TL;DR
Zeroth-order (ZO) optimization is often seen as a "noisy" approximation of first-order (FO) descent, yet it surprisingly suffers less from catastrophic forgetting in continual learning. This paper reveals that ZO acts as a randomized gradient shaper that contracts updates away from high-curvature (fragile) directions of past tasks, and introduces RISE, an algorithm that applies this protective "shaping" to exact gradients to balance stability and plasticity.
What Problem Does This Paper Address?
In continual learning, the goal is to adapt a model to new tasks without erasing old knowledge. Standard first-order methods (like SGD) often move parameters along directions where the historical loss is highly sensitive (high curvature), leading to catastrophic forgetting.
Recent empirical evidence suggested that zeroth-order methods—which estimate gradients using only forward passes—somehow mitigate this forgetting better than exact gradients. However, the community lacked a theoretical explanation for why "noise" would improve retention. This paper fills that gap by analyzing the local geometry of adaptation and identifying the specific mechanism that makes ZO "forget less."
Methods
The authors develop a Randomized Shaping Theory to compare FO and ZO on equal footing.
- Local Forgetting as Quadratic Damage: They model forgetting as the increase in historical loss caused by a parameter update, governed by the Hessian (curvature) of that loss.
- Norm-Matched Comparison: To ensure a fair fight, they calibrate ZO so its expected update norm matches the FO update. This isolates the direction of the update as the key variable.
- Randomized Shaping: They show that the ZO estimator acts as a random operator $P$ on the true gradient. While FO updates point directly along the gradient, ZO updates are "shaped" by the random directions used in the finite-difference estimation.
- RISE (Retention-Aware Isotropic Shaping for Exact-Gradient Adaptation): The authors translate their theory into a practical algorithm. RISE computes the exact FO gradient via backpropagation but then applies the calibrated ZO "shape" blockwise. This allows the model to keep the high-quality signal of exact gradients while gaining the retention benefits of randomized shaping.
Datasets
The authors evaluate their theory and the RISE algorithm across vision and language tasks:
- Vision: ViT-B/16 backbone on CIFAR100 (5-class increments), ImageNet-R, and DomainNet (69-class increments).
- Language: T5 models on a diverse 15-task pool including GLUE (MNLI, QQP, RTE, SST-2), SuperGLUE (WiC, CB, COPA, BoolQA, MultiRC), and standard CL benchmarks (Yelp, Amazon, DBpedia, Yahoo, AG News, IMDB).
Key Insights and Ideas
- ZO is a Curvature Contractor: The core "aha moment" is that norm-matched ZO doesn't just add noise; it preserves the "isotropic floor" of the retention landscape while contracting updates in anisotropic (high-curvature) directions.
- Spectral Equalization: Every eigenvalue of the retention Hessian is moved toward the mean. Large eigenvalues (fragile directions) move down, and small ones move up. This effectively "flattens" the landscape for the update.
- Geometry-Dependent Risk: ZO improves forgetting specifically when the FO gradient points toward above-average retention curvature. If you're "lucky" and the FO gradient is already in a flat region, ZO might actually increase forgetting slightly, but on average, it acts as a robust safety mechanism.
Key Results
- RISE Balances the Tradeoff: In vision tasks, RISE improves "Last" accuracy (a measure of plasticity) over pure ZO methods by recovering the gradient signal, while significantly reducing forgetting (Fgt) compared to FO methods. For example, on ImageNet-R, RISE reduced forgetting from 4.40% (ZO-FC) to 2.68%.
- Massive Forgetting Reduction in NLP: On the SeqLoRA benchmark, RISE cut FO forgetting from 35.57% down to 7.01% in one task order, while maintaining nearly the same final accuracy as FO.
- Query Count Control: The strength of the shaping effect is controlled by the number of random queries ($q$). Fewer queries lead to stronger isotropic shaping (more protection), while more queries move the update closer to standard FO descent.
Limitations and Future Work
- Blockwise Coupling: The RISE algorithm applies shaping to parameter blocks (like layers). The theory assumes that cross-block curvature is relatively small. If a model has extremely high coupling between distant layers, the local shaping benefit might be diluted.
- Curvature Agnosticism: While the theory explains why ZO works, RISE still doesn't require explicit knowledge of the Hessian. Future work could explore "informed" shaping if partial curvature information is available.
- Computational Overhead: Although RISE is more efficient than full ZO (which requires many forward passes), it still requires a backward pass plus a randomized shaping step, which adds a small amount of compute compared to vanilla SGD.
Summary updated