Training multi-layer binary neural networks with random local binary error signals

Luca Colombo, Fabrizio Pittorino, Manuel Roveri

TL;DR

This paper introduces a novel, fully binary, gradient-free training algorithm for multi-layer Binary Neural Networks (BNNs). This approach significantly reduces computational complexity and memory usage by eliminating the need for floating-point backpropagation, achieving competitive accuracy with state-of-the-art methods.

What Problem Does This Paper Address?

Deep learning models have become incredibly powerful, but their success comes at the cost of massive computational demands and memory footprints. Binary Neural Networks (BNNs) offer a solution by using 1-bit weights and activations, drastically reducing these requirements and enabling efficient bitwise operations. However, most existing BNN training methods still rely on traditional, computationally expensive floating-point backpropagation for gradient calculation, negating many of the benefits of BNNs during training. Furthermore, existing fully binary training methods are limited to single-layer networks, hindering the development of deeper, more complex BNN architectures. This paper addresses the challenge of training multi-layer BNNs using a completely binary and gradient-free approach.

Methods

The core innovation is a fully binary and gradient-free training algorithm for multi-layer Binary Neural Networks (BNNs). Instead of relying on back-propagated floating-point gradients, this method uses random local binary error signals. These signals are generated by fixed, random binary classifiers attached to each layer.

Key aspects of the method include:

  • Binary Forward and Backward Passes: All operations, including weight updates, are performed using only binary arithmetic (XNOR, Popcount, increment/decrement).
  • Local Binary Error Signals: Each layer generates its own error signal based on its local output and the true label, eliminating the need for a global error signal propagation.
  • Integer-Valued Metaplastic Weights: Hidden layers use integer-valued weights that act as a "metaplasticity" mechanism, storing confidence about the binary weights. These are updated using binary operations.
  • Independent Layer Training: The algorithm allows for independent training of each layer, facilitating parallelization and enabling the training of arbitrarily deep BNNs.
  • Robustness Parameter: A hyperparameter r is introduced to enforce a stronger correctness constraint, biasing NNs towards flatter loss landscapes and improving generalization.
  • Grouped Neuron Updates: Neurons within a layer are grouped, and only the "easiest" perceptrons (those closest to contributing correctly) are updated. This acts as a sparse update scheme and a regularizer.

Datasets

The paper evaluates its proposed algorithm on the following datasets:

  • Random Prototypes: A synthetically generated dataset designed to test optimization and generalization.
  • FashionMNIST: A dataset of grayscale images of clothing items.
  • CIFAR-10: A dataset of 32x32 color images of 10 object classes. Features were extracted from a pre-trained AlexNet.
  • Imagenette: A simplified 10-class subset of ImageNet, also using features extracted from a pre-trained AlexNet.
  • UCI ML repository: A collection of tabular datasets used for further comparison.

Key Insights and Ideas

  • True Binary Training is Possible for Deep Networks: The paper demonstrates that it's feasible to train multi-layer BNNs without any reliance on floating-point operations, including gradients. This unlocks the full potential of BNNs for resource-constrained environments.
  • Random Local Errors are Sufficient: Using random binary classifiers to generate local error signals is effective for training deep BNNs, bypassing the need for complex backpropagation.
  • Metaplasticity Aids Generalization: The use of integer-valued hidden weights (metaplastic weights) appears to help mitigate catastrophic forgetting and improve generalization, aligning with neurobiological plausibility.
  • Sparse Updates Improve Stability: The grouped neuron update strategy leads to sparser updates and a more stable learning process, reducing variance in test accuracy.
  • Binary Data Enables More Information Processing: Training with binarized data allows for processing significantly more information under the same memory constraints compared to full-precision data, leading to competitive or even improved accuracy.

Key Results

  • Significant Accuracy Improvements: The proposed algorithm achieves test accuracy improvements of up to +35.47% over the existing single-layer fully binary state-of-the-art solution [10].
  • Competitive with Full-Precision SGD: Compared to full-precision SGD, the proposed solution achieves comparable or even better test accuracy (up to +35.30% improvement on Imagenette) under the same total memory demand.
  • Drastic Computational Cost Reduction: The algorithm reduces computational cost by two to three orders of magnitude in terms of the total number of Boolean gates required for training.
  • Scalability to Deep Architectures: The method successfully trains BNNs with an arbitrary number of hidden layers, showing accuracy behavior similar to full-precision Adam.
  • Improved Memory Footprint: Achieves a 4x reduction in memory usage for hidden weights and a 32x reduction for weight updates compared to QAT-based methods.

Limitations and Future Work

  • Not Purely 1-bit: The current framework relies on integer-valued hidden weights, preventing a purely 1-bit implementation. Achieving effective learning without this "synaptic memory" is a challenge, especially concerning catastrophic forgetting.
  • Focus on Fully-Connected Layers: The current work is limited to fully-connected layers and MLPs. Extending the principles to Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) is a significant research direction, requiring the development of end-to-end binary backpropagation rules for these architectures.
  • Classification Tasks Only: The current solution is designed for classification. Adapting it for regression tasks would require new encoding schemes for the output layer.
  • Theoretical Analysis of Regularization: A deeper theoretical analysis of the regularization effect of the group size y and its impact on learning dynamics is needed.
  • Pure Binary Training: Investigating pure binary training (without hidden metaplastic variables) is a future avenue, though preliminary evidence suggests increased catastrophic forgetting.

Summary updated

BibTeX
@article{colombo2025training,
  author = {Luca Colombo and Fabrizio Pittorino and Manuel Roveri},
  title = {{Training multi-layer binary neural networks with random local binary error signals}},
  journal = {Mach. Learn. Sci. Technol},
  year = {2025},
  doi = {10.1088/2632-2153/adf0c1},
}
Figure