Title: Towards training digitally-tied analog blocks via hybrid gradient computation
Venue: NeurIPS 2024
Accepted: yes
Keywords: implicit differentiation

equilibrium propagation

bilevel optimization

hopfield networks

analog computing

hardware-aware training

backprop

energy-based models

physical learning
Abstract: Power efficiency is plateauing in the standard digital electronics realm such that new hardware, models, and algorithms are needed to reduce the costs of AI training. The combination of energy-based analog circuits and the Equilibrium Propagation (EP) algorithm constitutes a compelling alternative compute paradigm for gradient-based optimization of neural nets. Existing analog hardware accelerators, however, typically incorporate digital circuitry to sustain auxiliary non-weight-stationary operations, mitigate analog device imperfections, and leverage existing digital platforms. Such heterogeneous hardware lacks a supporting theoretical framework. In this work, we introduce \emph{Feedforward-tied Energy-based Models} (ff-EBMs), a hybrid model comprised of feedforward and energy-based blocks housed on digital and analog circuits. We derive a novel algorithm to compute gradients end-to-end in ff-EBMs by backpropagating and ``eq-propagating'' through feedforward and energy-based parts respectively, enabling EP to be applied flexibly on realistic architectures. We experimentally demonstrate the effectiveness of this approach on ff-EBMs using Deep Hopfield Networks (DHNs)  as energy-based blocks, and show that a standard DHN can be arbitrarily split into any uniform size while maintaining or improving performance with increases in simulation speed of up to four times. We then train ff-EBMs on ImageNet32 where we establish a new state-of-the-art performance for the EP literature (46 top-1 \%). Our approach offers a principled, scalable, and incremental roadmap for the gradual integration of self-trainable analog computational primitives into existing digital accelerators.

Towards training digitally-tied analog blocks via hybrid gradient computation

Abstract

Power efficiency is plateauing in the standard digital electronics realm such that new hardware, models, and algorithms are needed to reduce the costs of AI training. The combination of energy-based analog circuits and the Equilibrium Propagation (EP) algorithm constitutes a compelling alternative compute paradigm for gradientbased optimization of neural nets. Existing analog hardware accelerators, however, typically incorporate digital circuitry to sustain auxiliary non-weight-stationary operations, mitigate analog device imperfections, and leverage existing digital platforms. Such heterogeneous hardware lacks a supporting theoretical framework. In this work, we introduce Feedforward-tied Energy-based Models (ff-EBMs), a hybrid model comprised of feedforward and energy-based blocks housed on digital and analog circuits. We derive a novel algorithm to compute gradients end-to-end in ff-EBMs by backpropagating and 'eq-propagating" through feedforward and energy-based parts respectively, enabling EP to be applied flexibly on realistic architectures. We experimentally demonstrate the effectiveness of this approach on ff-EBMs using Deep Hopfield Networks (DHNs) as energy-based blocks, and show that a standard DHN can be arbitrarily split into any uniform size while maintaining or improving performance with increases in simulation speed of up to four times. We then train ff-EBMs on ImageNet32 where we establish a new state-of-the-art performance for the EP literature (46 top-1 %) 3 . Our approach offers a principled, scalable, and incremental roadmap for the gradual integration of self-trainable analog computational primitives into existing digital accelerators.

1 Introduction

Gradient-based optimization, the cornerstone and most energy greedy component of deep learning, fundamentally relies upon three factors: i) highly parallel digital hardware such as GPUs, ii) feedforward models and iii) backprop (BP). With skyrocketing demands of AI compute, reducing the energy consumption of AI systems has become a matter of great economic, societal and environmental urgency [Strubell et al., 2020], calling for the exploration of novel compute paradigms [Thompson et al., 2020, Scellier, 2021, Stern and Murugan, 2023].

One promising path towards this goal is analog in-memory computing [Sebastian et al., 2020]: by mapping weights onto a crossbar of resistive devices, Kirchoff current and voltage laws inherently perform matrix-vector multiplications with constant time complexity [Cosemans et al., 2019]. By stacking multiple such crossbars, an entire neural network can be mapped onto a physical system. An important formalism for such a system is that of energy-based (EB) analog circuits

[Kendall et al., 2020, Stern et al., 2023, Dillavou et al., 2023, Scellier, 2024], which are 'selflearning' systems that can compute loss gradients through two relaxations to equilibrium (i.e. two 'forward passes'). Such a procedure falls under the umbrella of energy-based learning (EBL) algorithms [Scellier et al., 2024]. One such algorithm, Equilibrium Propagation (EP) [Scellier and Bengio, 2017], particularly stands out for its strong theoretical guarantees, relative scalability in the realm of backprop alternatives [Laborieux and Zenke, 2022, 2023] and proven application on small analog systems with 10 , 000 × greater energy-efficiency and substantial speedups compared to its GPU-based counterpart [Yi et al., 2023]. This suggests a new alternative compute paradigm for gradient-based optimization consisting of: i) analog hardware, ii) EBMs, and iii) EP.

...

...

In this paper, we propose a theoretical framework for extending end-to-end gradient computation to a realistic setting where the system in question may or may not be fully analog. Such a setting is plausible in the near term, for two major reasons. First, analog circuits exhibit non-ideal physical behaviors which affect both the inference pathway [Wang et al., 2023, Ambrogio et al., 2023] and parameter optimization [Nandakumar et al., 2020, Spoon et al., 2021, Lammie et al., 2024], compromising performance. Second, owing to the latency and energy-consumption of resistive devices' write operations, analog circuits should be fully weight stationary - weights must be written before the inference procedure begins - which excludes many operations used conventionally in machine learning including activation functions, normalization, and attention [Spoon et al., 2021, Jain et al., 2022, Liu et al., 2023, Li et al., 2023]. Therefore, analog systems are likely to be used in combination with auxiliary digital circuitry, resulting in hybrid mixed precision systems [Haensch et al., 2018]. While the design of purely inferential engines made up of analog and digital parts is nearing commercial maturity

[Ambrogio et al., 2023], in-situ learning of such systems has barely been explored. An important challenge remains in proving EBL algorithms can scale in a manner comparable to backprop, given the requirement of simulating EB systems on GPUs. Because of the necessity of convergence, this amounts in practice in performing lengthy root finding algorithms to simulate physical equilibrium, limiting proof-of-concepts thereof to relatively shallow (5-6 layer) models [Scellier et al., 2024, Scellier, 2024].

Our work contends that the best of both worlds can be achieved with the following triad: i) hybrid digital and analog hardware, ii) feedforward and EB models, iii) BP and EP. Namely, by modeling digital and analog parts as feedforward and EB modules respectively, we show how backprop and EP error signals can be chained end-to-end via feedforward and EB blocks respectively in a principled fashion. Rather than opposing digital and analog, or backprop and 'alternative' learning algorithms, as is often done in the literature, we propose a novel hardware-aware building block which can, in principle, leverage advances from both digital and analog hardware in the near-term. More specifically:

We propose Feedforward-tied Energy-based Models (ff-EBMs, Section 3.1) as high-level models of mixed precision systems whose inference pathway read as the composition of feedforward and EB modules (Eq. (5), Alg. 1).

We show that gradients in ff-EBMs can be computed in an end-to-end fashion (Section 3.3), backpropagating through feedforward blocks and 'eq-propagating' through EB blocks (Theorem 3.1, Alg. 2) and that this procedure is rooted in a deeply-nested optimization problem (Section 3.2).

Finally, we experimentally demonstrate the effectiveness of our algorithm on ff-EBMs where EBM blocks are Deep Hopfield Networks (DHNs) (Section 4).In particular we show that i) final and transient gradient estimates computed by our algorithm (Alg. 2) near perfectly match gradients computed by end-to-end automatic differentiation (Section 4.2), which we also prove mathematically (Theorem 4.1), ii) a standard DHN model can be arbitrarily split into a ff-DHN with the equivalent

layers and architectural layers while maintaining or improving performance, remaining on par with automatic differentiation and being up to four times faster to simulate depending on the convergence criterion at use to compute equilibrium (Section 4.3), iii) the proposed approach yields 46 % top-1 (70% top-5) validation accuracy on ImageNet32 when training a ff-EBM of 15 layers, beating current state-of-the-art for EP by a large margin, without relying on holomorphic transformations inside EBM blocks [Laborieux and Zenke, 2022, 2023]

2 Background

Notations. Given A : R n → R m a differentiable mapping, we denote its total derivative with respect to s j as d s j A ( s ) := dA ( s ) /ds j ∈ R m , its partial derivative with respect to s j as ∂ j A ( s ) := ∂A ( s ) /∂s j ∈ R m . When A takes scalar values ( m = 1 ), its gradient with respect to s j is denoted as ∇ j A ( s ) := ∂ j A ( s ) ⊤ .

2.1 Energy-based models (EBMs)

For a given static input and set of weights, Energy-based models (EBMs) implicitly yield a prediction through the minimization of an energy function. As such they are a particular kind of implicit model. Namely, an EBM is defined by a (scalar) energy function E : s, θ, x → E ( s, θ, x ) ∈ R where x , s , and θ respectively denote a static input, hidden and output neurons and model parameters, and each such tuple defines a configuration with an associated scalar energy value. Among all configurations for a given input x and some model parameters θ , the model prediction s ⋆ is implicitly given as an equilibrium state which minimizes the energy function:

2.2 Standard bilevel optimization

Assuming that ∇ 2 s E ( x, s ⋆ , θ ) is invertible, note that the equilibrium state s ⋆ implicitly depends on x and θ by virtue of the implicit function theorem [Dontchev et al., 2009]. Therefore our goal when training an EBM-in a supervised setting, for instance - is to adjust the model parameters θ such that s ⋆ ( x, θ ) minimizes some cost function ℓ : s, y → ℓ ( s, y ) ∈ R where y is some ground-truth label associated to x . More formally, this learning objective can be stated with the following bilevel optimization problem [Zucchet and Sacramento, 2022]:

Solving Eq. (2) in practice amounts to computing the gradient of its outer objective C ( x, θ ) with respect to θ ( d θ C ( x, θ ) ) and then performing gradient descent over θ .

2.3 Equilibrium Propagation (EP)

