TL;DR
Can message passing replace backpropagation? This paper adapts Belief Propagation (BP) and related message-passing algorithms to train deep multilayer neural networks via mini-batches on GPUs. By coupling a "Posterior-as-Prior" update scheme with focusing techniques that target flat, high-entropy minima, the authors demonstrate that message passing can match Stochastic Gradient Descent (SGD) performance while providing native Bayesian predictions, superior robustness to network sparsity, and built-in resistance to catastrophic forgetting.
What Problem Does This Paper Address?
Virtually all modern deep learning relies on Stochastic Gradient Descent (SGD) and backpropagation. While exceptionally effective, gradient-based optimization struggles with non-differentiable objectives, such as networks with discrete ($\pm 1$) weights and activations, and is prone to catastrophic forgetting in continual learning settings.
Belief Propagation (BP)—a message-passing framework rooted in Bayesian inference and statistical physics—offers an appealing distributed alternative. However, applying BP to deep neural networks has historically faced severe hurdles: loopy factor graphs cause convergence failures, uninformative symmetric saddle points trap the dynamics, and the algorithms have notoriously struggled to scale to multi-layer architectures on modern hardware.
Methods
The authors reformulate training as probabilistic inference on a factor graph where activations and weights are variable nodes, and neuron computations are factor nodes. To make BP viable for deep networks, they introduce several key techniques:
-
Posterior-as-Prior (PasP) Rule: To enable mini-batch training, the approximate posterior over weights from one batch serves as the prior for the next, modulated by an exponential forgetting rate $\rho$: $$q_{\theta_{t+1}}(W) \approx [P(W \mid y_t, X_t, \theta_t)]^\rho$$ Tuning $\rho \approx 1$ mimics the "reinforcement" mechanism of Focusing BP (fBP), biasing training toward wide, high-entropy minima rather than isolated sharp minima.
-
GPU-Accelerated Inner Loop: The authors implement four message-passing variants: relaxed Belief Propagation (BP), BP-Inspired (BPI), Mean-Field (MF), and Approximate Message Passing (AMP) (which adds Onsager reaction terms). Each layer update splits into forward (activations) and backward (error messages) passes implemented with tensor contractions via the Julia GPU package
Tullio.jl. - Stabilization Heuristics: To prevent divergence on dense loopy graphs, the authors use a small symmetry-breaking initialization ($\epsilon$), message damping ($\alpha \in (0, 1)$), and run only one or few iterations per batch ($\tau_{\max} = 1$).
- Approximate Bayesian Predictions: Instead of collapsing to a single point-estimate weight configuration, the algorithm maintains posterior marginals (mean and variance), allowing cheap approximate Bayesian ensemble predictions in a single forward pass.
Datasets
Experiments were conducted on standard computer vision benchmarks in both multi-class (10 classes) and binary (even vs. odd) classification settings:
- MNIST
- Fashion-MNIST
- CIFAR-10
- Permuted MNIST: A continual learning benchmark consisting of 6 sequential tasks where image pixels undergo distinct fixed random permutations.
No new datasets were introduced.
Key Insights and Ideas
- Message passing scales with $O(N^2 B)$ time complexity: A single forward-backward pass of BP shares the same asymptotic scaling per batch size $B$ and layer size $N$ as standard backpropagation, making it computationally practical on GPUs.
- Bayesian predictions beat point-wise estimates: Evaluating predictions using the approximate posterior distribution over weights consistently achieves lower test error than evaluating the hardened, point-wise configuration, proving that the estimated weight marginals capture genuine uncertainty.
- High-entropy minima prevent forgetting: Because the reinforcement term biases the updates toward flat, dense regions of the loss landscape (confirmed via weight perturbation / local energy tests), the network can accommodate new tasks with minimal interference to previously learned ones—mitigating catastrophic forgetting without explicit replay buffers or regularization penalties.
- Natural synergy with sparsity: While pruning at initialization severely degrades standard SGD training, BP naturally thrives on sparse graphs; at 70–90% sparsity, BP and MF significantly outperform SGD-based binarized networks.
Key Results
- Classification Performance: On a binary Multi-Layer Perceptron (MLP) with 2 hidden layers of 501 units across 100 epochs, BP matches or outperforms the SGD baseline (BinaryNet):
- Fashion-MNIST (10-class): BP achieved 11.8% ± 0.3% test error vs. BinaryNet's 12.0% ± 0.6% (with lower training error: 3.4% vs. 4.0%).
- CIFAR-10 (10-class): BP achieved 58.7% ± 0.3% test error vs. BinaryNet's 59.0% ± 0.7%.
- MNIST (10-class): BP reached 2.6% ± 0.1% test error vs. BinaryNet's 2.2% ± 0.1% (and MF reached 2.3% ± 0.1%).
- Extreme Sparsity: On MNIST with 90% fixed random sparsity, BP and MF retained over 80% test accuracy, whereas BinaryNet dropped below 70%.
- Continual Learning: On 6 sequential Permuted MNIST tasks (40 epochs each), BP maintained between 70% and 80% test accuracy across all 6 tasks at the end of training, whereas BinaryNet degraded significantly on early tasks (dropping to ~40–60% depending on learning rate).
Limitations and Future Work
- Architectural Scope: Evaluations are limited to fully connected networks (MLPs) without biases or batch normalization. Extending this framework to convolutional layers, residual connections, and transformers remains open.
- Inexact Approximations: BP on deep networks lacks asymptotic exactness guarantees; the framework relies on central limit theorem approximations (Gaussian messages) and heuristic damping to maintain stability.
- Hyperparameter Sensitivity: Learning is sensitive to the polarization parameter $\rho$ and damping $\alpha$, often requiring layer-dependent tuning (specifically dampening the output layer to prevent premature over-polarization).
- Loss Functions: The current implementation primarily handles classification via hard constraint satisfaction (e.g., argmax / sign functions) rather than continuous, arbitrary loss functions.
Summary updated