Butterfly Effects of SGD Noise: Error Amplification in Behavior Cloning and Autoregression
Adam Block, Dylan J. Foster, Akshay Krishnamurthy, Max Simchowitz, Cyril Zhang
TL;DR
The paper addresses training instabilities in offline deep behavior cloning by identifying gradient variance amplification (GVA) as the mechanism behind long-horizon rollout oscillations. It demonstrates that SGD noise propagates through unstable closed-loop dynamics, causing dramatic, nonconvergent reward fluctuations even when the BC objective remains smooth. A key finding is that exponential moving average (EMA) of iterates robustly mitigates GVA across continuous control tasks and autoregressive language generation, often removing the need for learning-rate decay. The work provides theoretical vignettes illustrating EMA’s variance-reduction benefits and discusses the limitations of convex-theory explanations in nonconvex deep learning, suggesting EMA as a practical stabilizer for training neural networks in feedback-loop settings. Overall, EMA emerges as a broadly applicable tool to stabilize learning in both RL-oriented BC and NLP autoregressive models, with implications for data efficiency and generalization in systems with closed-loop dynamics.
Abstract
This work studies training instabilities of behavior cloning with deep neural networks. We observe that minibatch SGD updates to the policy network during training result in sharp oscillations in long-horizon rewards, despite negligibly affecting the behavior cloning loss. We empirically disentangle the statistical and computational causes of these oscillations, and find them to stem from the chaotic propagation of minibatch SGD noise through unstable closed-loop dynamics. While SGD noise is benign in the single-step action prediction objective, it results in catastrophic error accumulation over long horizons, an effect we term gradient variance amplification (GVA). We show that many standard mitigation techniques do not alleviate GVA, but find an exponential moving average (EMA) of iterates to be surprisingly effective at doing so. We illustrate the generality of this phenomenon by showing the existence of GVA and its amelioration by EMA in both continuous control and autoregressive language generation. Finally, we provide theoretical vignettes that highlight the benefits of EMA in alleviating GVA and shed light on the extent to which classical convex models can help in understanding the benefits of iterate averaging in deep learning.
