TL;DR
When training AI on a continuous, never-repeating stream of data, models usually overwrite old knowledge the moment they learn something new—a problem exacerbated by generic optimizers like SGD and AdamW that greedily chase the latest batch of data. This paper introduces SPIN (Stability-Plasticity INterpolation), a drop-in replacement optimizer designed specifically for Online Continual Learning that maintains two coupled sets of model weights: one fast and adaptable, one slow and consolidated. By evaluating gradients at an interpolated sweet spot between the two, SPIN naturally damps noisy updates and consistently boosts the accuracy of existing continual learning methods without requiring a single change to their architectures or loss functions.
What Problem Does This Paper Address?
Imagine trying to learn French, then Spanish, then Mandarin, under one strict rule: you can only read each textbook page once. In machine learning, this is Online Continual Learning (OCL)—learning from a non-stationary stream of tasks in a single pass.
Models in this regime face the classic stability–plasticity dilemma: if they adapt too quickly (plasticity), they suffer from catastrophic forgetting of older tasks; if they hold onto old weights too tightly (stability), they fail to learn anything new.
Historically, researchers have tackled OCL at the "upper level"—by saving tiny memory buffers of past data (experience replay), adding regularization penalties to the loss, or projecting gradients away from old tasks. Yet almost all of these sophisticated methods hand their final gradients off to standard, lower-level optimizers like SGD or AdamW. Because generic optimizers evaluate gradients purely at the current parameters using the newly arrived data, their trajectory gets hijacked by whatever distribution is happening right now, accelerating forgetting. The authors ask: What if we redesign the optimizer itself for continual learning?
Methods
The authors draw a clever parallel between classical stochastic optimization averaging schemes and continual learning needs:
- Polyak–Ruppert averaging evaluates gradients at the fast-moving current parameters (great plasticity, terrible forgetting).
- Primal averaging evaluates gradients at a slowly moving historical average (great stability, poor plasticity).
To get the best of both worlds, SPIN explicitly decouples and links two parameter sequences at every training step: a fast-moving plasticity sequence ($\phi_t$) and a slow-moving stability sequence ($\theta_t$). Each step works in three simple beats:
- Interpolate: Pick a middle-ground parameter point $x_t$ between $\phi_t$ and $\theta_t$ (controlled by ratio $\beta$).
- Adapt: Compute the gradient at that interpolated point $\nabla \mathcal{L}(x_t)$, and use a standard base rule (like SGD or AdamW) to update the fast sequence $\phi_{t+1}$.
- Consolidate: Gently pull the slow stability sequence $\theta_{t+1}$ toward the newly updated $\phi_{t+1}$ (controlled by synchronization strength $\alpha$, similar to an exponential moving average).
Crucially, SPIN interpolates in parameter space (averaging weights, then taking one gradient) rather than gradient space (taking two gradients at different points and averaging them), keeping compute costs to a single forward-backward pass and avoiding conflicting update directions.
Datasets
The authors evaluate SPIN across five existing datasets—no new benchmarks are introduced, allowing direct apples-to-apples comparisons with prior literature:
- Split CIFAR-100 (100 classes split into 10 sequential tasks) & Split CIFAR-10 (used for rehearsal-free tests).
- Split Tiny-ImageNet (200 classes split into 20 tasks).
- ImageNet-1K (1,000 classes, testing million-scale scalability).
- CLEAR100 (100 classes featuring real-world, smooth temporal distribution shifts over time with no artificial task boundaries).
Key Insights and Ideas
- Implicit Second-Order Curvature Damping: Through a neat Taylor expansion around $\theta_t$, the authors prove that SPIN's dual-sequence dance is mathematically equivalent to preconditioning updates with an inverse Hessian approximation: $\tilde{H}^{-1} \approx \gamma(I + \rho_t H_t)^{-1}$. In plain English, single-pass OCL gradients have wildly noisy curvature ($H_t$). That "$I +$" acts like Tikhonov regularization—putting a safe floor under noisy, low-curvature directions so updates don't explode, while respecting sharp, high-curvature boundaries that protect old tasks.
- It's More Than Just EMA: If you set $\beta = 0$, SPIN reduces to a standard Exponential Moving Average (EMA) of weights. Ablations show full SPIN ($\alpha = \beta = 0.05$) beats EMA handily. Evaluating the gradient at the interpolated point actively steers the optimization trajectory, rather than passively smoothing weights after the fact.
- Works Without Replay—and Under Equal Memory: Maintaining an extra copy of weights takes memory. To prove SPIN isn't "cheating" via extra RAM, the authors gave vanilla SGD a 30k-image replay buffer on CIFAR-100 to match the exact memory footprint of SPIN with a 15k buffer. SPIN (15k) still won. Furthermore, in strict rehearsal-free settings (zero buffer), SPIN outperformed dedicated regularization methods like Online-EWC and Synaptic Intelligence (SI) purely through its optimization dynamics.
Key Results
Tested as a plug-and-play wrapper (SPIN-SGD and SPIN-AdamW) across 11 state-of-the-art OCL baselines using a ResNet-18 backbone, SPIN swept the board:
- Split CIFAR-100 (11-method average):
SPIN-SGDlifted Final Average Accuracy from 32.66% to 36.54% over SGD, andSPIN-AdamWpushed AdamW from 36.23% to 38.49%. Averaged Anytime Accuracy (AAA—how well the model performs throughout the stream) jumped from 45.10% to 49.75% withSPIN-AdamW. - Split Tiny-ImageNet: Average final accuracy rose from 21.25% to 23.95% (
SPIN-SGD) and 24.95% to 26.56% (SPIN-AdamW). - Scale & Natural Shifts: On ImageNet-1K, swapping SGD for SPIN in DER++ boosted final accuracy from 14.19% to 17.51% (AAA from 18.50% to 22.02%). On CLEAR100, SPIN beat both SGD and SGD+EMA across small ($M=200$) and large ($M=5000$) buffers.
- Minimal Overhead:
SPIN-SGDruns at 1.13 ms/step (vs. 1.04 ms for SGD and 1.68 ms for AdamW) and uses less peak memory than AdamW (240.75 MB vs. 267.58 MB).
Limitations and Future Work
- Theoretical Assumptions: The Hessian connection relies on smoothness assumptions and a "quasi-steady-state" approximation (that the gap between $\phi_t$ and $\theta_t$ changes slowly), which may not capture every nuance of massively over-parameterized networks.
- Memory Overhead on Edge Devices: Storing dual weight sequences increases optimizer state memory compared to bare-bones SGD (from ~156 MB to ~241 MB in their ResNet-18 tests). Designing parameter-efficient interpolation schemes for memory-starved edge hardware is an open challenge.
- Foundation Models: Experiments focused on training ResNet-18 from scratch; the authors highlight applying SPIN to large pretrained models (like CLIP or Vision Transformers) via prompt-tuning or LoRA as an exciting next step.
Summary updated