TL;DR
This paper tackles the critical challenge of maintaining adversarial robustness in neural networks as they learn new tasks sequentially (continual learning). They introduce "Double Gradient Projection" (DGP), a novel technique that stabilizes sample gradients from previous tasks by projecting weight updates onto a crucial subspace, thereby preventing the rapid erosion of robustness.
What Problem Does This Paper Address?
Machine learning models are increasingly deployed in dynamic environments where they need to learn new information over time without forgetting what they've already learned. This is known as continual learning, and it's plagued by "catastrophic forgetting," where performance on old tasks plummets as new ones are learned. Simultaneously, adversarial robustness—a model's ability to resist subtle, malicious perturbations to its inputs—is crucial for security. The problem arises when these two needs conflict: defenses that enhance adversarial robustness are often fragile and quickly lost when a model undergoes weight updates for new tasks in a continual learning setting. This paper addresses this gap by proposing a method to maintain adversarial robustness during the continual learning process, ensuring that models remain secure even as they adapt to new data.
Methods
The core of the proposed solution is the Double Gradient Projection (DGP) technique. DGP aims to stabilize sample gradients from previous tasks. The key idea is to ensure that weight updates for a new task do not drastically alter the gradients of previous tasks. This is achieved by:
- Gradient Projection: Before updating weights for a new task, the back-propagation gradients are projected orthogonally onto a "crucial subspace." This subspace is derived from the layer-wise outputs and their gradients with respect to samples from previous tasks, identified using Singular Value Decomposition (SVD). This projection ensures that weight updates are constrained to directions that minimally affect the learned representations of past data.
- Collaboration with Defense Algorithms: DGP is designed to work in conjunction with defense algorithms that enhance robustness through sample gradient smoothing (like Input Gradient Regularization - IGR, and Adversarial Training - AT). By stabilizing these smoothed gradients, DGP helps preserve the robustness they provide.
- Two Sets of Base Vectors: DGP utilizes two sets of base vectors derived from SVD: one from layer-wise outputs and another from gradients of layer-wise outputs with respect to samples. These vectors define the crucial subspace onto which gradients are projected.
Datasets
The paper evaluates their approach on four standard benchmarks for continual learning:
- Permuted MNIST: A variant of MNIST where tasks are created by randomly permuting input pixels.
- Rotated MNIST: Another MNIST variant where tasks are created by applying random rotations to images.
- Split-CIFAR100: CIFAR100 is split into 10 subsets, each containing 10 distinct classes.
- Split-miniImageNet: A subset of ImageNet is divided into 10 subsets, each with 5 distinct classes.
These datasets are designed to simulate a sequential learning scenario where each subset represents a new task.
Key Insights and Ideas
- Conflicting Objectives: Directly combining existing continual learning algorithms with adversarial defense methods often leads to conflicts, weakening the effectiveness of both. This suggests that a tailored approach is needed for robust continual learning.
- Gradient Stability is Key: The paper hypothesizes that maintaining adversarial robustness hinges on stabilizing the smoothness of sample gradients from previous tasks. If these gradients remain consistent, the model's robustness is preserved.
- Orthogonal Projection as a Stabilizer: Projecting weight updates orthogonally onto a carefully chosen subspace derived from past data's gradients and outputs is an effective way to prevent catastrophic forgetting of adversarial robustness.
- DGP's Synergy: DGP's design allows it to collaborate effectively with gradient-smoothing defense mechanisms, amplifying their impact and longevity.
Key Results
- Superior Robustness Maintenance: DGP consistently outperforms baseline methods (combinations of continual learning algorithms with IGR or AT) in maintaining adversarial robustness across various datasets and attack strengths (AutoAttack, PGD, FGSM). For instance, on Split-CIFAR100, DGP achieves significantly higher accuracy on adversarial samples after learning multiple tasks compared to baselines.
- Comparable Classification Performance: DGP demonstrates classification performance (on original, non-adversarial samples) comparable to strong continual learning baselines like GPM and GEM, indicating it doesn't significantly sacrifice learning ability on new tasks.
- Effective Gradient Stabilization: Experiments show that DGP effectively stabilizes sample gradients from the first task over subsequent learning stages, as evidenced by a relatively flat similarity curve in Figure 5.
- Limitations of Direct Combinations: The paper highlights that simply mixing existing defenses (like Distillation) with continual learning algorithms can lead to performance degradation, underscoring the need for integrated solutions like DGP.
Limitations and Future Work
- Plasticity vs. Stability Trade-off: As the number of base vectors in DGP increases, the stability of the neural network improves, but this might restrict its plasticity, potentially hindering its ability to learn new tasks effectively.
- Approximation for Large Number of Bases: When the pool of base vectors becomes very large, the method approximates the orthogonal projection by selecting a subset of the largest singular values, which might introduce some approximation error.
- Smaller Perturbation Sizes: The paper notes that their method is evaluated with slightly smaller adversarial perturbation sizes than typically seen in literature. This was a deliberate choice to highlight DGP's advantage when baselines struggle significantly even with milder attacks. Future work could explore its performance with larger perturbations.
- Potential Incompatibility with Other Defenses: While DGP works well with gradient-smoothing defenses, the paper suggests potential incompatibilities with other defense mechanisms (e.g., Distillation), hinting at further research into how different defense strategies interact within a continual learning framework.
Summary updated