---
title: 'BELAY: Two-Way Averaging for NN Training'
url: https://www.emergentmind.com/topics/belay
type: topic
---

# BELAY: Two-Way Averaging for NN Training

**BELAY** is a training algorithm for neural network optimization that generalizes exponential moving average (EMA) of model weights by treating the online model and the averaged model as two coupled masses in a damped spring system. Introduced in "Exponential weight averaging as damped harmonic motion" [2310.13854], it replaces EMA’s one-way, passive averaging with a two-way coupling in which the smoothed trajectory can also pull back on the live model during training. In the paper’s formulation, standard weight EMA is recovered as a limiting case in which the online model has infinite mass and is therefore unaffected by the averaged trajectory.

## 1. Problem setting and motivation

BELAY is motivated by a mismatch between the ubiquity of weight EMA and the limited understanding of why EMA improves training-time and inference-time stability. In the paper’s convention, standard EMA is written as
$$
\mathbf{w}^{\mathrm{EMA}}(t+1)=\alpha \mathbf{w}^*(t)+(1-\alpha)\mathbf{w}^{\mathrm{EMA}}(t),
\qquad
\mathbf{w}^*(t)=\mathbf{w}(t)+g(\mathbf{w}(t)),
$$
where \(g(\mathbf{w}(t))\) is the optimizer update and \(\alpha \in [0,1]\) controls averaging [2310.13854].

The paper identifies three practical limitations of this scheme. First, EMA is one-way coupled: the averaged weights are pulled toward the online weights, but the online weights receive no stabilizing feedback from the averaged trajectory. Second, EMA is sensitive to \(\alpha\): if \(\alpha\) is too large in the paper’s convention, the average lags badly behind training, whereas if \(\alpha\) is too small, the average tracks too closely and loses much of its variance-reduction effect. Third, good choices of \(\alpha\) depend on the total training horizon \(T\), which makes transfer across runs awkward.

BELAY is designed to preserve EMA’s smoothing while reducing its passivity. The central objective is not merely to maintain a better evaluation-time model, but to use the smoothed trajectory to stabilize the optimization path itself. The paper summarizes this as using “the strong model stability properties of EMA to guide parameter updates during training” [2310.13854].

## 2. EMA as a damped two-body system

The paper’s core conceptual move is to interpret EMA as a discretized damped harmonic oscillator with two particles at positions \(\mathbf{w}_1(t)\) and \(\mathbf{w}_2(t)\), masses \(m_1\) and \(m_2\), spring constant \(k\), and damping coefficients \(c_1,c_2\). Particle 1 is subject to the optimizer’s external force; particle 2 is not. The continuous-time equations are
$$
\ddot{\mathbf{w}}_1
=
\frac{k}{m_1}(\mathbf{w}_2-\mathbf{w}_1)
-
\frac{c_1}{m_1}\dot{\mathbf{w}}_1
+
\frac{1}{m_1}f(\mathbf{w}_1,t),
$$
$$
\ddot{\mathbf{w}}_2
=
\frac{k}{m_2}(\mathbf{w}_1-\mathbf{w}_2)
-
\frac{c_2}{m_2}\dot{\mathbf{w}}_2.
$$

Using a forward Euler-style discretization with step \(\Delta t\), and then choosing
$$
c_1=\frac{2m_1}{\Delta t},
\qquad
c_2=\frac{2m_2}{\Delta t},
$$
the velocity terms cancel between steps. Defining
$$
\beta = 1-\frac{k\Delta t^2}{2m_1},
\qquad
\alpha = 1-\frac{k\Delta t^2}{2m_2},
$$
the paper obtains
$$
\mathbf{w}_1(t+\Delta t)=\beta \mathbf{w}_1^*(t)+(1-\beta)\mathbf{w}_2(t),
$$
$$
\mathbf{w}_2(t+\Delta t)=\alpha \mathbf{w}_1(t)+(1-\alpha)\mathbf{w}_2(t).
$$
Identifying \(\mathbf{w}_1\) with the online weights \(\mathbf{w}\) and \(\mathbf{w}_2\) with \(\mathbf{w}^{\mathrm{EMA}}\), standard EMA is recovered in the limit \(m_1\to\infty\), since then \(\beta\to 1\) and the online model ceases to feel the spring [2310.13854].

This interpretation is the paper’s main theoretical contribution. The online weights become one particle under an optimizer-induced external force; the averaged weights become a second particle; the coupling between them is a spring; and standard EMA corresponds to the special case in which only the averaged particle is meaningfully pulled. In that sense, BELAY does not discard EMA, but embeds it in a broader dynamical family.

