One Train for Two Tasks: An Encrypted Traffic Classification Framework Using Supervised Contrastive Learning

📄 arXiv: 2402.07501v1 📥 PDF

作者: Haozhen Zhang, Xi Xiao, Le Yu, Qing Li, Zhen Ling, Ye Zhang

分类: cs.LG, cs.AI

发布日期: 2024-02-12

备注: The code is available at https://github.com/ViktorAxelsen/CLE-TFE

🔗 代码/项目: GITHUB


💡 一句话要点

提出CLE-TFE框架以解决加密流量分类问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 加密流量分类 对比学习 多任务学习 网络安全 时序融合 图数据增强

📋 核心要点

  1. 现有加密流量分类方法未能充分利用数据样本之间的共性特征,导致分类性能不佳。
  2. 本文提出CLE-TFE模型,通过监督对比学习和跨级多任务学习,提升数据包级和流级表示的有效性。
  3. 实验结果显示,CLE-TFE在两个分类任务上表现最佳,计算开销显著低于现有预训练模型。

📝 摘要(中文)

随着网络安全受到广泛关注,加密流量分类已成为当前研究的重点。然而,现有方法在进行流量分类时未能充分考虑数据样本之间的共性特征,导致性能不佳。此外,现有方法独立训练数据包级和流级分类任务,造成冗余。为此,本文提出了一种名为对比学习增强时序融合编码器(CLE-TFE)的有效模型,利用监督对比学习增强数据包级和流级表示,并通过字节级流量图进行图数据增强,以捕捉字节之间的细粒度语义不变特征。我们还提出了跨级多任务学习,能够在同一模型中同时完成数据包级和流级分类任务。实验表明,CLE-TFE在两个任务上均实现了最佳性能,其计算开销仅为预训练模型(如ET-BERT)的约1/14。

🔬 方法详解

问题定义:本文旨在解决加密流量分类中的性能不足问题,现有方法未能有效利用数据样本之间的共性特征,且独立训练数据包级和流级任务造成冗余。

核心思路:CLE-TFE模型通过监督对比学习增强数据包级和流级表示,同时采用跨级多任务学习策略,能够在单次训练中完成两个任务,从而提高效率和性能。

技术框架:CLE-TFE的整体架构包括数据预处理、对比学习模块、时序融合编码器和分类模块。数据预处理阶段进行字节级流量图的构建,随后通过对比学习模块提取特征,最后通过分类模块实现任务目标。

关键创新:最重要的创新点在于引入了监督对比学习和跨级多任务学习的结合,使得数据包级和流级任务可以共享学习到的特征,显著提升了分类性能。

关键设计:模型中采用了特定的损失函数以优化对比学习效果,网络结构设计上结合了时序信息和图结构,确保了特征提取的有效性和准确性。具体参数设置和网络层次结构在论文中详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,CLE-TFE在数据包级和流级分类任务上均实现了最佳性能,相较于ET-BERT等预训练模型,其计算开销仅为约1/14,显示出显著的效率提升。

🎯 应用场景

该研究的潜在应用领域包括网络安全监测、流量分析和入侵检测等。通过提升加密流量分类的准确性和效率,CLE-TFE模型能够帮助网络管理员更好地识别和应对潜在的安全威胁,具有重要的实际价值和未来影响。

📄 摘要(原文)

As network security receives widespread attention, encrypted traffic classification has become the current research focus. However, existing methods conduct traffic classification without sufficiently considering the common characteristics between data samples, leading to suboptimal performance. Moreover, they train the packet-level and flow-level classification tasks independently, which is redundant because the packet representations learned in the packet-level task can be exploited by the flow-level task. Therefore, in this paper, we propose an effective model named a Contrastive Learning Enhanced Temporal Fusion Encoder (CLE-TFE). In particular, we utilize supervised contrastive learning to enhance the packet-level and flow-level representations and perform graph data augmentation on the byte-level traffic graph so that the fine-grained semantic-invariant characteristics between bytes can be captured through contrastive learning. We also propose cross-level multi-task learning, which simultaneously accomplishes the packet-level and flow-level classification tasks in the same model with one training. Further experiments show that CLE-TFE achieves the best overall performance on the two tasks, while its computational overhead (i.e., floating point operations, FLOPs) is only about 1/14 of the pre-trained model (e.g., ET-BERT). We release the code at https://github.com/ViktorAxelsen/CLE-TFE