Manuscript Offprint

arXiv:2610.22623

Understanding Stability of Outer Nesterov Momentum on Stochastic Pseudo-Gradients

Nishant Sharma, Laura Gomezjurado Gonzalez, Ganesh Talluri, Sarath Chandar, Hiroki Naganuma

ABSTRACT

Large neural networks are commonly trained across many workers, and communication between them is a major cost. Workers therefore take several local optimization steps before sending their net parameter displacements, or pseudo-gradients, to an outer optimizer, which often applies Nesterov momentum. We study how the outer momentum, the number of local steps and the averaging over workers control the training dynamics, and in particular their stability. For random quadratics, we derive an exact mean-square stability criterion in any dimension, which reveals that the inner batch size determines whether increasing the number of local steps eventually stabilizes or destabilizes the outer iteration. Moreover, while averaging the pseudo-gradients of independent workers can make larger outer momentum values admissible, the number of workers required for stability can grow exponentially with the number of local steps. Finally, we show that the mean-square dynamics governing stability can be probed directly at intermediate neural-network checkpoints using shared-minibatch perturbations. We test our theoretical findings across networks, and measure their consequences for training loss.

Large inner batch size

Figure

Small inner batch size

Averaging over workers

mean-square stable region

mean-square boundary

mean unstable region

mean boundary

Figure 1: Mean-square stable regions in (α,β)(\alpha, \beta). For inner batch size bb and inner-batch threshold bcb_c (as defined in Section 5.2), more local steps enlarge the mean-square stable region when b>bcb > b_c (left), and shrink it when b<bcb < b_c (middle). Averaging the pseudo-gradient over WW workers enlarges the mean-square stable region (right), but never past the mean boundary (gray), which averaging leaves unchanged.

∗^{*}This work was conducted while Hiroki Naganuma was at Mila.

A PREPRINT

1 Introduction

Deep neural networks, and large language models (LLMs) in particular, are now trained on many workers, often spread across compute nodes or even data centers. In such distributed training, each worker holds a copy of the model, and gradients are exchanged at every step to keep the copies in sync. This communication has become one of the main drivers of training costs at scale (Douillard et al., 2023). A common solution is to let each worker train locally for K optimization steps and send only its displacement, the pseudo-gradient, to an outer update (McMahan et al., 2017). This outer update often applies Nesterov momentum (Nesterov, 1983), which has been found to accelerate training on one or many workers (Kallusky et al., 2025; Agarwala, 2026) and to outperform SGD and Adam as the outer optimizer (Douillard et al., 2023).

Concretely, at outer step t, each of W workers starts from the shared parameters θt\theta_t and runs K steps of minibatch stochastic gradient descent (SGD) with batch size b and inner learning rate η\eta (its inner trajectory). The outer optimizer averages the workers' pseudo-gradients and applies Nesterov momentum to the average, with outer learning rate α\alpha and outer momentum β\beta (Algorithm 1).

Algorithm 1 Two-phase optimization with outer Nesterov momentum

Require: start θ0\theta_0, inner rate η\eta, inner batch size bb, outer rate α>0\alpha > 0, outer momentum 0≤β<10 \leq \beta < 1, number of local steps KK, number of workers WW

1: u−1←0u_{-1} \leftarrow 0

2: for t=0,1,2,…t = 0, 1, 2, \ldots do

3: for w=1,…,Ww = 1, \ldots, W do ▷ in parallel

4: run KK inner SGD steps at rate η\eta with batch size bb from θt\theta_t on fresh minibatches, ending at θt,K(w)\theta_{t,K}^{(w)}

5: end for

6: Pt←θt−1W∑w=1Wθt,K(w)P_t \leftarrow \theta_t - \frac{1}{W} \sum_{w=1}^{W} \theta_{t,K}^{(w)} ▷ pseudo-gradient

7: ut←βut−1+Ptu_t \leftarrow \beta u_{t-1} + P_t ▷ buffer updated first

