Abstract
While Deep Learning (DL) technologies are a promising tool to solve networking problems that map to classification tasks, their computational complexity is still too high with respect to real-time traffic measurements requirements. To reduce the DL inference cost, we propose a novel caching paradigm, that we named approximate-key caching, which returns approximate results for lookups of selected input based on cached DL inference results. While approximate cache hits alleviate DL inference workload and increase the system throughput, they however introduce an approximation error. As such, we couple approximate-key caching with an error-correction principled algorithm, that we named auto-refresh. We analytically model our caching system performance for classic LRU and ideal caches, we perform a trace-driven evaluation of the expected performance, and we compare the benefits of our proposed approach with the state-of-the-art similarity caching -- testifying the practical interest of our proposal.
Introduction
Deep Learning (DL) has emerged as a powerful solution for complex networking tasks, such as traffic classification. However, the "inference bottleneck" remains a significant hurdle. Executing a sophisticated DL model for every packet or flow in real-time is often computationally prohibitive for high-speed network infrastructures. Traditional caching strategies, while effective in other domains, fall short here. Exact caching suffers from low hit rates due to the vastness of the input space, while similarity caching introduces significant computational overhead for nearest-neighbor searches and lacks robust error control.
Rethinking Caching: Approximate-Key Caching
To address these limitations, we introduce approximate-key caching. Unlike similarity caching, which attempts to find the closest match in a high-dimensional space, our approach transforms the input $x$ into a simplified "approximate key" $x'$ using a function $APPROX(x)$. This allows for a standard, high-speed exact match lookup in the cache.
As illustrated in Figure 1, approximate-key caching (d) maps multiple inputs to a single cache key, significantly increasing the hit rate compared to exact caching (b). Crucially, it avoids the expensive pair-wise distance calculations required by similarity caching (c), turning a geometric search into a simple hash table operation.
Error Control via Auto-Refresh
Approximation inherently introduces the risk of classification errors. To mitigate this, we propose the auto-refresh mechanism. This system does not treat cache hits as final; instead, it periodically triggers the full DL inference model to verify the cached result.
The verification frequency is self-tuning:
- Confidence Building: If the DL model confirms the cached result, the system increases the interval before the next check using an exponential back-off parameter ($\beta$).
- Error Correction: If a mismatch is detected, the cache entry is immediately updated with the correct label, and the verification timer is reset.
This mechanism ensures that "dominant classes" (keys that consistently map to one label) are served quickly with few inferences, while "noisy" keys are monitored more closely.
Experimental Evaluation
We evaluated our approach using a large-scale traffic classification dataset containing over 1 million TCP flows. We tested various approximation functions, such as prefix_n (taking the first $n$ packets) and quantize_n (reducing value precision).
The results, summarized in Figure 4, demonstrate the effectiveness of the approach. Simple functions like prefix_10 provide an excellent balance, significantly reducing the miss rate compared to the identity (exact) mapping while maintaining low error rates.
Key Findings:
- Throughput: Approximate-key lookups are 2 to 5 orders of magnitude faster than state-of-the-art similarity caching methods like BallTrees or Locality Sensitive Hashing (LSH).
- Inference Reduction: The method can halve the number of required DL inferences by boosting cache hit rates.
- Accuracy: The auto-refresh mechanism maintains error rates below 2% in many configurations, a stark contrast to similarity caching which can reach error rates of 65% without such controls.
Conclusion
Approximate-key caching, coupled with an auto-refresh error-correction mechanism, provides a scalable and efficient way to deploy Deep Learning in high-speed networking environments. By replacing complex similarity searches with fast exact matches on transformed keys, we achieve significant speedups and reduced computational load without sacrificing classification accuracy. Future work will explore dynamic parameter tuning and direct hardware implementation in programmable data planes.
Summary updated