TL;DR
Network Foundation Models (NFMs) are rapidly emerging as general-purpose backbones for network traffic analysis, but evaluating them solely on downstream classification tasks conceals what they actually learn. This paper introduces an intrinsic evaluation framework that inspects the geometry, domain-feature alignment, and causal sensitivity of NFM embeddings. The authors show that state-of-the-art NFMs suffer from severe representation collapse (anisotropy), over-rely on payload bytes that are typically encrypted in production, and struggle to internalize high-level network conditions.
What Problem Does This Paper Address?
Traditional machine learning models for computer networking frequently fail when moved to production due to distribution shifts, protocol variations, and data collection biases. NFMs pre-trained on raw packets using self-supervised objectives (such as masked token prediction or autoencoding) promise better generalization.
However, prior research evaluates NFMs almost entirely through downstream fine-tuning benchmarks (e.g., malware or application classification accuracy). Downstream task metrics fail to answer crucial questions:
- Do models understand actual network protocols, or are they exploiting dataset-specific shortcuts?
- Do learned representations implicitly capture classical domain-expert metrics (like flow duration and TCP dynamics)?
- How do models react to changes in network conditions (like congestion control or active queue management)?
Without intrinsic evaluation of the pre-trained latent space, practitioners cannot diagnose model failures, compare architectures objectively, or understand what representations encode before deploying them.
Methods
The authors propose an intrinsic evaluation framework that inspects frozen NFM embeddings across three complementary pillars:
[Network Traffic] ──> [Frozen NFM] ──> [Embeddings]
│
┌────────────────────────────────────────┼──────────────────────────────────┐
▼ ▼ ▼
I. Embedding Geometry II. Metric Alignment III. Causal Sensitivity
• Anisotropy (Mean Cosine) • Centered Kernel Alignment • Protocol perturbations
• Mean Cosine Contribution (MCC) (CKA) with domain metrics (SEQ/ACK, TTL, flags)
• Isotropification gain (decorr.) (CICFlowMeter features) • Context shifts (NetReplica)
- Embedding Geometry Analysis: Quantifies how well embeddings populate the latent space using anisotropy (mean pairwise cosine similarity across flows) and Mean Cosine Contribution (MCC) to detect whether representation variance is hijacked by a handful of dominant dimensions. They also test isotropification gain—measuring classification improvements when raw embeddings are mathematically decorrelated.
- Metric Alignment Assessment: Uses Centered Kernel Alignment (CKA) to measure linear and non-linear correspondence between NFM embeddings and dozens of classical, expert-engineered statistical features extracted by
CICFlowMeter(e.g., inter-arrival times, window sizes, byte volumes). - Causal Sensitivity Testing:
- Protocol Perturbations: Systematically mutates valid protocol header fields (IP TTL, TCP window, flags, SEQ/ACK) and payload bytes, measuring embedding drift via cosine similarity.
- Exogenous Network Context: Uses the NetReplica network emulator to generate flows under controlled environmental variations—varying congestion control algorithms (CUBIC vs. BBR), Active Queue Management (FIFO vs. CoDel), and cross-traffic burstiness—evaluating whether these unobserved contexts form linearly separable clusters in the embedding space.
Datasets
The authors evaluated four prominent pre-trained NFMs (ET-BERT, netFound, YaTC, and NetMamba) across a diverse suite of benchmarks:
- Controlled / Labeled Datasets: Android Crossmarket (~66k mobile flows), CIC-IDS2017 (intrusion detection benchmark, 2.8M flows), and CIC-APT-IIoT24 (advanced persistent threats in IIoT, 3.7M flows).
- Real-World Backbone Datasets: CAIDA (1.5M backbone flows between Los Angeles and San Jose) and MAWI (1M transit flows from a Tokyo Internet Exchange Point).
- Synthetic Controllable Dataset: Custom traces generated via NetReplica spanning controlled combinations of congestion control algorithms, queue disciplines, and background cross-traffic profiles.
Key Insights and Ideas
- Severe Representation Collapse: Embeddings from existing NFMs cluster into extremely narrow cones in latent space (mean cosine similarity of $0.86 \pm 0.09$). In NetMamba, representations collapse uniformly across all dimensions, while YaTC suffers from dimensional dominance (a single dimension drives 19–27% of cosine similarity).
- Payload Addiction in an Encrypted Era: When mutating transport/network headers, embeddings barely flinched (similarities often remained $\ge 0.98$). But perturbing payload bytes caused drastic shifts (cosine similarity dropped to 0.18 for YaTC and 0.48 for ET-BERT). Current models heavily overfit to payload patterns—a massive operational risk given modern payload encryption (TLS 1.3) and privacy redactions.
- Architecture Dictates Domain Knowledge: ET-BERT (payload-only) showed near-zero alignment with classical networking metrics (mean CKA: 0.029). By contrast,
netFound(which integrates multi-modal header, flow, and burst tokens) had the highest alignment (mean CKA: 0.143). - Real-World Reality Check: All models demonstrated significantly lower metric alignment on wild backbone traffic (CAIDA: 0.032, MAWI: 0.055) compared to controlled laboratory traffic (CIC-APT-IIoT24: 0.131), indicating that models struggle to preserve statistical semantics under production noise.
- High-Level Context is Mostly Invisible: While models could partially separate Active Queue Management policies (CoDel vs. FIFO), they were largely blind to congestion control algorithm changes (CUBIC vs. BBR), yielding linear probing $F_1$ scores barely above random chance.
Key Results
- Isotropification Performance Boost: Applying an unsupervised decorrelation transformation to NetMamba’s frozen representations improved downstream linear-probe $F_1$ by +0.35 on Crossmarket, +0.11 on CIC-IDS2017, and +0.03 on CIC-APT-IIoT24 without changing model weights or fine-tuning the backbone.
- Top Aligned Features: When models did capture network features, they prioritized initial handshake dynamics and volume: YaTC strongly aligned with Fwd Seg Size Min (CKA: 0.423), while netFound captured FWD Init Win Bytes (0.385) and Packet Length Max (0.372).
- Context Linear Probing: On synthetic emulator traces, linear probes trained on netFound embeddings distinguished AQM policies with an $F_1$ of 0.93 (and 0.97 across all environment shifts), outperforming other architectures (NetMamba achieved 0.70 for AQM, while ET-BERT managed only 0.68).
Limitations and Future Work
- Loss Function Pitfalls: Cosine similarity metrics can provide misleading representations if the evaluated model was pre-trained using cosine-based objectives.
- Scope of Explored Architectures: The framework was tested on four frozen models; expanding to newer hybrid state-space and generative architectures remains future work.
- Dataset Biases: Public network datasets carry documented collection artifacts and labeling noise that can affect representation fidelity.
- Future Directions: Developing pre-training tasks that explicitly enforce isotropy, reduce payload reliance, and encourage awareness of transport-layer and link-layer dynamics.
Summary updated