Training Dynamical Binary Neural Networks With Equilibrium Propagation

Jérémie Laydevant, Maxence Ernoult, Damien Querlioz, Julie Grollier

Abstract

Equilibrium Propagation (EP) is an algorithm intrinsically adapted to the training of physical networks, thanks to the local updates of weights given by the internal dynamics of the system. However, the construction of such a hardware requires to make the algorithm compatible with the existing neuromorphic CMOS technology, which generally exploits digital communication between neurons and offers a limited amount of local memory. In this work, we demonstrate that EP can train dynamical networks with binary activations and weights. We first train systems with binary weights and full-precision activations, achieving an accuracy equivalent to that of full-precision models trained by standard EP on MNIST, and losing only 1.9% accuracy on CIFAR-10 with equal architecture. We then extend our method to the training of models with binary activations and weights on MNIST, achieving an accuracy within 1% of the full-precision reference for fully connected architectures and reaching the full-precision reference accuracy for the convolutional architecture. Our extension of EP to binary networks opens new solutions for on-chip learning and provides a compact framework for training BNNs end-to-end with the same circuitry as for inference.

Introduction: The Energy Bottleneck in Deep Learning

Deep learning's massive energy consumption is largely attributed to the non-local nature of Backpropagation (BP). In standard von Neumann architectures, BP necessitates constant data movement between memory and processors, creating a significant energy bottleneck. Equilibrium Propagation (EP) offers a biologically inspired alternative where weight updates are local, depending only on the states of the connected neurons. While promising for neuromorphic hardware, EP typically requires high-precision floating-point arithmetic. This paper bridges the gap by enabling EP to train Binary Neural Networks (BNNs), which utilize 1-bit weights and activations, significantly reducing the memory and power requirements for edge devices.

Methodology: Adapting Equilibrium Propagation for Binary Systems

The transition from full-precision EP to a binary framework involves several key innovations to maintain performance and ensure gradient flow.

Binary Optimization and Momentum

Traditional BNN training often relies on "latent" full-precision weights to accumulate small gradient updates. To improve hardware compatibility, the authors employ the Binary Optimizer (BOP). Instead of latent weights, BOP uses a momentum variable to track the "inertia" of gradients, flipping the binary weight (-1 or +1) only when the momentum crosses a threshold. This approach effectively halves the memory required for weights during the training phase.

Dynamical Weight Normalization

To prevent neuron saturation, a scaling factor ($\alpha$) is introduced. The authors discovered that learning this scaling factor dynamically using the EP framework itself—rather than keeping it fixed—significantly enhances both training speed and final accuracy.

Schematic representation of the network dynamics for (a) binary weights and (b) binary weights and activations.

Handling Non-Differentiable Activations

Binary activations are implemented using the Heaviside step function. Since this function is non-differentiable, a "straight-through estimator" (STE) is used during the system's dynamics to allow gradients to propagate.

Amplifying Error Signals: Output Layer Augmentation

A critical challenge in binary systems is that small error signals may fail to flip a binary neuron's state, leading to vanishing gradients. The authors address this by "amplifying" the error signal through output layer augmentation. By using significantly more output neurons than classes (e.g., 700 neurons for 10 MNIST classes), the network ensures the "nudge" from the error signal is strong enough to be registered by the binary layers.

Comparison of error rates between a classic output layer and an enlarged output layer, demonstrating the necessity of augmentation for binary training.

Key Results

The proposed method was evaluated on the MNIST and CIFAR-10 datasets, yielding several key insights:

  • Accuracy: On MNIST, the fully binarized convolutional network achieved an error rate of 1.14%, nearly matching the 1.05% baseline of full-precision EP. For fully connected architectures, the accuracy remained within 1% of the reference. Scaling to CIFAR-10 with binary weights and full-precision activations resulted in a performance drop of only 1.9% compared to full-precision models.
  • Memory Efficiency: The memory benefits are substantial. Convolutional models required 9x to 54x less memory for synapses, and the memory needed to store neuron states during training was reduced by a factor of 40x.
  • Hardware Compatibility: Because EP relies on the physical relaxation of a dynamical system, it can compute gradients using simple logic operations like AND and POPCOUNT, which are far more efficient than floating-point multiplications.

Discussion and Conclusion

This work demonstrates that Equilibrium Propagation is a natural fit for training BNNs. While currently simulated on GPUs, the true potential of this method lies in dedicated asynchronous neuromorphic hardware. Future research will focus on scaling these techniques to larger datasets like ImageNet and automating the optimization of the "nudging" parameter ($\beta$) for deeper architectures. This framework provides a path toward energy-efficient, on-chip learning for the next generation of AI hardware.

Summary updated

BibTeX
@inproceedings{laydevant2021training,
  author = {Jérémie Laydevant and Maxence Ernoult and Damien Querlioz and Julie Grollier},
  title = {{Training Dynamical Binary Neural Networks With Equilibrium Propagation}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  url = {https://openreview.net/forum?id=6yQa9Q0nCc},
}
Figure