TL;DR
Researchers have discovered that the solutions found by multitask learning (simultaneous training) and continual learning (sequential training) are connected by a straight line of low error in a neural network's weight space—provided they start from the same initialization. Leveraging this "linear mode connectivity," the authors developed MC-SGD, a new algorithm that significantly reduces catastrophic forgetting by forcing sequential training to stay within these shared, low-error valleys.
The Challenge: Multitask vs. Continual Learning
In the world of machine learning, we face a frustrating trade-off. If we train a model on all tasks at once (Multitask Learning or MTL), it generally performs exceptionally well across the board. However, if we train it sequentially—on Task A, then Task B, then Task C (Continual Learning or CL)—the model suffers from "catastrophic forgetting." It learns the new task but completely loses its ability to perform the old ones.
The central question this paper asks is: What is the geometric relationship between the "good" multitask solution and the "forgetful" continual learning solution? By understanding the shape of the loss landscape (the "hills and valleys" of error), the authors investigate whether we can find a path that allows a model to learn sequentially without falling off the cliff of forgetting.
Key Insights: The Geometry of Forgetting
Through empirical investigation, the authors uncovered several fascinating properties about the loss landscape of neural networks trained on multiple tasks:
- Linearity is Key: The most surprising finding is that the multitask and continual solutions are connected by a straight line of low error. Usually, paths between different neural network solutions are thought to be complex, non-linear curves.
- Initialization Matters: This linear connectivity only holds if the multitask and continual models start from the exact same initial weights. If they start from different random points, a "wall" of high error separates them.
- Curvature and Taylor Expansions: The authors show that multitask learning naturally drifts toward regions of "low curvature" (flat valleys). Standard continual learning methods like EWC (Elastic Weight Consolidation) fail because they rely on a mathematical approximation (a 2nd-order Taylor expansion) that breaks down as the model moves further away from the original task's solution.
- Shared Structure: Connectivity depends on the tasks sharing some underlying structure (like low-level features in images). If you try to connect tasks with totally different data distributions (e.g., MNIST vs. Fashion-MNIST), the linear path disappears.
Introducing MC-SGD
Motivated by these geometric insights, the authors introduce Mode Connectivity SGD (MC-SGD). This algorithm is a hybrid approach that combines two popular strategies:
- Experience Replay: Keeping a tiny buffer of samples from previous tasks.
- Regularization: Adding a penalty to the training objective to keep weights from changing too drastically.
The Novelty: Unlike previous methods that just try to keep the weights "close" to previous values using standard Euclidean distance, MC-SGD specifically constrains the model to find a solution that is linearly connected to previous solutions. During training for a new task, the algorithm samples points along a straight line between the current weights and the previous task's weights. It then ensures that the loss remains low at every point along that line. This effectively "pins" the model's trajectory inside a low-error valley that spans multiple tasks.
Experimental Results
The authors evaluated their method on three standard, increasingly difficult vision benchmarks for continual learning: Permuted MNIST, Rotated MNIST, and Split CIFAR-100.
MC-SGD consistently outperformed state-of-the-art baselines like EWC, A-GEM, and ER-Reservoir across all benchmarks:
- Permuted MNIST: MC-SGD achieved 85.3% average accuracy, compared to 72.4% for standard Experience Replay.
- Rotated MNIST: It reached 82.3% accuracy, while the next best baseline (Stable SGD) was at 70.8%.
- Split CIFAR-100: On this challenging dataset (100 classes split into 20 sequential tasks), MC-SGD hit 63.3% accuracy, significantly higher than the 46.9% achieved by standard replay methods.
- Forgetting: In all cases, MC-SGD showed the lowest "Average Forgetting" scores, proving it was the most successful at retaining old knowledge.
Limitations and Future Work
While powerful, the method has a few constraints:
- Shared Initialization: The theory relies on the model starting from a common point for all tasks. While standard in continual learning setups, it might be a limitation for models that need to be "hot-swapped" or merged from entirely different sources.
- Replay Buffer: Although the buffer is small (e.g., one example per class per task), it still requires storing some historical data, which may be a concern in strict privacy-sensitive applications.
- Computational Overhead: Calculating the loss at multiple points along the linear path increases the training time per task compared to naive SGD.
Future research could explore whether this linear connectivity holds for even larger-scale models like Transformers, or if more complex, non-linear paths could further bridge the gap between sequential and simultaneous learning.
Summary updated