The least-control principle for local learning at equilibrium
Abstract
Equilibrium systems are a powerful way to express neural computations.
As special cases, they include models of great current interest in both neuroscience and machine learning, such as deep neural networks, equilibrium recurrent neural networks, deep equilibrium models, or meta-learning.
Here, we present a new principle for learning such systems with a temporally- and spatially-local rule.
Our principle casts learning as a least-control problem, where we first introduce an optimal controller to lead the system towards a solution state, and then define learning as reducing the amount of control needed to reach such a state.
We show that incorporating learning signals within a dynamics as an optimal control enables transmitting activity-dependent credit assignment information, avoids storing intermediate states in memory, and does not rely on infinitesimal learning signals.
In practice, our principle leads to strong performance matching that of leading gradient-based learning methods when applied to an array of problems involving recurrent neural networks and meta-learning.
Our results shed light on how the brain might learn and offer new ways of approaching a broad class of machine learning problems.
Introduction
The neural networks of the cortex are both layered and highly recurrent [1, 2].
Their high degree of recurrence and relatively low depth stands in contrast to the prevailing design of artificial neural networks, which have high depth and little to no recurrence.
This discrepancy has triggered a recent wave of research into recurrent networks that are more brain-like and which achieve high performance in perceptual tasks [3–7].
Concurrently, another line of recent work has shown that repeating a short sequence of neural computations until convergence can lead to large gains in efficiency, reaching the state-of-the-art in various machine learning problems while reducing model size [8–10].
As we develop models that come closer to cortical networks by way of their recurrence, the precise mechanisms supporting learning in the brain remain largely unknown.
While gradient-based methods currently dominate machine learning, standard methods for efficient gradient computation result in non-local rules that are hard to interpret in biological terms [11, 12].
This issue is particularly aggravated when applying these methods to complex systems involving recurrence [13].
Indeed, while multiple interesting proposals [14–23] have emerged for how to efficiently compute loss function gradients for feedforward networks in biologically-plausible ways, apart from a few notable exceptions [24, 25] much less progress has been made for recurrent networks.
Furthermore, the majority of these methods requires that error feedback does not influence network activity, a property at odds with many experimental findings on activity-dependent plasticity [26].
In this paper, we focus on the problem of learning such recurrent systems using biologically-plausible, activity-dependent local rules.
To make progress in this longstanding question we make the assumption that our system is at equilibrium, and formalize learning as the following optimization problem:
[Equation]
where θ are the parameters we wish to learn, L is a loss function which measures performance, and ˙ ϕ
= f
( ϕ, θ ) is the system dynamics which is at an equilibrium point ϕ ∗ .
Our model is thus implicitly defined through a dynamics that is at equilibrium.
Expressing our problem in this general form allows us to model a very broad class of learning systems, without being restricted to a particular type of neural network [27–29].
In particular, we cover both feedforward and recurrent neural architectures.
More generally, f is not even restricted to being a neural dynamics.
Consider the case where f defines a learning algorithm governing the dynamics of the weights of a network; in this case (1) becomes a meta-learning problem, where the goal is to tune the (meta-)parameters of a learning algorithm such that its performance improves.
Inspired by a recent control-based learning method for feedforward neural networks [30], we present a new principle for solving problems of the form (1) which yields learning rules that are (i) gradientfollowing, (ii) local in space, (iii) local in time, and in particular do not require storing intermediate states, (iv) activity-dependent by embedding error information into the network activity, and (v) not reliant on infinitesimally small learning signals.
To meet all five criteria at once, we depart from direct gradient-based optimization of the loss, and we reformulate gradient-based learning within the framework of optimal control as a problem of least-control .
Such problems can be approached in two steps.
First, an optimal controller provides additional feedback input leading the dynamical system to a least-control state: an equilibrium point in which the loss L is minimized with the least amount of control.
Subsequently, the parameters are changed to further reduce the amount of control at the resulting equilibria.
Critically, this minimization can be achieved using a local gradient-based rule for which all the required information is available at the controlled equilibria.
This should be contrasted to the ubiquitous backpropagation of error algorithm [31, 32] (and its variant for equilibrium systems [33, 34]) which yields non-local parameter updates based on the outcome of two separate phases.
Importantly, our least-control problem is intimately related to the original learning problem; we make the connection between the two precise by identifying mathematical conditions under which least-control solutions correspond to minima of the original objective L ( ϕ ∗ ) , or a bound of it.
We apply our principle to learn equilibrium neural networks featuring a variety of architectures, including both fully-connected and convolutional feedfoward networks, laterally-connected recurrent networks of leaky integrator neurons, as well as deep equilibrium models [8–10], a recent family of high-performance models which repeat until convergence a sequence of complex computations.
To further demonstrate the generality of our principle, we then consider a recently studied metalearning problem where the goal is to change the internal state of a complex synapse such that future learning performance is improved [35].
We find that our single-phase local learning rules yield highly competitive performance in both application domains.
Our results extend the limits of what can be achieved with local learning rules, opening novel avenues to an old problem.
The least-control principle 2.1 The principle
We introduce the least-control principle for learning dynamical systems ˙ ϕ
= f
( ϕ, θ ) that reach an equilibrium ϕ ∗ .
Instead of directly minimizing a loss evaluated at the equilibrium L ( ϕ ∗ ) as in (1), we augment the dynamics ˙ ϕ
= f
( ϕ, θ )
+ ψ with a control signal ψ that drives the system towards a new controlled equilibrium where the loss is minimized (c.f. Figure 1).
Our principle recasts learning as minimizing the amount of control needed to reach that state:
[Equation]
The two constraints in the equation above ensure that we reach a steady state of the controlled dynamics, and that the loss L is minimized at this state.
Without loss of generality, we consider a single data point above (c.f. Section S5 in the supplementary materials).
[Figure]
To solve (2), we first fix the parameters θ .
We then find an optimal control ψ ⋆ and controlled equilibrium ϕ
⋆ that minimize the following least-control objective, for the current setting of θ ,
[Equation]
We call ϕ
⋆ the least-control state and ψ ⋆ the least control.
Here, ψ ⋆ represents an optimal control with terminal cost ∥ ψ ∥ 2 , and a terminal constraint enforcing that the optimally controlled equilibrium ϕ
⋆ minimizes the loss L .
Critically, both credit assignment and system dynamics are now combined into a single phase through the optimal control ψ ⋆ .
We then take a gradient-following update in θ on
H ( θ ) :
= 12 ∥ ψ ⋆ ∥ 2 , the least-control objective of Eq. 3, which implicitly depends on θ through ψ ⋆ .
Theorem 1 shows that the optimal control ψ ⋆ contains enough information about the learning objective so that the gradient is easy to compute.
We prove Theorem 1, along with all the theoretical results from Section 2, in Section S2.
We use ∂ x to denote partial derivatives w.r.t.
the variable x .
Theorem 1 (Informal) .
Under some mild regularity conditions, the least-control principle yields the following gradient for θ :
[Equation]
To illustrate what our principle achieves, let us briefly consider the simple setting where f ( ϕ, θ ) implements a feedforward neural network, typically learned by the backpropagation of a supervised error signal.
In this case, the variable ϕ corresponds to the state of the neurons (representing e.g. their firing rate or postsynaptic voltage) and θ to the synaptic connection weights.
The least control ψ ⋆ then drives the network to an equilibrium that minimizes the output loss, while being of minimum norm.
The resulting weight update now represents a local Hebbian rule multiplying presynaptic input with the postsynaptic control signal (c.f. Section S6.2).
By contrast, in the backpropagation algorithm, errors do not directly influence the neural activity and are computed in a separate phase.
In our case, the neural activity implicitly encodes credit assignment information, in such a way that local learning becomes possible.
The simplicity of our parameter update becomes apparent when contrasting it with the gradient associated with the original objective (1), as the implicit function theorem (c.f. Section S3) gives
[Equation]
Calculating this gradient directly requires inverting the Jacobian ∂ ϕ f
( ϕ ∗ , θ ) , which is intractable for large-scale systems.
The standard way of dealing with this issue is to resort to the two-phase recurrent backpropagation algorithm, which estimates ∇ θ L ( ϕ ∗ ) by running a second linear dynamics until equilibrium, while holding the first equilibrium state ϕ ∗ in memory.
For acyclic computation graphs, of which feedforward neural networks are a prime example, it simplifies into the error backpropagation algorithm.
Those procedures are still more complicated than ours: they require implementing a specialized auxiliary dynamical system, holding intermediate states in memory, and alternating between inference and gradient computation phases.
2.2 A general class of dynamics leads to the same optimal control and parameter update
Our principle is agnostic to the dynamics ˙
ψ ( t ) of the controller; the only assumption made is that its value ψ ∗ at the steady state is optimal, i.e. ψ ∗ = ψ ⋆ .
Remark that we use the subscripts ∗ to denote equilibrium states of the controlled dynamics and ⋆ to indicate optimality on the least-control objective of Eq. 3, and the superscript ∗ for a free (not controlled) equilibrium.
In particular, the parameter update only depends on information available at the controlled equilibrium state ( ϕ ∗ , ψ ∗ ) .
Here, we capitalize on this important flexibility by designing different simple feedback controller dynamics that lead to the same optimal steady state.
We consider feedback controllers which take the following general form:
[Equation]
where u is a controller defined on the output units and Q ( ϕ, θ ) determines the influence of the controller on the entire system.
The mapping Q ( ϕ, θ ) can either be a direct mapping from the output controller u to the entire system, or an indirect one leveraging internal feedback mechanisms in the system (c.f. Figure 1C).
The controller u may be seen as a leaky integral controller with leak rate α , that uses the output error ∇ ϕ L to drive the network towards a minimal-loss state (c.f. Section S2).
Returning to our example of a neural network, u leads the network into a state configuration where the output neurons y are at the target value y target , when α = 0 .
We use leaky integral control in (6) for explanatory purposes and as we use it in our experiments.
We remark however that our theory goes beyond this form of output control; in particular, it generalizes to any controller satisfying αu ∗ + ∇ ϕ L ( ϕ ∗ )
= 0 at equilibrium.
For example, the proportional control u = − β ∇ ϕ L ( ϕ ) satisfies this condition for α = β − 1 .
Theorem 2 provides general conditions for the dynamics (6) to converge to an optimal control signal needed for obtaining first-order parameter updates in Theorem 1.
Theorem 2.
Let ( ϕ ∗ , u ∗ ) be a steady state of the generalized dynamics (6) .
Assume that ∂ ϕ f ( ϕ ∗ , θ ) is invertible and that the following column space condition is satisfied at equilibrium:
[Equation]
where the matrix [0 , Id] has | ϕ | columns and as many rows as the system has output units.
Then, ψ ∗ =
Q ( ϕ ∗ , θ ) u ∗ is an optimal control ψ ⋆ for the least-control objective (3) , in the limit α → 0 .
Interestingly, Theorem 2 shows that many different feedback mappings from the output controller u towards the system state ϕ are possible, as long as the mapping Q ( ϕ ∗ , θ ) satisfies the column space condition (7) at equilibrium, in the limit α → 0 .
Furthermore, the control ψ need not be instantaneous and can have its own temporal dynamics ˙ ψ alongside the output controller dynamics ˙ u , as the column space condition (7) is only defined at equilibrium.
We exploit this property and construct a general-purpose algorithm that computes an optimal control ψ ⋆ :
[Equation]
and
[Equation]
with u the leaky integral controller defined in (6).
This inversion dynamics has two special properties.
First, it satisfies the conditions of Theorem 2 by construction (c.f. Section S2.3).
Second, as defined above, ˙ ψ resembles the second-phase dynamics of the (recurrent) backpropagation algorithm (c.f. Section S3), or in case of feedforward networks, the layerwise backpropagation of error signals in the error backpropagation algorithm.
Intuitively, in this case we find an optimally-controlled equilibrium by simultaneously (in a single phase) running the first- and second-phase dynamics of (recurrent) backpropagation, with the critical difference that here the dynamical equations of both phases interact through the relation ˙ ϕ
= f
( ϕ, θ ) + ψ .
2.3 The least-control principle solves the original learning problem
Iterating our parameter update minimizes the least-control objective H ( θ ) and not directly the original objective of learning (1).
The latter is however the objective of ultimate interest, used to measure the performance of the system after learning, when it is no longer under the influence of a controller.
We now show that there is a close link between the two objectives and identify a wide range of conditions under which least-control solutions also solve the original learning problem (1).
Proposition 3 shows the intuitive result that if the optimal control is minimized to zero, the equilibria of the controlled and free dynamics coincide and hence the loss L is minimized at the free equilibrium as well (c.f. Figure 1.B).
Proposition 3.
Assuming L is convex on the system output, we have that the optimal control ψ ⋆ is equal to
iff.
the free equilibrium ϕ ∗ minimizes L .
As ψ ⋆ = − f ( ϕ ⋆ , θ ) , reaching ψ ⋆ = 0 can only be done if the model is powerful enough to perfectly fit the controlled equilibria for all data points.
We show in Proposition 4, that overparameterization, i.e., having more parameters θ than system states ϕ , indeed helps solve the original learning problem (1).
The condition ∂ θ f
( ϕ ⋆ , θ ) being of full row rank, that is needed in this proposition, can only be satisfied when the dimensions satisfy | θ | ≥ | ϕ | , with ϕ the concatenated states of all data points, hence providing another perspective on why overparameterization helps.
Proposition 4.
Assuming L is convex on the system output, a local minimizer θ of the least control objective H is a global minimizer of the original learning problem (1) , under the sufficient condition that ∂ θ f
( ϕ ⋆ , θ ) has full row rank.
Fully minimizing the amount of control to zero is not always possible, which highlights the need to understand the relation between the least-control objective H ( θ ) =
∥ ψ ⋆ ∥ 2 and the loss L ( ϕ ∗ ) from the original learning problem (1).
Proposition 5 shows that we can do so, as minimizing ∥ ψ ⋆ ∥indirectly minimizes the loss L ( ϕ ∗ ) , under some regularity and strong convexity assumptions.
Proposition 5.
If ∥ f ∥ 2 is µ -strongly convex, L is M -Lipschitz continuous and the minimum of L is 0, then
[Equation]
Approximate equilibria.
Our least-control theory requires the system to be at equilibrium, and that the loss is minimized at the controlled equilibrium.
This is almost never the case in practice, for instance because the dynamics are run for a finite amount of time, the column space condition for Q is not perfectly satisfied, or because α is not zero in the output controller u dynamics.
The update we take therefore does not strictly follow the gradient of the least-control objective H ( θ ) .
We formally show in Section S2.6 that our update resulting from an approximate optimally-controlled equilibrium is close to the gradient ∇ θ H .
More precisely, under some regularity conditions on f , the error in the gradient estimation is upper bounded by the distance between ϕ ⋆ and its estimate.
Additionally, if we reach equilibrium but α is non-zero the update − ∂ θ f ( ϕ ∗ , θ ) ⊤ ψ ∗ follows the gradient of an objective very similar to the least-control one H , under strict conditions on the feedback mapping Q .
2.4 The least-control principle as constrained energy minimization
We now provide a dual view of our least-control principle from the perspective of energy minimization.
This will allow designing a second general-purpose dynamics for computing the least control ψ ⋆ , and establishing a link to another principle for learning known as the free-energy principle.
To arrive at an energy function, we rewrite the least-control objective (3) by substituting the constraint ψ = − f ( ϕ, θ ) into this objective, leading to the following constrained optimization problem:
[Equation]
The role of optimal control can therefore be reinterpreted as finding the state that is the closest to equilibrium under the free dynamics, among the states that minimize the loss function.
Next, we introduce the augmented energy F ( ϕ, θ, β ) :
= 12 ∥ f ( ϕ, θ ) ∥ 2 + βL ( ϕ ) , which adds a nudging potential to the equilibrium energy ∥
f ( ϕ, θ ) ∥ 2 , and take the perfect control limit , β → ∞ , where this potential dominates the energy.
As we show in Section S2.5, minimizing the augmented energy with respect to the state variable ϕ leads to fulfilling our objective (9).
Interestingly, when β → ∞ and f ( ϕ, θ ) implements a feedforward neural network, we recover the free-energy function which governs the predictive coding model of Whittington and Bogacz [36], which was obtained from an entirely different route based on variational expectation maximization for a probabilistic latent variable model [37] (c.f. Section S4).
Energy-based dynamics as optimal control.
We leverage this connection to design a second general-purpose dynamics that computes an optimal control, by using the gradient flow on F :
[Equation]
Here, the control ψ is implicitly contained in the dynamics of ϕ .
Part of the dynamics, − β ∇ ϕ L ( ϕ ) , plays the role of an infinitely-strong proportional controller on the system output; another part is in charge of optimally sending the teaching signal from the output back to the rest of the system.
We refer to Section S2.5 for more details.
Two opposing limits: perfect control vs. weak nudging.
The update ∂ θ f ⊤ f that we obtain in
Theorem 1 has been extensively studied in the weak nudging limit β → 0 [36, 38, 39], which sits at the opposite end of the β -spectrum of the perfect control limit studied here.
A seminal result shows that as β → 0 the gradient ∇ θ L ( ϕ ∗ ) of the original objective function is recovered [24, 40].
However, this update is known to be sensitive to noise as the value of f can be very small at the weakly-nudged equilibrium [35].
Our least-control principle works at the opposite perfect control end of the spectrum ( β → ∞ ), and it is therefore more resistant to noise.
One of our main contributions is to show that using the same update, but instead evaluated at an optimally-controlled state ϕ ⋆ , still performs principled gradient-based optimization, however now on the least-control objective H ( θ ) .
Applications of the least-control principle
The least-control principle applies to a general class of dynamical systems at equilibrium.
By contrast, the majority of previous work on local learning focused on designing circuits and rules tailored towards feedforward neural networks [14, 17, 23, 36, 41–45].
We now demonstrate the generality of our principle by applying it to two problems of interest in neuroscience and machine learning: deep and recurrent neural network learning, and meta-learning.
In both cases, our principle leads to activity-dependent local learning rules by leveraging Theorem 1, while making use of simple and flexible optimal controllers to feed back credit assignment information (c.f. Theorem 2).
We test our learning and meta-learning systems on standard benchmarks and find that they perform competitively when compared to conventional gradient-based methods.
3.1 The least-control principle for feedforward and recurrent neural networks
As a first demonstration of learning according to our principle we consider feedforward neural networks with multiple layers of hidden neurons, the current preferred architecture for a large array of perceptual problems.
Moreover, prior work on biologically-plausible alternatives to backpropagation has mostly focused on feedforward networks, making them a natural first choice to study our principle.
Motivated by the massive recurrence of cortical networks, we then turn to equilibrium recurrent neural networks as a second application of our principle, aiming to demonstrate its applicability beyond feedforward models.
While there is debate over the precise functional roles of recurrent processing in the brain, there is strong experimental evidence that these connections are not limited to transmitting learning signals and play an active role in information processing [e.g., 46–49].
From the viewpoint of machine learning, it has been shown that equilibrium RNNs are often more parameter-efficient than feedforward networks, while reaching state-of-the-art performance [3, 7, 9].
More concretely, we consider a generic neural network driven by a fixed input x assumed to converge to an equilibrium state, obeying the following free dynamics (e.g. Figure 1.C):
[Equation]
(11) with ϕ the neural activities, W the internal synaptic weight matrix, U the input weight matrix and σ the activation function.
Note that this notation is general enough to encompass feedforward and recurrent network architectures; while freely chosen W and U yield a vanilla RNN, structuring
W and U appropriately (with block-diagonal structure) allows recovering standard feedforward fully-connected or convolutional deep neural networks.
We point to Section S6 for full architectural details.
The learning problem then consists of optimizing the network weights θ = { W, U } on a loss
L ( ϕ ∗ ) at the equilibrium activity ϕ ∗ .
This loss is only measured on the output neurons, a subset of ϕ .
We now add a control signal ψ to the dynamics (11).
Theorem 1 guarantees that if the controlled steady state ψ ∗ is optimal, the following updates minimize the least-control objective H ( θ ) :
[Equation]
To showcase the flexibility of our principle, we use Theorem 2 to design various simple feedback circuits that compute these control signals, as we detail next.
We visualize those circuits in Figure S2.
3.1.1 A simple controller with direct linear feedback
To instantiate the least-control principle in its simplest form, we project the output controller u onto the hidden neurons ϕ with direct linear feedback weights Q , which is a generalization of a recent feedforward network learning method [30] to equilibrium neural networks.
Broadcasting output errors directly [50] may be seen as one of the simplest possible ways of avoiding the weight transport problem [11, 12, 16].
This results in the following dynamics:
[Equation]
with u a simple leaky integral output controller (c.f. Section 2.2), and ∇ ϕ L the output error.
Theorem 2 guarantees that Qu ∗ is an optimal control in the limit of α → 0 , if the feedback weights
Q satisfy the column space condition col[ Q ] = row (cid:2) [0 , Id](Id − Wσ ′ ( ϕ ∗ ))
− 1 (cid:3) for all data samples.
For a linear feedback mapping, this condition cannot be exactly satisfied for multiple samples as the row space is data-dependent, whereas Q is not.
Still, we learn the feedback weights Q to approximately satisfy this column space condition, by using a local Hebbian rule that operates simultaneously to the learning of the other weights, inspired by recent work on feedforward networks [30, 51] (details in Section S6).
The resulting update provably finds feedback weights Q that satisfy the column space condition for one sample, and we empirically verify that the control signal it gives in the multiple samples regime is close to optimal (c.f. Section S6).
Despite the simplicity of this linear feedback controller, we show that the training procedure described above is still powerful enough to learn both a two-hidden-layer (each of 256 neurons) fully-connected feedforward network and an equilibrium RNN with a fully-connected recurrent layer of 256 neurons on the MNIST digit classification task [52] (c.f.
Table 1, LCP-LF).
Notably, it performs almost as well as backpropagation (BP) and recurrent backpropagation (RBP), the current methods of choice for equilibrium RNN training.
We use fixed point iterations to find the steady states ϕ ∗ and u ∗ in Eq.
(13) for computational efficiency (c.f. Section S6 for more simulation details).
We also observe that the empirical performance improves by changing the parameter updates to ∆ W = σ ′ ( ϕ ∗ )
Qu ∗ σ ( ϕ ∗ ) ⊤ and ∆ U = σ ′ ( ϕ ∗ )
Qu ∗ x ⊤ when the column space condition is not perfectly satisfied, corroborating the findings of Meulemans et al.
[30, 51] for feedforward neural networks.
[Table]
3.1.2 Learning with general-purpose optimal control dynamics
In the previous section we designed and tested a simple error broadcast circuit and showed that we can learn it such that the conditions of Theorem 2 are approximately met.
This approximate feedback is likely insufficient for more complex tasks which require harnessing depth or strongly-recurrent dynamics [53].
This leads us to consider two feedback circuits with more detailed architectures, which have the capacity to steer the network to an (exact) optimally-controlled equilibrium.
The first circuit is based on our general-purpose dynamic inversion (8).
Applied to RNNs it yields:
[Equation]
and
[Equation]
The second circuit exploits the dual energy minimization view of our principle presented in Section 2.4.
Taking the energy-descending dynamics ˙ ϕ
= − ∂ ϕ F ( ϕ, θ, β )
⊤ of Eq.
10, we obtain
[Equation]
where we use the output controller u of Eq.
6 as a generalization of the proportional control − β ∇ y L to make the two circuits more directly comparable.
Above, we introduce decoupled feedback weights
S to avoid sharing weights between ϕ and ψ , and we learn S to align with W ⊤ by using the KolenPollack local learning rule [42, 54], which simply transposes the weight update ∆ W (12) and adds weight decay to both update rules: ∆ S = σ ( ϕ ∗ ) ψ ⊤∗ − γS .
Both circuits implement optimal control through neural dynamics, avoiding explicit matrix inverses and phases.
In biological terms, they lead to different interpretations and implementation possibilities, highlighting the flexibility of our learning principle.
The dynamic inversion circuit (14) fits naturally with dendritic error implementations, where ψ can be linked to feedback dendritic compartments whose signals steer plasticity [14, 17, 20, 23, 30, 41, 51, 55].
In particular, by leveraging burstmultiplexing circuits [14, 23] or interneuron microcircuits [17], all information for the dynamics and weight updates can be made locally available (cf.
Section S6).
On the other hand, the energyminimizing dynamics (15) naturally leads to an implementation based on prediction and error neuron populations, characteristic of predictive coding circuits [36, 56–58].
We provide a high-level discussion of the two circuit alternatives (14, 15) in Section S6.
[Figure]
First, we test our optimally-controlled neural networks by training a fully-connected equilibrium RNN on MNIST with circuit (14), while varying the recurrent layer width, cf.
Figure 2.
This analysis shows that our theoretical results of
Section 2.3 translate to practice, as for strongly overparameterized networks, both H and L are minimized to zero, whereas for underparameterized networks, minimizing the least-control objective H ( θ ) leads to a significant decrease in
L .
Moreover, our feedforward (2x256 hidden neurons) and recurrent (256 hidden neurons) networks achieve competitive test performance compared to backpropagation (recurrent backpropagation, for RNNs), both when the feedback weights are trained (LCP - DI KP) and when they are tied ( S = W ⊤ ; LCP - DI and LCP-EBD), irrespective of whether we use the energy-based (15) or dynamic inversion (14) optimal control dynamics, cf.
Table 1.
[Table]
implicit
Next, we test whether the circuits and rules obtained through our principle scale to more complex architectures and tasks and move to the CIFAR-10 image classification benchmark [60].
We study two distinct models: a standard feedforward convolutional neural network, and a deep equilibrium model (DEQ) consisting of a recurrent block of convolutions [9].
The latter can be interpreted as an efficient infinitedepth residual neural network with weightsharing [61, 62].
Full architectural details are provided in Sections S6.4.3 and S6.5.2; we note that to showcase our least-control principle as a scalable learning method in the DEQ experiments, we make a number of design choices that include using automatic differentiation to compute certain derivatives.
For our feedforward network experiments we make no such concessions, and we further investigate a weight-transport-free variant using Kollen-Pollack learning.
We show on Table 2 that the networks trained by our principle are able to match those trained with backpropagation.
Interestingly, we observe that the DEQ models considered here are not overparameterized enough to not need control, but that this does not impair final predictive performance (c.f. Table S5).
Lastly, we turn to implicit neural representations [63], yet another task for which recurrent connections are known to be particularly beneficial [10].
The network there has to represent an image in its weights so that it is able to map pixel coordinates with its color value.
We find that our principle performs competitively to RBP and refer to Section S6 for more details.
3.2 The least-control principle for meta-learning
The generality of the least-control principle enables considering learning paradigms other than supervised learning.
Here, we show that it can be applied to meta-learning, a framework that aims at improving a learning algorithm by leveraging shared structure in encountered tasks [64].
This framework is gaining traction in neuroscience, having been featured in recent work aiming at understanding which systems [65–67] and rules [35] could support meta-learning in the brain.
Meta-learning complex synapses.
Following [35, 68], we model the learning algorithm for training a neural network with synaptic weights ϕ on some task τ as the minimization of a data-driven loss
L train τ ( ϕ ) , regularized by a quadratic term λ || ϕ − ω
|| 2 .
This regularizer can be interpreted as a model of a complex synapse; similar models have been introduced in studies of continual learning and longterm memory [69–73].
In the context of meta-learning, the fast weights ϕ quickly learn how to solve a task and λ determines how strongly ϕ is pulled towards the slow weights ω , which consolidate the knowledge that has been previously acquired.
The capabilities of the learning algorithm are measured by evaluating L eval τ ( ϕ ∗ τ ) , the performance of the learned neural network on data from task τ that was held out during learning.
Meta-learning finally corresponds to improving the learning performance on many tasks by adjusting the meta-parameters θ = ω , leading to the following problem:
[Equation]
Above, the parameters ϕ no longer represent neural activities and θ synaptic weights as in the previous section; ϕ and θ = ω now designate synaptic weights and meta-parameters, respectively.
[Table]
[Equation]
[Table]
Meta-parameter updates.
Using the first-order conditions −∇
[Equation]
L train
[Equation]
to
[Equation]
a minimizer in the previous equation yields an optimization problem on which the least-control principle can be applied.
Our principle prescribes running the controlled dynamics
[Equation]
or any other process that finds the same fixed points ( ϕ τ ∗ , u τ ∗ ) .
The theory we developed in Section 2.2 guarantees that u τ ∗ is an optimal control as long as α → 0 and the Hessian of the evaluation loss ∂
2 ϕ
L eval τ at the equilibrium ϕ
τ ∗ is invertible.
Hence, we do not need complex dynamics to compute the gradient, highlighting the flexibility and simplicity of learning according to the least-control principle.
The resulting single-phase meta-learning rule is local to every synapse (c.f. Section S7):
[Equation] [Equation]
Experimental results.
Our meta-learning algorithm stands out from competing methods as being both principled, first-order and single-phase.
On the one hand, existing first-order and single-phase methods either approximate meta-gradients (e.g., FOMAML [74] and T1-T2 [75]) or rely on heuristics (e.g. Reptile [76]), and therefore do not provably minimize a meta-objective function.
On the other hand, full meta-gradient descent methods require two phases to backpropagate through learning [74], invert an intractable Hessian [68, 77], or learn a slightly modified task [35], and often require second derivatives [68, 74, 77].
Here, we compare our rule to competing first-order methods (FOMAML,
T1-T2 and Reptile) and meta-gradient approximation algorithms that use the same synaptic model (implicit MAML and contrastive meta-learning; iMAML and CML) on the Omniglot few-shot visual classification benchmark [78].
Each Omniglot task consists of distinguishing 20 classes after seeing only 1 sample per class; we choose this 20-way 1-shot regime as the gap between first- and secondorder methods is reputedly the largest compared to other variants of this benchmark.
We find that our meta-learning rule significantly outperforms other single-phased first-order methods, while still lagging behind iMAML, a second-order and two-phased method, and CML, a two-phased first-order method that can approximate the meta-gradient arbitrarily well.
These findings are particularly interesting since our synaptic model (16) is in the underparameterized regime: there is a separate set of weights ϕ τ per task τ
but only one set of consolidated weights ω for the whole task distribution.
The strong performance observed here is another demonstratation that least-control solutions can perform well even when overparameterization arguments (cf.
Section 2.3) do not hold.
Discussion
Control theories of neural network learning.
The relationship between control theory and neural network learning is an old and intricate one.
It is by now well known that backpropagation, the method of choice for computing gradients in deep learning, can be seen as the discrete-time counterpart of the adjoint method developed in control theory for continuous-time systems [79, 80].
One of the early papers realizing this connection formulated neural network learning as an optimization problem under equilibrium constraints, as in the original problem statement (1), and rederived the recurrent backpropagation algorithm [81].
More recent work has explored using feedback neural control circuits which influence the neural dynamics of feedforward [30, 51] and recurrent [82–84] networks to deliver learning signals.
Different from such approaches, our least-control principle is rooted in optimal control: instead of setting the control from an ansatz, we derived it from first principles.
This allowed us to arrive at a simple local rule for gradient-based learning, and to identify general sufficient conditions for the feedback control signals.
Predictive coding from the least-control perspective.
We have shown that least-control problems correspond to free-energy minimization problems.
This dual view of least-control problems allows connecting to influential theories of neural information processing based on predictive coding [19, 36, 37, 56, 58].
Our results elucidate predictive coding theories in at least three ways.
First,
Theorem 1 justifies the parameter update taken in supervised predictive coding networks [36] as gradient-based optimization of our least-control objective.
This connection offers a novel view of the predictive coding dynamics as an optimal control algorithm in charge of controlling hidden neurons, while ‘clamping’ output neurons to the respective targets can be seen as a form of output control.
Previous arguments for gradient-based learning were only known for the weak nudging limit ( β → 0 ) where learning signals are vanishingly small [24], which is problematic in noisy systems such as the cortex [85]; our novel theoretical and experimental findings characterize the opposite perfect control ( β → ∞ ) end of the spectrum.
Second, Theorem 2 broadens the class of neural network circuits which may be used to implement predictive coding, beyond the precisely-constructed microcircuits that have been proposed so far [17, 36].
Finally, our experiments on recurrent neural networks using free-energy-minimizing dynamics to assign credit are to the best of our knowledge the first of the kind, and serve to validate the effectiveness of predictive coding circuits beyond feedforward architectures.
Limitations.
A limiting factor of our theory is that in its current form it is only applicable to equilibrium systems.
While the study of neural dynamics at equilibrium is an old endeavor in neuroscience and neural network theory [86, 87], it remains unclear how strong an assumption it is when modeling the networks of the brain.
Extending our principle to out-of-equilibrium dynamic is an exciting direction for future work.
Another limitation concerning the breadth of problem (1) is that we did not allow the loss function L to directly depend on the parameters θ .
We discuss extensions to this more general case in Section S2.2, however not all loss functions L in this more general class satisfy the conditions needed to obtain a local parameter update.
Lastly, it should be noted that although our principle requires only one relaxation phase, its computational cost often exceeds the combined cost of performing the two phases of recurrent backpropagation (cf.
Section S6.6).
Concluding remarks.
We have presented a new theory that enables learning equilibrium systems with local gradient-based rules.
Our learning rules are driven by changes in activity generated by an optimal control, in charge of feeding back credit assignment information into the system as it evolves.
Taken together, our results push the boundaries of what is possible with single-phase, activity-dependent local learning rules, and suggest an alternative to direct gradient-based learning which yields high performance in practice.
Acknowledgments and Disclosure of Funding
This research was supported by an Ambizione grant (PZ00P3_186027) from the Swiss National
Science Foundation and an ETH Research Grant (ETH-23 21-1) awarded to João Sacramento.
Seijin
Kobayashi was supported by the Swiss National Science Foundation (SNF) grant CRSII5_173721.
Johannes von Oswald was funded by the Swiss Data Science Center (J.v.O. P18-03).
We thank
Angelika Steger, Benjamin Scellier, Walter Senn, Il Memming Park, Blake A. Richards, Rafal Bogacz,
Supplementary Materials
Alexander Meulemans*, Nicolas Zucchet*, Seijin Kobayashi*, Johannes von Oswald, João Sacramento
Table of Contents
S1 Notation
S1.1 General notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S1.2 Notations for the least-control principle in general . . . . . . . . . . . . . . . .
S1.3 Notations for recurrent neural networks . . . . . . . . . . . . . . . . . . . . . .
S1.4 Notations for meta-learning . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S2 Proofs for
[Table]
principle
S2.1 Constrained optimization and Lagrange multipliers . . . . . . . . . . . . . . . .
S2.2 Theorem 1: first-order gradient . . . . . . . . . . . . . . . . . . . . . . . . . .
S2.3 Theorem 2: general controller dynamics . . . . . . . . . . . . . . . . . . . . .
S2.4 Propositions 3, 4, 5: the least-control principle solves the original learning problem
S2.
The least-control principle as constrained energy minimization . . . . . . . . . .
S2.6 The parameter update is robust to approximate optimal control . . . . . . . . . .
S2.
[Table]
Quick review of
[Table]
optimization . . . . . . . . . . . . . . . . . . . . .
S
Implicit gradient, recurrent
backpropagation
and the link to
the least
control
principle
S4 On
the relation between the least-control principle
free
energy and predictive coding
S4.
[Table]
coding . . . . . . . . . . . . . . . . . . . . . . . . . . .
S
[Table]
Equivalence between
the
free
and
augmented energies . .
S
.3 Learning with teacher clamping results in gradients on the least-control
objective
S4.
4 The optimal control interpretation of predictive coding leads to flexible dynamics
S4.
5 Beyond feedforward neural networks
S
on the least-
principle
S5.
[Table]
Loss defined
sample
S5.
[Table]
Loss defined by expectation over an infinite
inputspace . . . . . . . . . . . . . .
S
The least-control principle for equilibrium RNNs
S6.
Equilibrium recurrent neural network model
specifications . . . . . . . . . . . .
S6.
Deriving a local learning rule for equilibrium RNNs
S6.
3 A controller with direct linear feedback
S6.
4 Using general-purpose dynamics for computing an optimal control
S6.
Additional experimental details
S6.
6 Computational cost
S6.
7 Related work
S
The least-control principle
meta
S
.1 Derivation of the meta-parameter updates
S7.2 Comparison to existing meta-learning algorithms
S7.3 Experimental details . . .
S Notation
In this section, we provide an extensive list of the notations we use.
In particular, we detail what the different quantities precisely mean for learning recurrent neural networks and for meta-learning.
S1.1 General notations
Notation
Meaning ∂∂x =
∂ x
Partial derivative of a function.
The derivative of a scalar function is a row vector of size | x | .
dd x = d x
Total derivative of a function.
The derivative of a scalar function is a row vector of size | x | .
∇ x
Gradient of a scalar function (column vector).
We have ∇ x · = (d x · ) ⊤ .
˙ x
Time derivative of x (column vector).
∥ · ∥
Euclidean (L2) norm.
min x
Minimum of a function with respect to x . arg min x
Set of x that (locally) minimize a function.
Id
Identity matrix (size defined by the context).
col[ A ]
Column space of A , that is Im
[ A ] .
row
[ A ]
Row space of A , that is Im[ A ⊤ ] .
S1.2 Notations for the least-control principle in general
Notation
Meaning ϕ
Dynamical parameters of the system.
θ
Parameters of the system.
f ( ϕ, θ )
Vector-field of the (free) dynamics on ϕ .
L
Learning loss that the system should minimize.
y = h ( ϕ )
Output units (i.e. units on which the loss is evaluated) of the system.
H
Least-control objective.
ψ
Controller whose goal is to help the system reaching a loss-minimizing state.
u
Controller on the output units.
Q ( ϕ, θ )
General feedback mapping from output control u to the entire system control ψ .
We have ψ = Q ( ϕ, θ ) u at equilibrium.
ϕ ∗
Equilibrium of the free dynamics.
ϕ ⋆ , ψ ⋆ , u ⋆
Optimal state, control and output control according for the least-control objective (c.f. Eq. 3).
ϕ ∗ , ψ ∗ , u ∗
Equilibrium of the controlled dynamics.
The least-control principle aims for ψ ∗ =
ψ ⋆ , that is to find an optimal control through the steady state of
[Table]
S1.3 Notations for recurrent neural networks
Notation
Meaning
[Table] [Table]
S Proofs for the least-control principle
The purpose of this section is to prove all the theoretical results behind the least-control principle.
Recall that our principle advocates to solve the following constrained optimization problem
[Equation]
that is minimizing the amount of control needed to reach a loss-minimizing state.
Finding an optimal control ψ ⋆ consists in solving the least-control problem:
[Equation]
Most of the proofs that we present here rely on interpreting the problem above as a constrained minimization problem, and using the associated first-order stationarity condition to manipulate ψ ⋆ and ϕ ⋆ .
Compared to the main text, we introduced the notation y
= h ( ϕ ) in this formulation.
It is here to select output units from the rest and clarifies mathematical manipulations.
S2.1 Constrained optimization and Lagrange multipliers
Throughout the proofs for the least-control principle, we characterize the optimal control ψ ⋆ and state ϕ
⋆ through the stationarity conditions that they verify, that are known as the KKT conditions.
In particular, this allows considering ( ϕ ⋆ , ψ ⋆ ) as an implicit function of θ , and computing derivatives through the implicit function theorem [89].
We provide a quick review on constrained optimization in Section S2.7 for the reader who is new to the topic.
We now state what are the KKT conditions for the constrained optimization problem (20).
To do so, we introduce the corresponding Lagrangian, which we denote as the LCP-Lagrangian:
[Equation]
where λ and µ are the Lagrange multipliers associated to the constraints f ( ϕ, θ ) + ψ = 0 and ∇ y L ( h ( ϕ ))
= 0 .
Then, ( ϕ ⋆ , ψ ⋆ ) verifies the KKT conditions associated to Eq.
20 if there exists ( λ ⋆ , µ ⋆ ) such that
[Equation]
In the proofs that follow, we use equivalently that ( ϕ ⋆ , ψ ⋆ ) is optimal for Eq. 20 and that it verifies the
KKT conditions of Eq.
We need to invoke sufficient conditions, such as the positive definiteness of the Hessian of the Lagrangian, to make it rigorous and to show that a state satisfying the KKT conditions is a local minimizer; we discuss this matter in more details in Section S2.7.
However, we omit these considerations in the proofs to keep the arguments as concise as possible.
S2.2 Theorem 1: first-order gradient
We first state the formal version of Theorem 1 and then prove it, by differentiating through the KKT conditions (22).
Note that we provide an alternate proof that leverages the energy-based formulation of the principle in Section S2.5.
Theorem S1 (Formal) .
Let ( ϕ ⋆ , ψ ⋆ ) an optimal control for the least-control problem (20) and ( λ ⋆ , µ ⋆ ) the Lagrange multipliers for which the KKT conditions are satisfied.
Under the assumption that the Hessian of the LCP-Lagrangian ∂ 2 ϕ,ψ,λ,µ L ( ϕ ⋆ , ψ ⋆ , λ ⋆ , µ ⋆ , θ ) is invertible, the least-control principle yields the following gradient for θ :
[Equation]
Proof.
The proof relies on two ingredients: rewriting H using the LCP-Lagrangian and then differentiating through this Lagrangian.
We start by rewriting the least-control objective H ( θ ) using the LCP-Lagrangian.
Recall that H is defined as
[Equation]
As ( ϕ ⋆ , ψ ⋆ ) is an optimal control, there indeed exists Lagrange multipliers ( λ ⋆ , µ ⋆ ) such that ∂ ϕ,ψ,λ,µ L ( ϕ ⋆ , ψ ⋆ , λ ⋆ , µ ⋆ , θ ) = 0 , as assumed in the statement of the theorem.
We use this equality condition to implicitly define ( ϕ ⋆ , ψ ⋆ , λ ⋆ , µ ⋆ ) as functions of θ .
The implicit function theorem along with the assumption that the Hessian is invertible ensures that these functions are well defined and differentiable.
As all the constraints are satisfied for ( ϕ ⋆ , ψ ⋆ ) , we have
[Equation]
We can then calculate d θ H ( θ ) :
[Equation]
where we used the chain rule for the second equation, and the stationarity equations of the Lagrangian for the third equation.
Through the stationarity equation ∂ ψ L ( ϕ ⋆ , ψ ⋆ , λ ⋆ , µ ⋆ , θ ) = 0 , we have that λ ⋆ = − ψ ⋆ .
The constraint on ψ additionally implies that ψ ⋆ = − f ( ϕ ⋆ , θ ) , which finishes the proof.
Extension to θ -dependent losses.
Throughout this work, we focus on loss functions L ( ϕ ) that do not explicitly depend on θ .
The influence of θ on the loss only appears through the equilibrium condition f
( ϕ, θ ) = 0 .
Still, we can generalize Theorem S1 further by also considering loss functions that explicitly depend on θ , on top of their implicit dependence on θ through ϕ .
A simple example is when we add a weight regularization term
∥ θ ∥ 2 to the loss L when training neural networks, or in meta-learning when θ does not only impact the learning algorithm of the system but also its prediction [90–92].
The proof of Theorem S1 can be slightly adapted to hold for the more general case, the only difference is that the equality ∂ θ L = λ ⊤∗
∂ θ f
( ϕ ∗ , θ ) is no longer true.
Instead, we have
[Equation]
The second derivative ∂ θ ∂ y L ( h ( ϕ ⋆ ) , θ ) captures mixed dependencies of the loss L on y and θ .
Note that when the loss L contains no terms mixing h ( ϕ ) and θ , as in the weight decay example we mentioned earlier, this second-order derivative is zero.
As for this weight decay example the resulting updates are the same as for the loss without any weight decay, this indicates that some θ -dependent losses are not captured in the least-control principle we introduced in the main text.
We now propose an extended formulation of the least-control principle to fully incorporate θdependent losses:
[Equation]
Intuitively, the least-control objective ∥ ψ ∥ 2 combined with the constraint that the loss is minimized w.r.t.
ϕ at the controlled equilibrium captures all the ways θ influences the loss through ϕ , and the new term L ( ϕ, θ ) takes care of the ways in which θ influences the loss without influencing ϕ , while keeping the same stationarity conditions for the LCP-Lagrangian (the extra term ∇ y L ( h ( ϕ ⋆ ) , θ ) that now appears in ∂ ϕ L vanishes).
Using the same proof strategy as in Theorem 1, we obtain the following gradient:
[Equation]
This generalized least-control principle now allows to fully consider terms in the loss that depend on θ , while keeping the nice properties of being single-phased, having no need to invert any Jacobian, and using no infinitesimal learning signals.
However, now the learning rule is not always first-order anymore due the mixed second-order derivative.
One special case of interest where the resulting learning rule is first-order again is when the θdependence of the loss is encapsulated in the decoder h ( ϕ, θ ) , i.e. when we have the loss L ( h ( ϕ, θ )) .
Applying Eq.
29 to this loss results in:
[Equation]
where the last term vanishes as ∂ y L ( h ( ϕ ⋆ , θ ))
= 0 is enforced by the constraints of the least-control objective of Eq.
When we use the inversion dynamics (8) or the energy-based dynamics (10), we can easily access the Lagrange multiplier µ ⋆ .
For this, let us take a look at the equilibrium equation of the inversion dynamics (8), which is equivalent to the equilibrium condition of the energy-based dynamics (10) if ∂ ϕ f ( ϕ ⋆ , θ ) is invertible:
[Equation]
Comparing this equilibrium condition with the KKT conditions of Eq.
22, and using the relation λ ⋆ = − ψ ⋆ , we have that
[Equation]
when ∂ ϕ h ( ϕ ∗ , θ ) is full rank and in the limit of α → 0 such that ( ϕ ∗ , ψ ∗ )
=
( ϕ ⋆ , ψ ⋆ ) .
Taking everything together, we arrive at the following simple first-order update rule for models with a θ -dependent decoder h , in the limit of α → 0 :
[Equation] [Equation]
Note that this update only holds when the inversion dynamics (8) or energy-based dynamics (10) are used.
If other dynamics are used for finding the optimal control ψ ⋆ , one needs to investigate case-by-case how to compute the Lagrange multiplier µ ⋆ .
S2.3 Theorem 2: general controller dynamics
Theorem 2 shows that we can find optimal control ψ ⋆ and state ϕ
⋆ for Eq.
20 through dynamics exhibiting the following equilibrium equations
[Equation]
in the limit α → 0 , when Q ( ϕ α ∗ , θ ) satisfies the column space condition (35).
We prove that by showing that the limit satisfies the KKT conditions, and hence is optimal.
We restate Theorembelow with the full technical specifications.
Theorem S2 (Formal) .
Let ( ϕ α ∗ , u α ∗ ) be a steady state of the generalized dynamics satisfying (34) such that ϕ
α ∗ admits a finite limit ϕ
⋆ when α goes to 0.
Assume that ∂ ϕ f ( ϕ ⋆ ) and ∂ 2 y L ( ϕ ⋆ ) are invertible,
∂ ϕ h ( ϕ ⋆ ) is full rank, Q is continuous, and that the following column space condition is satisfied:
[Equation]
Then, u α ∗ converges to a finite limit u ⋆ and ( ϕ ⋆ , Q ( ϕ ⋆ , θ ) u ⋆ ) verifies the KKT conditions for the least-control problem (20) .
Proof.
Note that there is a slight abuse of notation in the statement of the theorem as we use the superscript ⋆ to denote the limits of the different quantities without yet knowing if they correspond to an optimal quantity for the least-control problem (20).
Part of the proof is to actually show that those limits are optimal.
First, we show that u α ∗ has a finite limit when α goes to 0.
The function ϕ α ∗ admits a finite limit ϕ ⋆ when α goes to zero by hypothesis.
Taking α → 0 in the equilibrium equations (34) results in
[Equation]
36) as f is continuous.
The matrices ∂ ϕ h ( ϕ ⋆ ) and ∂ ϕ f
( ϕ ⋆ , θ ) − 1 are full rank, so the column space condition implies that Q ( ϕ ⋆ , θ ) is also full rank.
We can therefore extract Q ( ϕ α ∗ , θ ) out of the limit in the previous equation:
[Equation]
so that u α ∗ = − α − 1 ∇ y L ( h ( ϕ α ∗ )) has a finite limit that we note u ⋆ , using once again the fact that
Q ( ϕ ⋆ , θ ) is full rank and (36).
In particular, this implies that ϕ
⋆ is feasible as ∇ y L ( h ( ϕ α ∗ ))
=
O ( α ) so ∇ y L ( h ( ϕ ⋆ ))
= 0 .
We can now prove that the KKT conditions are satisfied at ( ϕ ⋆ , ψ ⋆ ) with ψ ⋆ := Q ( ϕ ⋆ , θ ) u ⋆ .
Note that we have f ( ϕ ⋆ , θ ) + ψ ⋆ = 0 by taking the limit α → 0 in the equilibrium equation
[Equation]
As col [ Q ( ϕ ⋆ , θ )] = row (cid:2) ∂
ϕ h ( ϕ ⋆ ) ∂
ϕ f ( ϕ ⋆ , θ ) − 1 (cid:3) , and ∂ 2 y L ( h ( ϕ ⋆ )) is invertible, there exist a µ and µ ⋆ , such that
[Equation]
[Equation]
Multiplying from the left with ∂ ϕ f
( ϕ ⋆ , θ ) ⊤ results in
[Equation]
[Equation]
We now take λ ⋆ := − ψ ⋆ and can easily check that ( ϕ ⋆ , ψ ⋆ , λ ⋆ , µ ⋆ ) is a stationary point for the
LCP-Lagrangian, i.e. it satisfies the KKT conditions (20).
It follows that ψ ⋆ is an optimal control and ϕ ⋆ an optimally-controlled state.
S2.4 Propositions 3, 4, 5: the least-control principle solves the original learning problem
We here restate the results from Section 2.3 and prove them.
Proposition S3.
Assuming L is convex on the system output y , we have that the optimal control ψ ⋆ is equal to
iff.
the free equilibrium ϕ ∗ minimizes L .
Proof.
First remark that, as L is convex, ϕ being a minimizer of L ( h ( ϕ )) is equivalent to ∇ y L ( h ( ϕ ))
= 0 .
Then, the two conditions are equivalent to ϕ ⋆ and ϕ ∗ satisfying both f ( ϕ, θ ) =and ∇ y L ( h ( ϕ ))
= 0 .
Proposition S4.
Assuming L is convex on the system output y , a local minimizer θ of the least-control objective H is a global minimizer of the original learning problem (1) , under the sufficient condition that ∂ θ f
( ϕ ⋆ , θ ) has full row rank.
Proof.
As θ is a local minimizer of H ( θ ) , we have that
[Equation]
The full row rank assumption of ∂ θ f ( ϕ ⋆ , θ ) ensures that f ( ϕ ⋆ , θ ) = 0 .
We hence have that ϕ
⋆ is a global minimizer of L ( h ( ϕ )) , as ∇ y L ( h ( ϕ ⋆ ))
= 0 , and L is convex, and satisfies f ( ϕ ⋆ , θ ) = 0 .
It follows that θ is a global minimizer for the original learning problem.
Remark S1 .
In the last two propositions, we assumed that the loss L is convex on output units.
This is for example the case in our supervised learning experiments, but not for meta-learning.
If we relax this assumption, Propositions 3 and 4 still hold, with the difference that global minimizers become local ones.
Additionally, the result of those two propositions does not only hold in the strong control limit but also in the α > 0 regime, under the strict feedback condition of Proposition S9.
The proof is a direct combination of the proof of the two propositions above with the stationarity result of Proposition S9.
Proposition S5.
If 12 ∥ f ∥ 2 is µ -strongly convex as a function of ϕ , L ◦ h is M -Lipschitz continuous and the minimum of L is 0, then
[Equation]
Proof.
As h ( ϕ ∗ ) minimizes L and L is Lipschitz-continuous,
[Equation]
The strong convexity of 12 ∥ f ∥ 2 yields
[Equation]
as ϕ ∗ is a global minimizer of 12 ∥ f ∥ 2 .
Gathering the last two inequalities gives the desired result.
We state and prove the remaining informal statements on the impact of approximate equilibria appearing in Section 2.3 in Section S2.6, as they require the energy-based view of the least control principle to be proved.
S2.5 The least-control principle as constrained energy minimization
In Section 2.4, we show that substituting the constraint f ( ϕ, θ ) + ψ = 0 back into the least-control problem implies that ϕ
⋆ is a minimizer of
[Equation]
The same objective can be obtained from an energy-based perspective, by minimizing the augmented energy F ( ϕ, θ, β )
= 12 ∥
f ( ϕ, θ ) ∥ 2 + βL ( h ( ϕ )) and taking the limit β → + ∞ .
We formalize this result by first showing that the limit of stationary points of F when β → ∞ satisfies the
KKT conditions (Proposition S6), and that the global minimizers coincide, under more restrictive assumption (Proposition S7).
Note that the KKT conditions associated to (45) are different from the ones in Eq.
22: the corresponding Lagrangian is
[Equation] [Equation]
and KKT conditions are
[Equation]
Proposition S6.
Let ϕ β ∗ be a function of β that admits a finite limit ϕ
⋆ when β goes to infinity and verifies
[Equation]
for every β .
If we further assume that the loss Hessian ∂ 2 y L ( h ( ϕ ⋆ )) is invertible and ∂ ϕ h ( ϕ ⋆ ) is full rank, then ϕ
⋆ satisfies the KKT conditions associated to Eq.
Proof.
We use the shorthand E := 12 ∥ f ∥ 2 for conciseness.
For every β , ϕ β ∗ verifies
[Equation]
By taking β to infinity in the equation above and using continuity of ∂ ϕ E , we obtain
[Equation]
This first implies that
[Equation]
51) as ∂ ϕ h , ∂ y L and h are continuous, and then that ∇ y L ( h ( ϕ ⋆ ))
=
as ∂ ϕ h ( ϕ ⋆ ) is full rank.
Eq.
50, along with ∂ ϕ h ( ϕ ⋆ ) being full rank, implies that β∂ y L ( h ( ϕ β ∗ )) admits a finite limit, note it µ .
As ∂ 2 y L ( h ( ϕ ⋆ )) is invertible, there exists µ ⋆ such that ∂ 2 y L ( ϕ ⋆ ) µ ⋆ = µ .
Put back into (50) it yields
[Equation]
52) hence ϕ
⋆ satisfies the KKT conditions associated to (45).
Proposition S7.
Assume L to positive and equal to 0 if and only if ∇ y L = 0 .
Let ϕ β ∗ be a global minimizer of the augmented energy F for every β , such that ϕ β ∗ admits a finite limit ϕ
⋆ when β goes to infinity.
Then the limit ϕ
⋆ is a global minimizer of the constrained optimization problem (45) .
Proof.
First, remark that the condition on the minimizers of L implies that solving
[Equation]
is equivalent to solving
[Equation]
We use the second characterization in the rest of the proof.
We introduce the short hand
[Equation]
For any ϕ we have that
[Equation]
[Equation]
by definition of ϕ β ∗ , in particular for all the ϕ verifying the constraint L ( h ( ϕ ))
= 0 .
It follows that
[Equation]
The last inequality can be rewritten as
[Equation]
The upper bound converges to 0 as the numerator converges to a finite value by continuity of ∥ f ∥ 2 .
Since L is positive and continuous and h is continuous we obtain L ( h ( ϕ ⋆ ))
= 0 , i.e., ϕ ⋆ is feasible.
We now show that ∥ f ( ϕ ⋆ , θ ) ∥ 2 / 2 = f ⋆ .
As ϕ ⋆ is feasible we have
[Equation] [Equation]
This implies that
[Equation] [Equation]
where we used the positivity of L for the last inequality.
Because of (57), we also have
[Equation]
(60) so that the combination of the last two equations yield
[Equation]
61) and
[Equation]
This finishes the proof.
Remark S2 .
Under the same assumptions, we can actually show that, for any β , β ′ ∈ R + , we have
[Equation]
This can be obtained by combining Proposition S7 and the fact that β (cid:55)→ F ( ϕ β ∗ , θ, β ) is a non decreasing function as
[Equation]
The function β (cid:55)→ F ( ϕ β ∗ , θ, β ) therefore converges to the least-control objective H ( θ ) from below.
In the energy-based view of the least-control principle, the least-control objective becomes
[Equation]
[Equation]
We use this formulation to provide an alternative proof to Theorem S1 that might be insightful for the reader.
Alternative proof of Theorem S1.
Theorem S1 states that
[Equation]
We use the shorthand notation E := 12 ∥ f ( ϕ, θ ) ∥ 2 .
The chain rule yields
[Equation]
As ∇ ϕ L is independent of θ , we have that d θ h ( ϕ ⋆ ) = 0 .
This rewrites ∂ ϕ h ( ϕ ⋆ )
d θ ϕ
⋆ = 0 .
This can be combined to the KKT conditions to show that the indirect term is equal to 0 :
right multiplying the condition
[Equation]
by d θ ϕ ⋆ gives
[Equation]
This finishes the proof.
S2.6 The parameter update is robust to approximate optimal control
The purpose of this section is to formally prove that the first-order update prescribed by Theoremis robust to inaccurate approximations of the optimally-controlled state ϕ ⋆ .
More precisely, we show that the quality of the gradient can be linked to the distance between the approximate and the true optimally-controlled state (Proposition S8) and that the update is minimizing a closely related objective when the perfect control limit is not exactly reached (Proposition S9).
Proposition S8.
Let ϕ ∗ be an optimally-controlled state and ˆ ϕ an approximation of it that is used to update the parameters θ .
Then, if the conditions of Theorem S1 apply and ∂ θ f ( ϕ, θ ) ⊤ f ( ϕ, θ ) is
M -Lipschitz continuous we have that
[Equation]
Proof.
We use Theorem S1 and then the Lipschitz continuity assumption:
[Equation]
We empirically verify that the behavior predicted by Proposition S8 holds in practice.
To do so, we compare the estimated gradient f (ˆ ϕ, θ ) ⊤ ∂ θ f
(ˆ ϕ, θ ) for several approximations ˆ ϕ of the optimallycontrolled state ϕ ∗ to the true least-control gradient d θ H ( θ ) on a feedforward neural network learning problem.
Figure S1 shows the gradient estimation error as a function of the steady state approximation ∥
ˆ ϕ − ϕ ∗ ∥ .
The evolution is almost linear, suggesting that the inequality in Eq.
70 is close to being an equality for some constant M .
Proposition S9.
Let ( ϕ ∗ , u ∗ ) verifying the steady-state equations
[Equation]
and
[Equation]
If
[Equation] [Equation]
then ϕ ∗ is a stationary point of the augmented energy F ( ϕ, θ, α )
= 12 ∥
f ( ϕ, θ ) ∥
+ α − 1 L ( h ( ϕ )) .
Steady state approximation 0.
G r ad .
e s t. e rr o r
Steady state approximation 0.
G r ad .
e s t. e rr o r
A
B
Proof.
We first use the formula for Q and use the steady-state equation on u ∗ :
[Equation]
Left-multiplying by ∂ ϕ f ( ϕ ∗ , θ ) yields
[Equation]
75) which is exactly ∇ ϕ F ( ϕ, θ, α )
= 0 .
Proposition S9 allows understanding what the update ∂ θ f
( ϕ ∗ , θ )
⊤ f ( ϕ ∗ , θ ) is doing when the controlled dynamics reach an equilibrium, but α is non zero.
In this case, we cannot guarantee that
Q ( ϕ ∗ , θ ) u ∗ is an optimal control.
Still, when the strict condition on Q of Eq.
73 is satisfied (it is strict compared to the more general condition (35) of Theorem S2), the update prescribed by the least-control principle is minimizing F ( ϕ ∗ , θ, α ) as
[Equation]
We showed in Section S2.5 that this objective is closely related to the least-control objective, and gets closer when α → 0 + .
Note that the same conclusions apply if we use a proportional controller with strength β , as it verifies the steady-state equation (72) for α = β − 1 .
S2.7 Quick review of constrained optimization
We heavily rely on the Karush–Kuhn–Tucker (KKT) conditions and Lagrange multiplier method for characterizing constrained optimum.
We state here some important properties that are throughout the proofs, and we refer the interested reader to [93, 94] for a comprehensive overview of the relevant theory.
KKT conditions.
Consider the following equality-constrained optimization problem
[Equation]
with f some scalar function to be optimized and g a vector-valued function defining equality constraints on the set of feasible states.
The corresponding Lagrangian is defined as
[Equation]
[Equation]
with λ the so-called Lagrange multipliers.
It can be shown, e.g. Nocedal and Wright [93, Theorem 12.1], that local solutions x ⋆ of the constrained optimization problem defined above satisfy the KKT conditions: there exists a Lagrange multiplier λ
⋆ such that
[Equation]
or equivalently such that ( x ⋆ , λ ⋆ ) is a stationary point of the Lagrangian, i.e. ∂ x ⋆ ,λ ⋆ L ( x ⋆ , λ ⋆ ) = 0 .
The KKT conditions are first-order stationary conditions for constrained optimization, in the same way ∂ x f = 0 is a stationary condition for unconstrained minimization.
On the other side, there exists sufficient conditions under which those stationary conditions give a local, constrained or unconstrained, minimum.
For unconstrained optimization, it can be that the Hessian ∇ 2 x f is positive definite.
For constrained optimization there are several variants, but those conditions can more or less be understood as the Hessian ∂ 2 x L ( x ⋆ , λ ⋆ ) of the Lagrangian w.r.t.
x is positive definite (see e.g.
Nocedal and Wright [93, Theorem 12.5]).
Differentiating through minima.
We now consider that both the objective f and the constraints g are dependent on some parameter y , and aim to calculate how f ( x ⋆ ( y ) , y ) will react to a change in y , that is we aim to compute the gradient associated to
[Equation]
For unconstrained bilevel optimization (i.e. without the equality constraints g ( x, y ) = 0 ), we differentiate through the inner minima x ⋆ ( y ) using the necessary stationary condition ∂ x f ( x ⋆ ( y ) , y )
= 0 , combined with the implicit function theorem [89] to ensure that the implicit function x ⋆ ( y ) is well defined.
This gives
[Equation]
Note that d y x ⋆ ( y ) can be obtained via the implicit function theorem by using the first-order condition ∂ x f ( x ⋆ ( y ) , y )
=
but we do not need to compute it.
A similar technique can be applied to differentiate through a constrained minimum.
We first remark that x ⋆ satisfies the KKT conditions so there exists a Lagrange multiplier
λ ⋆ ( y ) such that
[Equation]
We then use the implicit function theorem on the KKT condition ∂ x,λ L ( x ⋆ , λ ⋆ , y ) = 0 to show that the functions x ⋆ ( y ) and λ ⋆ ( y ) are well defined and differentiable, under the assumption
that the
Hessian of the Lagrangian w.r.t.
x and λ is invertible.
Finally, we have:
[Equation]
where the last inequality holds as x ⋆ ( y ) and λ ⋆ ( y ) are stationary points of the Lagrangian L .
S Implicit gradient, recurrent backpropagation and the link to the least-control principle
The least-control principle aims at solving the learning problem
[Equation]
indirectly, by minimizing the least-control objective.
This leads to first-order updates, contrary to the direct minimization of the loss L ( ϕ ∗ ) .
In this section, we derive the implicit gradient associated to direct loss minimization, show how the recurrent backpropagation computes it, and finally highlight the similarities behind the least control principle and recurrent backpropagation.
Implicit gradient.
The implicit gradient d θ L ( ϕ ∗ ) can be calculated analytically using the implicit function theorem [89], we here calculate it.
The quantity ϕ ∗ can be characterized as an implicit function of θ , which verifies
[Equation] [Equation]
for all θ .
The implicit function theorem guarantees that ϕ ∗ is properly defined as an implicit function of θ if ∂ ϕ f ( ϕ ∗ , θ ) is invertible, and then
[Equation]
We can then use the chain rule to obtain the implicit gradient:
[Equation]
Recurrent backpropagation.
The implicit gradient in computationally intractable for most of practical applications due to the matrix inversion.
The key idea behind the recurrent backpropagation algorithm is that the column vector
[Equation]
87) is the steady state of the dynamics
[Equation]
or alternatively the fixed point of the iterative procedure
[Equation]
Once δ ∗ , or its estimation, is obtained through this dynamical procedure, it can then be used to estimate the implicit gradient with
[Equation]
Backpropagation.
When the computational graph encoded in f is acyclic, that is we can find a permutation of the state such that f ( ϕ, θ ) i only depends on the states ϕ j for j ≤
i , the computation of δ ∗ can be simplified.
Indeed, instead of running the dynamics of Eq. 88, one can directly compute δ ∗ through the fixed-point equation
[Equation]
as the Jacobian ∂ ϕ f ( ϕ ∗ , θ ) is a lower triangular matrix.
This is for example how δ ∗ is calculated for feedforward neural networks.
In such settings, we can therefore interpret the dynamics (88) to be the continuous time version of the backpropagation algorithm.
Comparison with the least-control principle.
We now compare the implicit gradient, as computed with recurrent backpropagation, with the gradient of the least-control objective, which is equal to
[Equation] [Equation]
as given by Theorem 1.
In addition to the close resemblance between the gradients (90) and (92), the dynamical equations on δ and ψ share some interesting similarities.
Let us take the example of the inversion dynamics
[Equation]
of Eq.
The ψ dynamics are very similar to the one of δ : they can be understood as multiplying the inverse of the Jacobian of f with an error minimization signal, that is either − ∂ y L or u , to yield δ ∗ or ψ ⋆ .
The important conceptual difference is that the controlled dynamics of the least-control principle simultaneously compute both the steady state ϕ ∗ and optimal control ψ ∗ in a single phase, whereas recurrent backpropagation uses two separate phases for computing ϕ ∗ and δ ∗ .
This unique feature of the least-control principle is made possible by letting the control ψ influence the dynamics and hence the steady state of ϕ .
S On the relation between the least-control principle, free energy and predictive coding
Predictive coding [36, 37, 56, 58][95] emerged as an important framework to study perception and sensory processing in the brain.
In this framework, the brain is assumed to maintain a probabilistic model of the environment, which is constantly used to perform inference on its sensory inputs.
Here, we expand in more detail on the relation between our least-control principle and predictive coding.
More specifically, we discuss how the constrained energy minimization of Eq.
9 relates to the free energy used in recent work on supervised predictive coding [36], and how the new insights of the least-control principle, such as more flexible dynamics, translate to the predictive coding framework.
S4.1 Supervised predictive coding
The starting point of standard predictive coding theories is the specification of a probabilistic generative model from latent causes towards sensory inputs; this model is then used to infer the most likely causes underlying incoming sensory stimuli.
Recent work [36] investigated supervised predictive coding, a form of predictive coding where the direction of causality is flipped, i.e., where one uses a discriminative model from sensory inputs towards latent causes, and trains this model by clamping its outputs to the correct teacher value and performs inference to propagate teaching signals throughout the network.
Whittington and Bogacz [36] related the parameter updates resulting from supervised predictive coding network to error backpropagation [31, 32] when the output is weakly nudged towards the teacher value instead of being clamped.
In Section S4.3 we show that the least-control principle relates the supervised predictive coding updates with standard teacher clamping to gradient updates on the least-control objective (3) thereby removing the need for the weak-nudging limit.
Supervised predictive coding uses a probabilistic latent variable model to compute the likelihood p ( y | x ; θ ) of the output y given the sensory input x .
More specifically, it uses a hierarchical Gaussian model, a particular type of directed acyclic graphical model, with the following factorized distribution
[Equation]
with latent variables z = { z l } L − 1 l =1 , parameters θ = { W l } Ll =1 , N ( v ; µ, Σ) a Gaussian distribution over a variable v with mean µ and correlation matrix Σ , and where we take σ ( z 0 ) =
x .
The goal of training this model is to change the model parameters W l to maximize the marginal likelihood for input-output pairs ( x, y
[Equation] [Equation]
As optimizing this marginal directly is intractable, predictive coding uses the variational expectation maximization method [95–98].
This method uses a variational distribution q ( z ; ϕ ) with parameters ϕ to approximate the posterior p ( z | x, y ) and then defines the free energy F as an upper bound on the negative log-likelihood:
[Equation]
with D KL the KL divergence which is always positive.
Now the variational expectation maximization method proceeds in two alternating phases.
In the expectation phase, it minimizes the free energy
F w.r.t.
ϕ for the current parameter setting of θ , i.e. it finds a good approximation
q
( z ; ϕ ) for the posterior.
In the maximization phase, it minimizes the free energy w.r.t.
θ for the updated parameter setting of ϕ .
To be able to perform the two phases using simple neural dynamics and local update rules, predictive coding uses the Dirac delta distribution q ( z ; ϕ ) =
δ ( z − ϕ ) as the variational distribution [98].
Now, the entropy term E q [log p ( y, z | x ; θ )] is independent of ϕ and hence we ignore it in the expectation and maximization step.
4 Taken together, this result in the following free energy (without entropy term):
[Equation]
with C a constant independent of ϕ and θ , x = σ ( ϕ 0 ) , and where we took for simplicity Σ l = Id and Σ y =
ρ − 1 Id .
For the expectation step, predictive coding interprets the parameters ϕ
= { ϕ l } L − 1 l =1 as a prediction neuron population and uses the gradient flow on F w.r.t.
ϕ as neural dynamics to find a ϕ ∗ that minimizes F .
For the maximization step, predictive coding performs a gradient step on F ( ϕ ∗ , θ ) w.r.t.
θ , evaluated at the steady-state neural activity ϕ ∗ .
Thus,
[Equation]
with the change ∆ θ applied after the neural dynamics has converged, i.e., when ˙ ϕ = 0 .
S4.2 Equivalence between the free and augmented energies
To link supervised predictive coding to the least-control principle, we further manipulate the free energy of Eq.
97 to relate it to the augmented energy F = 12 ∥
f ( ϕ, θ ) ∥ 2 + βL introduced in Section 2.4.
For this, we introduce a ‘ghost layer’ z L in between z L − 1 and y , that exists solely for the purpose of analyzing the free energy.
The joint probability distribution is now given by
[Equation]
We recover the same marginal likelihood p ( y | x ; θ ) as before if we have that ρ − 1 = β − 1 + 1 , assuming that ρ − 1 > 1 .
Using again the dirac delta distribution as variational distribution, we get the following augmented free energy
[Equation]
with ϕ the concatenation of { ϕ l } Ll =1 , L the squared error loss and where we ignored the constant term C .
Hence, we see that the free energy used in predictive coding is equivalent to the augmented energy F = 1 2 ∥ f ( ϕ, θ )
∥ 2 + βL introduced in Section 2.4.
Consequently, we can use the least-control principle to characterize predictive coding in the limit of β → ∞ .
S4.3 Learning with teacher clamping results in gradients on the least-control objective
Whittington and Bogacz [36] connected supervised predictive coding to gradient-based optimization of the loss L , when the variance of the output layer y goes to infinity.
In this limit, there is only an infinitesimal effect of the teaching signal on the rest of the network, arising by clamping y towards y true , as the model ‘does not trust’ the output layer y by construction.
This weak nudging limit is captured in the augmented energy of Eq.
(100) as the limit of β → 0 , and can be linked to gradient-based optimization of the loss L for more general energy functions beyond predictive coding [24].
Equipped with the least-control principle, we can now relate predictive coding to gradient-based optimization on the least-control objective of Eq.
3, without the need for infinite variance in the output layer.
In Sections 2.4 and S2.5, we show that when the neural dynamics minimize the augmented energy F ( ϕ, θ, β ) for β → ∞ , the parameter update ∆ θ of Eq.
98 follows the gradient on the least-control objective (3).
This perfect control limit of β → ∞ corresponds to the conventional teacher clamping setting, where the output y has a finite variance (without loss of generality, ρ = 1 in this case in our derivation, as ρ − 1 = β − 1 + 1 ).
S4.4 The optimal control interpretation of predictive coding leads to flexible dynamics.
Now that we connected predictive coding to the least-control principle, we can further investigate predictive coding through the lens of optimal control.
In predictive coding, the neural dynamics follow the gradient flow on the augmented free energy F of Eq.
[Equation] [Equation]
with σ ′ ( ϕ ) =
∂
ϕ σ ( ϕ ) .
By comparing the above equation to ˙ ϕ
= f
( ϕ, θ )
+ ψ , we have the optimal control ψ = σ ′ ( ϕ ) W ⊤ (cid:0) ϕ − Wσ ( ϕ ) − Ux (cid:1)
− βD ⊤ ∇ y L ( Dϕ ) For β → ∞ , the last term βD ⊤ ∇ y L ( Dϕ ) corresponds to an infinitely fast proportional control that clamps the output y =
ϕ L to the teacher y true .
The term σ ′ ( ϕ ) W ⊤ (cid:0) ϕ − Wσ ( ϕ ) − Ux (cid:1) then optimally propagates the control at the output level towards the rest of the network.
In predictive coding, the term ϕ − Wσ ( ϕ ) −
Ux is usually interpreted as an error neuron population ϵ .
Hence, in the optimal control view, the error neuron population ϵ optimally controls the prediction neuron population ϕ via ψ = σ ′ ( ϕ
) W ⊤ ϵ − βD ⊤ ∇ y L ( Dϕ ) , to reach a controlled network state that exactly matches the output target y true , while having the smallest possible error signals ∥
ϵ ∥ 2 = ∥
ϕ − Wσ ( ϕ ) −
Ux ∥ 2 .
Note that at equilibrium, we have that ψ = − f ( ϕ, θ )
=
ϵ .
This optimal control view is further corroborated by isolating the error neurons ϵ at the equilibrium of the neural dynamics (101), leading to ϵ ∗ =
ψ ∗ = − ( I − Wσ ′ ( ϕ ∗ )) −⊤
D ⊤ β ∇ y L ( Dϕ ∗ ) , which satisfies the column space condition of Theorem 2 with u ∗ = − β ∇ y L ( Dϕ ∗ ) , confirming that the error neurons steady state ψ ∗ is an optimal control.
Importantly, using the least-control principle, we can go beyond the gradient-flow dynamics on F and generalize the predictive coding framework to more flexible neural dynamics.
First, instead of clamping the output of the network towards the teacher value with an infinitely fast proportional controller, one can use more general output controllers that satisfy the equilibrium condition αu ∗ + ∇ y L
( Dϕ ) =
for α → 0 , such as an integral controller.
Next, as we identified the error neurons ϵ = ϕ − Wσ ( ϕ ) −
Ux as being an optimal control ϵ ∗ =
ψ ⋆ at equilibrium, we can use any dynamics satisfying Theorem 2 to compute these optimal error neurons and resulting neural dynamics ˙ ϕ .
For example, we can use the inversion dynamcis of Eq.
8 and 14 to dynamically compute the error neuron activity.
Strikingly, at the steady state, the error neurons computed with these inversion dynamics are indistinguishable from the error neurons computed with the energy-based dynamics of Eq.
101, even though the underlying dynamics and hence circuit implementation are completely different.
This ‘circuit invariance’ under the optimality condition of Theorem 2 opens new routes towards finding cortical circuits implementing predictive coding, which is a topic of high relevance in neuroscience [58].
Furthermore, the least-control principle allows unifying predictive coding with other existing theories for learning in the brain [17, 30] by uncovering possible equivalences of the underlying credit assignment techniques.
S
.5 Beyond feedforward neural networks
The underlying theory of predictive coding, which starts from an acyclic graphical model, is tailored towards feedforward neural networks.
However, starting from the augmented energy F of Eq.
(100), we can generalize predictive coding to equilibrium recurrent neural networks with arbitrary synaptic connectivity matrices W and U .
Although the link with probabilistic latent variable models is not straightforwardly extendable to equilibrium RNNs, the predictive coding interpretation based on error and prediction neurons remains valid.
To the best of our knowledge, our experiments testing this new setting of predictive coding for equilibrium RNNs are the first of their kind.
S Remarks on the least-control principle when using multiple data points
Without loss of generality, we consider a single data point in the formulation of the least-control principle in Section 2, for clarity of presentation.
Here, we discuss in more detail how multiple data points can be incorporated in the least-control principle.
S5.1 Loss defined over finite sample of data points
In many learning problems, as in supervised learning, the loss L is defined over a finite set of data samples:
[Equation]
As the losses associated to different samples are different, the corresponding teaching signal will impact the state differently.
We therefore consider ϕ to be a concatenation of all the sample-specific states { ϕ b } Bb =1 .
The loss is then equal to
[Equation]
Similarly, we define f ( ϕ, θ ) as a concatenation of all f ( ϕ b , θ ) , and ψ as a concatenation of all the controls ψ b .
We can then apply the least-control principle on this concatenated quantities.
As the least-control objective of Eq.
3 can be rewritten as the sum (cid:80) b
∥ ψ ⋆ b ∥ 2 , and has constraints that do not interact in between different datapoints b , its gradient can also be rewritten as a sum over the datapoints:
[Equation]
with H b ( θ ) the least-control objective for a single data point b .
It follows that one can use standard stochastic or mini-batch optimization methods to minimize the least-control objective H ( θ ) .
S5.2 Loss defined by
expectation over an infinite inputspace
When there exists an infinite number of data samples (e.g. a continuous input space), the loss can be defined as an expectation over this infinity of data samples:
[Equation]
One approach to incorporate this case in the least-control principle is to first sample a finite amount of data samples, and then apply the arguments of Section S5.1.
Another approach is to define the least-control objective as an expectation over the infinity of samples:
[Equation]
Then, under standard regularity conditions for exchanging the gradient and expectation operator, we can sample gradients of this least-control objective:
[Equation]
with d θ H b ( θ ) given by Theorem 1.
S The least-control principle for equilibrium RNNs
Here, we provide additional details on the equilibrium recurrent neural network models, the derivation of the local learning rules and the various controller designs.
S6.1 Equilibrium recurrent neural network model specifications
We use an equilibrium RNN with the following free dynamics:
[Equation]
with ϕ the neural activities of the recurrent layer, W the recurrent synaptic weight matrix, U the input weight matrix and σ the activation function.
We evaluate the performance of this RNN at equilibrium, by selecting a set of output neurons and measuring its loss L ( Dϕ ∗ ) , with D =
[0 Id] a fixed decoder matrix.
Learning a decoder matrix.
In practice, we can achieve better performance if we learn a decoder matrix to map the recurrent activity ϕ to the output y , instead of taking a fixed decoder D =
[0 Id] .
To prevent the loss L ( Dϕ ) from depending on the learned parameters θ , we augment the recurrent layer ϕ
with an extra set of output neurons, and include a learned decoder matrix ˜ D inside the augmented recurrent weight matrix ¯ W , leading to the following free dynamics:
[Equation]
with ¯ ϕ the concatenation of ϕ with a set of output neurons and θ = { W, U, ˜ D } the set of learned parameters.
To map the augmented recurrent layer ¯ ϕ to the output y , we again use a fixed decoder
D =
[0 Id] that selects the ‘output neurons’ in ¯ ϕ .
At equilibrium, we now have y =
D ¯ ϕ = ˜
Dσ ( ϕ ) .
Hence, we see that at equilibrium, the augmented system of Eq.
109 with a fixed decoder D and hence a loss L ( D ¯ ϕ ) independent of θ is equivalent to the original system of Eq.
108 with a learned decoder D and loss L ( Dσ ( ϕ )) .
We can now use the least-control principle on the augmented system of Eq.
109 to learn the weight matrices θ =
{ W, U, ˜ D } , which we show in the next section.
Including biases.
In practice, we equip the neurons with a bias parameter b , leading to the following free dynamics
[Equation]
with the set of learned parameters θ = { W, U, b } .
This can be extended to the augmented system of
Eq. 109 by adding the augmented bias parameters ¯ b , which is a concatenation of the original bias b and the decoder bias ˜ b .
At equilibrium, we now have y =
D ¯ ϕ = ˜
Dσ ( ϕ ) + ˜ b .
For ease of notation, we omit the bias terms in most of the derivations in this paper.
Link with feedforward neural networks.
When the recurrent weight matrix has a lower blockdiagonal structure, the equilibrium of the RNN corresponds to a conventional deep feedforward neural network.
More specifically, taking
[Equation]
gives the following feedforward mappings at equilibrium
[Equation]
where we structure ϕ into L layers ϕ l , and take σ ( ϕ 0 )
=
x and y =
Dϕ = ϕ
L .
Hence, we see that the equilibrium RNN model also includes the conventional deep feedforward neural network.
Similarly, by further structuring W with blocks of Toeplitz matrices, the equilibrium point corresponds with a convolutional feedforward neural network.
Fixed point iterations.
For computational efficiency, we use fixed point iterations for finding the equilibrium of the free dynamics (108), which we need for the recurrent backpropagation baseline, and for evaluating the test performance of the trained equilibrium RNN.
[Equation]
[Figure]
controller
C controller
[Figure]
Dynamic inversion
Energy-based dynamics
S6.2 Deriving a local learning rule for equilibrium RNNs
The least-control principle prescribes to augment the RNN dynamics of Eq.
108 with an optimal controller ψ that leads the neural dynamics to a controlled equilibrium ϕ ∗ , where the output neurons y ∗ =
Dϕ ∗ minimize the loss L , while being of minimum norm ∥ ψ ⋆ ∥ .
This optimal control contains a useful learning signal, which we leverage in Theorem 1 to derive local first-order parameter updates ∆ θ = − d θ H ( θ )
= ψ ⋆ ⊤ ∂ θ f ( ϕ ⋆ , θ ) , with ( ψ ⋆ , ϕ ⋆ ) the minimizers of the least-control problem of Eq.
3, i.e. the optimal control and optimally controlled state, respectively.
In the next sections, we discuss in detail how to compute ( ψ ⋆ , ϕ ⋆ ) for the equilibrium RNN using neural dynamics.
Here, we apply the first-order update ∆ θ to the equilibrium RNN to arrive at the local synaptic updates of Eq.
Derivation of the local update rules.
To avoid using tensors in ∂ θ f ( ϕ ⋆ , θ ) , we vectorize the weight matrices W and U and use Kronecker products to rewrite the free dynamics of Eq. 108:
[Equation]
with ⊗ the Kronecker product, Id the identity matrix and ⃗W and ⃗U the vectorized form (concatenated columns) of W and U , respectively.
Taking θ the concatenation of ⃗W , ⃗U and b , we get
[Equation]
We can rewrite the resulting update in matrix form again, leading to the following parameter updates for the RNN:
[Equation]
Now assuming we have a controller ψ that leads the dynamics to the optimally controlled state ( ψ ∗ , ϕ ∗ )
=
( ψ ⋆ , ϕ ⋆ ) , we arrive at the updates of Eq.
Note that we can use these updates in any gradient-based optimizer.
Applying a similar derivation to the augmented RNN dynamics of Eq.
109, we arrive at the following updates for θ = { W, U, b, ˜ D, ˜ b } :
[Equation]
with ˜ ψ the control applied on the set of output neurons within ¯ ϕ , and ψ the control applied to the set of recurrent neurons ϕ (i.e. ¯ ϕ without the output neurons).
Controller dynamics.
Theorem 2 shows that we can compute an optimal control ψ ⋆ by using any controller ψ that leads the system to a controlled equilibrium
[Equation]
in the limit of α → 0 and with Q ( ϕ ∗ , θ ) satisfying the column space condition
[Equation]
Under these conditions, we have that Q ( ϕ ∗ , θ ) u ∗ is an optimal control ψ ⋆ .
Applied to the equilibrium
RNN setting, this result in the following column space condition.
[Equation]
with σ ′ ( ϕ ) :
=
∂ ϕ σ ( ϕ ) .
In the next sections, we propose various control dynamics ˙ ψ that satisfy these conditions at equilibrium and hence lead to an optimal control ψ ⋆ .
S6.3 A controller with direct linear feedback
We start with the simplest controller, that broadcasts the output controller u to the recurrent neurons ϕ with a direct linear mapping Q , resulting in the following dynamics:
[Equation]
with τ and τ u the time constants of the neural dynamics and output controller dynamics, respectively.
We visualize an example of such a direct linear feedback controller on a feedforward neural network in Figure S2.A.
We assume without further discussion that the output controller u which integrates the output error ∂ y L is implemented by some neural integrator circuit, a topic which has been extensively studied in ref.
S6.3.1 A single-phase learning scheme for updating the feedback weights
Theorem 2 guarantees that this dynamics converges to the optimal control ψ ⋆ if the columnspace condition of Eq.
120 is satisfied.
As Q is now a linear mapping, this condition cannot be exactly satisfied for all samples in the dataset, as the right-hand side of Eq.
120 is data-dependent, whereas Q is not.
Still, we learn the feedback weights Q simultaneously with the other weights W and U , to approximately fulfill this column space condition, without requiring separate phases.
For this, we add noise to the dynamics and we adapt a recently proposed feedback learning rule for feedforward neural networks [30, 51] towards our RNN setup, leading to the following system dynamcis and simple anti-Hebbian plasticity dynamics:
[Equation] [Equation]
Here, γ Q is a small weight-decay term, ϵ is noise from an Ornstein-Uhlenbeck process, i.e. exponentially filtered white noise with standard deviation s and timeconstant τ ϵ .
As post-synaptic plasticity signal, we use a high-pass filtered version u hp of the output control u , to extract the noise fluctuations.
We model the plasticity with continuous dynamics instead of a single update at equilibrium, as the noise ϵ changes continuously.
Building upon the work of Meulemans et al.
[30, 51], we show in
Proposition S10 that the feedback learning dynamics of Eq.
123 drives the feedback weights to a setting that satisfies the column space condition of Eq.
120, when trained on a single data point.
Proposition S10.
Assuming (i) a separation of timescales τ ≪ τ ϵ ≪ τ u ≪ τ Q , (ii) a small noise variance s 2 ≪ ∥ ϕ ∥ 2 , (iii) a high-pass filtered control signal u hp = u − u ss with u ss the steady state of the first moment of the output controller trajectory u , and (iv) stable dynamics, then, for a single fixed input x , the feedback learning dynamics of Eq.
123 let the first moment E [ Q ] converge towards a setting satisfying the column space condition of Theorem 2:
[Equation] [Equation]
with ϕ ss the steady state of the first moment of the state trajectory ϕ , and σ ′ ( ϕ ) =
∂
ϕ σ ( ϕ ) .
Proof.
The general idea behind the feedback learning rule of Eq.
123 is to correlate the noise fluctuations of the output controller u with the noise ϵ inside the neurons that caused these fluctuations.
As the injected noise propagates through the whole network, and the neural dynamics ˙
ϕ evolve on a faster timescale compared to the noise ϵ , the noise fluctuations in the output contain useful information on the network transformation D (Id − Wσ ′ )
− 1 which can be extracted by correlating these fluctuations with the noise ϵ .
We refer the interested reader to Appendix C of Meulemans et al.
[30] for a detailed discussion of this type of feedback learning rule for feedforward neural networks.
First, we define the neural fluctuations ˜ ϕ
= ϕ − ϕ ss and output controller fluctuations ˜ u
= u − u ss , with ϕ ss and u the steady state of the first moment of ϕ and u , respectively.
Using the assumption that the noise variance s 2 is much smaller than the neural activity ∥ ϕ ∥ 2 and that we have stable (hence contracting) dynamics, we perform a first-order Taylor approximation around ϕ ss and u , which for simplicity we assume to be exact, leading to the following dynamics:
[Equation]
where we used that − ϕ ss
+ Wσ ( ϕ ss ) + Ux + Qu ss = 0 and − ∂ y L ( Dϕ ss )
− αu ss = 0 by definition.
To compress notation, we introduce the variable ν as a concatenation of ˜ ϕ
and ˜ u .
[Equation]
We solve this linear time-invariant stochastic differential equation using the method of variation of constants [100], while assuming that ν = 0 at time t 0 , i.e. that the dynamics already have converged to the steady state at t 0 .
[Equation]
Now we turn to the first moment of the feedback weight learning (123), using ˜ u
= Cν with
C =
[0 Id] :
[Equation]
for which we used that E (cid:2) ϵ ( t ) ϵ ( t ′ )
⊤ (cid:3) = 12 τ ϵ exp( 1 τ ϵ | t − t ′ | ) for an Ornstein-Uhlenbeck process with timeconstant τ ϵ .
Now assuming that t ≫ t 0 and that we have stable dynamics (i.e. A has strictly positive eigenvalues), we can solve the integral of the matrix exponential:
[Equation]
We solve the inverse of this 2 × 2 block matrix analytically (following e
[Equation]
g. Lu and Shiou [101]), leading to
[Equation]
Using the separation of timescales τ ≪ τ ϵ ≪ τ u , this simplifies to
[Equation] [Equation]
Remembering that ˜ u
= u hp , we get the following plasticity dynamics using Eq. 123:
[Equation]
with ¯ Q ( t ) the first moment of Q ( t ) .
For γ > 0 , these dynamics are stable and lead to
[Equation]
thereby concluding the proof.
Isolating the postsynaptic noise ϵ with a multicompartment neuron model.
The feedback learning rule of Eq.
123 and the corresponding Proposition S10 represent the feedback learning idea in its simplest form.
However, for this learning rule, the feedback synapses need some mechanism to isolate the postsynaptic noise ϵ from the (noisy) neural activity.
Meulemans et al.
[30, 51] solve this by considering a multicompartment model of the neuron, inspired by recent dendritic compartment models of the cortical pyramidal neuron [14, 17, 41].
Here, a feedback (apical) compartment integrates the feedback input Qu , a basal compartment integrates the recurrent and feedforward input
Wσ ( ϕ ) + Ux and a central (somatic) compartment combines the two other compartments together and transmits the output firing rate σ ( ϕ ) to the other neurons.
In this model, we can assume that a part of the noise ϵ enters through the feedback compartment, and change the feedback learning rule to
[Equation] [Equation]
where (cid:0) Qu + sϵ fb (cid:1) is the feedback compartment activity, and hence locally available for the synaptic updates.
As E [ Quu ⊤ hp ] = Q E [ u hp u ⊤ hp ] = Q Σ u with Σ u the positive definite auto-correlation matrix of u hp , the result of Proposition S10 can be adapted to E (cid:2) Q ⊤ ss (cid:3) ∝ M∂ 2 y L ( Dϕ ) ss )
D (Id −
Wσ ′ ( ϕ ss )) − 1 , with M =
(Σ u + γ Id) − 1 a positive definite matrix.
This new fixed point of Q also satisfies the column space condition of Eq. 120.
Improving the parameter updates.
When the column space condition is not perfectly satisfied, as is the case with this direct linear feedback controller when multiple data points are used, the empirical performance can be improved by changing the parameter updates towards
[Equation]
This learning rule uses the local derivative of the nonlinearity σ as a heuristic to prevent saturated neurons from updating their weights, which is known to improve performance in feedforward networks [30, 51].
Alignment results.
We empirically tested the controller with direct linear feedback and trained feedback weights Q on the MNIST digit recognition task.
Figure S3 shows that the updates of Eq.
136 are approximately aligned to the gradients −∇ θ H ( θ ) on the least-control objective, indicating that the feedback weight learning for Q is successful and the controller with direct linear feedback approximates the optimal control.
[Figure]
W of the least-control principle for training an equilibrium
RNN on MNIST: a controller with trained linear feedback connections (LCP-LF) and a controller using dynamic inversion with trained feedback weights via Kolen-Pollack learning (LCP-DI
KP).
S6.3.2 Simulation details
For computational efficiency, we run fixed-point iterations for finding the equilibrium of the controlled neural dynamics shown in Eq.
121, which in this case is equivalent to simulating the dynamics with the forward Euler method with a simulation stepsize equal to the timeconstant:
[Equation]
We use the fixed points ϕ ∗ and u ∗ to update the parameters θ = { W, U, b, ˜ D, ˜ b } according to Eq.with ψ ∗ =
Qu ∗ .
For training the feedback weights, we simulate the stochastic differential equations of Eq.
122 with the Euler-Maruyama method [100], starting from the fixed points computed in Eq.
[Equation]
with ∆ t the simulation stepsize and ∆ ξ ∼ N (0 , Id) white Gaussian noise that is drawn independently for each simulation step.
The factor 1 √ ∆ t in front of ∆ ξ is due specific properties of Brownian motion in the simulation of stochastic differential equations.
For computational efficiency, we accumulate the weight updates for Q over the simulation interval, and apply them at the end:
[Equation] [Equation]
where m is the simulation step and we use u hp = u − u ∗ , with u ∗ the fixed point of Eq.
(137), and where we scale by the noise variance s 2 to remove the dependence of the update magnitude on this hyperparameter.
For all parameter updates, we use the Adam optimizer.
S
Using general-purpose dynamics for computing an optimal control
In the main text (Section 3.1.2) we discussed the application of our two general-purpose optimal control methods to an equilibrium RNN.
Here, we provide an expanded discussion on the neural network architectures each method yields.
While we leave the development of more detailed biological models for future work, we comment on how these controlled RNNs may be implemented in cortical circuits, sketching a number of alternative circuit designs.
We end this section with providing additional simulation and experimental details.
S6.4.1 Dendritic error compartments for dynamic inversion
In Section 3.1.2 we applied our general-purpose dynamic inversion method (8) to steer equilibrium
RNNs towards optimally-controlled states.
We restate here the resulting optimal control circuit (14) and discuss afterwards two possible network implementations, where feedback error signals are represented in dendritic compartments.
Assuming without loss of generality that the output controller is of the leaky-integral kind, the resulting network dynamics (14) is:
[Equation]
where y =
Dϕ is the output neuron state, a subset of the full neuron state ϕ determined by a fixed selector matrix D .
Figure S2.B shows an instantiation of this circuit on a feedforward neural network.
In Eq.
140, the control variable ψ follows its own dynamics ˙ ψ , which serves the purpose of inverting ∂
ϕ f ( ϕ, θ ) ⊤ .
This can be seen by inspecting the controlled steady state:
[Equation]
If the inverted factor appearing in the equation above would correspond to ∂ ϕ f ( ϕ ∗ , θ ) −⊤ , the network would be at an optimally-controlled state, where the weight updates following from our theory assume the Hebbian form
[Equation]
For this to be the case, we need to satisfy the symmetry requirement S = W ⊤ .
This corresponds to a form of weight transport, assuming that S and W are two distinct sets of synaptic connections.
We present now two alternative circuit implementations which allow maintaining S ≈ W ⊤ using local learning rules, so that the equations governing the change ∆ W , ∆ U and ∆ S of all synaptic weights only depend on quantities presumed to be available pre- and post-synaptically and at the same time.
In both cases, we build upon previous theories of error-driven cortical learning and assume that our control signal ψ corresponds to the apical dendritic activity of a cortical pyramidal cell, and ϕ to its somatic activity.
According to this view, apical dendrites encode neuron-specific credit assignment signals ψ ∗ which are responsible for determining which neurons should potentiate or depress their connections, and by how much.
We therefore extend previous models of apically-controlled synaptic plasticity [14, 18, 20, 23, 41], for which there is some experimental evidence [102], to the case of recurrently-connected networks.
Multiplexed codes.
Interpreting our apical dendrite dynamics ˙ ψ in literal terms appears to require dendrodendritic synapses which bypass the soma, due to the apical-to-apical term ψ ← Sψ occurring in (140).
While such connections are known to exist in the brain [103], they are rare.
We thus highlight an alternative implementation, which builds on the interesting proposal that pyramidal cells might be capable of transmitting credit assignment signals alongside their intended outputs, by means of a multiplexed code [14, 23].
The basic premise of this theory is that certain synaptic connections are sensitive to high-frequency bursts of spikes only, which can be triggered by increasing apical activity, whereas other connections are tuned to filter out such events.
Each connection type would then differentially reflect either apical or somatic activity, respectively; the required specific tuning to burst events or otherwise can be achieved for example by resorting to different profiles of short-term plasticity for each connection type.
Here, we leverage on this idea and propose to replace the dendrodendritic (direct apical-to-apical) connections appearing in (140) by common (axodendritic) apical-targetting synapses mediated through the soma (i.e., soma-to-apical ψ ← ϕ synapses), tuned to be sensitive to burst events.
This design enables keeping the circuit approximately symmetric ( S ≈ W ⊤ ) through local burst-dependent plasticity rules, ∆ S
= σ ( ϕ ∗ ) ψ ⊤∗ − γS and ∆ W = ψ ∗ σ ( ϕ ∗ ) ⊤ − γW , a form of Kolen-Pollack learning [42, 54].
Interestingly, the resulting network model differs in a conceptually important – and experimentally testable – way from the multiplexing model originally proposed by Payeur et al.
[23]: in our model, apical control signals should steer (thus, influence) the network state ϕ towards a controlled equilibrium, and therefore should not be filtered out from the somatic voltage dynamics ˙ ϕ , while the model of Payeur et al.
[23] fully multiplexes credit assignment information and the actual computations carried out by the network.
Critically, our major functional requirement is that apicaltargetting connections be capable of selectively transmitting burst events (e.g., through short-term facilitating plasticity), and we make no further claims about the short-term plasticity of the remaining connections, leaving open the possibility of using this mechanism for other computational purposes unrelated to multiplexing.
Dendritic errors via lateral inhibition.
Our network dynamics (140) is also compatible with an alternative proposal for how apical dendrites may come to encode credit assignment information, then used to steer synaptic plasticity within a neuron [17, 39].
In that model, dendritic errors emerge thanks to an auxiliary population of neurons, modeled after a particular class of inhibitory interneurons which preferentially target apical dendrites.
These interneurons are set up such that they learn to reproduce the activity of pyramidal neurons.
Both pyramidal neurons and interneurons feedback to apical dendrites, but with opposite sign.
Sacramento et al.
[17] showed that when the interneurons perfectly track pyramidal neurons (sometimes referred to as a ‘tight’ inhibitory-excitatory balance [104]) and an output error is generated, the remaining steady-state apical activity corresponds to a backpropagated error.
We briefly sketch here a proof-of-concept mapping of our dynamics (140) onto this model, while leaving more realistic implementations to future work.
We first replicate our recurrently-connected neurons with a population of interneurons, whose state we denote by δ , and let both types of neurons feedback onto apical dendrites.
Now, we follow the supplementary analysis of ref.
[17] and assume that both populations have exactly the same connectivity and weights, a condition to ensure successful tracking and error propagation, which can be reached with the local weight updates for the interneurons introduced in ref.
Moreover, for simplicity, here we assume our neurons are linear and ignore factors involving the derivative of the transfer function ∂ ϕ σ , although it is possible to take such factors into account with a more detailed construction.
Taking ˙ ψ = − ψ + Sϕ −
Sδ
+ D ⊤ u as our apical dendrite dynamics and inspecting its steady-state yields ψ ∗ =
(Id − S ) − 1 D ⊤ u ∗ , as the interneuron activity perfectly tracks the pyramidal neuron activity Wϕ + Ux , but does not include the apical activity ψ .
This is the optimally-controlled equilibrium we sought.
As with the multiplexed code described above, approximate symmetry S ≈ W ⊤ can then be maintained with local rules via
Kolen-Pollack learning.
S6.4.2 Error neurons for energy-based dynamics
In the main text and in Sections S2.5 and S4, we have seen that the optimal control problem arising under our principle can be generically approached using a (constrained) energy-minimizing dynamics.
We restate here the simple gradient-flow dynamics (15) presented in the main text:
[Equation]
(143) where u can be any output controller which enforces the constraint that the loss L is minimized with respect to the output neural activity y .
The circuit corresponding to those dynamics is shown on Figure S2.C. We now briefly discuss how this system can be implemented using a predictive coding architecture featuring two distinct subpopulations of neurons, generalizing the model of
Whittington and Bogacz [36] to the RNN setting.
In this architecture, ψ is interpreted as the activity of a population of prediction error neurons, while ϕ corresponds to the activity of prediction neurons.
Error neurons ψ act as comparators, which measure deviations of the actual state of prediction neurons ϕ from the expected state µ :=
Wσ ( ϕ ) − Ux ; in this model, such deviations dynamically adjust the predictions ϕ towards an optimally-controlled steady-state in which the output loss is minimal (c.f.
Section S4).
The critical architectural difference to the models of Whittington and Bogacz [36] and
Rao and Ballard [56] is that in our case the expected state µ does not necessarily stem from different network layers.
A hierarchically-structured connectivity matrix W is a special case of our model; we allow for top-down, lateral and bottom-up contributions to the expected states µ .
S6.4.3 Training deep equilibrium models with the least-control principle.
We use deep equilibrium models that consist out of three main modules: (i) an encoder g ( x, θ ) that maps the input x to the implicit layer ϕ , (ii) an implicit layer defined by f ( ϕ, θ ) = 0 where g ( x, θ ) is incorporated inside f ( ϕ, θ ) , and (iii) a decoder h ( ϕ, θ ) that maps the implicit layer towards the output y .
When h ( ϕ, θ ) is independent of θ , we can use the inversion dynamics of Eq.
8 or the energy-based dynamics of Eq.
10 to compute an optimal control ψ ⋆ and use the first-order parameter updates of
Theorem 1.
To harvest the full power of deep equilibrium models, it is beneficial to train the decoder h ( ϕ, θ ) as well.
However, this poses the problem that the loss L ( h ( ϕ, θ )) is now dependent on θ and hence Theorem 1 cannot be applied out-of-the-box.
There are two general approaches to solve this challenge: (i) similar to the vanilla equilibrium RNNs, we can extend the state ϕ with an extra set of output neurons to absorb the θ -dependent decoder h ( ϕ, θ ) inside of the implicit layer; and (ii) we can use the extended version of the least-control principle derived in Section S2.2 that can handle θ -dependent losses, to derive the parameter updates.
Augmenting the implicit layer.
We can use an augmented state ¯ ϕ that concatenates the system states ϕ with an extra set of output neurons ˜ ϕ .
Next we augment the implicit layer f ( ϕ, θ ) towards
[Equation]
Now, we can use a fixed linear decoder D =
[0 Id] to select the output states ˜ ϕ
for the loss L ( D ¯ ϕ ) , which now is independent of θ .
This augmented system is then controlled by ¯ ψ which has the following dynamics when using the dynamic inversion algorithm of Eq. 8:
[Equation]
Combining this with the system dynamics of Eq.
144 leads to the following set of equilibrium conditions
[Equation]
with ˜ ψ the control applied to the augmented output neurons ˜ ϕ .
Grouping the parameters θ into the encoder parameters θ g , the implicit module parameters θ f , and the decoder parameters θ h , we get the following parameter gradients:
[Equation]
Note that due to the general treatment, if the implicit module, encoder or decoder consist of multiple computational layers, the above partial derivatives do not result in a local update of presynaptic activity times postsynaptic control signal, but require instead to backpropagate the credit assignment signal (the control) through the computational layers within the module.
The updates however remain first-order updates which is important for computational efficiency, and they remain local in time in contrast to recurrent backpropagation (c.f. Section S3).
When a design requirement is to have local updates in space, e.g. for biological plausibility, we can augment the system state ϕ with states representing each computational layer in the modules, such that each layer receives a dedicated control, making the resulting updates local in time and space.
Using the least-control principle for θ -dependent losses.
In Section S2.2, we extend the leastcontrol principle to θ -dependent losses, and among others derive a first-order update when the decoder h ( ϕ, θ ) is θ -dependent, which we restate below.
[Equation]
This first-order learning rule equals the gradient when the inversion dynamics (8) or energy-based dynamics (10) are used for computing the optimal control ψ ⋆ , in the limit of α → 0 .
As the strategy of augmenting the implicit layer to have a loss independent of θ only uses the theory explained in the main manuscript, we use this strategy for our experiments.
S6.4.4 Simulation details
Equilibrium RNNs.
We use the following fixed point iterations for finding the equilibrium of the inversion dynamics of Eq. 14:
[Equation]
[Equation]
The fixpoint iterations terminates for a given input when either the relative change in the norm of the dynamic states Φ = { ϕ } or Φ = { ϕ, ψ, u } is less than some threshold ϵ , i.e. ∥ Φ t − Φ t +1 ∥ 2 ∥
Φ t ∥∥ Φ t +1 ∥ ≤ ϵ , or when some iteration budget max_steps is exhausted.
When we learn the feedback weights S with Kolen-Pollack learning (LCP-DI KP), we use the following weight updates for S and W :
[Equation]
[Equation]
with γ the weight decay parameter.
When we do not train the feedback weights S (LCP-DI), we fix them towards the transpose of the recurrent weights S = W ⊤
and we use standard weight update for
W without weight decay (12).
Deep equilibrium models.
We generalize the above fixed point iterations to more complex recurrent architectures, by using the abstract inversion dynamics of Eq.
8 and the equilibrium equations of Eq.
Note that we directly substitute ˜ ψ ∗ =
u ∗ in the fixed point equations, to eliminate an equation.
[Equation]
[Equation]
We use the first-order updates discussed in Eq. 147 for training the DEQs, with ˜ ψ ∗ = u ∗ .
S6.5 Additional experimental details
Here, we provide additional details on the experiments introduced in Section 3.1, including the architecture of the networks, the used hyperparameters, possible data preprocessing and the used optimization algorithms.
S6.5.1 Training feedforward networks and equilibrium RNNs on MNIST
We evaluate the least-control principle combined with the various feedback circuits introduced in
Section 3.1 on the MNIST digit classification task [52], and compare their performance to recurrent backpropagation (RBP).
Data preprocessing and augmentation.
No data preprocessing or augmentation was employed in our experiment.
Feedforward network architecture.
We use two hidden layers of 256 neurons to have the same amount of parameters as the equilibrium RNN architecture used for MNIST.
In the hidden layers, we use tanh nonlinearities and on the output layer a softmax nonlinearity.
RNN architecture.
We use 256 recurrent units in the RNN used for the results of table 1.
We include a trained decoder ˜ D inside the recurrent layer, as detailed in Section S6.1 and Eq. 109.
For the results shown in Fig.
2, we run the equilibrium RNN on MNIST with [23 , 32 , 45 , 64 , 90 , 128 , 181 , 256] recurrent units.
We use the tanh nonlinearity for all recurrent units, and include bias terms according to Eq. 110.
Optimization.
For the classification benchmark, we train the models for 30 of the MNIST train set, with a minibatch size of 64 and with the Adam optimizer [88].
When we learn the feedback weights
S with Kolen-Pollack learning, we apply the weight decay after every gradient update, i.e. we apply it outside of the optimizer.
For training the feedback weights Q of the linear feedback controller, we run the stochastic dynamics in Eq.
138 for max_steps timesteps, and we update Q following Eq.
139 by averaging ∆ Q over the minibatch.
For the simulation of the stochastic dynamics, we use ∆ t = τ ′ 2 , τ = τ ′ 2 , τ ϵ
= τ ′ and τ u = 1 for some hyperparameter τ ′ .
Table S2 contains details on the used and scanned hyperparameters.
Energy-based dynamics LCP-EBD models were trained by optimizing the energy for max_steps steps using the Adam optimizer [88] with learning rate ebd_inner_lr .
Due to computational efficiency reasons, we initialized ϕ at the free-dynamic equilibrium before the energy optimization for the RNN experiments.
For the feedforward networks, we initialized ϕ at zero.
As initializing the network to its free equilibrium results effectively in a two-phase algorithm, we investigated whether the same fixed points are reached when initializing at the free equilibrium or at a zero.
We observed that both initializations converge to the same fixed point, but that the zero initialization needs many more iterations to reach the fixed point, compared to the combined free-phase iterations and controlled dynamics iterations starting from the free equilibrium.
For the overparametrization experiments, we use the same hyperparameters except for a learning rate of 0 .
001 for both RBP and LCP-DI, with a cosine annealing scheduler [106] annealing the learning rate down to 0 .
0001 over a total training time of 50 epochs.
For all RNN experiments, we use gradient clipping whereby the norm of the gradient, computed over all gradients concatenated into a single vector, is normalized to some value (chosen to be 10) whenever above it.
The gradient clipping was particularly crucial for a stable training of the RBP model.
Additional results.
In table S3 we show additional experimental results for the MNIST experiments.
Note that the hyperparameter was chosen to maximise the test set accuracy.
Robustness to α .
While our theory characterizes the strong control limit α → 0 , some interesting properties still hold outside this regime.
In Proposition S9, we showed that under a strict alignment condition on the feedback mapping Q (Eq. 76), the controlled steady state is a local minimizer of the augmented energy F ( ϕ, θ, α ) =
|| f
( ϕ, θ )
||
+ α − 1 L ( ϕ ) .
This strict alignment condition holds for energy-based (Eq. 10) and inversion (Eq.
8) dynamics.
This has two consequences.
First, the update prescribed by Theorem 1 follows the gradient of some surrogate objective function (cf.
the end of
Section S2.6) which is closely related to the least-control objective (cf.
Remark 1 in Section S2.5).
Additionally, this surrogate objective (for α ̸ = 0 ) is still a meaningful one for the original learning problem: similar results to Propositions 3 and 4 hold for this objective (c.f. Section S2).
However, the feedback mapping flexibility of Theorem 2 does not hold anymore outside the strong control limit α → 0 , as the column space condition of Eq.
7 is now replaced by the strict alignment condition of
Eq.
To corroborate these theoretical insights and to verify whether the least-control principle exhibits robust performance for a wide range of values of α , we repeat the MNIST experiments for LCP-DI with a feedforward neural network for varying values of the controller leakage α .
Note that for α = 0 , a softmax output layer combined with one-hot targets would lead to an infinite control, as a softmax needs an infinite input to produce a one-hot output.
This can be remedied by either increasing α or by using soft targets , i.e. taking 1 − ϵ as target for the correct class, and ϵ/ ( N − 1) for the other N −classes.
As we want to include α = 0 in this line of experiments, we resort here to soft targets with ϵ = 0 .
01 , whereas for the experiments in the main text we increase the controller leakage to α = 0 .(c.f.
Table S2).
Table S1 shows that the performance of LCP-DI is robust to a wide range of values for α .
Test accuracy
[Table]
H yp e r p a r a m e t e r
RB P
L C P - D
I
L C P - D I ( K P )
L C P - L F
L C P - E B
D num _ epochs     batch _ size     α0 .0 .0 .0 .lr { 3 .
10 − 4 , 10 −, 3 .
10 −} { 3 .
10 − 4 , 10 −, 3 .
10 −} { 3 .
10 − 4 , 10 −, 3 .
10 −} { 3 .
10 − 4 , 10 −, 3 .
10 −} { 3 .
10 − 4 , 10 −, 3 .
10 −} optimizer
ADA
M
ADA
M
ADA
M
ADA
M
ADA
M scheduler { n o n e , c o s } { n o n e , c o s } { n o n e , c o s } { n o n e , c o s } { n o n e , c o s } max _ steps {, 200 , 800 } {, 200 , } {, } {, } ( FF ) /
( R
NN ) ϵ {− 5 , 10 −,− 3 } {− 6 , 10 − 5 , 10 −} {− 6 , 10 − 5 , 10 −} {− 6 , 10 − 5 , 10 −} - γ - - {− 6 , 10 − 5 , 10 − 4 , 10 −} - - s - - - { 0 .
1 } - τ ′ - - - { 0 . 1 , 0 . 2 } - τ Q - - - {, , , } - γ Q - - - {− 4 , 10 − 3 , 10 −, 0 .} - ebd _ inner _ optimizer - - - -
ADA
M ebd _ inner _ lr - - - - 0 .
( FF ) / 0 .
( R
NN )
T a b l e
S 2 :
H yp e r p a r a m e t e r s ea r c h s p ace f o r t h e
M N I
S T
F ee d f o r w a r d a nd
R
NN e xp e r
i m e n t .
A g r i d s ea r c h w it h on e s ee d f o r eac h c on fi gu r a ti on w a s don e t
o fi nd t
h e b e s t p a r a m e t e r s , w h
i c h a r e m a r k e d i n bo l d .
T h
e s a m
e s e t
o f hyp e r p a r a m e t e r s f
o r bo t h
R
NN a nd f ee d f o r w a r d m od e l s y i e l d e d t h e b e s t p e rf o r m a n ce , e x ce p t f
o r t
h e
L C P - E B
D m od e l w h e r e t h e
R
NN m od e l n ee d e d s ho r t e r i nn e r op ti
m i za ti on s t e p s du e t h e fr eeph a s e i n iti a li za ti on .
[Table]
) and least control (LCP).
The reported mean±std is computed over 3 seeds.
S6.5.2 Training convolutional networks and deep equilibrium models on CIFAR-
Here, we train a convolutional network and Deep Equilibrium model and evaluate their performances on the CIFAR-10 image classification benchmarks [60].
We compare the performance of the models trained via either RBP or LCP.
Data preprocessing and augmentation.
We normalize all images channel-wise by subtracting the mean and dividing by the standard deviation, which are computed on the training dataset.
We employed no data augmentation in our experiments.
Convolutional network architecture.
We use a convolutional network with 3 convolutional layers of kernel 5-by-5 and channel sizes 96-128-256 followed by two hidden fully connected layers of 2048 neurons.
All layers are followed by ReLU non linearity.
We do not use batch normalization (for simplicity, we dispense with normalization layers altogether).
To keep the architecture as simple as possible we do not use max-pooling units except after the first convolutional layer, and resort for all other convolutional layers to simple strided convolutions to implement downsampling.
Deep equilibrium model architecture.
The model consists of 3 sub-modules that are invoked sequentially: an encoder, an implicit module, and a decoder.
The encoder consists in a single convolutional layer with bias, followed by a Batchnorm layer [107].
The implicit module finds the fixed point of the following equation:
[Equation]
where both c 1 , c 2 are convolutional layers, norm are group normalization layers [108], and e is the output of the encoder module g ( x, θ ) .
Finally, the decoder module contains a batchnorm layer, followed by an average-pooling layer of kernel size 8-by-8, and a final linear classification layer.
All convolutional layers use 48 channels, a filter size of 3-by-3, padding of 1, and are without biases unless specified otherwise.
Optimization.
We train the model by finding the equilibrium of the controlled dynamics using the fixed point iterations of Eq.
and we update the parameters with the first order updates of
Eq.
Note that the implicit module contains multiple convolutional layers, hence the partial derivatives in Eq.
147 backpropagate the credit assignment signal ψ towards the parameters of the different computational layers.
We use automatic differentiation for this.
If local parameter updates in space are a design requirement, one can augment the system state ϕ with additional states for the output of each convolutional layer, resulting in dedicated control signals for each computational layer, similarly to Section S6.4.3 where we augment the state ϕ with output neurons to incorporate the decoder.
Both RBP and LCP-DI are trained on 75 epochs for the Deep Equilibrium model, while the Convolutional network is trained on 30 epochs.
For both models, we use the stochastic gradient descent optimizer with a minibatch size of 64, combined with an annealing learning rate using the cosine scheduler [106] which divides the learning rate by 10 over the training epochs.
We used a controller leakage of α = 1 to enable a faster convergence to the controlled equilibrium and hence reduce the computational requirements.
Table S4 contains further details on the hyper parameters.
[Table] [Table]
Additional results.
In table S5 we show additional experimental results for the CIFAR-10 experiments.
Note that the hyperparameter was chosen to maximise the test set accuracy.
As can be seen, the training loss is not close to 0, indicating that the model considered here is not overparametrized enough for perfectly fitting the training set.
Yet, LCP still manages to optimize for the training loss, and crucially, in such a way that generalizes competitively.
S
.5.3 Neural implicit representations
Inspired by the recent success of using implicit layers for implicit neural representations [10], we investigate using the least-control principle in this setup for learning.
Implicit neural representations (INRs) are a quickly emerging field in computer vision and beyond with the aim to represent any signal through a continuous and differentiable neural network.
Here we strictly follow the experimental setup of Huang et al.
[10] and leverage the continuity of implicit neural representations to generalize on trained images.
In particular, given an Image I , we train the INR to represent 25% of the pixels (we simply jump over every second pixel and every second row) while testing the networks prediction on 25% of unknown pixels and measuring the peak signal-to-noise ratio (PSNR).
This can be regarded as simple image inpainting.
Architecture.
Compared to Huang et al.
[10], we slightly modify the implicit layer resulting in the following free dynamics
[Equation]
We include a trained decoder matrix ˜ D inside the implicit layer, as discussed in Section S6.1.
We use fixed point iterations on the inversion dynamics (151) for finding an optimal control, and use the weight updates for the equilibrium RNNs (117).
Note that we did not include spectral normalization or a learning rate scheduler to train our models as in Huang et al.
Despite these simplifications we obtain comparable results across methods and models.
Hyperparameters.
Note the small discrepancy between the INR models trained with RBP and LCPDI in Table S7.
Interestingly, we had an easier time scanning hyperparameters to obtain competitive performance and stable forward dynamics when using LCP-DI compared to RBP, for which we had to include gradient clipping and weight decay.
See Table S7 for the hyperparameters found when repeating the the grid search identical to the one seen in Table S2.
Following Huang et al.
[10], we
[Table] [Table]
Gradient clipping
[Table]
include an extra hyperparameter ( Omega ), which is a scalar multiplier applied to all neural activity, and we scale the initialization of the weights accordingly with 1 / Omega .
Additional results.
Table S6 shows the full experimental results for learning neural implicit representations on the natural images and text dataset introduced by Huang et al.
As we changed the network architecture slightly, we include the SIREN and iSIREN results of Huang et al.
[10] for comparison.
We see that the least-control principle achieves competitive performance on this task, compared to RBP and the results of Huang et al.
S6.6 Computational cost
Here, we include a computational comparison between LCP-DI and RBP on the MNIST experiments for equilibrium RNNs.
The table below shows the amount of iterations (phase length), the computation time for one single iteration (silicon time; obtained by using
the NVIDIA/
PyProf profiler offline), and the total training time for both algorithms.
Note that RBP has two phases, whereas LCP only one.
We see that LCP requires more iterations compared to the combined two phases of RBP.
Furthermore, RBP requires significantly fewer computations per iteration, as LCP needs to compute both the system states and control states every iteration, resulting in more matrix-vector products.
Consequently, LCP requires significantly more compute compared to RBP on this line of experiments, when simulating on standard digital hardware.
Hence, despite its desirable single-phase property, the added computational cost per iteration results in a significantly higher computational cost of LCP.
We observed that increasing the controller leakage α decreases the number of iterations required for reaching the controlled equilibrium significantly, and hence also decreases the computational cost.
S6.7 Related work
Meulemans et al.
[30] introduced an approach for training feedforward neural networks with local update rules by minimizing control.
The mechanistic implementation of this method can be considered as a specific instance of the least-control principle applied to feedforward neural networks, where we use direct linear feedback connectivity from an output controller to the network to approximate an optimal control (c.f. Section S6.3).
Importantly however, the least-control principle is the first to RBP [Table] put the idea of learning by minimizing control on a strong and general theoretical foundation, as the theory of Meulemans et al.
[30] contains a problematic assumption.
When computing the gradient of the surrogate loss H w.r.t.
θ with the implicit function theorem,
Meulemans et al.
2022 consider the direct feedback weights Q to be independent of θ .
However, after taking an update, the feedback weights need to change to satisfy the column space condition (Meulemans et al.
2022, Condition 1) again for the new parameter setting θ .
Hence, the loss
H =
∥
Qu ∥ 2 is affected by this change in Q, which was not incorporated in the gradient calculation, making Strong-DFC only a heuristically-derived method.
We were not able to incorporate a θ -and ϕ dependent feedback mapping Q into the theoretical framework following the methods of Meulemans et al.
2022, using the implicit function theorem alone.
We could only resolve these fundamental issues by formulating least-control as an optimal control problem.
Furthermore, the least-control principle provides a way to learn general dynamical systems that reach an equilibrium.
These systems perform computations both in space and time and cannot in general be reduced to a feedforward computational graph.
Consequently, the least-control principle provides credit assignment both in space and time, significantly widening the range of systems that can be learned compared to Meulemans et al.
Finally, we introduce various different controller designs compatible with the least-control principle, that move beyond the direct linear feedback controller introduced by Meulemans et al.
Importantly, the inversion dynamics of Eq.
8 and the energy-based dynamics of Eq.
10 satisfy the column space condition of Theorem 2 exactly and thereby lead to gradient-following updates, in contrast to the direct linear feedback that cannot satisfy the column space condition perfectly and hence results in only approximate gradient updates.
S The least-control principle for meta-learning
In Section 3.2, we consider a meta-learning problem in which the objective is to improve the performance of a learning algorithm as new tasks are encountered.
To do so, we equip a neural network with fast weights ϕ that are learned on each task, and slow parameters θ = { ω, λ } that parametrize the learning algorithm.
The fast weights ϕ quickly learn how to solve a task τ and λ determines how strongly ϕ is pulled towards the slow weights ω , which consolidate the knowledge that has been previously acquired.
The capabilities of the learning algorithm are then measured by evaluating L eval τ ( ϕ ∗ τ ) , the performance of the learned neural network on data from task τ that was held out during learning.
Meta-learning finally corresponds to improving the learning performance on many tasks by adjusting the meta-parameters θ = { ω, λ } .
This can be formalized through the following bilevel optimization problem [35, 68]:
[Equation]
Note that compared to Eq.
16 in the main text, we now consider the more general setting in which each synapse i has its own attraction strength
λ i and meta-learn them.
We now derive the update rules prescribed by the least-control principle, review the meta-learning algorithms we are comparing against and detail our experimental setup.
S7.1 Derivation of the meta-parameter updates
The first step of the derivation is to replace the arg min in Eq.
154 by the associated stationarity condition:
[Equation]
This equation can be obtained from a dynamical perspective: let us assume that our learning algorithm is gradient descent, so that
[Equation]
The stationarity conditions therefore correspond to f ( ϕ ∗ τ , θ ) =
and we can apply the least control principle.
To do so, we run the controlled dynamics
[Equation]
and
[Equation]
and note ϕ τ ∗ and u τ ∗ the equilibrium.
Note that this corresponds to taking Q = Id and h ( ϕ ) =
ϕ in the general feedback dynamics of Eq. 6.
Theorem 2 therefore guarantees that ϕ τ ∗ is an optimally controlled state and u τ ∗ an optimal control in the limit α → 0 , as long as ∂ ϕ f
( ϕ τ ∗ , θ ) and ∂ 2 y L ( h ( ϕ τ ∗ )) are invertible, and the column space condition
[Equation]
is satisfied.
The column space conditions here rewrites
[Equation]
and is automatically satisfied through the assumption that the Jacobian of f is invertible.
To summarize, the controlled dynamics are optimal in the limit α → 0 , if ∂ 2 y L learn τ
[Equation]
are invertible.
We now put ourselves in a regime in which the conditions detailed above are satisfied, so that ϕ τ ∗ = ϕ
τ ⋆ and u τ ∗ = u τ ⋆ .
Theorem 1 then gives
[Equation] [Equation]
as ψ =
Qu is here equal to u .
A simple calculation gives
[Equation]
[Equation]
where diag( x ) is a diagonal matrix whose diagonal values are the elements of the vector x .
It further implies that the updates of the parameters are local, as
[Equation]
the multiplications being performed element wise.
S7.2 Comparison to existing meta-learning algorithms
We here review existing meta-learning rules that we compare against in Section 3.2.
We separate those methods in two categories, the one relying on implicit differentiation and the Reptile algorithm [76]
[Equation]
Implicit differentiation methods.
The first set of methods we are reviewing aims at directly minimizing the bilevel optimization problem (154) using the implicit gradient
[Equation]
In practice
[Equation]
this quantity is intractable because of the inverse of the Hessian and has to be estimated.
This lead to different algorithms.
T1-T2 [75] uses a first-order approximation of the implicit gradient by simply ignoring the inverse Hessian term:
[Equation]
Alternatively, a better estimate of the gradient can be obtained by iteratively minimizing the quadratic form
[Equation]
and updating the meta-parameters with
[Equation]
where δ ∗ τ is the result of the minimization procedure.
Using gradient descent to minimize the quadratic form (165) yields the recurrent backpropagation algorithm
[33, 34, RBP][109], also known as Neumann series approximation in this context [77], we discussed in more details in Section S3.
Gradient descent is a generic algorithm and more specialized optimization algorithms exist for quadratic forms, such as the conjugate gradients one used by Rajeswaran et al.
[68, iMAML].
Note that the updates (162), (164) and (166) share some similar structure, but do not incorporate the teaching signal in the same one.
The update of T1-T2 does not correspond to any gradient, but the other two do.
The estimation of the implicit gradient through Eq.
166 requires computing second derivatives, whereas the other two updates don’t need to.
The implicit gradient can be approximated in a totally different way, using the equilibrium propagation theorem [24], as done by the contrastive meta-learning rule [35].
The idea is to first minimize the so-called augmented loss
[Equation]
for two different values of β ( β = 0 and some small positive value, note ϕ ∗ τ, 0 and ϕ ∗ τ,β the solutions) and then update the meta-parameters with
[Equation]
ϕ ∗ τ,β,i − ϕ ∗ τ, 0 ,i β , and ∆ λ CML i = −
[Equation]
i
[Equation]
i
[Equation]
The equilibrium propagation theorem guarantees that those updates will converge to the true gradient when β → 0 .
Both the contrastive meta-learning rule and the rule prescribed by our principle are first-order, as that they don’t require computing second derivative.
However, the former approximates the implicit gradient when the latter approximates the gradient of the least-control objective H .
Interestingly, as we mentioned in Section 2.4, the augmented solution ϕ ∗ β and the controlled equilibrium ϕ τ ∗ are both stationary points of the augmented loss L τ (taking β = α − 1 for ϕ τ ∗ ).
However, the contrastive meta-learning update (168) is justified in the weak nudging limit ( β → 0 ), whereas the update (162) is justified in the perfect control limit ( α = β − 1 → 0 ).
We refer to Zucchet and Sacramento [110] for a more detailed review of those methods.
Reptile.
The Reptile algorithm
[76] meta-learns the initialization of a neural network such that it can adapt to a new task τ in very few gradient descent steps.
Let us denote ω the parameters of the network at initialization.
The Reptile algorithm first minimizes the learning loss L learn τ ( ϕ ) and then update ω through
[Equation]
(169) with ϕ ∗ τ the result of the learning loss minimization.
Contrary to the methods presented above, this algorithm is only heuristically motivated and does not rely on any theoretical foundations.
Still, it performs surprisingly well on many few-shot learning tasks.
S7.3 Experimental details
We compare the LCP to existing meta-learning and few-shot learning algorithms on the Omniglot few-shot image classification benchmark [78].
We follow the standard training and evaluation used in prior works [68, 74].
We focus on the 20-way 1-shot setting, and only meta-learn θ = { ω } while choosing a global λ as a hyperparameter.
The iMAML result in Table 3.2 is taken from Rajeswaran et al.
[68] while those of Reptile and FOMAML are taken from Nichol et al.
Data preprocessing and augmentation.
We resize the Omniglot images to 28 × 28 and augment the images by random rotation by multiples of 90 degrees during meta-training.
Architecture.
For our classifier, we use the same architecture as in previous works [68, 74], which consists in 4 convolutional modules with a 3 × 3 convolutions and 64 filters, each followed by a batch normalization layer, a ReLU nonlinearity, and a 2 × 2 max-pooling layer.
The output of the module is then flattened and fed into a final classification layer followed by a softmax activation.
Optimization.
We train all models on 100000 tasks, split into meta batches of size 16.
Each task consists in a 20-way classification problem with a single example per class provided for the adaptation phase, and 15 examples per class for evaluating the adaptation.
For T1-T2, the adaptation consists in 100 gradient steps with learning rate η = 0 .
For LCP, we use 100 steps of the discretized version of the dynamics (157):
[Equation]
where η = 0 .
The Adam optimizer takes the ∆ ω as input and updates the meta-parameters, with learning rate 0.001.
Finally, the models are evaluated on 100 test tasks.
See Table S9 for an overview of the hyperparameters.
[Table]