TL;DR
Nepco is a novel network traffic analysis system that bridges the gap between versatile foundation models and high-efficiency hardware offloading. By replacing heavy, host-bound Transformers with a hardware-friendly, localized convolution architecture deployed directly on a SmartNIC, Nepco achieves state-of-the-art classification accuracy while slashing end-to-end latency by 328× down to the millisecond scale.
What Problem Does This Paper Address?
Modern network traffic analysis faces two conflicting pressures: pervasive encryption and ultra-low latency requirements.
Because over 95% of traffic is now encrypted, obtaining large-scale labeled datasets for training is incredibly difficult. To combat this, researchers have turned to Network Foundation Models (like ET-BERT). These models pre-train on massive amounts of unlabeled traffic to learn general representations, meaning they can adapt to new security tasks with very few labels (high versatility). However, they rely on heavy Transformer architectures, making them slow and forcing them to run on host CPUs/GPUs.
Conversely, to achieve the sub-second latencies required to block threats before damage occurs, engineers use Hardware Offloading to run lightweight models (like decision trees) directly on programmable switches or SmartNICs. Unfortunately, these models rely on coarse statistical features, generalize poorly, and require massive amounts of labeled data (high efficiency, low versatility).
The authors identify that this trade-off isn't fundamental, but rather a consequence of polarized design choices across traffic processing, model architecture, and execution environments.
Methods
The authors introduce Nepco, a system co-designed across three pillars to achieve both versatility and efficiency:
- Encoding-Free Early-Stage Traffic Processing: Instead of using computationally expensive tokenizers (like byte-pair encoding), Nepco directly embeds raw packet byte sequences using hardware table lookups. To ensure the model learns true traffic semantics rather than cheating, it zeroes out address-related protocol fields (MAC, IP, ports) and concatenates the first 5 packets of a flow.
- Localized Pattern-Aware Traffic Modeling: While Transformers use global self-attention ($O(n^2)$ complexity), Nepco exploits the insight that discriminative network features are highly localized. It uses depth-wise convolutions ($O(n)$ complexity) enhanced by two novel mechanisms: window-wise byte scoring (to emphasize important bytes inside a sliding window) and sequence-wise byte gating (to selectively suppress uninformative bytes across the full sequence). It is pre-trained using a continuous byte masking strategy.
- SmartNIC Native Collaborative Execution: Nepco is prototyped entirely on an NVIDIA BlueField-3 SmartNIC. It splits the workload: the NIC hardware filters out later-stage packets of already-analyzed flows at line rate, while the onboard ARM SoC cores handle input construction and model inference (via ONNX Runtime) in parallel.
Datasets
The authors rigorously separated their datasets to prevent temporal and shortcut bias:
- Pre-training: Bottlenet-HTTPS and ISCX-SlowDoS (collected in 2016, totaling over 786,000 flows).
- Fine-tuning & Evaluation: Evaluated across six public datasets spanning three distinct security tasks:
- Malware Analysis: USTC-TFC
- Application Fingerprinting: ISCX-VPN-App, ISCX-VPN-Service, and DataCon
- Intrusion Detection: CIC-EVSE (EV charging stations) and CIC-IoMT (Internet of Medical Things)
Key Insights and Ideas
- Traffic Information is Localized, Not Global: Byte-level attribution analysis revealed that the "signatures" distinguishing different types of traffic are tightly concentrated within specific protocol fields. This makes global attention mechanisms (Transformers) an overkill; localized convolutions are structurally a better fit.
- The Danger of Address Leakage: The authors proved that leaving IP or MAC addresses in the training data causes severe "shortcut learning." Models trained with address fields see an artificial performance boost but collapse (Macro F1 drops by up to 44.67%) if those addresses are randomized at test time. Zeroing them out is mandatory for real-world generalization.
- Early-Stage Sufficiency: Analyzing just the first 5 packets provides enough fine-grained semantic information for accurate classification, allowing later-stage packets to be dropped by the NIC to save SoC compute cycles.
Key Results
- Versatility: Nepco achieved a Macro F1 score competitive with 8 state-of-the-art Transformer-based foundation models. Remarkably, when trained on just 1% of labeled data, Nepco outperformed traditional hardware-offloadable models trained on 100% of the labels.
- Efficiency & Latency: Deployed on the BlueField-3 SmartNIC, Nepco maintained a stable end-to-end analysis latency of 2.23 to 2.47 milliseconds, even under high network loads (5,000 New Flows Per Second). This represents a 328× latency reduction compared to native deployments of existing network foundation models.
Limitations and Future Work
- Pre-training Scale: To prevent temporal bias, the authors restricted their pre-training data to corpora that predated the evaluation data, resulting in a moderate pre-training scale. They note that scaling up to Terabyte-scale pre-training is a promising direction to further boost versatility.
- Hardware Portability: While the design principles of Nepco (table lookups, parallel element-wise gating) are inherently hardware-friendly, the current prototype is tied to the NVIDIA BlueField-3 ecosystem. Future work includes adapting the architecture to more constrained primitives like P4 programmable switches and FPGAs.
Summary updated