An algorithm used to train an EBM model in the sense of Eq. (2) may be called an EBL algorithm [Scellier et al., 2024]. Equilibrium Propagation (EP) [Scellier and Bengio, 2017] is an EBL algorithm which computes an estimate of d θ C ( x, θ ) with at least two phases. During the first phase, the model is allowed to evolve freely to s ⋆ = arg min s E ( s, θ, x ) . Then, the model is slightly nudged towards decreasing values of cost ℓ and settles to a second equilibrium state s β . This amounts to augmenting the energy function E by an additional term βℓ ( s, y ) where β ∈ R ⋆ is called the nudging factor . Next, the weights are updated to increase the energy of s ⋆ and decrease that of s β , thereby 'contrasting' these two states. More formally, Scellier and Bengio [2017] show in the seminal EP paper:

where α denotes some learning rate. EP comes in different flavors depending on the sign of β inside Eq. (3) or on whether two nudged states of opposite nudging strengths ( ± β ) are contrasted, a variant called Centered EP (C-EP) which was shown to work best in practice [Laborieux et al., 2021, Scellier et al., 2024] and reads as:

3 Tying energy-based models with feedforward blocks

In the present section we introduce a new model, Feedforward-tied EBMs (ff-EBMs, section 3.1), which read as composition of feedforward and EB transformations (Alg. 1). We show how optimizing ff-EBMs amounts to solving a multi-level optimization problem (Section 3.2) and propose a BP-EP gradient chaining algorithm as a solution(Section 3.3, Theorem 3.1, Alg. 2). We highlight as an edge case the fact that ff-EBMs reduce to standard feedforward nets (Lemma A.1) and the proposed BP-EP gradient chaining algorithm to standard BP (Corollary A.1) when each EB block comprises a single hidden layer. We highlight in red and blue the parts of the model and associated algorithms performed inside feedforward (digital) and EB (analog) blocks respectively.

3.1 Feedforward-tied Energy-based Models (ff-EBMs)

Inference procedure. We define Feedforward-tied Energy-based Models (ff-EBMs) as compositions of feedforward and EB transformations. Namely, an data sample x is fed into the first feedforward transformation F 1 parametrized by some weights ω 1 , which yields an output x 1 ⋆ . Then, x 1 ⋆ is fed as a static input into the first EB block E 1 with parameters θ 1 , which relaxes to an equilibrium state s 1 ⋆ . s 1 ⋆ is in turn fed into the next feedforward transformation F 1 with weights ω 1 and the above procedure repeats until reaching the output layer ˆ o . More formally, denoting F k and E k the k th feedforward and EB blocks parametrized by the weights ω k and θ k respectively, the inference pathway of a ff-EBM reads as:

The ff-EBM inference procedure is depicted more compactly inside Fig. 2 (left) and Alg. 1.

Algorithm 1 ff-EBM inference (Eq. (5))

Form of the energy functions. We further specify the form of the energy of the k th EB block of a ff-EBM as defined per Eq. (5). The associated energy function E k takes some static input x k from the output of the preceding feedforward transformation, has hidden neurons s k and is parametrized by weights θ k . More precisely:

Eq. (6) reveals three different contributions to the energy. The first term determines the non-linearity applied inside the EB block [Zhang and Brand, 2017, Høier et al., 2023]: for a given invertible and continuous activation function σ , G is defined such that ∇ G = σ -1 (see Appendix A.1.3).

The second term inside Eq. (6) accounts for a purely feedforward contribution from the previous feedforward block F k . Finally, the third term accounts for internal interactions within the layers of the EB block.

Recovering a feedforward net. When taking the gradient of E k as defined in Eq. (6) with respect to s k and zeroing it out, it can be seen that s k ⋆ is implicitly defined as:

A noteworthy edge case highlighted by Eq. (7) is when U k = 0 for all k 's, i.e. when there are no intra-block layer interactions, or equivalently when the EB block comprises a single layer only. In this case, s k ⋆ is simply a feedforward mapping x k through σ and in turn the ff-EBM is simply a standard feedforward architecture (see Lemma A.1 inside Appendix A.1.1).

3.2 Multi-level optimization of ff-EBMs

Just as learning EBMs can be naturally cast as a bilevel optimization problem, learning ff-EBMs equates to a multi-level optimization problem where the variables being optimized in the inner subproblems are comprised of EB block variables s 1 , · · · , s N -1 . To make this clearer, we re-write the energy function of the k th block E k from Eq. (6) to highlight the dependence between two consecutive EB block states:

It can be seen from Eq. (8) that the equilibrium state s k ⋆ obtained by minimizing E k will be dependent upon the equilibrium state s k -1 ⋆ of the previous EB block, which propagates back through prior EB blocks. Denoting W := { θ 1 , · · · , θ N -1 , ω 1 , · · · , ω N } , the learning problem for a ff-EBM can therefore be written as:

Here again and similarly to bilevel optimization, solving Eq. (9) in practice amounts to computing g θ k := d θ k C and g ω k := d ω k C and performing gradient descent on θ k and ω k .

3.3 A BP-EP gradient chaining algorithm

Main result: explicit BP-EP chaining. Based on the multilevel optimization formulation of ffEBMs learning in Eq. (9), we state the main theoretical result of this paper in Theorem 3.1 (see proof in Appendix A.2.1).

Theorem 3.1 (Informal) . Assuming a model of the form Eq. (5), we denote s 1 ⋆ , x 1 ⋆ , · · · , s N -1 ⋆ , ˆ o ⋆ the states computed during the forward pass as depicted in Alg. 1. We define the nudged state of block k , denoted as s k β , implicitly through ∇ 1 F k ( s k β , θ k , x k ⋆ , δs k , β ) = 0 with:

Denoting δs k and ∆ x k the error signals computed at the input of the feedforward block F k and of the EB block E k respectively, then the following chain rule applies:

Proposed algorithm: implicit BP-EP chaining. Theorem 3.1 reads intuitively. It prescribes an explicit chaining of EP error signals passing backward through E k ( δs k → ∆ x k ) and BP error signals passing backward through ∂F k ⊤ ( ∆ x k → δs k -1 ), which directly mirrors the ff-EBM inference pathway as depicted in Fig. 2. Yet noticing that:

the same error signal can by passed through ˜ E k ( δs k → δs k -1 ) where BP and EP are implicitly chained inside ˜ E k (see Appendix A.2.1). This insight, along with a centered scheme to estimate

derivatives with respect to β around 0 as done for the C-EP algorithm (Eq. (4)), motivates the implicit BP-EP gradient chaining algorithm in Alg. 2 we used for our experiments (see Alg. 5 inside Appendix A.3.1 for its explicit counterpart). Given that the proposed algorithm appears as a a generalization of EP, we refer to Alg. 2as 'EP' in the experimental section, for simplicity.

Recovering backprop. When the ff-EBM under consideration is purely feedforward ( U k = 0 ), we show that Eqs. (11)-(12) reduce to standard BP through a feedforward net (Corollary A.1, Alg. 6 and Alg. 7 in Appendix A.2.1). Since this case is extremely close to standard BP through feedforward nets, we do not consider this setting in our experiments.

4 Experiments

In this section, we present the ff-EBMs used in our experiments (Section 4.1) and carry out static gradient analysis - computing and analyzing ff-EBM parameter gradients for some x and y (Section 4.2). We extend the observation made by Ernoult et al. [2019] -that transient EP parameter gradients obtained during the second phase match those computed by automatic differentiation through equilibrium and across blocks- to ff-EBMs (Fig. (3)-(4), Theorem 4.1), showing that gradient estimates of automatic differentiation and EP in our framework, are near perfectly aligned (Fig. 5). We then show on the CIFAR-10 task that performance of ff-EBMs can be maintained or improved across various block splits maintaining the same number of layers, while remaining on par with automatic differentiation(Section 4.3). We show furthermore that blocks of smaller size are up to four times faster to simulate depending on the convergence criterion at use for computing equilibrium inside EB blocks. Finally, we perform further ff-EBM training experiments on CIFAR-100 and ImageNet32 where we establish a new state-of-the-art performance in the EP literature (Section 4.4).

4.1 Setup

Models. Using the same notations as in Eq. (6), the ff-EBMs at use in this section are defined:

with BN( · ; ω k α , ω k β ) , P and ⋆ the batchnorm, pooling and convolution operations, · the generalized dot product for tensors and s k := ( s k ⊤ 1 , · · · s k ⊤ L ) ⊤ the state of block k comprising L layers. Such EBMblocks are known as Deep Hopfield Networks (DHNs). DHNs are comprised of fully connected ( U k FC ) and convolutional operations ( U k CONV ) forming a symmetric weight matrix θ k with a sparse, block-wise structure such that each layer s k ℓ is bidirectionally connected to its neighboring layers s k ℓ -1 and s k ℓ +1 through connections θ k ℓ -1 and θ k ⊤ ℓ respectively (see Appendix A.1.3). To empirically ensure convergence, the non-linearity σ applied within EB blocks is σ α ( x ) := min (max ( αx, 0) , 1) with α ∈ (0 , 1) . Finally, two design choices were instrumental to the success of ff-EBM gradient computation and subsequent training. First, we initialized the weights of U k FC and U k CONV using

Gaussian Orthogonal Ensembles (GOE) [Agarwala and Schoenholz, 2022] to enable faster equilibrium computation (see next paragraph). Second, while the last layer of a given block was simply passed as an input to the next block (i.e. using F k ID in Eq. (13)) for small enough models ( L = 6 inside the experiment depicted in Section 4.3), the use of batchnorm layers in between blocks (i.e. using F k BN in Eq. (13)) becomes essential for deeper models.

Equilibrium computation. As depicted in Alg. 2, the steady states s ± β may be computed with any loss minimization algorithm. Here, as in past works on EP [Ernoult et al., 2019, Laborieux et al., 2021, Laborieux and Zenke, 2022, Scellier et al., 2024], we employ a fixed-point iteration scheme to compute the EB blocks steady states. Namely, we iterate Eq. (7) until reaching equilibrium (the same scheme is used for ff-EBM inference, Alg. 1, with β = 0 .):

Important details about how Eq. (14) is executed in practice have to be highlighted. First, we employ a scheme to asynchronously update even ( s k 2 ℓ ′ ) and odd ( s k 2 ℓ ′ +1 ) layers [Scellier et al., 2024] - see Appendix A.1.3. Second, Eq. (14) were either executed for a fixed and predetermined number of steps as done in the aforementioned EP literature, or using an ϵ -tolerance-based convergence criterion (TOL) which stops executing Eq. (14) when ( s i t +1 -s i t ) /s i t ≤ ϵ on average - see Appendix A.5.3 for details.

