用LSTM和KDE生成数据,结合新嵌入方法提升网络流量分类准确率
A Pipeline of Augmentation and Sequence Embedding for Classification of Imbalanced Network Traffic
- 用LSTM与KDE生成合成流量数据平衡样本
- 提出FS-Embedding,将端口方向当作‘词’建模,提升特征表达
- 相比传统方法,模型参数更少、收敛更快,适合小样本流量分类
网络流量分类(NTC)是网络管理的关键任务,但互联网流量类别严重不均衡,如HTTP流量远多于其他应用,导致模型对少数类表现差。为此,本文提出一个数据增强与序列嵌入的流水线:首先使用长短期记忆网络(LSTM)和核密度估计(KDE)生成人工流量数据以平衡数据集;其次提出基于“流即句子”视角的新型嵌入框架FS-Embedding,将源/目的端口及包方向视为一个“词”,在分类任务中学习嵌入向量空间;最后对比了该流水线与卷积循环神经网络(CRNN)和Transformer在原始不平衡数据、采样数据及传统独热编码下的性能。实验表明,该方法在保持准确率不变的前提下,显著降低模型参数量并加快收敛速度。
原文摘要 · Abstract (English)
Network Traffic Classification (NTC) is one of the most important tasks in network management. The imbalanced nature of classes on the internet presents a critical challenge in classification tasks. For example, some classes of applications are much more prevalent than others, such as HTTP. As a result, machine learning classification models do not perform well on those classes with fewer data. To address this problem, we propose a pipeline to balance the dataset and classify it using a robust and accurate embedding technique. First, we generate artificial data using Long Short-Term Memory (LSTM) networks and Kernel Density Estimation (KDE). Next, we propose replacing one-hot encoding for categorical features with a novel embedding framework based on the "Flow as a Sentence" perspective, which we name FS-Embedding. This framework treats the source and destination ports, along with the packet's direction, as one word in a flow, then trains an embedding vector space based on these new features through the learning classification task. Finally, we compare our pipeline with the training of a Convolutional Recurrent Neural Network (CRNN) and Transformers, both with imbalanced and sampled datasets, as well as with the one-hot encoding approach. We demonstrate that the proposed augmentation pipeline, combined with FS-Embedding, increases convergence speed and leads to a significant reduction in the number of model parameters, all while maintaining the same performance in terms of accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。