Convolutions are Competitive with Transformers for Encrypted Traffic Classification with Pre-training
By: Chungang Lin , Weiyao Zhang , Tianyu Zuo and more
Potential Business Impact:
Helps computers understand internet traffic faster.
Encrypted traffic classification is vital for modern network management and security. To reduce reliance on handcrafted features and labeled data, recent methods focus on learning generic representations through pre-training on large-scale unlabeled data. However, current pre-trained models face two limitations originating from the adopted Transformer architecture: (1) Limited model efficiency due to the self-attention mechanism with quadratic complexity; (2) Unstable traffic scalability to longer byte sequences, as the explicit positional encodings fail to generalize to input lengths not seen during pre-training. In this paper, we investigate whether convolutions, with linear complexity and implicit positional encoding, are competitive with Transformers in encrypted traffic classification with pre-training. We first conduct a systematic comparison, and observe that convolutions achieve higher efficiency and scalability, with lower classification performance. To address this trade-off, we propose NetConv, a novel pre-trained convolution model for encrypted traffic classification. NetConv employs stacked traffic convolution layers, which enhance the ability to capture localized byte-sequence patterns through window-wise byte scoring and sequence-wise byte gating. We design a continuous byte masking pre-training task to help NetConv learn protocol-specific patterns. Experimental results on four tasks demonstrate that NetConv improves average classification performance by 6.88% and model throughput by 7.41X over existing pre-trained models.
Similar Papers
Adversarial Pre-Padding: Generating Evasive Network Traffic Against Transformer-Based Classifiers
Cryptography and Security
Confuses smart computer programs about internet traffic.
Language of Network: A Generative Pre-trained Model for Encrypted Traffic Comprehension
Cryptography and Security
Finds hidden dangers in secret internet messages.
Joint Multi-scale Gated Transformer and Prior-guided Convolutional Network for Learned Image Compression
CV and Pattern Recognition
Makes pictures smaller with better quality.