The Expanding Scope of the Stability Gap: Unveiling its Presence in Joint Incremental Learning of Homogeneous Tasks

Sandesh Kamath, Albin Soutif-Cormerais, Joost van de Weijer, Bogdan Raducanu

Abstract

The "stability gap"—a transient but significant drop in performance occurring at the onset of learning a new task—has traditionally been attributed to the challenges of distribution shift or the lack of access to previous data in continual learning settings. This paper challenges that assumption by demonstrating that the stability gap persists even in the most idealized conditions: Joint Incremental Learning (JIL) of homogeneous tasks. Through rigorous analysis using Linear Mode Connectivity and per-batch gradient tracking, we show that the stability gap is not a data-driven necessity but a fundamental optimization artifact where Stochastic Gradient Descent (SGD) bypasses existing low-loss paths in favor of high-loss detours.

Introduction

In the field of Continual Learning (CL), the primary focus has long been "catastrophic forgetting," where a model loses previously acquired knowledge upon learning new information. Recent research, however, has identified a more nuanced phenomenon known as the stability gap. This refers to a sharp, temporary decline in performance on old tasks immediately following the introduction of a new task, followed by a gradual recovery.

Existing theories suggested that this gap was a byproduct of "heterogeneous tasks" (where new data differs significantly from old data) or the restricted access to previous samples typical of CL. This study investigates a provocative counter-hypothesis: Does the stability gap exist even when these obstacles are removed? By isolating the optimization process from data distribution shifts, the authors seek to determine if the stability gap is an inherent property of neural network training.

Experimental Framework

To isolate the cause of the stability gap, the researchers employed a specific experimental setup:

  • Joint Incremental Learning (JIL): Unlike standard continual learning, the model maintains full access to all data from previous tasks. As new tasks are introduced, the model trains on the cumulative pool of all available data.
  • Homogeneous Tasks: The data for new tasks is drawn from the exact same distribution as the previous tasks. This eliminates "distribution shift" as a potential cause for performance drops.
  • Architectures and Benchmarks: The study utilized ResNet-18 and VGG-16 architectures trained on CIFAR-10 and CIFAR-100. These benchmarks provided varying levels of complexity to ensure the universality of the findings.

Methodology

The authors utilized two primary analytical lenses to observe the model's internal dynamics during task transitions:

  1. Linear Mode Connectivity (LMC): This technique checks for the existence of a "low-loss path" in the weight space. By interpolating a straight line between the model's parameters before the task switch and its final parameters after training, researchers can determine if the model could have moved to the new optimum without increasing loss.
  2. Per Mini-Batch Analysis: A granular "microscope" approach was used to analyze individual SGD updates. The researchers measured how a single update—intended to reduce loss on a specific mini-batch—affected the overall test accuracy and the model's distance from the optimal path.

Key Findings

1. The Universality of the Stability Gap

The experiments revealed that the stability gap is a universal phenomenon. Even with identical data distributions and full data access, models experienced significant performance crashes. On CIFAR-10, accuracy plummeted from 0.89 to 0.74 immediately after the task switch. On CIFAR-100, the drop was even more severe, falling from 0.65 to 0.38. These drops occurred despite the model eventually recovering, suggesting that the initial phase of learning a "new" (but identical) task is inherently disruptive.

2. The High-Loss Detour

Through LMC analysis, the authors confirmed that a low-loss linear path between the pre-switch and post-recovery states always exists. However, SGD does not follow this path. Instead, the optimizer takes a "scenic route" through a high-loss region of the weight space. This confirms that the stability gap is an optimization failure; the model is physically capable of maintaining high performance during the transition, but the optimizer chooses a path that sacrifices global stability for local gains.

3. Local Gain vs. Global Pain

The per-batch analysis explained why SGD takes this detour. During the first few iterations of a new task, each SGD update successfully reduces the loss for the current mini-batch. However, these updates are counterproductive to the model's overall performance on the full dataset. The optimizer prioritizes immediate, local loss reduction, which inadvertently pushes the network parameters away from the low-loss manifold of the previous state.

4. Influence of Task Size

The magnitude of the gap is sensitive to the ratio of new data to old data. The stability gap is most pronounced when the initial task is small (e.g., starting with 10% of the dataset) and the subsequent increment is large. This suggests that the "momentum" of the initial optimization state is easily disrupted by new batches when the initial state was formed on a limited sample size.

Conclusion

This research fundamentally redefines our understanding of the stability gap. It is not merely a consequence of changing data or forgotten samples; it is a characteristic of how SGD navigates the high-dimensional loss landscape of neural networks. The discovery that a low-loss path exists but is ignored by standard optimizers suggests a new direction for Continual Learning research. Rather than focusing solely on loss functions or data replay, future work should investigate optimization strategies—such as modified SGD variants or path-based regularization—that can "nudge" models to stay on the low-loss linear paths that already exist in the weight space.

Summary updated

BibTeX
@inproceedings{kamath2024expanding,
  author = {Sandesh Kamath and Albin Soutif-Cormerais and Joost van de Weijer and Bogdan Raducanu},
  title = {{The Expanding Scope of the Stability Gap: Unveiling its Presence in Joint Incremental Learning of Homogeneous Tasks}},
  booktitle = {Workshops @ CVPR},
  year = {2024},
}
Figure