Algorithm baseline. As an algorithmic baseline, we simply use automatic differentiation (AD) backward through the fixed-point iteration scheme Eq. (14) with β = 0 and directly initializing s k t =0 = s ⋆ (Fig. 4). This version of AD, where we backpropagate through equilibrium , is known as 'Recurrent Backpropagation' [Almeida, 1987, Pineda, 1987] or Implicit Differentiation (ID).

4.2 Static comparison of EP and ID on ff-EBMs

In order to study the transient dynamics of ID and EP, we define, with W k := { θ k , ω k } :

where s k ± β,t is computed from Eq. (14) with the nudging error current δs k computed with Alg. 2, and T is the total number of iterations used for both ID and EP in the gradient computation phase.

Figure 3: EP and ID partially computed gradients ( ( ̂ g EP w ( t )) t ≥ 0 in black dotted curves and ( ̂ g ID w ( t )) t ≥ 0 in plain colored curves) going backward through equilibrium for ID and forward through the nudging phase for EP [Ernoult et al., 2019] for a random sample x and associated label y . The ff-EBM comprises 6 blocks and 15 layers in total, with block sizes of either 2 or 3 layers. Each sub-panel represents a layer (labeled on the y-axis) with each curve corresponding to a randomly selected weight. 'Backward' time is indexed from t = 0 to T = 120 , starting from block 6 backward to block 1, with 20 fixed-point iteration dynamics (Eq. (14)) being used for both EP and ID within each block.

For a given block k , d W k ( T -k ) C ( x, W, y ) is the 'sensitivity' of the loss C to parameter W k at timestep T -k so that ̂ g ID W k ( t ) is a ID gradient truncated at T -t . Fig. 4 depicts the computational graph that is differentiated through when using ID and shows where ̂ g ID W k ( t ) are obtained correspondingly. Similarly, ̂ g EP W k ( t ) is an EP gradient truncated at t steps forward through the nudged phase. When T is sufficiently large, ̂ g ID W k ( T ) and ̂ g EP W k ( T ) converge to d W k C ( x, W, y ) . Fig. 3 displays ( ̂ g ID W k ( t )) t ≥ 0 and ( ̂ g EP W k ( t )) t ≥ 0 on an heterogeneous ff-EBM of 6 blocks and 15 layers (16 if counting the last linear

'readout' layer computing the logits) with blocks comprising 2 or 3 layers for a randomly selected sample x and its associated label y - see caption for a detailed description. It can be seen EP and ID error weight gradients qualitatively match very well throughout time, across layers and blocks. We also display the cosine similarity between the final EP and ID weight gradient estimate ̂ g ID W k ( T ) and ̂ g EP W k ( T ) for each layer and observe that EP and ID weight gradients are near perfectly aligned. Theorem 4.1 generalizes the equivalence between EP and ID to ff-EBMs [Ernoult et al., 2019].

...

...

4.3 Splitting experiment

For a given (standard, single block) EBM with a fixed number of layers, we ask how block splitting of this EBM into a ff-EBM with multiple EB blocks affects training performance and Wall Clock (simulation) Time (WCT). We address this question with two different depths ( L = 6 and L = 12 layers in total) and various block sizes (bs), maintaining a fixed total number of layers (e.g. for L = 6 , 1 block of 6 layers, 2 blocks of 3 layers, etc.). Additionally, to ensure the fairest comparison in terms of WCTs across different splits, we adopt the aforementioned TOL approach to execute the fixed-point dynamics Eq. (14) within each EB block. We display the results obtained on the CIFAR-10 task inside Table 1. We observe that EP performance improves with smaller block sizes

(reaching 90 . 1% and 92 . 5% for L = 6 and L = 12 respectively with bs = 2 and bs = 3 ) with overall WCT reduction (up to ≈ × 4 ) while remaining on par with ID. This significant reduction in

WCT is due to the fact that inference time for ff-EBMs with DHN blocks by construction scales linearly with the number of blocks rather than supralinearly with the number of layers as has been empirically observed in the EP literature [Ernoult et al., 2019]. When instead using a fixed number of iterations to execute Eq. (14) inside EB blocks (Table 5 in Appendix A.5.3), EP performance is maintained across all splits ( 90 . 1% and 92 . 5% for L = 6 and L = 12 resp.) and is still on par with ID. However, there is no advantage in terms of WCTs in this case as the number of iterations is kept the same across all block splits and is much larger than necessary for smaller block sizes. Results for L = 6 are consistent with the existing literature and those for L = 12 surpass EP state-of-the-art on CIFAR-10 [Scellier et al., 2024, Laborieux and Zenke, 2022]. Overall these results suggest that: i) ff-EBM performance is agnostic to EB block sizes and are therefore flexible in design, ii) ff-EBMs are much faster to simulate that EBM counterparts of equivalent depth.

4.4 Scaling experiment

We now consider ff-EBMs of fixed block size 2, and relatively small number of iterations . We train two models of depth ( L = 12 and L = 15) on CIFAR-100 and ImageNet32 by EP and ID and show the results obtained in Table 2. Here again we observe that EP matches ID performance on all models and tasks, ff-EBMs benefit from depth, and the performance obtained by training the 15-layer deep ff-EBM by EP exceeds state-of-the-art performance on ImageNet32 by around 10% top-1 validation accuracy [Laborieux and Zenke, 2022] and by around 5% the best performance reported on this benchmark among all backprop alternatives [Høier et al., 2023].

5 Discussion

EP literature. Ever since fixed-point iteration schemes were first proposed to facilitate EP experiments [Ernoult et al., 2019, Laborieux et al., 2021], there has been a growing body of work assessing scalability of EP and its algorithmic extensions on standard vision tasks. Most notably, Laborieux and Zenke [2022] introduced a holomorphic version of EP where loss gradients are computed with adiabatic oscillations of the model by nudging in the complex plane, which was very recently extended to more general implicit models [Laborieux and Zenke, 2023]. Moving further towards physical implementations of EP, Scellier et al. [2022] proposed a fully black-box version of EP where details about the system may not be known. All these advances could be readily applied inside our EP-BP chaining algorithm to EB blocks. The work closest to ours, albeit with a purely theoretical motivation and without clear algorithmic prescriptions, is that of Zach [2021] where feedforward model learning is cast as a deeply nested optimization in which consecutive layers are tied by elemental pair-wise energy functions. This work more recently inspired the Dual Propagation algorithm [Høier et al., 2023]. Such a setting can be construed as a particular case of ff-EBM learning by EP where each EB block comprises a single layer ( U k = 0 ) inside Eq. (6)-which, as we have shown, is tantamount to standard BP(see last paragraph of Section 3.3).

Forward-only learning beyond EP. Given that zeroth-order (ZO) optimization and 'forwardforward' (FF) algorithms [Dellaferrera and Kreiman, 2022, Hinton, 2022] can be applied to any

model, and-like EP- compute a learning rule through multiple inference steps, one may wonder why it is important that our models should be energy-based. While mechanistically appealing for analog hardware [Oguz et al., 2023, Momeni et al., 2023, 2024, Xue et al., 2024], these forward-only approaches do not match the performance of automatic differentiation on equivalent models, even if they are roughly the same size as those studied in our work. On the one hand, weight perturbation [Fiete et al., 2007] (WP or 'SPSA' [Spall, 1998]), yields unbiased yet noisy gradient estimates with variance scaling cubically with the model dimensionality [Ren et al., 2022], resulting in a significant gap in model performance compared to backprop, that can only be partially mitigated when using heuristics [Silver et al., 2021, Ren et al., 2022, Fournier et al., 2023, Chen et al., 2023]. On the other hand FF algorithms, as learning heuristics, suffer from a lack of theoretical guarantees which may impact the resulting model performance.

Limitations and future work. Since our recipe advocates EP-BP chaining by construction, it is fair to say that ff-EBM learning partially inherits the pitfalls of BP. Fortunately, nothing prevents feedforward modules inside ff-EBMs from being trained by any BP alternative to mitigate specific issues. For instance: BP can be parameterized by feedback weights to obviate weight transport from the inference circuit to the gradient computation circuit [Akrout et al., 2019]; BP gradients can be approximated as finite differences of feedback operators [Ernoult et al., 2022]; or computed via implicit forward-mode differentiation [Hiratani et al., 2022, Fournier et al., 2023, Malladi et al., 2023]; local layer-wise self-supervised or supervised loss functions can be used to prevent 'backward locking' [Belilovsky et al., 2019, Ren et al., 2022, Hinton, 2022]. This insight may help exploring many variants of ff-EBM training.

Pursuing the core motivation of this work, one natural extension of this study is to incorporate more hardware realism into ffEBMs . Beyond Deep Hopfield networks, Deep Resistive Nets (DRNs) - developed by Scellier [2024] and strongly inspired by Kendall et al. [2020] - are exact models of idealized analog circuits, trainable by EP, promising fast simulation times. As such, using DRNs as EB blocks inside ff-EBMs is an exciting research direction - see Fig. 6. Still, further work in this direction presents new challenges especially given device non-idealities which may affect the inference pathway, such as analog-todigital and digital-to-analog noise [Rasch et al., 2023, Lammie et al., 2024]. Finally, considerable work is needed to prove ff-EBM further at scale on more difficult tasks (e.g. standard ImageNet), considerably deeper architectures, and moving beyond vision tasks. One other exciting research direction would be the design of ff-EBM based transformers , with attention layers being chained with energy-based fully connected layers inside attention blocks.

Concluding remarks and broader impact. We show that ff-EBMs constitute a novel framework for deep-learning in heterogeneous hardware settings. We hope that the proposed algorithm can help to overcome the typical division between digital versus analog or BP versus BP-free algorithms and that the greater energy-efficiency afforded by this framework provides a pragmatic, near-term blueprint to mitigating the dramatic carbon footprint of AI training [Strubell et al., 2020]. While we are still a long way from fully analog training accelerators at commercial maturity, we believe this work offers an incremental and sustainable roadmap to gradually integrate analog, energy-based computational primitives as they are developed into existing digital accelerators.

Author contributions

TN was responsible for implementation, architecture design, coding all algorithmic details and running training experiments, as well as discovery of criteria for stable convergence. TN also participated in writing relevant portions of this manuscript. ME designed the study, derived all theoretical results, debugged and refactored the initial codebase and wrote most of the manuscript.

References

Agarwala and S. S. Schoenholz. Deep equilibrium networks are sensitive to initialization statistics. In International Conference on Machine Learning , pages 136-160. PMLR, 2022.

Akrout, C. Wilson, P. Humphreys, T. Lillicrap, and D. B. Tweed. Deep learning without weight transport. Advances in neural information processing systems , 32, 2019.

