FENIX: Enabling In-Network DNN Inference with FPGA-Enhanced Programmable Switches

Xiangyu Gao (Tsinghua University), Tong Li (Renmin University of China), Yinchao Zhang (Tsinghua University), Ziqiang Wang (Southeast University and Tsinghua University), Xiangsheng Zeng (Huazhong University of Science and Technology), Su Yao (Tsinghua University and BNRist), Ke Xu (Tsinghua University and Zhongguancun Laboratory)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · Learning at Line Rate

Overview

Machine learning has become a cornerstone of modern network traffic analysis, powering critical tasks such as intrusion detection, malware identification, and traffic classification. Traditionally, these machine learning workloads run in the control plane: the data plane extracts traffic features, ships them to a server, and waits for inference results. While flexible, this decoupled approach imposes high interaction latencies—often at the millisecond scale—which is unacceptable for time-sensitive security operations and real-time mitigation. To eliminate these bottlenecks, recent systems attempt to push machine learning inference directly into the data plane, reducing latencies to the microsecond level or lower.

Watch on YouTube · Slides

Visual summary for FENIX: Enabling In-Network DNN Inference with FPGA-Enhanced Programmable Switches by Xiangyu Gao, Tong Li, Yinchao Zhang, Ziqiang Wang, Xiangsheng Zeng, Su Yao, Ke Xu
Visual summary for FENIX: Enabling In-Network DNN Inference with FPGA-Enhanced Programmable Switches by Xiangyu Gao, Tong Li, Yinchao Zhang, Ziqiang Wang, Xiangsheng Zeng, Su Yao, Ke Xu

Key moments

  1. 0:00 Introduction and motivation for in-network DNN inference
  2. 2:00 Key observation: Complementary strengths of switches and FPGAs
  3. 4:00 Overall hardware architecture and throughput mismatch challenge
  4. 6:00 Data engine design and fine-grained feature rate control
  5. 8:00 Model engine on FPGA and hardware prototype implementation
  6. 9:35 Evaluation results on accuracy and classification performance
  7. 10:00 Latency, throughput scalability, and hardware resource overhead

FENIX: Enabling In-Network DNN Inference with FPGA-Enhanced Programmable Switches

Speakers: Xiangyu Gao (Tsinghua University); Tong Li (Renmin University of China); Yinchao Zhang (Tsinghua University); Ziqiang Wang (Southeast University and Tsinghua University); Xiangsheng Zeng (Huazhong University of Science and Technology); Su Yao (Tsinghua University and BNRist); Ke Xu (Tsinghua University and Zhongguancun Laboratory)

Conference: USENIX NSDI

Video: https://www.youtube.com/watch?v=EoY2kl3JHeA

Overview

Machine learning has become a cornerstone of modern network traffic analysis, powering critical tasks such as intrusion detection, malware identification, and traffic classification. Traditionally, these machine learning workloads run in the control plane: the data plane extracts traffic features, ships them to a server, and waits for inference results. While flexible, this decoupled approach imposes high interaction latencies—often at the millisecond scale—which is unacceptable for time-sensitive security operations and real-time mitigation. To eliminate these bottlenecks, recent systems attempt to push machine learning inference directly into the data plane, reducing latencies to the microsecond level or lower.

However, existing data-plane ML architectures face a fundamental trilemma: the conflicting goals of ultra-low latency, multi-terabit throughput, and high model accuracy. Control-plane approaches sacrifice latency for accuracy by running complex models. Software-based programmable packet processing systems (like SMIV) reduce latency but cap throughput at hundreds of gigabits per second, falling far short of modern multi-terabit switch requirements. Meanwhile, protocol-independent programmable switches (P4 switches) operate at line rate but suffer from severely constrained computational and memory resources within their switch pipelines. Consequently, they are restricted to rudimentary models—such as decision trees, random forests, or binarized neural networks—which degrade accuracy on complex traffic distributions.

This talk introduces FENIX, a hybrid in-network deep neural network (DNN) inference system designed to achieve low latency, high throughput, and high accuracy simultaneously. By combining the strengths of high-speed programmable application-specific integrated circuit (ASIC) switches with field-programmable gate arrays (FPGAs), FENIX partitions the workload intelligently. The switch acts as a data engine for line-rate packet processing and feature extraction, while the FPGA serves as a model engine capable of executing expressive, high-accuracy deep neural networks.

Background

▶ Watch: Introduction and motivation for in-network DNN inference (0:00)

