All models

Rao-Ballard-style deep predictive coding net

Rao and Ballard's three-level predictive coding hierarchy: feedback predicts, feedforward carries the error.

Neuroscience signals · 1,623 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (110 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
36.9K
Operations
1,623
Framework
PyTorch
Recurrent
Yes
Published
1999, Nature Neuroscience
Cited by
5,227 (as of 4 October 2026)
Authors
Rajesh P. N. Rao, Dana H. Ballard
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14359
Graph hash
e0db3f425665d266ade790b1f22ead47f2133220b13c7ac8b1e6eb076597e822
Skeleton hash
e0db3f425665d266ade790b1f22ead47f2133220b13c7ac8b1e6eb076597e822
Architecture hash
3f699f4f0a9b7e3e6cbfb44aa020c0ed9b55c15c445d4e5aad8f84f948522901
Diagram SHA-256
5bf98bf1685859a7b5c1ac308e682ee6d96979114ef4ca9cfddcde4adbae7084
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This is a model of visual processing in which feedback connections from a higher to a lower cortical area carry predictions of lower-level neural activity, while the feedforward connections carry the residual errors between those predictions and the actual activity. When exposed to natural images, a hierarchical network of model neurons implementing the scheme developed simple-cell-like receptive fields. A subset of neurons carrying the residual errors showed endstopping and other extra-classical receptive-field effects. The suggestion is that nonclassical surround effects in the visual cortex may result from cortico-cortical feedback rather than being exclusively feedforward phenomena.

Each predictive estimator (PE) module has feedforward neurons encoding the synaptic weights, neurons whose responses r hold the current estimate of the input, feedback neurons conveying the prediction f(Ur) to the lower level, and error-detecting neurons computing the difference between the estimate and its top-down prediction. The response is determined by a first-order differential equation implementing the prediction and error-correction cycle, derived, like the synaptic learning rule, by maximizing the posterior probability of generating the observed data. An optimal estimate of r is obtained by gradient descent on the cost E with respect to r, so the forward pass is a run of inference steps rather than a single sweep. For any given input, the network converges to a set of neuronal responses optimal for predicting that input. For the endstopping simulations the priors on r and U were Gaussian. Localized receptive fields come from a sparse kurtotic prior on r. Minimizing E is equivalent to the minimum description length principle.

The simulated network is a three-level hierarchy: an input image is analyzed by three level-1 PE modules, each predicting its own local image patch, and the responses of all three feed the level-2 module. Receptive fields grow with the hierarchy, from 16 x 16 pixels at level 1 to 16 x 26 at level 2. It was trained on image patches extracted from five natural images. With feedback intact, 28 of the 32 model error-detecting neurons were endstopped, and disabling the feedback connections eliminated endstopping in all but 5 of them, a reduction of 82%.

Key idea. A hierarchical network in which feedback carries predictions and feedforward carries residual errors; trained on natural images it develops simple-cell-like receptive fields, and its error neurons show endstopping that depends on the feedback.

  • Rao-Ballard predictive coding
  • Rao and Ballard 1999
  • Rao & Ballard
  • predictive coding network
  • hierarchical predictive coding
  • predictive estimator
  • extra-classical receptive field
  • endstopping
  • visual cortex model
  • computational neuroscience
  • Nature Neuroscience 1999

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Rao_1999, title={Predictive coding in the visual cortex: a functional interpretation of some extra-classical receptive-field effects}, volume={2}, ISSN={1546-1726}, url={http://dx.doi.org/10.1038/4580}, DOI={10.1038/4580}, number={1}, journal={Nature Neuroscience}, publisher={Springer Science and Business Media LLC}, author={Rao, Rajesh P. N. and Ballard, Dana H.}, year={1999}, month=Jan, pages={79–87} }