Computer Science ›› 2026, Vol. 53 ›› Issue (3): 443-452.doi: 10.11896/jsjkx.241200167

• Information Security • Previous Articles     Next Articles

Transformer-based Domain Adaptation Method for IoT Traffic Intrusion Detection

ZHU Feng1, YE Zongguo1, LI Peng1,2, XU He1,2   

  1. 1 College of Computer Science, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
    2 Jiangsu High Technology Research Key Laboratory for Wireless Sensor Networks, Nanjing 210023, China
  • Received:2024-12-23 Revised:2025-03-07 Published:2026-03-12
  • About author:ZHU Feng,born in 1987,Ph.D,assistant professor,master supervisor.His main research interests include cyberspace security,Internet of Things security and operating system security.
    LI Peng,born in 1979,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.48573M).His main research interests include computer communication networks,clouding computing and information security.
  • Supported by:
    National Natural Science Foundation of China(61902196,62102196),Scientific and Technological Support Project of Jiangsu Province(BE2019740) and Six Talent Peaks Project of Jiangsu Province(RJFW-111).

Abstract: With the proliferation of IoT devices,intrusion detection systems(IDS) are essential to safeguard IoT networks from malicious attacks.However,the scarcity of IoT-specific data limits the effectiveness of traditional methods,while existing domain adaptation approaches often rely on coarse alignment,overlooking intrinsic semantic properties and lowering feature discriminabi-lity.To address these issues,this paper proposes a semi-supervised domain adaptation model,named TDAIID.This model aligns NI domain and II domain at domain,class,and sample levels.The cross-attention mechanism ensures fine-grained feature alignment by focusing on similarities between same-class samples in the source and target domains.Multiple geometric semantic alignment is semantically aligned from both domain-level and class-level perspectives,facilitating the cross-attention mechanism in learning richer and more accurate knowledge from the source NI domain.To fully exploit unlabeled target data,a dynamic center-aware pseudo-labeling algorithm is proposed to improve pseudo-label accuracy and mitigate negative transfer caused by mislabe-ling.Experiments on several widely-used intrusion detection datasets demonstrate that the TDAIID model outperforms state-of-the-art baseline methods,showcasing its superior performance on IoT intrusion detection.

Key words: Domain adaptation, Internet of Things, Intrusion detection, Cross-attention, Transfer learning

CLC Number: 

  • TP391
