Back Original

Backprop Alternative: Augmented Lagrangian Predictive Coding

We introduce PC-ALM, a local alternative to backpropagation. PC-ALM trains residual MLPs up to 1000 layers, nearly matching backprop's performance despite using only layer-local dynamics. PC-ALM equips each layer with a feedback control dynamical system that distributes and propagates supervision credit throughout a network.

Standard deep learning relies on backpropagation. The brain, however, cannot implement backpropagation, at least not exactly[1, 2]. How the brain solves the multilayer credit assignment problem without explicit use of backprop remains one of the fundamental unsolved problems in neuroscience (though not without progress[3, 4, 5]).

There are several reasons the brain can't implement exact backpropagation. One is “phase locking”[6, 2]. Backpropagation runs in three phases, in strict order: 1) a forward pass, then 2) a backward pass, then 3) a weight update. A weight update is locked until the forward and backward passes have completed—a neuron in an early layer must hold its activation and wait for the error signal to arrive. The brain has no known mechanism that could enforce such strict timing coordination across an entire network[1].

In this post, we introduce PC-ALM (Augmented Lagrangian Predictive Coding), a method for training networks that replaces the forward and backward passes of backprop with layer-local dynamical systems. Each layer is coupled only to its neighbors. Instead of forward-then-backward, we run each layer forward in time. When run to convergence, the dynamics of the whole system distribute supervision credit signals quickly and accurately across the entire network.

PC-ALM is an extension of standard predictive coding (PC)[7, 8, 9, 10]. PC uses diffusive (i.e. energy-based or "heat flow") coupling between layers. Compared to PC, PC-ALM introduces dual neurons (Lagrange multipliers) per layer, making each layer's local recurrence a PI feedback controller. In the limiting case of linear networks, the dual neurons converge to the exact backprop credit signals, despite using only local computation.

We compare PC-ALM to PC and backprop in a suite of experiments. Local training methods such as PC have historically been difficult to scale. Following the PC literature, we use simple tasks (Fashion-MNIST, CIFAR-10, etc.) and networks such as residual MLPs.

We show that PC-ALM can successfully propagate supervision credit in 1000-layer neural networks, overcoming standard PC's signal decay problem

[11]

while remaining layer-local.

We focus on deep, small-width networks, a regime in which PC tends to perform poorly.

Ultimately, our motive is to understand how distributed systems (such as the brain) can implement gradient computations without backpropagation. Scientific motivations aside, this research may inform energy-efficient deep learning on neuromorphic hardware, where dynamical systems simulation is cheaper than on GPU[12].

Predictive coding: each layer as a dynamical system

Before explaining PC-ALM, let us first explain PC, interpreting it from a dynamical systems standpoint to emphasize its role as a backprop alternative.

Predictive coding

Predictive coding has its roots in Helmholtz's theories of unconscious perception[13]. Rao & Ballard (1999) developed a mathematical framework for PC as a model of visual cortex[14]. The idea of PC is that each layer attempts to model its incoming signals, sending upward only the prediction error (the part that the layer failed to model) to the next layer.

Mathematically, predictive coding utilizes a general motif: take a state and update it to reduce a prediction error at the next step,

statet+1=statetη(statettargett)prediction error

By applying this update rule to each layer's activation vector (the “state” is the layer's activation hi; its “target” is the prediction σ(Wihi1) arriving from the layer below)1, the PC framework effectively sidesteps backprop's need for a synchronized forward and backward pass.

To explain this in more detail, let's write a feedforward network as a constrained optimization problem:

minimizeθ,h12yWLhL12subject tohi=σ(Wihi1),i=1,,L1.

where L is the network depth, h0:=x the input, y the target, θ={Wi} the weights, hi the layer activations, and σ an activation function such as ReLU. Note that each hi is an optimization variable2. We then construct a new loss function that includes the original supervision loss, together with a quadratic penalty for violations of each layer constraint:

FPC(h,θ)=12yWLhL12+12i=1L1hiσ(Wihi1)2.

This is a quadratic relaxation of the constrained problem. FPC is known as the “free energy” of the network[15, 9].

To train a neural network, PC alternates between inference and learning steps:

Predictive coding

inference

for t=1,,T

hihiηhhiFPCfor i=1,,L1

learning

WiWiηθWiFPCfor i=1,,L

Per mini-batch, a forward pass initializes the activations, followed by T inference steps and a single weight update. We set T proportional to network depth; the 1000-layer experiments below use T=2L.

Each hi-update reduces the prediction errors between layers adjacent to i. This is because hiFPC depends only on hi1, hi, and hi+1. Inference requires only nearest-neighbor communication ("message passing") between layers. Explicitly, writing ri=hiσ(Wihi1) for the prediction error between layers i1 and i, the inference update reads3:

hihiηh(rierror belowWi+1(σri+1error above))i=1,,L1

The bottom h0 is “clamped” (fixed) to an input value and the top of the network is clamped to the target y. Running T update steps, the network settles into states hi for each layer, after which a gradient descent step is taken on the same FPC but now with respect to the weights W (given the current remaining prediction errors and the current state activations).

