用Mamba架构提升加密流量分类效率与准确率
NetMamba+: A Framework of Pre-trained Models for Efficient and Accurate Network Traffic Classification
- 融合Mamba与Flash Attention,提升模型计算效率
- 多模态表示保留关键字节特征,消除偏差,F1最高提升6.44%
- 适合资源受限场景,少样本学习能力强
随着加密网络流量的快速增长,有效的流量分类对网络安全和服务质量管理至关重要。当前机器学习与深度学习方法在流量分类中面临三大挑战:Transformer架构计算效率低、传统表示丢失关键字节级特征并引入冗余偏差、难以处理真实数据中的长尾分布。本文提出NetMamba+框架,通过三项创新解决上述问题:(1) 结合Mamba与Flash Attention机制的高效架构;(2) 多模态流量表示方案,保留关键信息同时消除偏差;(3) 基于标签分布感知的微调策略。在涵盖四大主要分类任务的大规模数据集上评估显示,NetMamba+相比最先进基线在F1分数上最高提升6.44%。此外,其推理吞吐量达到最佳基线的1.7倍,内存占用相当,且具备优异的少样本学习能力。我们还实现了一个在线分类系统,在真实环境中实现261.87 Mb/s的吞吐量。作为首个将Mamba架构应用于流量分类的框架,NetMamba+为复杂网络环境下的高效精准分析提供了新路径。
原文摘要 · Abstract (English)
With the rapid growth of encrypted network traffic, effective traffic classification has become essential for network security and quality of service management. Current machine learning and deep learning approaches for traffic classification face three critical challenges: computational inefficiency of Transformer architectures, inadequate traffic representations with loss of crucial byte-level features while retaining detrimental biases, and poor handling of long-tail distributions in real-world data. We propose NetMamba+, a framework that addresses these challenges through three key innovations: (1) an efficient architecture considering Mamba and Flash Attention mechanisms, (2) a multimodal traffic representation scheme that preserves essential traffic information while eliminating biases, and (3) a label distribution-aware fine-tuning strategy. Evaluation experiments on massive datasets encompassing four main classification tasks showcase NetMamba+'s superior classification performance compared to state-of-the-art baselines, with improvements of up to 6.44\% in F1 score. Moreover, NetMamba+ demonstrates excellent efficiency, achieving 1.7x higher inference throughput than the best baseline while maintaining comparably low memory usage. Furthermore, NetMamba+ exhibits superior few-shot learning abilities, achieving better classification performance with fewer labeled data. Additionally, we implement an online traffic classification system that demonstrates robust real-world performance with a throughput of 261.87 Mb/s. As the first framework to adapt Mamba architecture for network traffic classification, NetMamba+ opens new possibilities for efficient and accurate traffic analysis in complex network environments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。