[1]LU Z,XU H,PAN J.Study on Intrusion Detection in IoTs Environment Based on GAN&CNN[J].Chinese Journal of Sensors and Actuators,2025,38(10):1853-1861.
[2]ZHAO J,JIANG W.IoT Intrusion Detection Model Integrating Improved TCN and DRSN[J].Journal of Chinese Computer Systems,2025,46(2):474-481.
[3]XIE Y,LIU L.RFLE Algorithm Based on the Internet ofThings Intrusion Detection Model[J].Journal of Air & Space Early Warning Research,2025,39(3):203-208.
[4]ELHADJ B,THOMAS W,WALAA H.A Critical Review ofPractices and Challenges in Intrusion Detection Systems for IoT:Toward Universal and Resilient Systems[J].IEEE Communications Surveys & Tutorials,2018,20(4):3496-3509.
[5]PAN S,YANG Q.A Survey on Transfer Learning[J].IEEE Transactions on Knowledge and Data Engineering,2010,22(10):1345-1359.
[6]ZHUANG D,QI Z,DUAN K,et al.A Comprehensive Survey on Transfer Learning[J].Proceedings of the IEEE,2021,109(1):43-76.
[7]LY V,QUANG U N,DIEP N N,et al.Deep Transfer Learning for IoT Attack Detection[J],IEEE Access,2020,8:107335-107344.
[8]PENG Y,CHEN X,CHEN S,et al.Cross-Domain Anomalous Traffic Detection Based on Transfer Learning[J].Journal of Beijing University of Posts and Telecommunications.2021,44(2):33-39.
[9]CHRISTIAN D,RAPHAEL L C,JESSICA S,et al.IoT-Botnet Detection and Isolation by Access Routers[C]//9th Internatio-nal Conference on the Network of the Future.2018:88-95.
[10]DOUGLAS H S,KENNETH M Z,CHEN Y.Ultra-lightweight Deep Packet Anomaly Detection for Internet of Things Devices[C]//IEEE 34th International Performance Computing and Communications Conference.2015:1-8.
[11]VALERIAN R,PEDRO M S S,ALBERTO H C,et al.Federated Learning for Malware Detection in IoT Devices[J].Compu-ter Networks,2022,204:108693.
[12]MOJTABA E,ZAFFAR H J,MASSIMO V,et al.Passban IDS:An Intelligent Anomaly-based Intrusion Detection System for IoT Edge Devices[J].IEEE Internet of Things Journal,2020,7(8):6882-6897.
[13]SARUMATHI M,ABBAS J.A Lightweight Intrusion Detection for Sybil Attack under Mobile RPL in the Internet of Things[J].IEEE Internet of Things Journal,2020,7(1):379-388.
[14]LI Z,XU C,DENG K,et al.A Subspace-based Few-shot Intrusion Detection System for the Internet of Things[J].Frontiers of Information Technology & Electronic Engineering,2025,26(6):862-876.
[15]XIE B,LI S,LYU F,et al.A Collaborative Alignment Framework of Transferable Knowledge Extraction for Unsupervised Domain Adaptation[J].IEEE Transactions on Knowledge and Data Engineering,2023,35(7):6518-6533.
[16]YAO Y,ZHANG Y,LI X,et al.Discriminative DistributionAlignment:A Unified Framework for Heterogeneous Domain Adaptation[J].Pattern Recognition,2020,101:107165.
[17]NING J,GUAN G,WANG Y,et al.Malware Traffic Classification Using Domain Adaptation and Ladder Network for Secure Industrial Internet of Things[J].IEEE Internet of Things Journal,2022,9(18):17058-17069.
[18]HU X,ZHU C,CHENG G,et al.A Deep Subdomain AdaptationNetwork with Attention Mechanism for Malware Variant Traffic Identification at an IoT Edge Gateway[J].IEEE Internet of Things Journal,2022,10(5):3814-3826.
[19]WU J,WANG Y,DAI H,et al.Adaptive Bi-Recommendationand Self-Improving Network for Heterogeneous Domain Adaptation-Assisted IoT Intrusion Detection[J].IEEE Internet of Things Journal,2023,10(15):13205-13220.
[20]LIAM D M,SIAMAK L,WAI W L,et al.FlowTransformer:A Transformer Framework for Flow-based Network Intrusion Detection Systems[J].Expert Systems with Applications,2023,241:122564.
[21]LI X,HOU Y,WANG P,et al.Trear:Transformer-Based RGB-D Egocentric Action Recognition[J].IEEE Transactions on Cognitive and Developmental Systems,2022,14(1):246-252.
[22]HU R,AMANPREET S.UniT:Multimodal Multitask Learning with a Unified Transformer[C]//2021 IEEE/CVF International Conference on Computer Vision.2021:1419-1429.
[23]BHARATH B D,BENJAMIN K,RÉMI F,et al.DeepJDOT:Deep Joint Distribution Optimal Transport for Unsupervised Domain Adaptation[C]//15th European Conference on Compu-ter Vision.2018:467-483.
[24]WU J,WANG Y,XIE B,et al.Joint Semantic Transfer Network for IoT Intrusion Detection[J].IEEE Internet of Things Journal,2023,10(4):3368-3383.
[25]NOUR M,JILL S.UNSW-NB15:A Comprehensive Data Set for Network Intrusion Detection Systems(UNSW-NB15 Network Data Set)[C]//2015 Military Communications and Information Systems Conference.2015:1-6.
[26]IMANS,ARASH H L,GHORBANI A,et al.Toward Generating a New Intrusion Detection Dataset and Intrusion Traffic Characterization[C]//4th International Conference on Information Systems Security and Privacy.2018:108-116.
[27]NICKOLAOS K,NOUR M,ELENA S,et al.Towards the Development of Realistic Botnet Dataset in the Internet of Things for Network Forensic Analytics:Bot-IoT Dataset[J].Future Generation Computer Systems,2019,100:779-796.
[28]BOOIJ T M,IRINA C,ERIK M,et al.ToN_IoT:The Role of Heterogeneity and the Need for Standardization of Features and Attack Types in IoT Network Intrusion Data Sets[J].IEEE Internet of Things Journal,2022,9(1):485-496.
[29]MOHANAD S,SIAMAK L,MARIUS P.Towards a Standard Feature Set for Network Intrusion Detection System Datasets[J].Mobile Networks and Applications,2022,27:357-370.
[30]YAN Z,WU Y,LI G,et al.Multi-level Consistency Learning for Semi-supervised Domain Adaptation[C]//31th International Joint Conference on Artificial Intelligence.2022:1530-1536.
[31]YU Y,LIN H.Semi-Supervised Domain Adaptation with SourceLabel Adaptation[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:24100-24109.
[1] LI Zequn, DING Fei. Fatigue Driving Detection Based on Dual-branch Fusion and Segmented Domain AdaptationTransfer Learning [J]. Computer Science, 2026, 53(3): 78-87.
[2] WU Jiahao, PENG Li, YANG Jielong. Partial Domain Adaptation Based on Machine Unlearning [J]. Computer Science, 2026, 53(3): 173-180.
[3] YU Ding, LI Zhangwei. Prediction Method of RNA Secondary Structure Based on Transformer Architecture [J]. Computer Science, 2026, 53(3): 375-382.
[4] LI Ang, ZHANG Jieyuan, LIU Xunyun. Camouflaged Object Detection for Aerial Images Based on Bidirectional Cross-attentionCross-domain Fusion [J]. Computer Science, 2026, 53(1): 173-179.
[5] CHEN Xiu, ZHANG Xinyun, CHENG Yuting, CHEN Wei, HUANG Zhengxing, LIU Zhenyu, ZHANG Yuanpeng. Research Progress on Multi-domain Adaptation Problems in Clinical Data Modeling [J]. Computer Science, 2025, 52(9): 25-36.
[6] ZENG Lili, XIA Jianan, LI Shaowen, JING Maike, ZHAO Huihui, ZHOU Xuezhong. M2T-Net:Cross-task Transfer Learning Tongue Diagnosis Method Based on Multi-source Data [J]. Computer Science, 2025, 52(9): 47-53.
[7] SU Shiyu, YU Jiong, LI Shu, JIU Shicheng. Cross-domain Graph Anomaly Detection Via Dual Classification and Reconstruction [J]. Computer Science, 2025, 52(8): 374-384.
[8] ZHANG Taotao, XIE Jun, QIAO Pingjuan. Specific Emitter Identification Based on Progressive Self-training Open Set Domain Adaptation [J]. Computer Science, 2025, 52(7): 279-286.
[9] HUANG Bocheng, WANG Xiaolong, AN Guocheng, ZHANG Tao. Transmission Line Fault Identification Method Based on Transfer Learning and Improved YOLOv8s [J]. Computer Science, 2025, 52(6A): 240800044-8.
[10] LI Mingjie, HU Yi, YI Zhengming. Flame Image Enhancement with Few Samples Based on Style Weight Modulation Technique [J]. Computer Science, 2025, 52(6A): 240500129-7.
[11] CHEN Qirui, WANG Baohui, DAI Chencheng. Research on Electrocardiogram Classification and Recognition Algorithm Based on Transfer Learning [J]. Computer Science, 2025, 52(6A): 240900073-8.
[12] GONG Zian, GU Zhenghui, CHEN Di. Cross-subject Driver Fatigue Detection Based on Local and Global Feature Integrated Network [J]. Computer Science, 2025, 52(6): 200-210.
[13] TIAN Qing, KANG Lulu, ZHOU Liangyu. Class-incremental Source-free Domain Adaptation Based on Multi-prototype Replay andAlignment [J]. Computer Science, 2025, 52(3): 206-213.
[14] SUN Hongbin, WANG Su, WANG Zhiliang, JIANG Zheyu, YANG Jiahai, ZHANG Hui. Augmenter:Event-level Intrusion Detection Based on Data Provenance Graph [J]. Computer Science, 2025, 52(2): 344-352.
[15] HE Yuankang, MA Hailong, HU Tao, JIANG Yiming, ZHANG Peng, LIANG Hao. Traffic Adversarial Example Defense Based on Feature Transfer [J]. Computer Science, 2025, 52(2): 362-373.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!