B. Almeida. A learning rule for asynchronous perceptrons with feedback in a combinatorial environment. In Proceedings, 1st First International Conference on Neural Networks , volume 2, pages 609-618. IEEE, 1987.

Ambrogio, P. Narayanan, A. Okazaki, A. Fasoli, C. Mackin, K. Hosokawa, A. Nomura, T. Yasuda, A. Chen, A. Friz, et al. An analog-ai chip for energy-efficient speech recognition and transcription. Nature , 620(7975):768-775, 2023.

Bai, J. Z. Kolter, and V. Koltun. Deep equilibrium models. Advances in neural information processing systems , 32, 2019.

Belilovsky, M. Eickenberg, and E. Oyallon. Greedy layerwise learning can scale to imagenet. In International conference on machine learning , pages 583-593. PMLR, 2019.

Blondel, Q. Berthet, M. Cuturi, R. Frostig, S. Hoyer, F. Llinares-López, F. Pedregosa, and J.-P. Vert. Efficient and modular implicit differentiation. Advances in neural information processing systems , 35:5230-5242, 2022.

Chen, Y. Zhang, J. Jia, J. Diffenderfer, J. Liu, K. Parasyris, Y . Zhang, Z. Zhang, B. Kailkhura, and S. Liu. Deepzero: Scaling up zeroth-order optimization for deep model training. arXiv preprint arXiv:2310.02025 , 2023.

Chrabaszcz, I. Loshchilov, and F. Hutter. A downsampled variant of imagenet as an alternative to the cifar datasets. arXiv preprint arXiv:1707.08819 , 2017.

Cosemans, B. Verhoef, J. Doevenspeck, I. Papistas, F. Catthoor, P. Debacker, A. Mallik, and D. Verkest. Towards 10000tops/w dnn inference with analog in-memory computing-a circuit blueprint, device options and requirements. In 2019 IEEE International Electron Devices Meeting (IEDM) , pages 22-2. IEEE, 2019.

Dellaferrera and G. Kreiman. Error-driven input modulation: Solving the credit assignment problem without a backward pass. In International Conference on Machine Learning , pages 4937-4955. PMLR, 2022.

Dillavou, B. Beyer, M. Stern, M. Miskin, A. Liu, and D. Durian. Transistor-based self-learning networks. In APS March Meeting Abstracts , volume 2023, pages D07-006, 2023.

L. Dontchev, R. T. Rockafellar, and R. T. Rockafellar. Implicit functions and solution mappings: A view from variational analysis , volume 616. Springer, 2009.

Ernoult, J. Grollier, D. Querlioz, Y. Bengio, and B. Scellier. Updates of equilibrium prop match gradients of backprop through time in an rnn with static input. Advances in neural information processing systems , 32, 2019.

M. Ernoult, F. Normandin, A. Moudgil, S. Spinney, E. Belilovsky, I. Rish, B. Richards, and Y. Bengio. Towards scaling difference target propagation by learning backprop targets. In International Conference on Machine Learning , pages 5968-5987. PMLR, 2022.

R. Fiete, M. S. Fee, and H. S. Seung. Model of birdsong learning based on gradient estimation by dynamic perturbation of neural conductances. Journal of neurophysiology , 98(4):2038-2057, 2007.

Fournier, S. Rivaud, E. Belilovsky, M. Eickenberg, and E. Oyallon. Can forward gradient match backpropagation? In International Conference on Machine Learning , pages 10249-10264. PMLR, 2023.

Haensch, T. Gokmen, and R. Puri. The next generation of deep learning hardware: Analog computing. Proceedings of the IEEE , 107(1):108-122, 2018.

Hinton. The forward-forward algorithm: Some preliminary investigations. arXiv preprint arXiv:2212.13345 , 2022.

Hiratani, Y. Mehta, T. Lillicrap, and P. E. Latham. On the stability and scalability of node perturbation learning. Advances in Neural Information Processing Systems , 35:31929-31941, 2022.

Høier, D. Staudt, and C. Zach. Dual propagation: Accelerating contrastive hebbian learning with dyadic neurons. In International Conference on Machine Learning , 2023. URL https: //icml.cc/virtual/2023/poster/23795 .

Jain, H. Tsai, C.-T. Chen, R. Muralidhar, I. Boybat, M. M. Frank, S. Wo´ zniak, M. Stanisavljevic, P. Adusumilli, P. Narayanan, et al. A heterogeneous and programmable compute-in-memory accelerator architecture for analog-ai using dense 2-d mesh. IEEE Transactions on Very Large Scale Integration (VLSI) Systems , 31(1):114-127, 2022.

Kendall, R. Pantone, K. Manickavasagam, Y. Bengio, and B. Scellier. Training end-to-end analog neural networks with equilibrium propagation. arXiv preprint arXiv:2006.01981 , 2020.

P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 , 2014.

Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.

Laborieux and F. Zenke. Holomorphic equilibrium propagation computes exact gradients through finite size oscillations. Advances in Neural Information Processing Systems , 35:12950-12963, 2022.

Laborieux and F. Zenke. Improving equilibrium propagation without weight symmetry through jacobian homeostasis. arXiv preprint arXiv:2309.02214 , 2023.

Laborieux, M. Ernoult, B. Scellier, Y. Bengio, J. Grollier, and D. Querlioz. Scaling equilibrium propagation to deep convnets by drastically reducing its gradient estimator bias. Frontiers in neuroscience , 15:633674, 2021.

Lammie, F. Ponzina, Y. Wang, J. Klein, M. Zapater, I. Boybat, A. Sebastian, G. Ansaloni, and D. Atienza. Lionheart: A layer-based mapping framework for heterogeneous systems with analog in-memory computing tiles. arXiv preprint arXiv:2401.09420 , 2024.

Li, M. Manley, J. Read, A. Kaul, M. S. Bakir, and S. Yu. H3datten: Heterogeneous 3-d integrated hybrid analog and digital compute-in-memory accelerator for vision transformer self-attention. IEEE Transactions on Very Large Scale Integration (VLSI) Systems , 2023.

Liao, Y. Xiong, E. Fetaya, L. Zhang, K. Yoon, X. Pitkow, R. Urtasun, and R. Zemel. Reviving and improving recurrent back-propagation. In International Conference on Machine Learning , pages 3082-3091. PMLR, 2018.

Liu, C. Mu, H. Jiang, Y. Wang, J. Zhang, F. Lin, K. Zhou, Q. Liu, and C. Chen. Hardsea: Hybrid analog-reram clustering and digital-sram in-memory computing accelerator for dynamic sparse self-attention in transformer. IEEE Transactions on Very Large Scale Integration (VLSI) Systems , 2023.

Loshchilov and F. Hutter. Sgdr: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations , 2017.

Malladi, T. Gao, E. Nichani, A. Damian, J. D. Lee, D. Chen, and S. Arora. Fine-tuning language models with just forward passes. Advances in Neural Information Processing Systems , 36:5303853075, 2023.

Momeni, B. Rahmani, M. Malléjac, P. Del Hougne, and R. Fleury. Backpropagation-free training of deep physical neural networks. Science , 382(6676):1297-1303, 2023.

Momeni, B. Rahmani, B. Scellier, L. G. Wright, P. L. McMahon, C. C. Wanjura, Y. Li, A. Skalli, N. G. Berloff, T. Onodera, et al. Training of physical neural networks. arXiv preprint arXiv:2406.03372 , 2024.

Nandakumar, M. Le Gallo, C. Piveteau, V. Joshi, G. Mariani, I. Boybat, G. Karunaratne, R. Khaddam-Aljameh, U. Egger, A. Petropoulos, et al. Mixed-precision deep learning based on computational memory. Frontiers in neuroscience , 14:406, 2020.

Oguz, J. Ke, Q. Weng, F. Yang, M. Yildirim, N. U. Dinc, J.-L. Hsieh, C. Moser, and D. Psaltis. Forward-forward training of an optical neural network. Optics Letters , 48(20):5249-5252, 2023.

J. Pineda. Generalization of back-propagation to recurrent neural networks. Physical review letters , 59(19):2229, 1987.

J. Rasch, C. Mackin, M. Le Gallo, A. Chen, A. Fasoli, F. Odermatt, N. Li, S. Nandakumar, P. Narayanan, H. Tsai, et al. Hardware-aware training for large-scale and diverse deep learning inference workloads using in-memory computing-based accelerators. Nature communications , 14 (1):5282, 2023.

Ren, S. Kornblith, R. Liao, and G. Hinton. Scaling forward gradient with local losses. arXiv preprint arXiv:2210.03310 , 2022.

Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision , 115:211-252, 2015.

Scellier. A deep learning theory for neural networks grounded in physics. arXiv preprint arXiv:2103.09985 , 2021.

Scellier. A fast algorithm to simulate nonlinear resistive networks. arXiv preprint arXiv:2402.11674 , 2024.

Scellier and Y. Bengio. Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. Frontiers in computational neuroscience , 11:24, 2017.

Scellier and Y. Bengio. Equivalence of equilibrium propagation and recurrent backpropagation. Neural computation , 31(2):312-329, 2019.

Scellier, S. Mishra, Y. Bengio, and Y. Ollivier. Agnostic physics-driven deep learning. arXiv preprint arXiv:2205.15021 , 2022.

Scellier, M. Ernoult, J. Kendall, and S. Kumar. Energy-based learning algorithms for analog computing: a comparative study. Advances in Neural Information Processing Systems , 36, 2024.

Sebastian, M. Le Gallo, R. Khaddam-Aljameh, and E. Eleftheriou. Memory devices and applications for in-memory computing. Nature nanotechnology , 15(7):529-544, 2020.

Silver, A. Goyal, I. Danihelka, M. Hessel, and H. van Hasselt. Learning by directional gradient descent. In International Conference on Learning Representations , 2021.

C. Spall. Implementation of the simultaneous perturbation algorithm for stochastic optimization. IEEE Transactions on aerospace and electronic systems , 34(3):817-823, 1998.

Spoon, H. Tsai, A. Chen, M. J. Rasch, S. Ambrogio, C. Mackin, A. Fasoli, A. M. Friz, P. Narayanan, M. Stanisavljevic, et al. Toward software-equivalent accuracy on transformer-based deep neural networks with analog memory devices. Frontiers in Computational Neuroscience , 15:675741, 2021.

Stern and A. Murugan. Learning without neurons in physical systems. Annual Review of Condensed Matter Physics , 14:417-441, 2023.

