TL;DR
This paper explores Zeroth-Order (ZO) optimization as a memory-efficient alternative for Continual Learning (CL), showing it naturally promotes flatter loss landscapes, which reduces forgetting. However, directly applying ZO to existing CL methods fails due to issues with learnable classifiers. The authors propose ZO-FC, a hybrid approach that uses ZO for parameter-efficient fine-tuning modules and standard first-order optimization for the classifier, achieving a good balance between stability and plasticity with significantly reduced memory usage.
What Problem Does This Paper Address?
Continual Learning (CL) aims to enable models to learn sequentially from new data without forgetting previously acquired knowledge. This is a challenging "plasticity-stability dilemma": models need to be plastic enough to learn new tasks but stable enough to retain old knowledge. Existing methods often rely on parameter-efficient fine-tuning (PEFT) techniques applied to pre-trained models, freezing the backbone and training small modules. While effective, these methods can still suffer from catastrophic forgetting. This paper investigates Zeroth-Order (ZO) optimization, a gradient-free optimization technique known for its memory efficiency, as a potential solution to mitigate forgetting in CL. The core problem is to understand if ZO's inherent properties can address the plasticity-stability trade-off in CL, especially in resource-constrained settings, and how to best integrate it into existing CL frameworks.
Methods
The paper's core contribution lies in its investigation and proposal of a novel approach for CL using Zeroth-Order (ZO) optimization.
- Theoretical Analysis: The authors provide a theoretical link between ZO optimization and the plasticity-stability dilemma. They argue that ZO optimization naturally converges to flatter minima in the loss landscape. Flatter minima are known to be more robust to parameter perturbations, thus reducing catastrophic forgetting. However, they also note that ZO's imprecise gradient estimates can hinder plasticity, making it less effective at acquiring new task-specific knowledge compared to first-order (FO) methods.
- Empirical Investigation of Direct ZO Substitution: The paper first tests the hypothesis of directly replacing FO optimizers with ZO optimizers in existing PEFT-based CL methods. They categorize these methods based on their classifier types: prototype-based and unified learnable classifiers.
- Proposed Method: ZO-FC: Based on the empirical findings, the authors propose ZO-FC. This method leverages the strengths of both ZO and FO optimization. Specifically, it applies ZO optimization to a single PEFT module (like an adapter) for learning new task-specific representations, aiming to benefit from the stability of flatter minima. Crucially, it retains standard FO optimization for the learnable classifier, which requires precise updates for accurate decision boundaries. This hybrid approach aims to balance plasticity and stability while maintaining memory efficiency.
Datasets
The experiments were conducted on three widely-used benchmarks for Continual Learning:
- CIFAR100: A dataset with 100 classes.
- ImageNet-R (ImageNet-Rendition): A dataset designed to test robustness to domain shifts.
- DomainNet: A large-scale dataset comprising multiple domains, used to evaluate robustness under domain shift.
The experiments used both 5-class and 10-class incremental settings for CIFAR100 and ImageNet-R, and a 69-class incremental setting for DomainNet.
Key Insights and Ideas
- ZO Optimization Naturally Favors Flat Minima: The paper provides theoretical backing that ZO optimization, due to its stochastic nature and reliance on smoothed objectives, inherently steers the optimization process towards flatter regions of the loss landscape. This is a key insight because flatter landscapes are empirically and theoretically linked to reduced catastrophic forgetting.
- Direct ZO Substitution Fails, Especially with Learnable Classifiers: A surprising and critical finding is that simply swapping FO optimizers for ZO optimizers in existing CL methods does not work. The failure is particularly pronounced when the methods use unified learnable classifiers, suggesting that these components require the precision of FO gradients.
- The Classifier is the Bottleneck for ZO in CL: The authors pinpoint the learnable classifier as the primary culprit for the failure of naive ZO substitution. They hypothesize that effective classifier training demands precise, directional updates that ZO's noisy gradient estimates struggle to provide.
- Hybrid ZO-FC Achieves a Sweet Spot: The proposed ZO-FC method demonstrates that a hybrid approach can be highly effective. By using ZO for the PEFT module (adapter) and FO for the classifier, they manage to retain the stability benefits of ZO while preserving the plasticity needed for accurate classification, all with minimal memory overhead.
- Memory Efficiency is a Significant Advantage: The paper highlights that ZO-FC achieves substantial memory savings (up to 6x) compared to FO methods, making it particularly suitable for on-device CL scenarios where memory is a critical constraint.
Key Results
- ZO-FC Outperforms Naive ZO Methods: ZO-FC consistently achieves better accuracy and significantly lower forgetting compared to other methods that naively apply ZO optimization to PEFT components.
- Competitive Accuracy with FO Methods: On CIFAR100 and ImageNet-R, ZO-FC achieves accuracy comparable to state-of-the-art FO PEFT-based CL methods, often outperforming many of them. For instance, it achieves over 12% higher last accuracy on ImageNet-R compared to ZO-EASE.
- Reduced Forgetting: ZO-FC demonstrates strong stability, consistently exhibiting lower forgetting than many FO PEFT-based CL baselines. In some cases, its forgetting is even lower than methods that only update the classifier with FO.
- Significant Memory Savings: ZO-FC requires only 0.7 GB of training memory, achieving up to a 6x reduction compared to FO methods, making it a practical solution for resource-constrained environments.
- Flatter Minima Validation: Experiments using a SAM-based flatness score confirm that ZO-FC converges to flatter minima compared to its FO counterpart, supporting the theoretical analysis.
Limitations and Future Work
- Query Budget Sensitivity: The paper notes that for more complex datasets and tasks, achieving performance comparable to strong FO methods might require a larger query budget (Q) for ZO optimization. This could increase computational cost.
- Potential for Further Optimization: The authors suggest that future work could explore more advanced ZO optimization strategies or parallelization techniques to further improve performance and reduce computational overhead.
- Harder Fine-Grained CL Settings: The authors plan to validate ZO-FC on more challenging fine-grained CL settings and explore on-device training scenarios.
- Parallelizing Low-Variance ZO Methods: Investigating parallelizing low-variance ZO methods is also mentioned as a future direction.
Summary updated