Knowledge Graph Enhanced Generative Multi-modal Models for Class-Incremental Learning

Xusheng Cao, Haori Lu, Linlan Huang, Fei Yang, Xialei Liu, Ming-Ming Cheng

Introduction

In the evolving landscape of machine learning, Class-Incremental Learning (CIL) remains a significant hurdle. Ideally, artificial intelligence should learn new concepts sequentially over time—much like a human learning to identify a "Pineapple" after already knowing what a "Granny Smith" apple is. However, most models suffer from catastrophic forgetting: as they adapt to new tasks, they overwrite the parameters crucial for recognizing older ones.

Even modern generative models that combine vision encoders (like CLIP) with Large Language Models (LLMs) struggle in this paradigm. They often lose fine-grained details of previously learned categories. For instance, after learning several new fruits, a model might misclassify a "Granny Smith" as a "Pineapple" simply because the newer knowledge is more dominant in the network's memory.

Comparison of standard GMM and KG-GMM

To address this, researchers have developed KG-GMM (Knowledge Graph Enhanced Generative Multi-modal Model), a framework that tackles catastrophic forgetting by integrating an evolving Knowledge Graph (KG) with generative multi-modal models. By teaching models to associate images with structured relational facts rather than simple labels, the system maintains a much sharper memory of old categories while learning new ones.

Methods: Anchoring Memory with Knowledge Graphs

The authors identify that existing models lack a structured way to differentiate similar categories across different learning stages. KG-GMM solves this by anchoring the model's memory using three core mechanisms:

Overview of the KG-GMM framework
  1. Evolving Knowledge Graph Construction: As the model encounters new classes, it queries a common-sense database (like ConceptNet) to build a local subgraph. Instead of merely storing a class label, it stores relational triplets: (Head, Relation, Object), such as (Granny Smith, IsA, Fruit) and (Granny Smith, hasColor, Green).
  2. Knowledge Graph Enhanced Learning: During training, the ground-truth target for the LLM is a concatenation of these relational triplets rather than a simple label. This forces the model to focus on factual, descriptive attributes that uniquely distinguish one class from another.
  3. Knowledge Graph Augmented Inference: During testing, the model is prompted to describe the image's details (e.g., color, location). The system extracts relations from this generated text and searches the stored Knowledge Graph to find the "head entity" that most frequently matches those facts. This predicted head refines the final classification, acting as a logical check against the model's raw visual intuition.

Key Insights

  • Relations as Anchors: Simple text labels are "flat," whereas relational triplets provide multi-dimensional anchors. If a model forgets the exact visual features of a "Hammerhead," the relationship (Hammerhead, AtLocation, Sea) helps pull its predictions back to the correct conceptual neighborhood.
  • The "Trim to Key" Strategy: To handle similar classes, the system ensures unique relations are emphasized. If "Fruit" is already a relation used for "Apple," the system seeks out distinct relations for a new similar class (like "Pineapple") to create a clear boundary between them.
  • Generative vs. Discriminative: By utilizing a generative LLM (Vicuna-7B) rather than a simple linear classifier, the model can "reason" through descriptions, making it far more resistant to the recency bias of simply picking the most recently learned class.

Datasets and Key Results

The researchers evaluated KG-GMM across several challenging benchmarks, including conventional CIL (Tiny-ImageNet, ImageNet-R), few-shot CIL (CIFAR100, Mini-ImageNet), and specialized fine-grained domains (CUB-200, HAM-10000, FGVC-Aircraft, Herbarium19).

KG-GMM established new state-of-the-art performance:

  • ImageNet-R: Achieved a "Last" accuracy of 84.29%, outperforming the previous state-of-the-art (GMM) by 3.57% and surpassing traditional prompt-based methods like CODA-Prompt by over 10%.
  • Few-Shot Learning: On Mini-ImageNet (where the model only sees 5 examples per new class), it reached 78.07% accuracy in the final session, nearly 3% higher than the previous best.
  • Efficiency: Despite the added reasoning capabilities, the overhead is minimal. The Knowledge Graph adds only about 169KB of memory—vastly less than the megabytes required to store "exemplar" images for traditional replay-based continual learning.

Limitations and Future Work

While highly effective, the method relies on external Knowledge Graphs like ConceptNet, which may not exist for highly specialized fields (e.g., niche medical data). Although the authors experimented with using LLMs to generate these attributes, this introduces a dependency on the LLM's internal knowledge. Future work could explore scaling this approach with larger "frontier" models and incorporating more complex, hierarchical reasoning within the graph to further improve the model's common sense when distinguishing between very similar sub-species.

Summary updated

BibTeX
@inproceedings{cao2025knowledge,
  author = {Xusheng Cao and Haori Lu and Linlan Huang and Fei Yang and Xialei Liu and Ming-Ming Cheng},
  title = {{Knowledge Graph Enhanced Generative Multi-modal Models for Class-Incremental Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=SeC5Zb8Orf},
}
Figure