WiWi+ηθ(σri)hi1i=1,,L1

Both the inference step and the weight update are layer-local. The weight update is Hebbian-like, in that it multiplies a postsynaptic error by the presynaptic activity (a delta rule), and the dynamics map onto a neural circuit with explicit error neurons[14, 7].

PC trains deep networks, but exhibits signal decay

PC inference in a 32-layer residual MLP (width 16, ReLU) at weight initialization. Credit = per-layer norm of the prediction error ri. Dashed reference: norm of the backprop adjoint (the loss gradient with respect to that layer's activations).

Since minimizing the free energy with respect to each hi does not enforce the layer-wise constraints to hold exactly, PC results in a different learning trajectory compared to standard backpropagation.

Nevertheless, PC has been shown to successfully train networks on simple tasks. For example, MNIST and Fashion-MNIST in 128-layer residual MLPs with wide layer widths (512 neurons per layer)[16].

However, PC struggles on more complex tasks and networks[17]. Further, PC struggles even on simple networks/tasks if the network width is smaller than its depth[18].

Each layer adjusts its activity to reduce prediction errors with its neighbors. Supervision enters at the output, but must work its way through this chain of local compromises to influence earlier layers. In deep, narrow networks, the resulting credit signal becomes weak long before it reaches the input.

This leads to a documented signal-decay problem of PC[11], as illustrated in the above figure. Increasing T lets credit propagate farther, but requires more computation for each training update.

Our method, PC-ALM, introduces a way to improve signal propagation of PC networks, retaining the layer-local dynamics of PC and keeping inference budget T proportional to network depth.

Augmented Lagrangian Predictive Coding

We propose Augmented Lagrangian Predictive Coding, a variant of PC that uses the augmented Lagrangian (AL)[19, 20, 21] in place of PC's FPC:

L(h,θ,λ)=12yWLhL12+i=1L1λi(hiσ(Wihi1))+12i=1L1hiσ(Wihi1)2

supervised loss  +  Lagrangian term  +  PC energy

In each layer, the augmented Lagrangian introduces a Lagrange multiplier (or dual variable) λiRni of the same dimension as hi.

The augmented Lagrangian is used extensively in distributed optimization[22], and has motivated many distributed methods for training deep networks[23, 24].

LeCun (1988)[25] showed that the Lagrange multipliers of a constrained network encode its backprop credit signals at equilibrium. The augmented Lagrangian combines this classical construction with the quadratic prediction-error penalties already used by PC. This suggests a simple possibility: can PC’s local dynamics recover those credit signals if we add the multipliers?

To use the augmented Lagrangian for training, we make a simple modification to PC:

Augmented Lagrangian predictive coding

inference

for t=1,,T

hihiηhhiLfor i=1,,L1primal

λiλi+α(hiσ(Wihi1))for i=1,,L1dual

learning

WiWiηθWiLfor i=1,,L

Here α is the dual step size. PC-ALM is primal descent, dual ascent on the augmented Lagrangian, versus PC's descent on the energy.

By accumulating local prediction errors, the dual variables recover the exact backprop credit signals in a deep linear network. We derive this result in the paper.

Thus, at least for linear networks, PC-ALM gives a method for computing exact supervised loss gradients and distributing them throughout a network, using only layer-local dynamics.

In the experiments below, we test whether this advantage carries over to nonlinear networks.

Mechanistic interpretation

To understand, mechanistically, how PC-ALM works, consider a simple scalar network, with hidden unit h=w1x and output y^=w2h. We want to propagate the gradient of the supervised loss 12(yy^)2 to w1.

We attach a multiplier λ to the constraint h=w1x, initialize λ=0, and initialize h at its forward-pass value.

The first step of PC-ALM agrees exactly with a PC step. After that λ accumulates the layer's prediction error each step, which feeds back into the h updates. Each h update now takes a gradient step on the energy with prediction targets shifted by the dual.4

At convergence the activation h returns to its forward-pass value (restoring the constraint h=w1x), while λ has accumulated to the backprop credit signal of that layer: i.e. λ=w2(yy^).

PC vs PC-ALM in a two-layer, linear, scalar network, y^=w2w1x, with x,y clamped to data values. Left: training trajectories of BP, PC, and PC-ALM in weight space. In this simple model, both PC and PC-ALM work and converge to the solution manifold. Performance differences between PC and PC-ALM become apparent in deep-narrow networks.

Control theory and credit assignment

PC-ALM offers a control-theoretic perspective on credit assignment. Each layer combines its current prediction error with an accumulated error signal—the proportional and integral terms of a PI feedback controller.5 Global credit assignment emerges from a network of local feedback controllers. We believe this perspective offers a useful principle for designing new local learning algorithms.

Results

We present below some results for PC-ALM.

PC-ALM: a local learning method for training 1000-layer neural networks

PC-ALM successfully trains 1000-layer MLPs on MNIST. We use the residual MLP setup from Innocenti et al. (2026)[18]. We train for five epochs. Our architecture is a simple MLP with residual skip connections, using weight parameterizations that stabilize backprop training at this depth.

Our results are presented in the figure below; PC-ALM achieves near-BP performance using only layer-local dynamics.

MNIST test accuracy versus depth, from shallow networks through 1000 layers, for BP, PC-ALM, and PC. Backprop is global; PC and PC-ALM are local.
MNIST test accuracy vs depth (width N=32, ReLU activation). PC-ALM stays within ~2 percentage points of backprop across the whole range, including at 1000 layers.

Image classification benchmarks

We tested PC-ALM on a small set of image classification tasks and found that it improves performance over PC on every task, including when training ResNet-18 on CIFAR-10 and Tiny ImageNet.

Test accuracy for BP, PC, and PC-ALM across MNIST and Fashion-MNIST at 32, 64, and 128 layers, plus CIFAR-10 and Tiny ImageNet.
Across benchmarks. PC-ALM consistently narrows the gap between standard PC and global backprop. As depth increases, PC’s accuracy falls off much faster than PC-ALM’s.

PC-ALM propagation dynamics

In addition to the performance of PC-ALM across image recognition tasks, we find PC-ALM exhibits surprising dynamical properties. In both PC and PC-ALM inference, movement of the hidden activations hi initially appears only in the final network layers. As inference proceeds, earlier layers receive credit signal, forming a wavefront that advances toward the input. PC-ALM’s primal-dual dynamics drive this wavefront through the network faster than PC. We call this "ballistic" credit propagation to contrast with PC's diffusive, heat-flow-like propagation.

Ballistic vs diffusive credit propagation. Credit magnitude across layers during inference. PC's credit decays with depth; PC-ALM's spreads evenly across the network.

Stable oscillatory transient responses

Individual neurons in PC-ALM also exhibit damped oscillations during inference.

Oscillatory inference dynamics. We consider a deep linear network (σ=identity) with depth L=8 and width N=1. With weights fixed, the coupled inference dynamics across all layers form a linear system, characterized by the eigenvalues shown on the left (Equation (17) of the paper). Right: a neuron’s activity and dual variable during inference. The parameter α is the dual step size. Setting α=0 recovers PC exactly, with all eigenvalues real; increasing α introduces complex eigenvalues and oscillatory dynamics. Increasing α too far eventually destabilizes the network (Equation (14) of the paper).

Discussion

This work introduces PC-ALM, a layer-local alternative to backpropagation for training deep networks. To our knowledge, this is the first layer-local method shown to successfully train networks up to 1000 layers.

Summary

Predictive coding remains an attractive candidate for a theory of cortical function. It is rooted in Helmholtz's ideas on unconscious processing. It was later shown that predictive coding can be viewed as a layer-local alternative to backpropagation for training deep networks. PC in its standard form can successfully train networks on simple tasks, but signal decay limits its performance in deep, narrow networks. By introducing Lagrange multipliers and running primal-dual inference on the augmented Lagrangian (vs PC's gradient flow on an energy), PC-ALM lets individual layers compute a gradient signal of a global loss function, using only communication between neighboring layers. The primary motivation of this work is to understand more deeply the mechanisms of credit assignment in real physical systems such as the brain.

