LoFi

Low-cost early application filter based on cached ML decisions

LoFi

Overview

LoFi is a hybrid early application filter for traffic analysis pipelines. It combines the low overhead of pattern-matching filters with the flexibility of ML-based classification by using ML sparingly: most flows are handled by a fast “short-circuit” path that relies on cached ML decisions, and the ML pipeline is invoked only for flows the cache cannot classify.

The Problem

As traffic volumes and the complexity of analysis tasks grow, traffic analysis pipelines need to filter out irrelevant traffic early. Existing filtering approaches each fall short:

  • Static filters based on ports or IP addresses are fast but brittle, as services run over HTTPS and frequently change IP assignments through CDNs
  • Dynamic filters based on DNS queries or the TLS SNI depend on plaintext protocol information that encryption continues to remove
  • ML-based filters can classify encrypted traffic, but applying a model to every flow at high speed introduces significant computational overhead

What LoFi Does

  1. Pattern Matching: Checks each packet against a flow cache of accepted and rejected flows (indexed by five-tuple) and a cache of destination IP addresses associated with the target service
  2. Short-Circuit: If a cached decision applies, the flow is accepted or dropped without further analysis
  3. Model Inference: Otherwise, packets are gathered per flow until the model has enough input, features are extracted, and the model makes a binary accept/reject decision
  4. Cache Population: The decision is applied to the flow and written back to the caches, so that later flows can take the short-circuit path

Key Features

  • Parsimonious ML: Invokes the model only when simpler methods fail
  • Self-Updating Caches: ML decisions continually populate the IP cache; least-recently-used eviction and time-based expiration keep it current as IP assignments change
  • Model-Agnostic: Models are loaded through ONNX and declare the input features and number of packets they need
  • Multiple Input Representations: Supports flow statistics, raw packet bytes, and nPrint

Results

  • Packet loss reduced from 38.33% to 1.17% relative to an ML-only configuration, on a CAIDA trace using two CPU cores
  • Lower per-packet cost: Pattern matching has a lower processing cost than both the ML path and TLS SNI inspection
  • Moderate overhead: Filtering on cached IP addresses admits a moderate amount of extraneous traffic, due to IP address sharing among services

Resources

  • Paper: IEEE International Conference on Network Softwarization (NetSoft), 2026
  • Cruise Control: Dynamic model selection for ML-based network traffic analysis

Citation

@inproceedings{hugon2026lofi,
  title={LoFi: Low-Cost Early Application Filter Based on Cached ML Decisions},
  author={Hugon, Johann and Liu, Shinan and Schmitt, Paul and Feamster, Nick and Bronzino, Francesco},
  booktitle={IEEE International Conference on Network Softwarization (NetSoft)},
  year={2026}
}