Abstract
As adversaries increasingly weaponize encryption and protocol obfuscation to evade traffic detection, traditional methods are rendered obsolete, necessitating deep learning to unmask sophisticated threats. However, the prohibitive computational costs of existing large models create a critical defense gap, hindering their deployment in real-time and throughput-sensitive environments. To close this vulnerability, we introduce Traffic-MoE, a sparse foundation model tailored for traffic security analysis. By dynamically routing traffic tokens to a small subset of specialized experts, Traffic-MoE effectively decouples model capacity from computational overhead. Extensive evaluations across four security-oriented tasks demonstrate that Traffic-MoE achieves state-of-the-art or highly competitive performance compared to leading competitors. Crucially, it delivers a 70.42% increase in throughput, reduces inference latency by 41.39% while significantly optimizing GPU memory consumption. Beyond efficiency, Traffic-MoE exhibits superior robustness against adversarial traffic shaping and maintains strong detection capabilities in few-shot scenarios, establishing a scalable and resilient paradigm for modern network traffic security analysis.