Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2026, Vol. 60 Issue (3): 624-632    DOI: 10.3785/j.issn.1008-973X.2026.03.018
    
Method for detecting unknown IoT attack based on relational embedding
Zhihui LI1,2(),Kun DENG1,*(),Congyuan XU1,3
1. College of Information and Engineering, Jiaxing University, Jiaxing 314001, China
2. School of Information Science and Engineering (School of Cyber Science and Technology), Zhejiang Sci-Tech University, Hangzhou 310018, China
3. School of Electrical and Information Engineering, Tianjin University, Tianjin 300072, China
Download: HTML     PDF(975KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A few-shot IoT intrusion detection method combining wavelet transform with relational embedding was proposed in order to address the challenge of accurately detecting unknown attack categories in traditional deep learning approaches. Wavelet transform was utilized to enhance the backbone network’s ability to capture global information. A relational embedding-based few-shot algorithm was employed to calculate sample relation vectors. Classification was performed through cosine similarity functions. Experimental validation was conducted on public dataset CICIOT2023 and BotIoT to demonstrate the capability of method in detecting unknown attack categories. Detection accuracies of 93.5% and 99.3% were achieved under 5-way 5-shot settings, while 93.12% and 99.33% accuracies were obtained in 5-way 10-shot configurations.



Key wordsfew-shot      wavelet transform      relational embedding      intrusion detection      Internet of Thing (IoT)     
Received: 14 March 2025      Published: 04 February 2026
CLC:  TP 393  
Fund:  国家自然科学基金资助项目(62302197);浙江省自然科学基金资助项目(LQ23F020006);嘉兴市科技计划资助项目(2024AY40010);中国博士后科学基金资助项目(2024M752366).
Corresponding Authors: Kun DENG     E-mail: lzs1902@163.com;dengkun@hrbeu.edu.cn
Cite this article:

Zhihui LI,Kun DENG,Congyuan XU. Method for detecting unknown IoT attack based on relational embedding. Journal of ZheJiang University (Engineering Science), 2026, 60(3): 624-632.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2026.03.018     OR     https://www.zjujournals.com/eng/Y2026/V60/I3/624


基于关系嵌入的物联网未知攻击检测方法

针对传统深度学习方法难以准确检测出未知类别攻击的问题,提出基于小波变换和关系嵌入的小样本物联网入侵检测方法. 该方法利用小波变换来增强主干网络对全局信息的捕捉能力,使用基于关系嵌入的小样本算法计算样本的关系向量,通过余弦相似度函数进行分类. 在公开数据集CICIOT2023和BotIoT上验证了所提方法对未知类别攻击检测的能力. 在5-way 5-shot设置下的检测准确率分别是93.5%和99.3%,在5-way 10-shot设置下的检测准确率分别是93.12%和99.33%.


关键词: 小样本,  小波变换,  关系嵌入,  入侵检测,  物联网(IoT) 
Fig.1 Overview of relational embedding method
Fig.2 Structure diagram of WTRN
Fig.3 Structure diagram of residual block
Fig.4 Structure diagram of WTConv
算法1 训练关系嵌入分类器
输入:任务$ T $
1 $ \theta \leftarrow $随机初始化
2 for t in {$ {T}_{1},\cdots ,{T}_{i} $} do
3  计算样本基本表示$ {{\boldsymbol{Z}}}_{{\boldsymbol{s}}} $$ {{\boldsymbol{Z}}}_{{\boldsymbol{q}}} $
4  通过$ \boldsymbol{F}=g\left(\boldsymbol{B}\right)+\boldsymbol{Z} $计算自相关表示$ {{\boldsymbol{F}}}_{{\boldsymbol{s}}} $$ {{\boldsymbol{F}}}_{{\boldsymbol{q}}} $
5  计算互相关张量$ {{\boldsymbol{A}}}_{{\boldsymbol{s}}} $$ {{\boldsymbol{A}}}_{{\boldsymbol{q}}} $
6  通过$ {{\boldsymbol{A}}}_{{\boldsymbol{s}}}、{{\boldsymbol{F}}}_{{\boldsymbol{s}}} $$ {{\boldsymbol{A}}}_{{\boldsymbol{q}}}、{{\boldsymbol{F}}}_{{\boldsymbol{q}}} $计算最终嵌入sq
7  通过L$ ={L}_{\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{h}\mathrm{o}\mathrm{r}}+\lambda {L}_{\mathrm{m}\mathrm{e}\mathrm{t}\mathrm{r}\mathrm{i}\mathrm{c}} $计算损失函数
8  通过$ \nabla L $更新$ \theta $
9 end for
 
Fig.5 Structural diagram of self-correlation module and cross-correlation module
Fig.6 Detection result of unknown attack on CICIOT2023 dataset
Fig.7 Detection result of unknown attack on BotIoT dataset
方法实验设置Ac/%
DNNN/A14.24
CNNN/A15.09
Swin_transformer5-way 5-shot91.13
Swin_transformer5-way 10-shot91.96
原型网络5-way 5-shot92.58
原型网络5-way 10-shot92.52
本文方法5-way 5-shot93.50
本文方法5-way 10-shot93.12
Tab.1 Result of comparison with deep learning method on CICIOT2023 dataset
数据集方法实验设置Ac /%
CICIOT2023Baseline5-way 5-shot91.82
Baseline5-way 10-shot92.62
+ WTConv5-way 5-shot93.50
+ WTConv5-way 10-shot93.12
BotIoTBaseline5-way 5-shot98.56
Baseline5-way 10-shot98.73
+ WTConv5-way 5-shot99.30
+ WTConv5-way 10-shot99.33
Tab.2 Ablation study of proposed method
方法数据集物联网数据集实验设置Ac/%UTRS
LNN[24]BotIoTYN/A96.150.0003
L2F+MAML[9]CICIDS2017N2-way 10-shot94.6610.00
MAML+CNN[8]FSIDSIOTY5-way 5-shot89.6428.91
MAML+CNN[8]FSIDSIOTY5-way 10-shot92.1918.16
IPN-IDS[23]CICIDS2017N5-way 5-shot84.9425.57
IPN-IDS [23]CICIDS2017N5-way 10-shot86.3515.21
CIDIOT[25]CICIOT2023YN/A77.200.017
本文方法CICIDS2017N5-way 5-shot98.8231.41
本文方法CICIDS2017N5-way 10-shot98.8919.08
本文方法BotIoTY5-way 5-shot99.3034.89
本文方法BotIoTY5-way 10-shot99.3322.49
本文方法CICIOT2023Y5-way 5-shot93.5029.91
本文方法CICIOT2023Y5-way 10-shot93.1218.16
Tab.3 Comparative analysis between proposed method and related works
Fig.8 Impact of sample size on model detection accuracy and UTRS
[1]   DAI B, WANG Y, YE C, et al A novel method for extracting time series information of deformation area of a single landslide based on improved U-Net neural network[J]. Frontiers in Earth Science, 2021, 9: 785476
doi: 10.3389/feart.2021.785476
[2]   CHEN D, ZHANG F, ZHANG X Heterogeneous IoT intrusion detection based on fusion word embedding deep transfer learning[J]. IEEE Transactions on Industrial Informatics, 2023, 19 (8): 9183- 9193
doi: 10.1109/TII.2022.3227640
[3]   HE M S, HUANG Y M, WANG X L, et al A lightweight and efficient IoT intrusion detection method based on feature grouping[J]. IEEE Internet of Things Journal, 2024, 11 (2): 2935- 2949
doi: 10.1109/JIOT.2023.3294259
[4]   FINN C, ABBEEL P, LEVINE S. Model-agnostic meta-learning for fast adaptation of deep networks [C]//Proceedings of the International Conference on Machine Learning. New York: ACM, 2017: 1126-1135.
[5]   ZHUANG F, QI Z, DUAN K, et al A comprehensive survey on transfer learning[J]. Proceedings of the IEEE, 2021, 109 (1): 43- 76
doi: 10.1109/JPROC.2020.3004555
[6]   WANG Y, XU C, LIU C, et al. Instance credibility inference for few-shot learning [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 12833–12842.
[7]   ZHAO L, LU J, XU Y, et al. Few-shot class-incremental learning via class-aware bilateral distillation [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 11838–11847.
[8]   LU C M, WANG X F, YANG A M, et al A few-shot-based model-agnostic meta-learning for intrusion detection in security of Internet of Things[J]. IEEE Internet of Things Journal, 2023, 10 (24): 21309- 21321
doi: 10.1109/JIOT.2023.3283408
[9]   SHI Z X, XING M Y, ZHANG J, et al. Few-shot network intrusion detection based on model-agnostic meta-learning with L2F method [C]//Proceedings of the IEEE Wireless Communications and Networking Conference. Glasgow: IEEE, 2023: 1–6.
[10]   YAN Y, YANG Y, GU Y, et al. A few-shot intrusion detection model for the Internet of Things [C]//Proceedings of the 3rd International Conference on Electronic Information Engineering and Computer Science. Changchun: IEEE, 2024: 531–537.
[11]   DU L, GU Z Q, WANG Y, et al A few-shot class-incremental learning method for network intrusion detection[J]. IEEE Transactions on Network and Service Management, 2024, 21 (2): 2389- 2401
doi: 10.1109/TNSM.2023.3332284
[12]   DI MONDA D, MONTIERI A, PERSICO V, et al Few-shot class-incremental learning for network intrusion detection systems[J]. IEEE Open Journal of the Communications Society, 2024, 5: 6736- 6757
doi: 10.1109/OJCOMS.2024.3481895
[13]   FINDER S E, AMOYAL R, TREISTER E, et al. Wavelet convolutions for large receptive fields [C]// Proceedings of the European Conference on Computer Vision. Madrid: Springer, 2024: 363–380.
[14]   KANG D, KWON H, MIN J, et al. Relational embedding for few-shot classification [C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. Montreal: IEEE, 2021: 8802–8813.
[15]   HE K, ZHANG X, REN S, et al. Deep residual learning for image recognition [C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770–778.
[16]   XU C, SHEN J, DU X A method of few-shot network intrusion detection based on meta-learning framework[J]. IEEE Transactions on Information Forensics and Security, 2020, 15: 3540- 3552
doi: 10.1109/TIFS.2020.2991876
[17]   YANG J C, LI H W, SHAO S, et al FS-IDS: a framework for intrusion detection based on few-shot learning[J]. Computers and Security, 2022, 122: 102899
doi: 10.1016/j.cose.2022.102899
[18]   SNELL J, SWERSKY K, ZEMEL R S. Prototypical networks for few-shot learning [C]//Proceedings of the Neural Information Processing Systems. Long Beach: [s. n. ], 2017: 4080-4090.
[19]   SIMON C, KONIUSZ P, NOCK R, et al. Adaptive subspaces for few-shot learning [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 4135–4144.
[20]   NETO E C P, DADKHAH S, FERREIRA R, et al CICIoT2023: a real-time dataset and benchmark for large-scale attacks in IoT environment[J]. Sensors, 2023, 23 (13): 5941
doi: 10.3390/s23135941
[21]   KORONIOTIS N, MOUSTAFA N, SITNIKOVA E, 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
doi: 10.1016/j.future.2019.05.041
[22]   DRAPER-GIL G, LASHKARI A H, MAMUN M S I, et al. Characterization of encrypted and VPN traffic using time-related features [C]//Proceedings of the 2nd International Conference on Information Systems Security and Privacy. Portugal: SciTEPress, 2016: 407-414.
[23]   WANG Y, ZHANG Z, ZHAO K, et al A few-shot learning based method for industrial Internet intrusion detection[J]. International Journal of Information Security, 2024, 23 (5): 3241- 3252
doi: 10.1007/s10207-024-00889-x
[24]   ZHAO R J, GUI G, XUE Z, et al A novel intrusion detection method based on lightweight neural network for internet of things[J]. IEEE Internet of Things Journal, 2021, 9 (12): 9960- 9972
[1] Jizhong DUAN,Haiyuan LI. Multi-scale parallel magnetic resonance imaging reconstruction based on variational model and Transformer[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(9): 1826-1837.
[2] Yue HOU,Tiantian WANG,Xin ZHANG,Jie YIN. Traffic flow forecasting with multi-resolution trend period decoupling interaction[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1362-1372.
[3] Rongtai YANG,Yubin SHAO,Qingzhi DU. Structure-aware model for few-shot knowledge completion[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1394-1402.
[4] Lihong WANG,Xinqian LIU,Jing LI,Zhiquan FENG. Network intrusion detection method based on federated learning and spatiotemporal feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1201-1210.
[5] Qincheng JIANG,Jianfeng TAO,Yangyang WANG,Yulei ZHANG,Chengliang LIU. EWT-LSTM based industrial robot joint anomaly detection[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(5): 982-994.
[6] Yan YANG,Cunpeng JIA. An efficient image dehazing algorithm with Agent Attention for domain feature interaction[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(12): 2527-2538.
[7] Bingyang ZHU,Jianfeng WU,Ke WANG,Zhangquan WANG,Banteng LIU. Sleep staging based on single-channel ECG signal and INFO-ABCLogitBoost model[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2547-2555.
[8] Ling-wei ZHANG,Zheng-dong ZHOU,Yun-fei XU,Jia-wen WANG,Wen-tao JI,Ze-feng SONG. Classification of imagined speech EEG signals based on feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 726-734.
[9] Hong-da CHENG,Hai-ming LUO,Qing-chao XIA,Can-jun YANG. Recognition of images for underwater vehicle based on improved γ-CLAHE algorithm[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(8): 1648-1655.
[10] Zhu-peng WEN,Jie CHEN,Lian-hua LIU,Ling-ling JIAO. Fault diagnosis of wind power gearbox based on wavelet transform and improved CNN[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(6): 1212-1219.
[11] Pei-zhi WEN,Jun-mou CHEN,Yan-nan XIAO,Ya-yuan WEN,Wen-ming HUANG. Underwater image enhancement algorithm based on GAN and multi-level wavelet CNN[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 213-224.
[12] Yun FEI,Tao MENG,Zhong-he JIN. Hierarchical fault detection for nano-pico satellite attitude control system[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(4): 824-832.
[13] ZHANG Cheng-zhi, FENG Hua-jun, XU Zhi-hai, LI Qi, CHEN Yue-ting. Piecewise noise variance estimation of images based on wavelet transform[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(9): 1804-1810.
[14] CHEN Xue-jun, YANG Yong-ming. De-noising for vibration signals of wind power generator using empirical wavelet transform[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(5): 988-995.
[15] XIANG Yi-qiang, JIA Ya-kun. Damage detection of hangers in arch bridges based on relative variation of wavelet total energy[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(5): 870-878.