## 3. Algorithmic form of BELAY

BELAY introduces finite online mass \(m_1\), so that the averaged trajectory influences the online model as well. In the paper’s Algorithm 1, the parameter set is
\((k,m_1,m_2,c_1,c_2)\),
together with optimizer update function \(g(\mathbf{w},t)\) and learning rate \(\eta\) [2310.13854].

| Symbol | Role |
|---|---|
| \(k\) | spring constant controlling attraction between the two weight vectors |
| \(m_1\) | mass of the online model weights |
| \(m_2\) | mass of the EMA weights |
| \(c_1,c_2\) | damping coefficients |
| \(g(\mathbf{w},t)\) | external force from the optimizer |
| \(\eta\) | learning rate |

With \(\Delta t=1\), the algorithm first computes an optimizer step
$$
\mathbf{w}_1^*=\mathbf{w}_1+\eta g(\mathbf{w}_1(t),t).
$$
It then defines momentum remnants
$$
\mathbf{M}_1=\left(1-\frac{c_1}{2m_1}\right)\dot{\mathbf{w}}_1(t),
\qquad
\mathbf{M}_2=\left(1-\frac{c_2}{2m_2}\right)\dot{\mathbf{w}}_2(t),
$$
and mixing coefficients
$$
\alpha = 1-\frac{k}{2m_1},
\qquad
\beta = 1-\frac{k}{2m_2}.
$$
The position updates are
$$
\mathbf{w}_1(t+1)=\alpha \mathbf{w}_1^*(t)+(1-\alpha)\mathbf{w}_2(t)+\mathbf{M}_1,
$$
$$
\mathbf{w}_2(t+1)=\beta \mathbf{w}_2(t)+(1-\beta)\mathbf{w}_1(t)+\mathbf{M}_2.
$$

The paper emphasizes a simplified practical regime in which damping eliminates carried-over velocity each step:
$$
c_1=2m_1,
\qquad
c_2=2m_2.
$$
Then \(\mathbf{M}_1=\mathbf{M}_2=0\), and BELAY reduces to a two-way averaging scheme:
$$
\mathbf{w}_1(t+1)=\alpha \mathbf{w}_1^*(t)+(1-\alpha)\mathbf{w}_2(t),
$$
$$
\mathbf{w}_2(t+1)=\beta \mathbf{w}_2(t)+(1-\beta)\mathbf{w}_1(t).
$$
This is the form actually used in the experiments. Relative to EMA, the difference is structural: BELAY still computes an optimizer step for the online model, but then mixes online and averaged weights in both directions. Standard EMA is recovered when \(m_1\to\infty\), equivalently when \(\alpha\to 1\) in the online update [2310.13854].

## 4. Analytical interpretation and tuning heuristics

The paper’s clearest analytical statement is that EMA is a special case of BELAY. In the infinite-mass limit for the online particle, the spring cannot move \(\mathbf{w}_1\), so the averaged model passively trails the online model exactly as in ordinary EMA. BELAY therefore enlarges the design space rather than replacing the EMA intuition outright [2310.13854].

A second claim is that BELAY should reduce lag while increasing responsiveness. Standard EMA reduces variance but necessarily trails the online trajectory because coupling is one-way. BELAY’s two-way coupling partially anchors the online weights to a smoother path. The intended effect is a trade: less destructive separation between live and averaged trajectories, with some of EMA’s smoothing transferred back into the training dynamics.

A third claim concerns damping. Setting
$$
c_i=\frac{2m_i}{\Delta t}
$$
fully dampens the system, so velocity is reset between time steps. Deviating from this introduces a momentum-like term. BELAY therefore unifies two ingredients that are usually discussed separately: EMA-like averaging and momentum-like inertial effects. The paper treats the damping coefficients as physically interpretable controls over stability.

The paper also sketches a relationship to momentum optimizers. For SGD with momentum,
$$
\mathbf{v}(t)=\lambda \nabla \mathcal{L}(\mathbf{w}(t))+(1-\lambda)\mathbf{v}(t-1),
$$
so the velocity is an exponentially weighted sum of past gradients. For a linear loss, the derivation shows that such averaging can be interpreted as evaluating gradients at an EMA-smoothed iterate. The paper presents this as an interpretive bridge rather than a formal theorem.

To reduce EMA’s dependence on total training length, the paper derives a heuristic scaling law for the spring constant:
$$
k(T)\approx k_0\frac{T_0}{T},
\qquad
k(T)=\frac{C}{T},
$$
with \(C=10^6\) in the reported experiments. This is explicitly a heuristic design rule, not a formal guarantee.

