TL;DR
Prompt-based continual learning models often suffer from catastrophic forgetting because the latent space becomes crowded, causing new classes to overlap with old ones. This paper introduces Taxonomy-based Continual Learning (TCL), a framework that dynamically organizes classes into a hierarchical tree using LLMs and applies an optimal transport-guided contrastive loss to keep semantically similar classes distinct.
What Problem Does This Paper Address?
Continual Learning (CL) aims to train deep learning models on a sequence of tasks over time without forgetting previously acquired knowledge. A popular modern approach is prompt-based CL, which keeps a large pretrained backbone (like a Vision Transformer) frozen and only trains a small set of learnable prompts for each new task.
While effective at preventing parameter drift, the authors identify a subtle, overlooked cause of catastrophic forgetting: latent space crowding. As the model learns more tasks, the feature space fills up. When new classes arrive that are visually or semantically similar to older ones (e.g., introducing "willow tree" after already learning "oak tree"), their representations overlap. Because existing methods treat all classes equally during training, the model becomes confused, leading to severe performance degradation on older tasks.
Methods
The authors introduce TCL, which mimics the human cognitive habit of organizing information hierarchically to improve distinction. It consists of three core components:
- Dynamic Hierarchical Taxonomy: As new classes emerge, TCL uses an LLM (such as ChatGPT or Llama) as an expert to dynamically insert new labels into a tree-like taxonomy based on their origin, type, and shape. This automatically clusters semantically related classes into "leaf groups."
- Group-Based Contrastive Regularization: TCL introduces a novel regularization loss function ($L_G$) that applies Supervised Contrastive Loss at two levels: globally across all classes seen so far, and locally within each leaf group. This forces the model to draw sharper decision boundaries between easily confused classes.
- Optimal Transport (OT) Prior: To avoid treating all classes within a leaf group identically, the authors use the frozen pretrained model to calculate the $L2$-Wasserstein distance between class feature distributions. Classes that are naturally closer together in the pretrained space receive higher weights in the contrastive loss, forcing the model to focus its optimization on the most challenging boundaries.
Datasets
The framework was evaluated on four widely used class-incremental learning benchmarks:
- Split CIFAR-100: 100 classes split into 10 sequential tasks.
- Split ImageNet-R: 200 classes containing structurally difficult or stylized images, split into 10 tasks.
- 5-Datasets: A challenging composite sequence of five distinct datasets (CIFAR-10, MNIST, Fashion-MNIST, SVHN, and notMNIST).
- Split CUB-200: A fine-grained dataset of 200 bird species split into 10 tasks.
Key Insights and Ideas
- Crowding vs. Drifting: By isolating the classification head during testing, the authors proved that "within-task accuracy" remains nearly perfect over time. Forgetting happens primarily because the global classification head cannot distinguish old classes from new, overlapping ones.
- LLMs as Dynamic Domain Experts: Instead of relying on rigid, pre-defined semantic trees (like WordNet), TCL demonstrates that modern LLMs can reliably generate and expand custom taxonomies on-the-fly as a stream of data arrives.
- Pretrained Models as Geometric Guides: Pretrained backbones already possess rich geometric intuitions about class similarities. Mining these priors via optimal transport allows the model to predict exactly which new classes pose the highest confusion risk to historical data.
Key Results
TCL consistently outperformed all state-of-the-art prompt-based baselines (including HiDe-Prompt, CODA-Prompt, and L2P) across all benchmarks:
- Final Average Accuracy (FAA): TCL achieved a consistent ~1.5% accuracy boost over the strongest baseline across all datasets (e.g., reaching 93.94% on Split CIFAR-100 and 76.41% on Split ImageNet-R).
- Forgetting Mitigation: TCL dramatically reduced the Final Forgetting Measure (FFM). Most notably, on the 5-Datasets benchmark, it reduced forgetting to a mere 0.21%, outperforming the runner-up baseline by an absolute margin of 17%.
Limitations and Future Work
The primary limitation of TCL is its dependency on the quality of the generated taxonomy. If the LLM creates an inappropriate structure or misallocates a class to the wrong leaf group, the contrastive constraints will be suboptimal and could harm performance.
For future work, the authors propose extending this taxonomy-driven grouping strategy to more complex computer vision tasks beyond classification, such as Object Detection and Action Recognition, where class overlap and relationship modeling are even more critical.
Summary updated