[Paper Review] Continual HyperTransformer: A Meta-Learner for Continual Few-Shot Learning
This paper proposes Continual HyperTransformer (CHT), a meta-learner that uses a HyperTransformer to recursively generate and update task-specific CNN weights from few-shot support sets, enabling continual few-shot learning without catastrophic forgetting. By employing a prototypical loss to maintain class prototypes across tasks, CHT achieves positive backward transfer and generalizes effectively to both task-incremental and class-incremental scenarios, outperforming baselines even when tested on more tasks than it was trained for.
We focus on the problem of learning without forgetting from multiple tasks arriving sequentially, where each task is defined using a few-shot episode of novel or already seen classes. We approach this problem using the recently published HyperTransformer (HT), a Transformer-based hypernetwork that generates specialized task-specific CNN weights directly from the support set. In order to learn from a continual sequence of tasks, we propose to recursively re-use the generated weights as input to the HT for the next task. This way, the generated CNN weights themselves act as a representation of previously learned tasks, and the HT is trained to update these weights so that the new task can be learned without forgetting past tasks. This approach is different from most continual learning algorithms that typically rely on using replay buffers, weight regularization or task-dependent architectural changes. We demonstrate that our proposed Continual HyperTransformer method equipped with a prototypical loss is capable of learning and retaining knowledge about past tasks for a variety of scenarios, including learning from mini-batches, and task-incremental and class-incremental learning scenarios.
Motivation & Objective
- To address catastrophic forgetting in continual few-shot learning where tasks arrive sequentially with only a few labeled examples.
- To develop a meta-learner that can update task-specific CNN weights on the fly without retraining, using only support set inputs.
- To enable generalization across both task-incremental and class-incremental learning scenarios using a single unified architecture.
- To demonstrate that the model can maintain knowledge of past tasks and even improve performance on them through positive backward transfer.
- To evaluate the model's robustness in multi-domain few-shot learning, where tasks come from diverse image distributions.
Proposed method
- The method uses a HyperTransformer (HT) to generate task-specific CNN weights directly from few-shot support sets, decoupling the meta-learner (Transformer) from the task-specific learner (CNN).
- CHT recursively reuses previously generated CNN weights θₜ₋₁ as input alongside new support sets S⁽ᵗ⁾ to generate updated weights θₜ for the current task.
- The loss function is modified from cross-entropy to a prototypical loss that learns class prototypes in the embedding space, enabling joint optimization over all past and current tasks.
- Prototypes are updated incrementally as new tasks arrive, and predictions are made based on the nearest-prototype classification in the embedding space.
- The model operates as a recurrent system, allowing inference at any point t ≤ T, with performance improving as T increases.
- The architecture is trained end-to-end to minimize the sum of query-set losses across all prior tasks, ensuring knowledge retention.

Experimental results
Research questions
- RQ1Can a HyperTransformer be adapted to perform continual few-shot learning without catastrophic forgetting?
- RQ2Does the proposed method achieve positive backward transfer, where performance on earlier tasks improves with new task learning?
- RQ3Can a single CHT model generalize effectively to both task-incremental and class-incremental learning scenarios?
- RQ4How does the model perform when tested on more tasks than it was trained for, particularly in multi-domain few-shot settings?
- RQ5Does the use of a prototypical loss improve generalization and knowledge retention compared to standard cross-entropy in continual few-shot learning?
Key findings
- CHT achieved positive backward transfer, with performance on earlier tasks improving when trained on more tasks, especially in smaller models.
- For the Omniglot dataset, CHT trained on T=5 tasks outperformed the MergedHT baseline, even though MergedHT had access to all task information from the start.
- In multi-domain few-shot learning, CHT achieved 56.2% accuracy on task 0 and 55.2% on task 1, outperforming ConstPN by nearly 3% (53% and 52.8% respectively).
- When tested on more tasks than it was trained for, CHT showed only a slight performance drop, indicating strong extrapolation capability.
- The model maintained high performance in both task-incremental and class-incremental settings, with comparable results across both scenarios.
- The performance of a given weight θₜ improved when the CHT was trained on a larger number of tasks T, demonstrating the value of broader pre-training.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.