Stern, S. Dillavou, D. Jayaraman, D. J. Durian, and A. J. Liu. Physical learning of power-efficient solutions. arXiv preprint arXiv:2310.10437 , 2023.

Strubell, A. Ganesh, and A. McCallum. Energy and policy considerations for modern deep learning research. In Proceedings of the AAAI conference on artificial intelligence , volume 34, pages 13693-13696, 2020.

C. Thompson, K. Greenewald, K. Lee, and G. F. Manso. The computational limits of deep learning. arXiv preprint arXiv:2007.05558 , 2020.

Wang, P. S. Nalla, G. Krishnan, R. V. Joshi, N. C. Cady, D. Fan, J.-s. Seo, and Y. Cao. Digitalassisted analog in-memory computing with rram devices. In 2023 International VLSI Symposium on Technology, Systems and Applications (VLSI-TSA/VLSI-DAT) , pages 1-4. IEEE, 2023.

Xue, T. Zhou, Z. Xu, S. Yu, Q. Dai, and L. Fang. Fully forward mode training for optical neural networks. Nature , 632(8024):280-286, 2024.

S.-i. Yi, J. D. Kendall, R. S. Williams, and S. Kumar. Activity-difference training of deep neural networks using memristor crossbars. Nature Electronics , 6(1):45-51, 2023.

Zach. Bilevel programs meet deep learning: A unifying view on inference learning methods. arXiv preprint arXiv:2105.07231 , 2021.

Zhang and M. Brand. Convergent block coordinate descent for training tikhonov regularized deep neural networks. Advances in Neural Information Processing Systems , 30, 2017.

Zucchet and J. Sacramento. Beyond backpropagation: implicit gradients for bilevel optimization. arXiv preprint arXiv:2205.03076 , 2022.

A Appendix

Contents

A.1 Model details

A.1.1 Feedforward-tied EBMs (ff-EBMs)

We first formally define Feedforward-tied Energy-based Models (ff-EBMs) with precise assumptions on the energy-based and feedforward blocks.

Definition A.1 (ff-EBMs) . A Feedforward-tied Energy-based Model (ff-EBM) of size N comprises N twice differentiable feedforward mapping F 1 , · · · , F N and N -1 twice differentiable energy functions E 1 , · · · , E N -1 with respect to all their variables. For a given x , the inference procedure reads as:

Finally, we assume that ∀ k = 1 · · · N -1 , ∇ 2 1 E k ( s k ⋆ , θ k , ω k ) is invertible.

A.1.2 Feedforward nets as a special case

We show that when energy-based blocks comprise a single layer only, the ff-EBM becomes purely feedforward.

Lemma A.1. We consider ff-EBM per Def. (A.1) where the energy functions E k have the form:

We assume that U k = 0 for k = 1 · · · N -1 , s →∇ G ( s ) is invertible and we denote σ := ∇ G -1 . Then, the resulting model is a feedforward model described by the following recursive equations:

Proof of Lemma A.1. Let k ∈ [1 , N -1] . By definition of s k ⋆ and x k ⋆ :

Therefore Eq. (19) is immediately obtained from Eq. (20) with U k = 0 .

A.1.3 Equilibrium computation

For a single block. As mentioned in Section 3.1, the energy function of the k th EB block has the form:

where x k is the output of the preceding feedforward block. For a given choice of a continuously invertible activation function, G k σ is defined as:

To be more explicit and as we did previously, we re-write the augmented energy-function which encompasses both the k th EB block and the feedforward module that precedes it:

Deep Hopfield Nets (DHNs) as EB blocks. In our experiments, we used weight matrices of the form:

whereby each layer ℓ is only connected to its adjacent neighbors. Therefore, fully connected and convolutional DHNs with L layers have an energy function of the form:

Synchronous fixed-point iteration. We showed that when G is chosen such that ∇ G = σ -1 for some activation function σ , then the steady state of the k th block reads:

which justifies the following fixed-point iteration scheme, when the block is influenced by some error signal δs with nudging strength β :

The dynamics prescribed by Eq. 28 are also used for the inference phase with β = 0 . To further refine Eq. (28), let us re-write Eq. (28) with a layer index ℓ where ℓ ∈ [1 , L k ] with L k being the number of layers in the k th block, and replacing x k by its explicit expression:

As done in past EP works [Ernoult et al., 2019, Laborieux et al., 2021, Laborieux and Zenke, 2022, 2023, Scellier et al., 2024] and for notational convenience, we introduce the primitive function of the k th block as:

such that Eq. (29) re-writes:

Eq. (31) depicts a synchronous scheme where all layers are simultaneously updated at each timestep.

Asynchronous fixed-point iteration. Another possible scheme, employed by Scellier et al. [2024], instead prescribes to asynchronously update odd and even layers and was shown to speed up convergence in practice:

We formally depict this procedure as the subroutine Asynchronous inside Alg. 3. In practice, we observe that it was more practical to use a fixed number of iterations rather than using a convergence criterion with a fixed threshold.

Algorithm 3 Asynchronous (for all blocks until penultimate )

5: end for

Resulting ff-EBM inference algorithm. With the aforementioned details in hand, we re-write the inference algorithm Alg. 1 presented in the main as a Forward subroutine.

Algorithm 4 Forward

Output : s 1 , · · · , s N -1 or ˆ o depending on the context

1: s 0 ← x

4: end for

▷ Alg. 3

A.2 Main theoretical result

A.2.1 Proof of Theorem 3.1

The proof of Theorem 3.1 is structured as follows:

We directly solve the multilevel problem optimization defined inside Eq. (9) using a Lagrangian-based approach (Lemma A.2), yielding optimal Lagrangian multipliers, block states and loss gradients.

We show that by properly nudging the blocks, EP implicitly estimates the previously derived Lagrangian multipliers (Lemma A.3).

We demonstrate Theorem 3.1 by combining Lemma A.2 and Lemma A.3.

Finally, we highlight that when a ff-EBM is a feedforward net (Lemma A.1), then the proposed algorithm reduces to BP (Corollary A.1).

Lemma A.2 (Lagrangian-based approach) . Assuming a ff-EBM (Def. A.1), we denote s 1 ⋆ , x 1 ⋆ , · · · , s N -1 ⋆ , ˆ o ⋆ the states computed during the forward pass as prescribed by Eq. (17). Then, the gradients of the objective function C := ℓ (ˆ o ( s N -1 ⋆ ) , y ) as defined in the multilevel optimization problem (Eq. (9)), where it is assumed that ℓ is differentiable, read:

where λ 1 ⋆ , · · · , λ N -1 ⋆ satisfy the following conditions:

Proof of Lemma A.2. Denoting s := ( s 1 , · · · , s N -1 ) ⊤ the state variables of the energy-based blocks, λ := ( λ 1 , · · · , λ N -1 ) ⊤ the Lagrangian multipliers associated with each of these variables, W := { θ 1 , ω 1 , · · · , θ N -1 , ω N -1 } the energy-based and feedforward parameters and ˆ o ( s N -1 ) := F N ( s N -1 , ω N -1 ) the logits, the Lagrangian of the multilevel optimization problem as defined in Eq. (9) reads:

Writing the associated Karush-Kuhn-Tucker (KKT) conditions ∂ 1 , 2 L ( s ⋆ , λ ⋆ , W ) := 0 satisfied by optimal states and Lagrangian multipliers s ⋆ and λ ⋆ , we get :

Eq. (36) governs the bottom-up block-wise relaxation procedure (as depicted in Alg. 1), while Eq. (37) and Eq. (38) governs error propagation in the last block and previous blocks respectively. Given s ⋆ and λ ⋆ by Eq. (36) - Eq. (38), the total derivative of the loss function with respect to the model parameters read:

More precisely, applying Eq. (39) to the feedforward and energy-based block parameters yields:

Lemma A.3 (Computing Lagrangian multipliers by EP) . Under the same hypothesis as Lemma A.2, we define the nudged state of block k , denoted as s k β , implicitly through ∇ 1 F k ( s k β , θ k , x k ⋆ , δs k , β ) = 0 with:

Defining ( δs k ) k =1 ··· N -1 recursively as:

then we have:

where ( λ k ) k =1 ··· N -1 are the Lagrangian multipliers associated to the multilevel optimization problem defined in Eq. (9).

Proof of Lemma A.3. We prove this result by backward induction on k .

Initialization ( k = N -1 ) . By definition, s N -1 β satisfies :

Differentiating Eq. (43) with respect to β and evaluating the resulting expression at β = 0 , we obtain:

Substracting out Eq. (37) defining the Lagrangian multiplier λ N -1 ⋆ and Eq. (44), we obtain:

By invertibility of ∇ 2 1 ˜ E N -1 ( s N -1 ⋆ , θ N -1 , s N -2 ⋆ , ω N -1 ) , we therefore have that:

Backward induction step ( k +1 → k ). Let us assume that λ k +1 ⋆ = d β s k +1 β | β =0 . We want to prove that λ k ⋆ = d β s k β | β =0 . Again, s k +1 β satisfies by definition:

On the one hand, proceeding as for the initialization step, differentiating Eq. (47) with respect to β and taking β = 0 yields:

On the other hand, note that δs k rewrites :

where we used at the last step the recursion hypothesis. Therefore combining Eq. (48) and Eq. (49), we get:

Finally, we substract out Eq. (38) and Eq. (50) to obtain:

We conclude again by invertibility of ∇ 2 1 ˜ E k ( s k ⋆ , θ k , s k -1 ⋆ , ω k ) that λ k ⋆ = d β s k β | β =0 .

Theorem A.1 (Formal) . Assuming a model of the form Eq. (5), we denote s 1 ⋆ , x 1 ⋆ , · · · , s N -1 ⋆ , ˆ o ⋆ the states computed during the forward pass as prescribed by Alg. 1. We define the nudged state of block k , denoted as s k β , implicitly through ∇ 1 F k ( s k β , θ k , x k ⋆ , δs k , β ) = 0 with:

Denoting δs k and ∆ x k the error signals computed at the input of the feedforward block F k and of the energy-based block E k respectively, g θ k and g ω k the gradients of the loss function:

then the following chain rule applies:

Proof of Theorem A.1. Combining Lemma A.2 and Lemma A.3, the following chain rule computes loss gradients correctly:

Therefore to conclude the proof, we need to show that ∀ k = 1 , · · · , N -1 :

Let k ∈ [1 , N -1] . We prove Eq. (58) as:

Eq. (59) can be obtained as:

Finally and similarly, we have:

A.2.2 An alternative proof of Theorem 3.1

