Abstract
As network data volumes continue to surge, traditional end-host machine learning (ML) processing has become a significant bottleneck. IIsy is a novel framework that enables commodity programmable switches to perform ML classification directly in the data plane at line rate. By translating models such as Random Forests, XGBoost, and SVMs into hardware-optimized lookup tables, IIsy achieves terabit-per-second throughput and microsecond latency. This paper details the architecture of IIsy, its unique table-based mapping strategy, and its performance across real-world network intrusion and financial datasets.
Introduction
The rapid expansion of data generation has outpaced the processing capabilities of traditional CPU/GPU-based end-hosts. In modern high-speed networks, moving every packet to a server for classification introduces unacceptable latency and creates massive throughput bottlenecks. While "in-network computing" offers a potential solution, running ML on standard switch Application-Specific Integrated Circuits (ASICs) is challenging. These devices are optimized for simple packet forwarding and lack the complex mathematical units, such as multipliers, required for most ML algorithms.
IIsy bridges this gap by providing a framework to run practical ML on unmodified, off-the-shelf programmable switches. It allows networks to perform critical tasks—such as filtering anomalies or tagging high-priority financial trades—directly within the data plane before the traffic even reaches a server.
The IIsy Framework
IIsy automates the translation of trained ML models from standard libraries (e.g., scikit-learn) into P4 code, the domain-specific language for programmable switches. The system architecture manages the workflow from offline training to online data plane execution, ensuring that ML logic is seamlessly integrated into the network pipeline.
The framework supports a wide array of models, including Decision Trees, Random Forests, XGBoost, SVMs, Naïve Bayes, and K-Means. To handle the strict memory and processing constraints of switch hardware, IIsy employs several key strategies:
- Resource Sharing: For ensemble models, feature lookup tables are shared across multiple trees to minimize the SRAM footprint.
- Hybrid Deployment: A "confidence-based" approach uses a small, fast model on the switch for the majority of traffic. Packets resulting in low-confidence classifications are forwarded to a full-sized backend model for a "second opinion."
- Deep Feature Extraction: IIsy enables switches to extract features from both packet headers and deep within the payload, which is critical for effective classification.
Technical Implementation: Table-Based Mapping
The core innovation of IIsy is its ability to perform classification without complex mathematical operations. Instead, it maps model logic into a series of match-action lookup tables.
As shown in the mapping logic, for a Decision Tree, IIsy uses one table per feature to generate intermediate "action codes." These codes represent specific ranges or branches. A final classification table then combines these codes to produce the leaf node result. This decoupling allows the switch to process deep trees without being limited by the number of physical hardware stages in the ASIC pipeline.
Evaluation and Results
The researchers evaluated IIsy using an Intel Tofino switch (6.2 Tbps) across two primary datasets: UNSW-NB15 for network intrusion detection and the Jane Street Market Prediction dataset for financial latency-sensitive tasks.
- Throughput and Latency: IIsy demonstrated a 25x to 80,000x throughput improvement over CPU-based implementations, maintaining a full 6.2 Tbps line rate. Latency was reduced from tens of microseconds on a server to sub-microsecond scales.
- Server Offloading: In anomaly detection tests, the hybrid model handled 84.5% of traffic entirely on the switch (at a 0.7 confidence threshold), maintaining an F1 score of 0.976.
- Hardware Efficiency: Most tested models utilized less than 10% of the switch's SRAM, ensuring that standard networking functions like routing and load balancing remain unaffected.
Discussion and Limitations
IIsy demonstrates that "good enough" in-network models can significantly alleviate the load on backend infrastructure. However, certain limitations remain. IIsy does not currently support Deep Learning due to the complexity of matrix multiplications and non-linear activations. Additionally, its payload inspection capabilities are limited by end-to-end encryption (e.g., TLS). Future work will focus on automated feature "binning" to further optimize memory usage and support even larger model ensembles.
Summary updated