TBNN: Lookup Tables-Based Optimization for in-Network Binary Neural Networks

Shaowei Xu, Shengrui Lin, Hongyan Liu, Dong Xiang Zhang, Jinqi Zhang, Chunming Wu · 2025

Binary Neural Network (BNN) is a meaningful machine learning model on the data plane. However, due to the chip limitations, the scalability, especially the number of hidden layers in one pipeline, is limited. For better inference performance, existing methods reuse the hidden layers through packet recirculations. Recirculations lead to poor processing latency. Additionally, the simplified operations in the in-network BNN model restrict the flexibility of itself, which results in the unarbitrary input length of neurons for more the additional resource consumption than normal BNN model. In this paper, we present TBNN, an optimized in-network BNN model that achieves both scalability and flexibility. This approach eliminates deployment constraints while maximizing hardware utilization, advancing the feasibility of complex BNN models on resourcelimited data planes. By replacing computational bottleneck actions with Lookup Tables (LUTs), TBNN enables at most$4 \times$more neurons per pipeline and reduces per-packet latency by 50% through minimized recirculation. LUT-based implementation supports pruning operations, trading an accuracy loss of$\mathbf{1. 6 9 \%}$for saving about$\mathbf{2 4 \%}$instructions.

Read the paper · More papers on PaperTik