The architectural evolution of network telemetry and machine learning has long been bounded by hardware segregation. In conventional network monitoring frameworks, the data plane handles packet forwarding and simple header parsing, while the control plane houses general-purpose CPUs running heavy inference pipelines. This separation creates a structural communication tax. Sending packets or extracted feature vectors from the forwarding ASIC to a remote CPU involves PCIe buses, software network stacks, and operating system context switches, accumulating millisecond-level delays.

To bypass this overhead, researchers explored running inference directly inside the programmable data plane using P4-programmable switches. While switch pipelines can process traffic at multi-terabit line rates, their internal hardware primitives—match-action units, ternary content-addressable memories (TCAMs), and limited static random-access memory (SRAM) registers—are fundamentally unsuited for matrix multiplications, convolutions, or recurrent cell computations required by modern CNNs and RNNs. Developers are forced to deploy heavily quantized, binarized, or shallow models, sacrificing classification accuracy.

Conversely, standalone FPGA or smartNIC solutions offer rich arithmetic logic units, flip-flops, block RAMs (BRAMs), and digital signal processing (DSP) slices, making them hospitable to complex neural architectures. Yet, their raw packet processing throughput cannot match the multi-terabit capacity of modern data center switch ASICs. FENIX resolves this systems dilemma by recognizing that switches and FPGAs possess complementary strengths that can be bridged via fine-grained rate control and hardware co-design.

Key Findings

▶ Watch: Overall hardware architecture and throughput mismatch challenge (4:00)

The primary contribution of FENIX is demonstrating that multi-terabit in-network DNN inference is achievable without compromising model accuracy or introducing packet drops. Through extensive evaluation on real hardware testbeds and calibrated simulations, the authors establish several key findings:

  • Accuracy Gains Without Line-Rate Bottlenecks: By offloading expressive deep neural network models (such as CNNs and RNNs) to the FPGA model engine, FENIX significantly outperforms switch-only and smartNIC-based baselines on complex tasks like VPN traffic classification and malware identification, where binarized or shallow switch models falter.
  • Microsecond-Level Latency: Direct high-bandwidth onboard channels connecting the switch ASIC and the FPGA bypass traditional software stack overheads, reducing transfer and inference latency to the microsecond level.
  • Terabit-Scale Throughput via Probabilistic Rate Control: By avoiding the pitfall of mirroring every packet or feature vector to the FPGA, FENIX utilizes a probabilistic token bucket and fine-grained rate limiter to match the FPGA's processing capacity while sustaining multi-terabit switch throughput.
  • Low Hardware Footprint: On the switch ASIC, FENIX consumes minimal SRAM, TCAM, and pipeline stages, leaving ample headroom for standard packet forwarding functions. On the FPGA, CNN and RNN models maintain moderate resource utilization across flip-flops, BRAMs, and DSPs.

Technical Deep Dive

▶ Watch: Data engine design and fine-grained feature rate control (6:00)

The architecture of FENIX is partitioned into two primary subsystems: the Data Engine residing on the programmable switch ASIC, and the Model Engine running on the FPGA co-processor.

The Data Engine (Programmable Switch)

The switch pipeline executes line-rate feature extraction and flow-level state tracking. Incoming packets hit a parser, match-action pipeline, and deparser.

  • Flow Tracker: Maintains per-flow state within a flow info table stored in switch SRAM, indexed by 5-tuple packet hashes.
  • Inference Multiplexing: When a packet arrives, the flow checker first inspects whether it carries a returning inference result from the FPGA. If so, it updates the cached flow classification class and drops the internal control packet. For normal data packets, classified flows are forwarded according to their assigned class, while unclassified flows undergo temporary packet-level inference using a lightweight switch-resident decision tree.
  • Fine-Grained Feature Rate Control: To prevent overwhelming the FPGA, the data engine employs a precomputed probability table to select flows fairly. A probabilistic token bucket then limits the aggregate feature-sending rate to precisely match the FPGA's operational capacity.
  • Buffer Manager: Bundles recent feature vectors together with their corresponding flow IDs before transmitting them over high-speed interconnects to the FPGA, ensuring the co-processor receives compressed feature representations rather than raw, bandwidth-heavy packet streams.

The Model Engine (FPGA Co-Processor)

The FPGA receives feature vectors and executes high-accuracy DNN inference.

  • Decoupling and Matching: Upon receiving a feature packet, the model engine separates the flow ID from the feature vector. The feature vector is fed into the DNN model, while the flow ID is buffered locally to maintain state association.
  • Quantized Neural Execution: Once inference completes, the resulting classification output is re-associated with the buffered flow ID and transmitted back to the switch ASIC. The switch subsequently applies the corresponding traffic policy (e.g., dropping malicious flows or prioritizing latency-sensitive VPN traffic). The system leverages model quantization techniques (such as fixed-point weight representation) to minimize arithmetic overhead and memory footprint on the FPGA fabric.

