Prototype Augmented Hypernetworks for Continual Learning

Neil De La Fuente, Maria Pilligua, Daniel Vidal, Albin Soutiff, Cecilia Curreli, Daniel Cremers, Andrey BarskyarXiv 2025 · DOI

Introduction

Continual Learning (CL) represents a significant challenge in artificial intelligence: the ability of a model to learn a sequence of tasks without suffering from "catastrophic forgetting" (CF). In Task-Incremental Learning (TIL), where task identity is known at inference, forgetting often stems from the drift of the underlying feature backbone, which renders previously learned classification heads obsolete.

Existing approaches typically rely on rehearsal (storing old data), regularization (penalizing weight changes), or architectural expansion. However, these methods often face trade-offs between memory overhead, plasticity, and parameter explosion. Prototype Augmented Hypernetworks (PAH) offers a novel alternative by using a hypernetwork to generate task-specific classifier heads on the fly, conditioned on learnable task prototypes.

Proposed Architecture: PAH

The PAH framework introduces a three-component architecture designed to maintain stability while allowing for task-specific adaptation.

The PAH architecture overview, illustrating the interaction between the Main Network, Task Prototypes, and the Hypernetwork.
  1. Main Network: A standard feature extractor (e.g., ResNet-18) that processes input data $x_k^i$.
  2. Learnable Task Prototypes ($e_k$): Instead of static embeddings, PAH utilizes compact 10x10 feature grids that represent the semantic essence of a task's classes. These prototypes are initialized using actual images (semantic initialization) and are updated dynamically.
  3. Hypernetwork ($\Upsilon$): A secondary network that takes the task prototypes as input and generates the weights for the classifier head of the main network for that specific task.

Dual Distillation and Loss Functions

To mitigate forgetting during the sequential learning process, PAH employs a tripartite loss strategy:

  • Hard Loss ($L_{hm}$): Standard cross-entropy loss to ensure high performance on the current task.
  • Soft Loss Main ($L_{sm}$): A distillation loss that encourages the current model's predictions for previous tasks to remain consistent with the outputs of the model from the previous time step.
  • Soft Loss Prototypes ($L_{sp}$): A critical innovation where old prototypes are adapted to the evolving feature space of the backbone. By freezing the backbone during this update, the prototypes "follow" the feature drift without causing further interference.

Experimental Results

The authors evaluated PAH on two primary benchmarks: Split-CIFAR100 (10 tasks) and TinyImageNet (10 and 20 tasks).

Comparison of PAH against state-of-the-art continual learning methods on Split-CIFAR100 and TinyImageNet.

As shown in the results table, PAH significantly outperforms existing baselines in both accuracy and forgetting rates. On Split-CIFAR100, PAH achieved 74.46% accuracy with a remarkably low 1.71% forgetting rate. In contrast, established methods like SI or A-GEM exhibited forgetting rates exceeding 27%. On the more challenging TinyImageNet dataset, PAH maintained its lead, reaching 63.65% accuracy with only 4.43% forgetting, outperforming rehearsal-based methods that require storing raw data samples.

Key Insights

  • Dynamic Head Generation: By treating the classifier head as a dynamic output of a hypernetwork rather than a set of fixed weights, PAH bypasses the rigidity that typically leads to forgetting.
  • The Power of Prototypes: Using 10x10 grids as conditioning inputs provides the hypernetwork with a rich, compressed summary of the task, which is more effective than simple vector embeddings.
  • Semantic Initialization: Initializing prototypes with actual (resized) images from the training set provides a grounded starting point for the hypernetwork, significantly boosting final performance compared to random initialization.
  • Efficiency and Privacy: PAH achieves state-of-the-art results without storing raw images from previous tasks, making it a memory-efficient and privacy-preserving solution for continual learning.

Conclusion and Future Work

PAH establishes a new performance benchmark for Task-Incremental Learning by effectively decoupling the classification head from the backbone's drift. While highly effective in TIL, future work is needed to adapt this framework for Class-Incremental Learning (CIL), where task identity is not provided at test time. Additionally, exploring the optimal complexity of the hypernetwork could further enhance the scalability of the approach to even larger numbers of tasks.

Summary updated

BibTeX
@misc{fuente2025prototype,
  author = {Neil De La Fuente and Maria Pilligua and Daniel Vidal and Albin Soutiff and Cecilia Curreli and Daniel Cremers and Andrey Barsky},
  title = {{Prototype Augmented Hypernetworks for Continual Learning}},
  year = {2025},
  eprint = {2505.07450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.07450},
}
Figure