An energy function for ff-EBMs? While it is clear that the energy function of a ff-EBM is not E = ∑ N -1 k =1 ˜ E k (which would correspond in this case to the 'single block' standard case), one may wonder if:

ff-EBM inference (Alg. 1) can still be described as the minimization of some energy function?

Therefore, if Theorem 3.1 can be derived by directly applying EP to this energy function?

We show below that this is indeed the case. We follow Zach [2021], denoting s := ( s 1 ⊤ , · · · , s N -1 ⊤ ) ⊤ and W = { W 1 , · · · , W N -1 } , by picking the following energy function:

where we locally redefine x as the concatenation of all block inputs, i.e. x ← ( x ⊤ , s 1 ⊤ ⋆ , · · · , s N -2 ⊤ ⋆ ) ⊤ , and with s ⋆ := ( s 1 ⊤ ⋆ , · · · , s N -1 ⊤ ⋆ ) implicitly defined through ∇ 1 F ( s ⋆ , W, x, β = 0) = 0 . In Lemma A.4, we show that the free steady state of the above energy function ( s ⋆ obtained with β = 0 inside Eq. (61)) indeed corresponds to the states computed by the ff-EBM inference scheme (Alg. 1).

Lemma A.4. Let ˜ E 1 , · · · , ˜ E N -1 be the block-wise energy functions of a ff-EBM defined per Def. A.1. Assume s ⋆ implicitly defined through ∇ 1 F ( s ⋆ , W, β = 0) = 0 where F is defined by Eq. (61). Then:

Proof of Lemma A.4. For k = N -1 , the stationarity condition ∇ s N -1 F ( s ⋆ , W, x, β ) yields:

Then, for any 1 ≤ k < N -1 , ∇ s k F ( s ⋆ , W, x, β ) = 0 yields:

Eq. (63) and Eq. (63) indeed correspond to ff-EBM inference as depicted inside Alg. 1.

The EP fundamental Lemma. For self-containedness of this paper, we restate the fundamental EP result below inside Lemma A.5.

Lemma A.5 ([Scellier, 2021]) . Let F ( s, W, x, β ) be a twice differentiable function of the three variables s , W and β . For fixed W , x and β , let s β be a point that satisfies the stationarity condition:

and suppose that ∇ 2 1 F ( s β , W, x, β ) is invertible. Then, in the neighborhood of this point, we can define a continuously differentiable function ( x, W, β ) → s β such that Eq. (65) holds for any ( x, W, β ) in this neighborhood. Furthermore, we have the following identity:

In particular, Eq. (66) may be evaluated with F = E + βℓ at β = 0 to yield the EP learning rule, denoting C := ℓ ( s ⋆ , y ) [Scellier and Bengio, 2017]:

Theorem 3.1 as a direct application of EP. Now we know Eq. (61) defines a valid energy function for ff-EBMs and with Lemma A.5 in hand, we are ready to apply EP directly to this energy function. We rewrite below the block-wise free energy functions at use inside Theorem 3.1 and used in practice inside Alg. 2 to nudge a block of energy ˜ E k given some top-down error signal δ k :

In Theorem A.2, we show that the direct application of Lemma A.5 to F as defined inside Eq. (61) yields the same gradient formula for each parameter W k and the same nudged block states as those prescribed by Theorem 3.1 for sufficiently small β .

Theorem A.2 (Informal) . Let F be defined as in Eq. (61) satisfying the same assumptions as in Lemma A.5. For fixed W , x and β , let s β satisfy the stationarity condition:

Then, we have:

Proof of Theorem A.2. Lemma A.5 yielding:

proving Eq. (69) amounts to show that:

On the one hand, we have:

For notational convenience, we define A ( β ) := ( ∇ 2 2 , 3 ˜ E k ( s k β , W k , s k -1 ⋆ ) -∇ 2 2 , 3 ˜ E k ( s k ⋆ , W k , s k -1 ⋆ ) ) . Note that A ( β = 0) = 0 . Differentiating Eq. (72) with respect to β and taking β = 0 yields:

which proves Eq. (70).

On the other hand, the stationary condition ∇ s k F ( s β , W, x, β ) on the last block ( k = N -1 ) yields:

For previous blocks, i.e. k < N -1 , we have:

Altogether, Eq. (73) and Eq. (74) finishes to prove Eq. (71).

A.3 Resulting algorithms

A.3.1 Explicit BP-EP chaining

We presented in Alg. 2 a 'pure' EP algorithm where the BP-EP gradient chaining is implicit . We show below, inside Alg. 5, an alternative implementation (equivalent in the limit β → 0 ) where the use of BP through feedforward modules is explicit and which is the direct implementation of Theorem A.1. We also show the resulting algorithm when the ff-EBM reduces to a feedforward net (Lemma A.1) inside Alg. 7, highlight in blue the statements which differ from the general case presented inside Alg. 5.

A.3.2 Recovering backprop through feedforward nets as a special case

Corollary A.1. Under the same hypothesis as Theorem A.1 and Lemma A.1, then the following chain rule applies to compute error signals backward from the output layer:

Proof of Corollary A.1. Let k ∈ [1 , N -1] . As we can directly apply Theorem A.1 here, proving the result simply boils down to showing that:

First, we notice that when E k is of the form of Eq. (18), then ∆ x k reads as:

s k β satisfies, by definition and when U k = 0 :

Combining Eq. (77) and Eq. (78) yields Eq. (76), and therefore, along with Theorem A.1, the chain-rule Eq. (75).

We showcase in Alg. 6 and Alg. 7 the resulting algorithms implicit and explicit BP-EP chaining respectively, with lines in blue highlighting differences with the general algorithm Alg. 2.

Algorithm 6 Implicit BP-EP gradient chaining with U k = 0

Algorithm 7 Explicit BP-EP gradient chaining with U k = 0

A.3.3 Detailed implementation of the implicit BP-EP chaining algorithm (Alg. 2)

Nudging the last block. From looking at the procedure prescribed by Theorem 3.1 and algorithms thereof (Alg. 2, Alg. 5), all the error signals used to nudge the EB blocks are stationary , including the top-most block where the loss error signal is fed in. Namely, the augmented energy function of the last block reads as:

where ˆ o ⋆ := F N ( s N -1 ⋆ , ω N ) is constant . Up to a constant, Eq. (80) uses the cost function linearized around s N -1 ⋆ instead of the cost function itself. This is, however, in contrast with most EP implementations where the nudging force acting upon the EB block is usually elastic , i.e. the nudging depends on the current state of the EB block. More precisely, instead of using Eq. (79), we instead use:

This results in the following asynchronous fixed-point dynamics for the last block:

The resulting Asynchronous subroutine, applying for the last block, is depicted inside Alg. 8.

Readout. Laborieux et al. [2021] introduced the idea of the 'readout' whereby the last linear layer computing the loss logits is not part of the EB free block dynamics but simply 'reads out' the state of the penultimate block. In all our experiments we use such a readout in combination with the cross entropy loss function. Using our formalism, our readout is simply the last feedforward transformation used inside ℓ , namely F N ( · , ω N ) .

Detailed implicit EP-BP chaining algorithm. We provide a detailed implementation of our algorithm presented in the main (Alg. 2) in Alg. 11. As usually done for EP experiments, we always perform a 'free phase' to initialize the block states ( Forward subroutine, Alg. 4). Then, two

Algorithm 8 Asynchronous (for last block)

2:

for

t

= 1

· · ·

T

do

5:

∀

even

ℓ

∈ {

1

,

· · ·

, L

N

}

:

7:

end for nudged phases are applied to the last block and parameter gradients subsequently computed, as done classically ( BlockGradient subroutine for the last block, Alg. 9), with an extra computation to compute the error current to be applied to the penultimate block ( δs N -2 ). Then, the same procedure is recursed backward through blocks (Alg. 10), until reaching first block.

Algorithm 9 BlockGradient (for last block)

Algorithm 10 BlockGradient (for all blocks until penultimate )

Algorithm 11 Detailed implicit BP-EP gradient chaining

1:

3:

s

1

,

for

· · ·

k

, s

=

N

N

-

1

-

2

Forward

· · ·

1

do

5:

end for

(

T

, x, W

)

▷

▷

Alg. 4

▷

Alg. 9

Alg. 10

A.4 Static gradient analysis

Important foreword. The whole subsection is dedicated to an important tool when developing code for EP research. While EP is agnostic to how the steady states are obtained - the EP theory only prescribes they are energy minimizers - they can be obtained in practice (i.e. in simulations ) through fixed-point iteration schemes (see Appendix A.1.1). The below formally defines the computational graph spanned by these schemes and abstract them away into a transition function K and defines three different techniques to compute gradients on this graph: Automatic Differentiation (AD, Prop. A.1), Implicit Differentiation (ID, Def. A.3) or Equilibrium Propagation (EP, Def. A.4). After defining each of these algorithms formally, we will state and demonstrate an equivalence between EP and ID (Theorem A.3) which we test numerically and relied upon for the development of our codebase.

A.4.1 Algorithmic baselines

Definition of the computational graph being optimized. We abstract fixed-point iteration dynamics away into a kernel function K which, given some block state s k t yields s k t +1 .

Definition A.2 (Form of the computational graph through equilibrium) .

Note that we emphasize, through the W k t -1 = W k notation, that the parameters W k are shared across all timesteps t = 1 , · · · , τ . This will help us define loss gradient with respect to W k t -1 further below, i.e. how much W k contributes at time t -1 to changing the loss C . The total contribution of W k reads as the sum of the elemental contributions of all W k t . This intuition is more precisely illustrated further below. Given the computational graph defined in Def. A.2, we can now formally define the Automatic Differentiation (AD) baseline.

Automatic Differentiation (AD). Our goal is to compute:

In plain words, ˆ g AD W k ( t ) denotes the loss gradient for parameter W k truncated at the t th step moving backward in time. We formally define below Automatic Differentiation (AD).

Proposition A.1 (Automatic Differentiation (AD)) . The gradients ˆ g AD W k ( t ) can be computed using the following recursive equations:

Proof of Prop. A.1. This is a straightforward application of the chain rule applied to Eq. (81).

Implicit Differentiation (ID). We define the steady state of block k , which we denote s k ⋆ , as the fixed point of Eq. (81). With this notation in hand, we can define Implicit Differentiation (ID) in this setting.

Definition A.3 (Implicit Differentiation (ID)) . Denoting s k ⋆ the fixed point of Eq. (81) inside block k , we define Implicit Differentiation (ID) through the following recursive equations:

We are now ready to state a simple algorithmic equivalence between ID and AD, which we built upon for our implementation of Alg. 12.

