NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Predictive coding is a consequence of energy efficiency in recurrent neural networks

Abdullahi Ali, Nasir Ahmad, Elgar de Groot, Marcel A. J. van Gerven, Tim Christian KietzmannPatterns 2022

TL;DR

This paper demonstrates that the principles of predictive coding, a prominent theory of brain function, can emerge in recurrent neural networks (RNNs) solely by optimizing for energy efficiency. By training RNNs to minimize their energy consumption on predictable data, the networks spontaneously develop distinct "prediction" and "error" units and learn to inhibit expected sensory input, mirroring key hallmarks of predictive coding without explicit architectural constraints.

What Problem Does This Paper Address?

The brain is remarkably efficient in processing sensory information, and predictive coding is a leading theory explaining this efficiency. It posits that the brain constantly predicts incoming sensory input and only processes deviations from these predictions (prediction errors). While computational models have successfully implemented predictive coding by hardwiring its hierarchical structure, it remains an open question whether these complex mechanisms could arise from simpler, more fundamental principles. This paper investigates whether energy efficiency, a known constraint on biological systems, could be the driving force behind the emergence of predictive coding in neural networks.

Methods

The core of this research lies in training recurrent neural networks (RNNs) with a novel objective function: minimizing "preactivation." Preactivation, representing the summed input to a neuron before its activation function, is used as a proxy for energy consumption, encompassing both synaptic transmission and neuronal activity. This approach contrasts with traditional methods that focus on minimizing output activity or employing L2 regularization on weights. The authors trained these energy-efficient RNNs on sequences of handwritten digits (MNIST) and natural images (CIFAR-10). To validate the emergent properties, they employed virtual lesioning experiments, selectively deactivating identified "prediction" units to observe the impact on network performance and energy consumption. They also analyzed the network's internal dynamics to identify distinct populations of "prediction" and "error" units.

Datasets

  • MNIST: A dataset of handwritten digits used for training and evaluating the primary RNN models. Sequences were generated by presenting digits in numerical order with wraparound.
  • CIFAR-10: A dataset of natural images (10 classes) used to test the generalizability of the findings. Sequences were generated similarly to MNIST.

Key Insights and Ideas

  • Energy Efficiency as a Driver of Predictive Coding: The most striking insight is that optimizing for energy efficiency alone can lead to the emergence of predictive coding mechanisms, including prediction and error signaling. This suggests that predictive coding might not be a uniquely evolved computational strategy but rather a natural consequence of efficient computation in biological systems.
  • Spontaneous Emergence of Prediction and Error Units: Without explicit architectural constraints, the trained RNNs naturally segregated into distinct populations of "prediction" units (which anticipate input) and "error" units (which signal deviations from predictions). This self-organization is a key finding, as it mirrors the functional specialization observed in biological brains.
  • Two Timescales of Prediction: The study identified two distinct inhibitory mechanisms for prediction operating at different timescales: a faster, lateral inhibition among error units and a slower, top-down inhibition involving prediction units that integrate evidence over time. This aligns with hierarchical predictive coding theories and the brain's ability to process information across different temporal scales.
  • Preactivation as a Proxy for Energy: Using preactivation as a proxy for energy consumption proved effective. Minimizing preactivation led to reduced synaptic transmission and overall energy efficiency, outperforming models that solely minimized unit output.

Key Results

  • Reduced Energy Consumption: RNNs trained with the preactivation loss function consistently showed lower energy consumption compared to baseline models trained with output minimization or output minimization plus L2 regularization.
  • Hallmarks of Predictive Coding: The energy-efficient RNNs exhibited:
  • Inhibition of Predicted Input: The networks learned to suppress sensory input that matched their predictions.
  • Emergence of Prediction and Error Units: Distinct populations of units specialized for prediction and error signaling were identified.
  • Improved Prediction with Temporal History: Predictions became more precise and targeted as the network processed longer sequences.
  • Lesion Studies Confirm Causal Role: Lesioning the identified prediction units significantly impaired the network's ability to reduce energy consumption and integrate evidence over time, confirming their crucial role in predictive processing.
  • Generalization to CIFAR-10: The core findings, including the emergence of prediction/error units and the impact of prediction unit lesions, were replicated on the more complex CIFAR-10 dataset, suggesting the robustness of the principles.

Limitations and Future Work

  • Simplified Model: The study used a single-layer RNN, which is a simplification of the complex hierarchical structures found in the brain. Future work could explore multi-layer RNNs to investigate inter-layer communication between prediction and error units.
  • Rate-Coded Neurons: The models used rate-coded neuron models. Extending this to spiking neural network models, which more closely mimic biological neurons, is a promising avenue for future research.
  • Limited Energy Cost Factors: The energy cost function primarily focused on action potentials and synaptic transmission. Future work could incorporate other metabolic costs, such as those related to wire length, to provide a more comprehensive model of biological energy constraints.
  • Dataset Scale: The use of smaller-scale datasets like MNIST and CIFAR-10 is acknowledged as a proof of concept. Testing on larger, more complex datasets like CIFAR-100 or ImageNet would further validate the generalizability of the findings.
  • Handling Unpredictable Inputs: The current work focuses on predictable environments. Investigating how these energy-efficient systems handle unpredictable or noisy inputs is an important area for future exploration.

Summary updated

BibTeX
@article{ali2022predictive,
  author = {Abdullahi Ali and Nasir Ahmad and Elgar de Groot and Marcel A. J. van Gerven and Tim Christian Kietzmann},
  title = {{Predictive coding is a consequence of energy efficiency in recurrent neural networks}},
  journal = {Patterns},
  year = {2022},
  doi = {10.1016/j.patter.2022.100639},
}
Figure