8: θt+1←θt−α(βut+Pt)\theta_{t+1} \leftarrow \theta_t - \alpha (\beta u_t + P_t) ▷ uses the updated buffer

9: end for

Several familiar training methods fit this two-phase template. Local SGD and federated averaging (McMahan et al., 2017; Stich, 2019; Lin et al., 2020) are the simplest case, α=1\alpha = 1 and β=0\beta = 0, in which the outer step just averages the workers' parameters. Lookahead (Zhang et al., 2019) keeps β=0\beta = 0 but takes α<1\alpha < 1 on a single worker, and SNOO (Kallusky et al., 2025) adds the outer Nesterov step, still on a single worker. DiLoCo (Douillard et al., 2023) and, more recently, MuLoCo (Thérien et al., 2025) apply the outer Nesterov step across workers using AdamW (Kingma and Ba, 2015; Loshchilov and Hutter, 2019) and Muon (Jordan et al., 2024) as inner optimizers, respectively. SlowMo (Wang et al., 2020) also adds momentum to the outer step, adaptive federated optimizers (Reddi et al., 2021) use an adaptive outer optimizer, semi-synchronous variants target high-latency links (Naganuma et al., 2025), and asynchronous ones tolerate stragglers and hardware failures (Douillard et al., 2026).

These methods, which have been scaled to language models with billions of parameters (Charles et al., 2025; Douillard et al., 2025), have many interacting hyperparameters, such as the inner and outer optimizers, the outer momentum, the learning rates, the batch size and the number of local steps K, and today they are set by tuning. SNOO, for example, finds that outer momentum 0.9 is more sensitive to K than smaller values, and that suboptimal outer hyperparameters can substantially degrade performance (Kallusky et al., 2025). Among these choices, the number of local steps K is special, because it influences the variance of the pseudo-gradient (Section 3.2), and this variance grows with the error left by earlier outer steps, so it does not average out over the outer steps. As a result, the error can shrink on average while its mean square grows without bound, so an analysis of the mean alone can wrongly predict stability, as in the region between the green and grey boundaries of Figure 1. Moreover, the stability of this two-phase setup is less understood than that of standard SGD (Wu et al., 2018; Ma and Ying, 2021; Granziol et al., 2022; Velikanov et al., 2023; Ziyin et al., 2023; Mulayoff and Michaeli, 2024), because the outer optimizer acts on a stochastic K-step pseudo-gradient rather than on a single stochastic gradient. In this work, we give a theory that explains how changing the outer momentum, the number of local steps and the averaging over workers controls the training dynamics, and in particular their mean-square stability, which provides both a deeper mechanistic understanding of these methods and principled guidance for choosing their hyperparameters.

Our contributions are as follows.

  1. For random quadratics, we derive a necessary and sufficient condition for the mean-square stability of outer Nesterov momentum on pseudo-gradients from K stochastic inner SGD steps (Theorem 1).

A PREPRINT

  1. From it we derive four implications: (i) at a fixed α\alpha, the noise budget can only shrink as β\beta grows (Proposition 2); (ii) the inner batch size decides whether large K is eventually stable or unstable (Proposition 3; Figure 1); (iii) averaging W workers divides the variance only by W, and the number of workers needed for stability can grow exponentially in K (Corollary 4; Figure 1); (iv) for fixed total batch size budget, splitting it across workers cannot improve mean-square stability (Proposition 5).

  2. We measure stability at an intermediate neural-network checkpoint without knowing a minimizer, by tracking whether a small difference between two runs that share their minibatches grows or shrinks. We apply this measurement at several checkpoints of an MLP and a ResNet-20, both trained on CIFAR-10, and of Pythia language models from 70m to 1b parameters, and test the trends that the four implications predict (Figure 4). We also measure the consequences of instability for the training loss (Section 6.3; Figure 5).

References (55)