Deep Predictive Coding Network (trainable PCN)
Predictive coding network that learns supervised tasks with local Hebbian weight updates.
7 operations Checked
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
- 269.3K
- Operations
- 7
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2017, Neural Computation
- Cited by
- 278 (as of 27 October 2026)
- Authors
- James C. R. Whittington, Rafal Bogacz
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15857
- Graph hash
- daf4e2f443cf79b4e4dd4d7dd70e64ce012f1450171f6180aa1d561425ae0de0
- Skeleton hash
- be3eea851be5dfb4ccd9245fa4cca821ef2ac0921e2566145c9e8c02a0f9e833
- Architecture hash
- 4493d958b4b168bde81afe823a91be8de7b779fde187e2347a971f4ff0d0a9b8
- Diagram SHA-256
- f23a0609490e4c240c9b0932e4fbfeb3fa4618daf98d0e43cca4d30f6e138d15
- 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 predictive coding network used for supervised learning, from a paper about how cortical networks could implement something like error back-propagation. In back-propagation, the change in a synaptic weight is a complex function of weights and activities of neurons not directly connected with the synapse being modified, whereas changes in biological synapses are determined only by the activity of pre-synaptic and post-synaptic neurons. The paper shows that a network developed in the predictive coding framework can perform supervised learning with only simple local Hebbian plasticity.
After an input is provided, all nodes are updated until the network converges to a steady state. During learning, the nodes on the lowest level are set to the output sample, and once the network has reached its steady state the weights are updated so the model better predicts the desired output. Used this way, the prediction error nodes have activity very similar to the error terms in back-propagation, and for certain parameters the weight change converges to that of the back-propagation algorithm.
The paper tested the model on the MNIST dataset, comparing an artificial neural network of size 784-600-600-10 with predictive coding networks of the corresponding size. The PyTorch library used in the Bogacz Group implements a range of predictive coding networks and includes a tutorial that trains a predictive coding model to perform classification on MNIST.
Key idea. The paper shows that a predictive coding network can perform supervised learning with only local Hebbian plasticity, and that for certain parameters its weight changes converge to those of back-propagation.
- Predictive Coding Network
- PCN
- trainable PCN
- predictive coding
- supervised predictive coding
- Hebbian plasticity
- biologically plausible learning
- back-propagation approximation
- inference learning
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Whittington_2017, title={An Approximation of the Error Backpropagation Algorithm in a Predictive
Coding Network with Local Hebbian Synaptic Plasticity}, volume={29}, ISSN={1530-888X}, url={http://dx.doi.org/10.1162/NECO_a_00949}, DOI={10.1162/neco_a_00949}, number={5}, journal={Neural Computation}, publisher={MIT Press}, author={Whittington, James C. R. and Bogacz, Rafal}, year={2017}, month=May, pages={1229–1262} }