Corollary A.2 (Equivalence of ID and AD) . Assuming that:

where s k ⋆ denotes the fixed-point of Eq. 81, then automatic differentiation (Prop. A.1) and implicit differentiation (Def. A.3) are equivalent, namely:

Proof of Corollary A.2. This is a straightforward application of the definition of AD (Prop. A.1 along with the hypothesis made inside Corollary A.2.

Resulting implementation of ID. We describe our implementation of ID inside Alg. 12. First, we relax all blocks sequentially to equilibrium following Alg. 4 and we do not track gradients throughout this first phase, using T free fixed-point iteration steps per block. Then , initializing the block states with those computed at the previous step, we re-execute the same procedure (still with Alg. 4), this time tracking gradients and using T nudge steps fixed-point iteration steps for each block. Then, we use automatic differentiation to backpropagate through the last T nudge steps for each block, namely backpropagating, backward in time, through equilibrium .

Algorithm 12 Our implementation of ID

An important note about this implementation of ID. Note that this is not a standard implementation of ID and it may be surprising at first glance to implement ID as AD, thereby loosing the constant O (1) memory cost of ID with respect to the length of the computational graph. Instead, the memory cost of Alg. 12 is O (( N -1) τ ) 4 . However, our goal is not so much to optimize for memory usage (as in the context of Deep Equilibrium Models [Bai et al., 2019]) but to code an algorithmic baseline which we know to be equivalent to EP. Lastly, note that this implementation of ID is also known as Recurrent Backprop (RBP, [Almeida, 1987, Pineda, 1987]) or Von-Neumann RBP [Liao et al., 2018], and that ID generally comes in many more algorithmic flavors [Blondel et al., 2022].

A.4.2 Proof of Theorem 4.1

In order to state a formal equivalence between EP and ID, we first need to formally define EP in the context of the aforementioned computational graph defined in Def. A.2.

Definition A.4 (Equilibrium Propagation (EP)) . Denoting s k ⋆ the fixed point of Eq. (81) inside block k and assuming that the transition kernel K has the form K ( s, W k , x k ) = ∇ 1 Φ( s, W k , x k ) , we define Equilibrium Propagation (EP) through the following recursive equations:

Now that we have properly defined ID and EP, we are ready to state the main result of this section about the algorithmic equivalence between ID and EP which our coding work significantly built upon.

Theorem A.3 (Extension of [Ernoult et al., 2019] to ff-EBMs) . Assuming that:

where s k ⋆ denotes the fixed-point of Eq. (81) and that the transition kernel K has the form K ( s, W k , x k ) = ∇ 1 Φ( s, W k , x k ) , then implicit differentiation (Def. A.3) and equilibrium propagation (Def. A.4) are equivalent in the limit β → 0 , namely:

Proof of Theorem A.3. This proof follows the exact same methodology as that of Ernoult et al. [2019]. For self-containedness though and because of some subtle differences, we carry out here the derivation. We first define:

Note that since s k β,t =0 = s ⋆ , d β s k t | β =0 = 0 since s ⋆ does not depend on θ . Furthermore, note that by differentiating the equation satisfied by s k β,t +1 with respect to β and evaluating the resulting expressions at β = 0 yields:

In particular, evaluating Eq. (90) for t = 0 yields:

Therefore, substracting Eq. (90) across two timesteps yields altogether:

Note that ˆ g EP W k ( t ) rewrites:

Likewise, we can show that:

Altogether, Eq. (91), Eq. (92) Eq. (93) and Eq. (94) yield, denoting ˆ g EP W k ( t ) := lim β → 0 ˆ g EP W k ( β, t ) and ∆ x k t := lim β → 0 ∆ x k β,t :

Starting from k = N -1 , ( -∆ s N -1 t ) t ∈ J 1 ,τ K and ( δs N -1 t ) t ∈ J 1 ,τ K , (∆ x N -1 t ) t ∈ J 1 ,τ K and ( δx N -1 ) t ∈ J 1 ,τ K , (ˆ g EP W N -1 ( t )) t ∈ J 1 ,τ K and (ˆ g ID W N -1 ( t )) t ∈ J 1 ,τ K satisfy the same initial conditions and recursive equations, therefore there are all (pair-wise) equal for t = 1 , · · · , τ . Therefore in particular, ∆ x N -1 τ = δx N -1 τ such that ( -∆ s N -2 t ) t ∈ J 1 ,τ K and ( δs N -2 t ) t ∈ J 1 ,τ K from the previous ( N -2) th block satisfy the same initial conditions, such that the reasonning applying to k = N -1 recurses for k < N -1 , which yields Eq. (88).

A.4.3 Details about Fig. 3

Precise hyperparameters to reproduce Fig. 5 and Fig. 3 can be found inside our repository .

Fig. 7 precisely depict the architecture at use for these experiments.

Conv-64

BatchNorm

Conv-128

BatchNorm

Pool

Conv-128

Conv-256

BatchNorm

Pool

Conv-256

Conv-256

Conv-512

BatchNorm

Pool

Conv-512

BatchNorm

Pool

Conv-512

BatchNorm

Linear

Conv-512

Conv-512

Conv-512

Conv-512

Linear

Conv-64

A.5 Experimental Details

A.5.1 Datasets

Simulations were run on CIFAR-10, CIFAR-100 and Imagenet32 datasets, all consisting of color images of size 32 × 32 pixels. CIFAR-10 [Krizhevsky, 2009] includes 60,000 color images of objects and animals. Images are split into 10 classes, with 6,000 images per class. Training data and test data include 50,000 images, and 10,000 images respectively. CIFAR-100 [Krizhevsky, 2009] likewise comprises 60,000 and features a diverse set of objects and animals split into 100 distinct classes. Each class contains 600 images. Like CIFAR-10, the dataset is divided into a training set with 50,000 images and a test set containing the remaining 10,000 images. The ImageNet32 dataset [Chrabaszcz et al., 2017] is a downsampled version of the original ImageNet dataset Russakovsky et al. [2015] containing 1,000 classes with 1,281,167 training images, 50,000 validation images, 100,000 test images and 1000 classes.

A.5.2 Data preprocessing

All data were normalized according to statistics shown in 3 and augmented with 50% random horizontal flips. Images were randomly cropped and padded with the last value along the edge of the image.

A.5.3 Simulation details

Weight initialization. EP, similar to other machine learning paradigms reliant on fixed-point iteration [Bai et al., 2019], is highly sensitive to initialization statistics [Agarwala and Schoenholz, 2022], hence conventionally difficult to tune, and requiring many iterations for the three relaxation phases. Initialization of weights as Gaussian Orthogonal Ensembles (GOE) ensures better stability (reduced variance) and, combined with other stabilizing measures discussed below, empirically yields faster convergence.

According to GOE, weights are intialized as:

̸

where N ( µ, σ 2 ) denotes a Gaussian (normal) distribution with mean µ and variance σ 2 . N was manually tuned for each architecture.

State initialization. All layers are initialized as zero matrices.

Activation functions. An important detail for faithful reproduction of these experiments is the choice and placement of activation functions applied during the iterative fixed-point procedure. In the literature, activations (i.e. 'clamping') is conventionally applied at each layer, with the exception of the final layer , where it is sometimes included e.g. Scellier et al. [2024], and sometimes omitted Laborieux et al. [2021], depending on the loss function at use. For these experiments we used both the standard hard activation employed by Ernoult et al. [2019] and Scellier et al. [2024], and the more conservative one given in [Laborieux et al., 2021]. For the tolerance based and splitting experiments, we generalize the approach of Laborieux et al. [2021], by scaling values by a variable factor α instead of a fixed value 0 . 5 . Details are given in Table 4.

In practice, we find that the smaller scaling factors corresponding with the 'laborieux' activation, in conjunction with GOE, and the omission of clamping at the output of each block significantly

enhances gradient stability and speeds convergence in deep multi-block settings. In the interest of multi-scale uniformity and consistency with previous literature [Laborieux et al., 2021] Ernoult et al. [2019], we apply clamping activations on all layers in our 6-layer architecture.

For the scaling experiments, we apply the 'laborieux' activation at every layer except the output of each block. For the 12-layer splitting experiment, we do the same, omitting clamping from the output of the final layer of each block in the block-size = 4 and block-size = 3 experiments. However, in the block-size = 2 case we clamp the output of the second and fourth blocks to preserve dynamics of the block-size = 4 split. Such consistency is not possible for the block-size = 3 experiment, constituting a possible discrepancy in dynamics.

Cross-entropy loss and softmax readout. Following [Laborieux et al., 2021], all models were implemented such that the output y is removed from the system (e.g. not included in the relaxation dynamics) but is instead the function of a weight matrix: W out of size dim ( y ) × dim ( s ) , where s is the state of the final layer. For each time-step t , ˆ y t = softmax ( W out s t ) .

The cross-entropy cost function associated with the softmax readout is then:

Convention to count layers. It is important to note that by convention we refer to architectures throughout this text to the exclusion of the softmax readout, which is technically an additional layer, though not involved in the relaxation process.

Architecture. All convolutional layers used in experiments are of kernel size 3 and stride and padding 1. Max-pooling was applied with a window of 2 × 2 and stride of 2. For the 6-layer model used in Table 1 , batchnorm was applied after the first layer convolution and pooling operation. All other models in both experiments use batch-normalization on the first layer of each block after convolution and pooling (where applied). These details exclude the linear softmax readout of size n classes.

Hyperparameters. Detailed hyperparameters for to reproduce Table 1 and Table 2 are given inside the configuration files of our repository . Note that all architectural details for the 12-layer models are identical across splitting and scaling experiments. Additionally, identical hyperparameters were used for CIFAR100 and Imagenet experiments of Table 2. Unlike previous literature, the use of GOE intialization eliminates the need for separate layerwise learning rates and initialization parameters. One noteworthy detail is that only 100 epochs were used for the larger model for Table 2 compared with 200 epochs for the smaller 12-layer model. This was due to prohibitively long run-time of training the larger model. Noteably, performance still significantly improves with decreased overall runtime.

Root-finding algorithms. While in principle any root-finding algorithm may be used for the two relaxation phases of our EP implementation (for inference and gradient computation), our implementation utilized a simple fixed-point iteration procedure, in which neuron states are initialized as zero vectors with values updated asynchronously on each iteration to that of the gradient of the total system energy with respect to current state. An approximate illustration of this procedure is found in Alg. 3. As indicated in Section 4.3, two variants of the convergence procedure were employed, one in which the average value of current state is compared to that of the previous state for each layer, and relaxation is truncated when values for all layers have a difference of less than 1e-4. This was known

as the tolerance-based (TOL) procedure. Notably, tolerance-based convergence criteria were applied on the free phase only , with nudging computed with a fixed value of iterations . This was to ensure consistency between ID and EP, though in practice a tolerance can be applied equally to the nudging phase.

Supplementary results with a fixed number of iterations. In addition to the TOL-based procedure, we obtained results for 4.3 using the more conventional approach of [Scellier and Bengio, 2019][Laborieux et al., 2021][Ernoult et al., 2019], applying fixed number of iterations on the first and second relaxation phases (see 1). This approach was also the default used for our scaling experiments in 4.4. Importantly, with the TOL procedure described above Alg 3 becomes Alg 13. Results using a fixed iteration root-finding scheme are shown in 5

Other details. All experiments were run using Adam optimizer [Kingma and Ba, 2014]and Cosine Annealing scheduler[Loshchilov and Hutter, 2017], specifying some minimum learning rates and setting maximum T equal to epochs (i.e. no warm restarts). Code was implemented in Pytorch 2.0 and all simulations were run on NVIDIA A100 SXM4 40GB GPUs.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: we have a dedicated paragraph in the 'Discussion' section of the paper which explicitly mentions limitations and future work.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: All proofs are included in the appendix.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: detailed information to reproduce experiments along with configuration files are provided on our github repository.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: The URL to our github repository is provided in the main.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: all these details are provided in the appendix.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: we perform each of our training simulations on 3 different seeds and reported mean and standard deviation of the resulting performance.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: this information is also inside our appendix.

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: we wrote a dedicated paragraph inside our 'Discussion' section.

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: Our work poses no such risk at present as it only provides proof-of-concepts for systems which do not yet exist.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [NA]

Justification: this work does not use existing assets.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: this paper does not release new assets.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: our paper does not involve crowdsourcing nor research with human subjects.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: our paper does not involve crowdsourcing nor research with human subjects.

Peer reviews:
comments: SUMMARY:
State-of-the-art (SOTA) analog hardware accelerators consist of both analog and digital components supporting major and auxiliary operations. Moreover, they typically suffer from device imperfections on their analog parts. In this paper, the authors propose feedforward-tied energy-based models (ff-EBMs) for digital and analog circuits. ff-EBMs compute gradients by both backpropagating on feedforward parts and eq-propagating on energy-based parts. In this paper, ff-EBMs use a Deep Hopfield Network (DHN) as one example, which can be arbitrarily partitioned into uniform size. ff-EBMs achieves a SOTA performance on ImageNet32.

STRENGTHS:
1. The paper works on an important and interesting problem.
2. The paper flows well.

WEAKNESSES:
1. The paper does NOT consider a detailed analog computing device model. It will be interesting to see how significant variations on the analog devices the ff-EBMs can tolerate. And what is the relationship between the convergence speed and the device variations?

2. The paper does not include energy-related data. What is the energy saving for the energy-based models? What is the energy saving of skipping the accurate gradient computations?

QUESTIONS:
Please comment on the points in the weakness section.

LIMITATIONS:
no limitations.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-06-21

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper discusses a novel approach to improving the power efficiency of AI training by integrating analog and digital hardware. The authors introduce a hybrid model called Feedforward-tied Energy-based Models (ff-EBMs) that combines feedforward neural networks with energy-based models (EBMs). This model aims to leverage the benefits of both analog and digital systems to create a more efficient computational framework for neural network training.\n\nThe paper introduces a new model, ff-EBMs, which integrates feedforward and EB modules. These models are designed to perform end-to-end gradient computation, combining backpropagation through feedforward blocks and \"eq-propagation\" through EB blocks. And bilevel and multi-level optimization are concepts used to frame the learning process of the Feedforward-tied Energy-based Models (ff-EBMs).\n\nThe paper promises to demonstrate the effectiveness of the proposed approach experimentally, using DHNs as EB blocks and achieving new state-of-the-art performance on the ImageNet32 dataset.\n\nSTRENGTHS:\n- The paper presents a robust framework that leverages the strengths of bilevel and multi-level optimization to address the challenges of training neural networks in a hybrid digital-analog setting. One of the significant strengths lies in the rigorous mathematical proofs provided for the bilevel optimization inherent to energy-based models (EBMs). The authors extend this foundation to a multi-level optimization approach, which is not only theoretically sound but also practically applicable to the training of Feedforward-tied Energy-based Models (ff-EBMs).\n\n- The bilevel optimization is solidly established with the inner problem accurately reflecting the equilibrium state search, crucial for EBMs, while the outer problem adeptly encapsulates the parameter adjustment to minimize the cost function. This nested structure is then expanded into a multi-level optimization problem that inherently captures the complexity of training ff-EBMs, where each level represents an optimization challenge within the model's architecture.\n\n- The theoretical robustness is complemented by a well-thought-out algorithm that intertwines backpropagation and equilibrium propagation, offering a practical solution to the end-to-end training of these hybrid models. This algorithm is not just a theoretical construct; it is underpinned by a series of proofs that validate its effectiveness. The experimental results are particularly compelling, as they demonstrate the effectiveness of the proposed approach on ff-EBMs, achieving state-of-the-art performance on the ImageNet32 dataset.\n\nWEAKNESSES:\nWhile the paper introduces an innovative approach to hybrid digital-analog neural network training, there are a few areas where it shows some limitations. \n- The paper could benefit from clearer articulation regarding the energy efficiency claims, providing more detailed comparisons with existing systems to substantiate these claims. \n- Additionally, the reliance on simple datasets, ImageNet32, for experimental validation, while common, might limit the generalizability of the findings. A broader range of datasets with varying characteristics could strengthen the paper's conclusions. The choice of ImageNet32 should be justified with respect to its relevance to the research goals and its limitations for testing the model's robustness.\n- Lastly, while the authors acknowledge the need for further research, a more explicit discussion on the current limitations and a roadmap for future work would provide a more comprehensive view of the research's trajectory.\n\nQUESTIONS:\nIn the proposed implicit BP-EP chaining algorithm, is it necessary to ensure the satisfaction of the first-order optimality conditions derived from the implicit theory, or can the algorithm be robust and effective without strictly guaranteeing these conditions?\n\nLIMITATIONS:\nA notable limitation of our study is the constrained scope of network architectures and datasets utilized for validation. While the implicit BP-EP chaining algorithm has shown success with Deep Hopfield Networks on ImageNet32, its performance on the standard ImageNet and transformer-based models, which are more complex and widely used, is yet to be established.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-04"}