Constrained and lifted optimization

PC-ALM relates to a long line of work on constrained optimization approaches to training deep networks. These approaches “lift” training into a larger optimization problem by treating the activations h as variables alongside the weights W. This includes the method of auxiliary coordinates[26], ADMM training of deep networks[23, 27, 24], BlockProp[28], ProxProp[29], several other variants[30, 31, 32, 33, 34, 35], and augmented Lagrangian methods for network training[36, 37].

PC-ALM draws on this optimization lineage to address a question from neuroscience: how can local neural dynamics compute and distribute credit for a global objective?

Prospective-configuration tradeoff

In PC, the settled activations differ from the forward pass. Song et al.[38] called this prospective configuration and showed that it can improve sample efficiency over backprop. PC-ALM improves credit propagation but gives up prospective configuration at convergence. We suspect a fundamental tradeoff between the two, with intermediate settings of T, α, and dual leak potentially preserving the benefits of prospective configuration while substantially improving credit propagation.

Motivations

This work began with three observations:

1

The Neuro-AI and distributed optimization communities share a concern with locality, but there has been relatively little cross-talk between them.

2

The PC energy is suspiciously similar to the augmented term of the augmented Lagrangian that is commonly used in distributed and constrained/lifted optimization.

3

LeCun (1988) identified the multipliers of the standard Lagrangian with backprop credit signals, suggesting that these multipliers could serve as local credit signals.

Our work on PC-ALM ties these threads together.

Future work

There is a wealth of work that needs to be done. Notably, extending PC-ALM to temporal tasks with temporal credit assignment[39, 40], self-supervised losses[41], and of course larger networks and more difficult tasks.

We hope this work inspires further connections between augmented Lagrangian methods and biologically plausible credit assignment.