Differentiable Weightless Neural Networks

Alan Tendler Leibel Bacellar, Zachary Susskind, Mauricio Breternitz Jr, Eugene John, Lizy Kurian John, Priscila Machado Vieira Lima, Felipe M.g. França

Abstract

Traditional deep learning relies on power-intensive floating-point multiplications, limiting deployment on ultra-low-power edge devices. Weightless Neural Networks (WNNs) offer a multiplication-free alternative using lookup tables (LUTs), but have historically been limited to single-layer models due to their non-differentiable nature. This paper introduces Differentiable Weightless Neural Networks (DWNs), which leverage a novel Extended Finite Difference (EFD) technique to enable end-to-end training of multi-layer LUT-based architectures. DWNs achieve state-of-the-art efficiency on FPGAs and microcontrollers, outperforming both quantized neural networks and traditional tabular models like XGBoost.

Introduction

Deep learning's massive energy footprint is largely driven by millions of arithmetic operations. While Binary Neural Networks (BNNs) reduce precision, they do not eliminate the fundamental overhead of multiplication. Weightless Neural Networks (WNNs) provide a radical alternative by using RAM-based lookup tables (LUTs) to drive neural activity. Instead of calculating $w \cdot x + b$, a WNN uses input bits as an address to retrieve a binary value from a table.

Figure 1: Basic architecture of a Weightless Neural Network (WNN) using lookup tables for classification.

Despite their hardware efficiency, WNNs have historically been restricted to shallow, single-layer models because their discrete nature prevents the use of gradient-based optimization. The primary challenge addressed by this work is bridging the gap between discrete LUT-based inference and continuous backpropagation.

Methodology

The authors introduce four key innovations to enable deep, trainable weightless architectures:

  1. Extended Finite Difference (EFD): To overcome the non-differentiability of discrete tables, EFD approximates gradients by analyzing how outputs change when input address bits are flipped. It considers contributions from all table positions weighted by Hamming distance, providing a robust signal for optimization.
  2. Learnable Mapping: Unlike traditional WNNs with fixed random connections, DWNs use a weight matrix during training to learn optimal input routing to LUTs. This matrix is discarded at inference, maintaining a "weightless" hardware profile.
  3. Learnable Reduction: To replace hardware-intensive "popcounts," DWNs utilize a pyramid of LUT layers that learn to reduce feature vectors into final classifications, significantly shrinking the required circuit area.
  4. Spectral Regularization: To prevent overfitting—a common issue with high-capacity LUTs—the authors apply Fourier analysis-based regularization to ensure the Boolean functions learned by the tables remain resilient to noise.

Experimental Results

DWNs were evaluated across image classification (MNIST, CIFAR-10), audio processing, and tabular datasets. The results demonstrate significant advantages across three hardware tiers:

  • FPGAs: DWNs achieved a 2522x improvement in energy-delay product compared to the BNN-based FINN platform. By aligning with the native LUT-6 structure of FPGAs, the models utilize hardware with near-zero waste.
  • Microcontrollers: On an 8-bit Arduino-class microcontroller, DWNs outperformed XGBoost by 5.4% in accuracy while running 15% faster.
  • ASICs: For ultra-low-cost logic, DWNs reduced the required silicon area by up to 42.8x compared to existing tiny classifiers.
  • Tabular Data: Across 11 AutoGluon datasets, DWNs achieved an average rank of 2.5, outperforming heavyweights like XGBoost (3.4) and CatBoost (3.6).

Conclusion

By making lookup tables differentiable, this work moves weightless architectures from shallow learners to deep, high-performance models. While DWNs currently lag behind convolutional BNNs on high-resolution data like CIFAR-10, their extreme efficiency on FPGAs and microcontrollers makes them a compelling choice for the next generation of edge AI. Future research will focus on extending these principles to convolutional and Transformer-based architectures.

Summary updated

BibTeX
@inproceedings{bacellar2024differentiable,
  author = {Alan Tendler Leibel Bacellar and Zachary Susskind and Mauricio Breternitz Jr and Eugene John and Lizy Kurian John and Priscila Machado Vieira Lima and Felipe M.G. França},
  title = {{Differentiable Weightless Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=GBxflz0qdX},
}
Figure