comments: SUMMARY:
This paper proposes a new building model block with analog forward circuits and energy-based blocks built on a digital-analog hybrid setup.  A novel algorithm is further proposed to train the new block model. Experiments show the SOTA accuracy in the EP literature.

STRENGTHS:
* This paper achieves SOTA accuracy compared to recent literature.
* A solid optimization method is proposed for the hybrid block.

WEAKNESSES:
* The paper's motivation is vague to me, as I am new to this topic. Why must we combine an analog forward circuit with a digital one for EP-based training? For the analog accelerator, we can use several other methods to do training, e.g., forward-forward only and zeroth-order optimization. What are the benefits of incorporating an energy-based model?

QUESTIONS:
N/A

LIMITATIONS:
N/A
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-12

comments: SUMMARY:
This paper presents Feedforward-tied Energy-based Models (ff-EBMs), a hybrid model that integrates feedforward and energy-based components, accounting for both digital and analog circuits. A novel algorithm is proposed to compute gradients end-to-end in ff-EBMs by backpropagating and "eq-propagating" through feedforward and energy-based sections, respectively, allowing EP to be applied to more flexible and realistic architectures. It has been shown that ff-EBMs can be trained on ImageNet32, achieving new state-of-the-art performance in the EP literature with a top-1 accuracy of 46%.

STRENGTHS:
-- The proposed ff-EBMs as high-level models of mixed precision systems, where the inference pathway is composed of feedforward and EB modules, is interesting and novel. Specially, gradients computations as an end-to-end backpropagation through feedforward blocks and “eq-propagating” through EB blocks.

-- The results are also encouraging specially on CIFAR datasets.

-- The paper is easy to read and understand.

WEAKNESSES:
-- The primary limitation of this work is its accuracy performance on the ImageNet dataset. Although the paper has set a new state-of-the-art accuracy, it still lags behind the results achieved by Transformers and CNNs. There is a lack of compelling reasons to use this method given its comparatively lower performance.

-- Additionally, it is crucial to measure the energy consumption of this training method and compare it with traditional methods. How much energy savings does your method offer?

QUESTIONS:
See weaknesses.

LIMITATIONS:
NA
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-15

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nAnalog in-memory computing is gaining traction as an energy-efficient platform for deep learning. However, fully analog-based accelerators are challenging to construct, necessitating a training solution for digital-analog hybrid accelerators. This paper introduces Feedforward-tied Energy-based Models (ff-EBMs), a hybrid model that integrates feedforward components, typical in digital systems, with energy-based blocks suitable for analog circuits. An algorithm is derived to compute gradients end-to-end for training ff-EBMs. Experimental results show that ff-EBMs achieve superior accuracy on ImageNet32 classification compared to conventional equilibrium propagation literature.\n\nSTRENGTHS:\n1. This paper developed training algorithms specifically for digital-analog hybrid computing platforms, addressing a realistic computing scenario that leverages analog in-memory computing.\n\nWEAKNESSES:\n1. The paper lacks examples of situations where ff-EBM is needed. It does not adequately explain which parts of the overall system are digital and which are analog when using ff-EBM. Additionally, it does not clarify whether the existing training techniques can be used in these scenarios or what advantages ff-EBM offers compared to traditional methods.\n\nQUESTIONS:\nAs I understand it, analog in-memory computing naturally finds the node voltage that minimizes the energy function through Kirchhoff's laws, classifying it as an EP problem. Therefore, if we disregard the natural minimization of the energy function, the training process with analog in-memory computing appears very similar to the conventional backpropagation-based training procedure. Hence, the derived algorithm for calculating end-to-end gradients of the ff-EBM seems trivial. In this context, I don't see the difference between this research and previous studies that have conducted training on analog in-memory systems using EP or backpropagation. Could you explain the differences between the previous approaches and the proposed approach in more detail? Providing examples of situations where ff-EBM is needed, as discussed in the Weakness section of this review, would be helpful.\n\nLIMITATIONS:\nPlease check the weakness.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-31"}