用多实例注意力捕捉加密流量包间关系,提升分类准确率
MIETT: Multi-Instance Encrypted Traffic Transformer for Encrypted Traffic Classification
- 将每条流量中各数据包视为独立实例,通过两级注意力建模包与流的关系
- 在五个数据集上达到当前最优性能,尤其在复杂流量模式识别上表现突出
- 适合网络安全部署、流量分析系统研发人员参考使用
网络流量由网页浏览、文件传输等数据组成,以数据包(小数据单元)和流(两端间的数据包序列)形式组织。加密流量分类对检测安全威胁和优化网络管理至关重要。近年来,基础模型因其能利用大量无标签数据并具备强泛化能力而表现优异。然而,现有方法侧重于字符级关系建模,难以捕捉流量的宏观模式——因加密流量中的字符(十六进制序列)语义信息有限,真正关键的特征来自同一流内多个数据包间的交互行为。为此,本文提出多实例加密流量变压器(MIETT),将每个数据包视为代表整个流的“包袋”中的独立实例。通过两级注意力(TLA)层,有效建模字符级与包级关系,增强对复杂包动态和流模式的学习能力。进一步引入两项新预训练任务:包相对位置预测(PRPP)和流对比学习(FCL),强化模型对时间演化和流特性的理解。微调后,MIETT 在五个数据集上均达到最新最优(SOTA)结果,显著提升加密流量分类性能与对复杂网络行为的理解能力。代码已公开于 <https://github.com/Secilia-Cxy/MIETT>。
原文摘要 · Abstract (English)
Network traffic includes data transmitted across a network, such as web browsing and file transfers, and is organized into packets (small units of data) and flows (sequences of packets exchanged between two endpoints). Classifying encrypted traffic is essential for detecting security threats and optimizing network management. Recent advancements have highlighted the superiority of foundation models in this task, particularly for their ability to leverage large amounts of unlabeled data and demonstrate strong generalization to unseen data. However, existing methods that focus on token-level relationships fail to capture broader flow patterns, as tokens, defined as sequences of hexadecimal digits, typically carry limited semantic information in encrypted traffic. These flow patterns, which are crucial for traffic classification, arise from the interactions between packets within a flow, not just their internal structure. To address this limitation, we propose a Multi-Instance Encrypted Traffic Transformer (MIETT), which adopts a multi-instance approach where each packet is treated as a distinct instance within a larger bag representing the entire flow. This enables the model to capture both token-level and packet-level relationships more effectively through Two-Level Attention (TLA) layers, improving the model's ability to learn complex packet dynamics and flow patterns. We further enhance the model's understanding of temporal and flow-specific dynamics by introducing two novel pre-training tasks: Packet Relative Position Prediction (PRPP) and Flow Contrastive Learning (FCL). After fine-tuning, MIETT achieves state-of-the-art (SOTA) results across five datasets, demonstrating its effectiveness in classifying encrypted traffic and understanding complex network behaviors. Code is available at \url{https://github.com/Secilia-Cxy/MIETT}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。