Equally important are the limits of the analysis. The paper does **not** prove faster asymptotic convergence than EMA, lower statistical bias than EMA, Lyapunov stability guarantees, or nonconvex convergence theorems. Its theoretical advantages are interpretive and structural: an exact mechanical analogy, EMA as a limiting case, interpretable control of coupling and damping, and a plausible reduction in lag with improved robustness under aggressive optimization settings [2310.13854].

## 5. Empirical evaluation

The empirical study has two parts: ill-conditioned two-dimensional optimization and score-based diffusion models. In the 2D tests, the compared methods are BELAY + Adam, BELAY + SGD, EMA + Adam, EMA + SGD, Adam, and SGD, evaluated on Rosenbrock, Beale, \(\frac{|x|}{10}+|y|\), and \(\frac{(x+\frac{y}{10})^2+(x-\frac{y}{10})^2}{10}\). The paper reports that BELAY and EMA improve stability relative to raw Adam and SGD; in the high learning rate regime, only BELAY + Adam and EMA + Adam are reported to converge without serious instability; and BELAY is often among the fastest to converge in the trajectory plots. For these tests, BELAY + Adam / SGD uses \(k=1, m_1=10, m_2=20\), with \(c_1,c_2\) chosen to zero out velocity terms, and the EMA baseline uses \(\alpha=0.95\) [2310.13854].

The generative-model experiments compare BELAY and EMA on score-based diffusion models. The strongest numerical win is on MNIST; CIFAR-10 is essentially parity.

| Dataset | BELAY | EMA |
|---|---|---|
| MNIST | Train Loss 0.042, Test Loss 0.040, FID 15.2 | Train Loss 0.056, Test Loss 0.061, FID 18.1 |
| CIFAR-10 | Train Loss 0.176, Test Loss 0.170, FID 1.99 | Train Loss 0.175, Test Loss 0.168, FID 1.98 |

For MNIST, the model is the score-based diffusion model of Song & Ermon (2020), with BELAY settings \(k=1\), \(m_1=2000\), \(m_2=500\), damping set to zero out velocity, and Adam learning rate \(\eta=5\times 10^{-2}\). For CIFAR-10, the model is the diffusion model of Karras et al. (2022), with \(k=1\), \(m_1=20000\), \(m_2=2000\), again with damping chosen to zero out velocity. The appendix also varies \(m_1\) over
$$
m_1=2000,\; 2\times 10^4,\; 2\times 10^5,
$$
which the paper uses to illustrate that BELAY helps most when \(m_1\) is finite but not so small that the online model becomes overconstrained [2310.13854].

The empirical picture is therefore asymmetric. On MNIST, BELAY clearly outperforms EMA on train loss, test loss, and FID. On CIFAR-10, it remains competitive but is not numerically superior on the reported summary metrics. The paper’s own practical conclusion is correspondingly measured: BELAY can improve robustness and sometimes convergence speed, especially in noisy or high-learning-rate regimes, but EMA remains simpler and more established.

## 6. Interpretation, scope, and disambiguation

BELAY is best understood as **EMA plus feedback**: an EMA-like averaged model is retained, but it is no longer merely retrospective. The smoothed trajectory becomes a stabilizing reference for the live model. This makes BELAY most natural in settings where EMA already helps, but where one also wants the smoothing effect to shape the optimization path itself. The principal additional burden is parameterization: BELAY adds \(m_1,m_2,k,c_1,c_2\), whereas standard EMA needs only the averaging coefficient. The paper therefore presents BELAY not as a universal replacement for EMA, but as a more expressive coupled dynamical system [2310.13854].

The acronym should also be distinguished from several unrelated or only conceptually adjacent uses in the arXiv literature. "Recursive Belief Vision Language Model" introduces **RB-VLA**, a belief-centric VLA architecture rather than a method named BELAY [2602.20659]. "Belief Engine: Configurable and Inspectable Stance Dynamics in Multi-Agent LLM Deliberation" introduces **BE**, not BELAY [2605.15343]. "ABBEL: LLM Agents Acting through Belief Bottlenecks Expressed in Language" introduces **ABBEL** [2512.20111], and "Agent-BRACE: Decoupling Beliefs from Actions in Long-Horizon Tasks via Verbalized State Uncertainty" introduces **Agent-BRACE** [2605.11436]. These works share an interest in explicit state or belief representations, but they address long-horizon control or deliberation rather than weight averaging. Lower-case **belay** in climbing mechanics is likewise unrelated to the optimizer described here [1611.04327].

Source: https://www.emergentmind.com/topics/belay