Continual Learning with Guarantees via Weight Interval Constraints

Maciej Wolczyk, Karol J. Piczak, Bartosz Wójcik, Lukasz Pustelnik, Pawel Morawiecki, Jacek Tabor, Tomasz Trzcinski, Przemyslaw Spurek

This paper introduces a mathematically rigorous approach to tackling one of the oldest problems in artificial intelligence: catastrophic forgetting. By moving away from "soft" penalties and toward "hard" geometric constraints, the authors provide a framework where a model can learn new tasks without ever "unlearning" the old ones.

The Problem: Catastrophic Forgetting

Artificial Neural Networks are notoriously bad at Continual Learning (CL). When trained on a new task, they tend to overwrite the weights necessary for previous tasks, leading to catastrophic forgetting.

Existing solutions generally fall into two camps:

  1. Regularization (Soft Constraints): Methods like Elastic Weight Consolidation (EWC) add a penalty to the loss function to discourage weights from moving too far from their previous values. However, these provide no firm guarantees; the model can still forget if the new task's gradient is strong enough.
  2. Architecture/Replay: These involve growing the network or storing old data, which can be computationally expensive or violate privacy constraints.

The fundamental theoretical hurdle is that the region of "good" parameters for a given task is usually a complex, irregular shape. Finding a point that lies in the intersection of many such irregular shapes across multiple tasks is an NP-hard problem.

The Solution: Hyperrectangle Training

To overcome this, the authors propose InterContiNet, which implements a paradigm called Hyperrectangle Training. This method provides formal guarantees against catastrophic forgetting by constraining neural network weights to stay within specific intervals.

Nested hyperrectangles ensure valid parameter intersections across tasks.
  • Weight Intervals: Instead of representing a weight as a single scalar value ($\theta$), they represent it as an interval $[W - \epsilon, W + \epsilon]$. Collectively, these intervals form a hyperrectangle in the high-dimensional parameter space.
  • Interval Arithmetic: To ensure performance, the authors use interval arithmetic to propagate these ranges through the network. This allows them to calculate a "worst-case" loss. If the worst-case loss within the hyperrectangle is low, then any point chosen from that box is guaranteed to perform well on the task.
  • Two-Phase Optimization: For each new task, training is split into two phases:
  • Center Phase: Optimizing the centers ($W$) of the intervals to minimize standard loss.
  • Radii Phase: Optimizing the radii ($\epsilon$) to maximize the size of the "safe" box while ensuring the worst-case accuracy stays above a user-defined threshold (acc_thresh).
  • Nested Constraints: To prevent forgetting, the hyperrectangle for Task $N$ must be a subset of the hyperrectangle for Task $N-1$. They use a clever reparameterization (using tanh and sigmoid functions) to mathematically force this nesting, ensuring the model never wanders into "forgetting territory."

Key Insights

  • Complexity Reduction: The "aha moment" of the paper is that while intersecting arbitrary shapes is NP-hard, intersecting hyperrectangles is trivial and takes polynomial time. By "trimming" the valid parameter regions into boxes, they make the math tractable.
  • Guaranteed Lower Bounds: This is one of the few CL methods that can provide a hard lower bound on performance. An engineer can guarantee a model's accuracy on Task 1 will never drop below a specific threshold, backed by mathematical certainty.
  • The Stability-Plasticity Knob: The acc_thresh hyperparameter acts as a direct control for the stability-plasticity trade-off. A high threshold ensures near-perfect memory but leaves less "volume" in the parameter space for future learning.

Key Results

The method was evaluated on standard benchmarks including MNIST, FashionMNIST, CIFAR-10, and CIFAR-100 across Incremental Task, Incremental Domain, and Incremental Class scenarios.

Accuracy on the first task is maintained over time, demonstrating the guaranteed lower bounds against forgetting.
  • Superiority in Task-IL: In the Incremental Task setting, InterContiNet outperformed standard regularization methods. On Split-MNIST, it achieved 98.93% average accuracy compared to EWC's 97.01%.
  • Competitive Performance: In Domain-IL, it performed on par with state-of-the-art methods while providing the unique benefit of a performance guarantee.
  • Long-term Viability: On Split-CIFAR-100 (20 tasks), the model remained capable of learning new tasks until the end, suggesting that the "parameter volume" does not collapse as quickly as one might fear.

Limitations and Future Work

While powerful, the method has limitations. Interval arithmetic is incompatible with standard Batch Normalization, requiring alternative architectures or Layer Norm. Furthermore, the current derivation is tailored for cross-entropy loss in classification; extending it to regression or reinforcement learning requires new interval-based loss formulations. Finally, propagating intervals is computationally more expensive (roughly 3x the FLOPs), though this overhead is only incurred during the radii optimization phase.

Summary updated

BibTeX
@inproceedings{wolczyk2022continual,
  author = {Maciej Wolczyk and Karol J. Piczak and Bartosz Wójcik and Lukasz Pustelnik and Pawel Morawiecki and Jacek Tabor and Tomasz Trzcinski and Przemyslaw Spurek},
  title = {{Continual Learning with Guarantees via Weight Interval Constraints}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=X8Jufo2asx},
}
Figure