Experimental Setup & Results

▶ Watch: Evaluation results on accuracy and classification performance (9:35)

The evaluation of FENIX was conducted using a custom hardware prototype paired with a cycle-accurate simulator for scale-out analysis.

  • Hardware Testbed: The physical prototype integrates a Tofino 2 switch ASIC and a Xilinx ZCU104 / ZU19EG FPGA mounted on the same board, interconnected via high-bandwidth onboard channels.
  • Datasets & Benchmarks: Evaluations focused on two real-world, highly imbalanced traffic classification workloads: VPN traffic classification and malware identification. Because dataset class distributions are heavily skewed, performance is measured using micro-F1 score, precision, and recall.
  • Baselines: FENIX was benchmarked against traditional control-plane CPU inference systems, purely switch-based P4 machine learning models, and software-based smartNIC (SMIV) inference architectures.
  • Headline Results:
  • Accuracy: FENIX achieves superior micro-F1 scores compared to switch-only and SMIV baselines across both VPN and malware benchmarks, bridging the accuracy gap by executing uncompromised CNN and RNN models on the FPGA.
  • Latency: By eliminating software stack overheads, PCIe serialization delays, and operating system context switches, FENIX achieves stable microsecond-level end-to-end inference latency, representing orders-of-magnitude improvement over control-plane alternatives.
  • Throughput & Scalability: Hardware testbed experiments confirm that as flow concurrency increases, FENIX maintains stable classification accuracy. Scaled simulation results demonstrate that probabilistic rate control enables FENIX to sustain terabit-per-second (Tbps) line rates without saturating the FPGA co-processor.
  • Ablations & Resource Usage: Hardware resource profiling indicates that FENIX consumes a minor fraction of the Tofino 2's SRAM, TCAM, and pipeline stages. On the FPGA side, CNN and RNN workloads utilize moderate counts of flip-flops, BRAM blocks, and DSP slices, leaving substantial headroom for more complex models or concurrent packet-processing accelerators.

Practical Implications

▶ Watch: Latency, throughput scalability, and hardware resource overhead (10:00)

For network infrastructure teams, model builders, and systems deployers, FENIX offers a compelling blueprint for integrating heavy artificial intelligence into high-speed data planes without sacrificing network capacity.

  • Overcoming Hardware Tradeoffs: Practitioners no longer need to choose between the high throughput of ASIC switches and the computational flexibility of accelerators. Hybrid architectures allow system designers to decouple feature extraction from model execution.
  • Traffic Engineering and Security: The ability to execute deep neural networks at microsecond latencies enables real-time intrusion detection systems (IDS) and automated DDoS mitigation to drop or reroute malicious flows within microseconds of their inception.
  • Design Tradeoffs & Limitations: Implementing FENIX requires specialized hardware co-design (e.g., physical or high-speed board-level interconnects between programmable switches and FPGAs) which may not be universally available in legacy data center topologies. Furthermore, tuning the probabilistic rate control parameters requires careful calibration against specific traffic distributions to ensure that critical anomalous flows are not probabilistically dropped before reaching the FPGA model engine.

Key Takeaways

  • Complementary Hardware Synergy: Programmable switches excel at line-rate feature extraction and deterministic packet processing, whereas FPGAs provide the computational richness necessary for complex deep neural networks.
  • Solving the Throughput Mismatch: Fine-grained feature rate control—utilizing precomputed probability tables and token buckets—successfully bridges the throughput gap between multi-terabit switch ASICs and resource-constrained FPGA accelerators.
  • Preserving Model Accuracy: Offloading inference to FPGA-resident CNNs and RNNs bypasses the restrictive quantization and structural limits imposed by switch-only P4 execution pipelines.
  • Microsecond Response Times: Direct hardware-to-hardware communication channels eliminate CPU, PCIe, and OS software stack overheads, achieving microsecond-level inference latency.
  • Minimal Hardware Footprint: FENIX maintains low resource utilization across switch SRAM/TCAM and FPGA logic slices, preserving ample system headroom for future model scaling and concurrent network functions.

About the Speaker(s)

The talk was presented by Xiangyu Gao, a researcher from Tsinghua University, representing a collaborative academic team spanning Tsinghua University, Renmin University of China, Southeast University, Huazhong University of Science and Technology, BNRist, and Zhongguancun Laboratory. The research group focuses on high-speed networking, programmable data planes, and intelligent network systems.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)