LUTNet: Learning FPGA Configurations for Highly Efficient Neural Network Inference

Erwei Wang, James J. Davis, Peter Y. K. Cheung, George A. Constantinides

TL;DR

LUTNet is a novel framework that maps neural networks directly to the native building blocks of FPGAs—Look-Up Tables (LUTs)—by treating them as learnable Boolean operators. By leveraging the inherent non-linearity of LUT hardware, the authors achieve up to a 2× improvement in area efficiency and significant energy savings compared to state-of-the-art Binarized Neural Networks (BNNs).

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously resource-heavy. To deploy them on edge devices like FPGAs, researchers often use Binarized Neural Networks (BNNs), which replace power-hungry multipliers with simple XNOR gates.

However, there is a fundamental mismatch: an FPGA’s basic unit is the $K$-input LUT, which can implement any Boolean function of $K$ inputs. Using a LUT just to perform a 2-input XNOR is a massive waste of the hardware's potential. The authors address this "flexibility gap" by asking: What if we trained the network to use the full expressive power of the LUT itself?

Methods

The authors introduce LUTNet, a hardware-software co-design framework that evolves a standard BNN into a "LUT-native" architecture through three main stages:

  1. Pruning & Binarization: They start with a standard high-precision model, prune it heavily to remove redundant connections, and binarize the weights.
  2. Logic Expansion: Each remaining XNOR gate is replaced by a $K$-input LUT. The first input preserves the original connection, while the remaining $K-1$ inputs are randomly connected to other activations within the same layer.
  3. Differentiable Training: To make the discrete Boolean functions inside the LUTs trainable, the authors use a Lagrange interpolating polynomial extension. This allows them to use standard backpropagation to "learn" the optimal truth table (LUT mask) for every single operator in the network.

The paper also describes a tiled architecture (using RAM to stream in additional learned parameters) to allow large networks to fit on smaller FPGAs where full unrolling isn't possible.

Datasets

The framework was evaluated on four standard benchmarks:

  • MNIST: Using the LFC (Large Fully Connected) model.
  • SVHN & CIFAR-10: Using the CNV (Convolutional) model.
  • ImageNet: Using the AlexNet model.

Key Insights and Ideas

  • Hardware-Native Arithmetic: Instead of forcing FPGAs to emulate traditional CPU/GPU arithmetic (like dot products), LUTNet changes the underlying math to match what FPGAs do best: Boolean logic.
  • Thinning the Popcount Tree: In BNNs, the "popcount" (summing the bits) consumes the most area. Because LUTNet nodes are more expressive than XNORs, the network can be pruned much more aggressively. This "thins" the summation tree, which is where the bulk of the area savings come from.
  • Non-Linearity at the Edge: Traditional DNNs rely on a single non-linear activation (like ReLU) after a linear sum. LUTNet introduces non-linearity at every single product term, significantly increasing the "logic density" of the network.

Key Results

  • Area Efficiency: For unrolled implementations, LUTNet achieved area compression of 2.08× for the CNV network (CIFAR-10) and 1.90× for AlexNet (ImageNet) compared to ReBNet, the previous state-of-the-art BNN.
  • Energy Efficiency: The unrolled LUTNet showed up to 6.66× better energy efficiency than prior reported works due to the massive reduction in active logic.
  • Accuracy: LUTNet maintained or slightly improved accuracy despite the smaller footprint. For example, a 91.1%-pruned LUTNet achieved 0.59 percentage points higher accuracy than an unpruned ReBNet baseline while using significantly less area.
  • Tiling Gains: Even in resource-constrained "tiled" scenarios, LUTNet outperformed ReBNet by up to 1.28× in area and 1.57× in energy efficiency.

Limitations and Future Work

  • Training Complexity: Training LUTNet is more computationally expensive. The authors noted that a whole-network implementation can take up to 15.8× longer to train than a standard BNN due to the expanded parameter space.
  • Overfitting: Using highly flexible 6-input LUTs showed early signs of overfitting in some experiments. The authors suggest "throttling" expressiveness during training as a future solution.
  • Learning the Summation: Currently, LUTNet only replaces the multiplication part of the dot product. The authors suggest future work could involve learning the entire popcount/summation circuitry to further optimize the FPGA fabric.

Summary updated

BibTeX
@article{wang2020lutnet,
  author = {Erwei Wang and James J. Davis and Peter Y. K. Cheung and George A. Constantinides},
  title = {{LUTNet: Learning FPGA Configurations for Highly Efficient Neural Network Inference}},
  journal = {IEEE Trans. Computers},
  year = {2020},
  url = {https://openreview.net/forum?id=akvHlX42Ec},
}
Figure