Augmenting Continual Learning of Diseases with LLM-Generated Visual Concepts

Jiantao Tan, Peixian Ma, Kanghao Chen, Zhiming Dai, Ruixuan WangarXiv 2025 · DOI · arXiv

Abstract

Continual learning (CL) in medical imaging is often hampered by catastrophic forgetting, where models lose knowledge of previous diseases when learning new ones. This paper introduces a novel framework that leverages Large Language Models (LLMs) to generate descriptive visual concepts (e.g., "thickened discolored nail") for new classes. These concepts serve as stable semantic anchors. By integrating these descriptors through a vision-concept cross-attention mechanism and an exemplar-free replay strategy, the proposed method achieves state-of-the-art performance on medical and natural image benchmarks while maintaining high parameter efficiency.

Introduction: The Challenge of Catastrophic Forgetting

In clinical settings, deep learning models must adapt to a sequential stream of new diagnostic tasks. However, standard CL approaches often rely on simple class labels (e.g., "Melanoma"), which lack the descriptive depth required to distinguish visually similar conditions. Humans identify diseases by recognizing a collection of specific visual features or "concepts." This research addresses the semantic gap by incorporating LLM-derived knowledge into the learning process, providing the model with rich, descriptive anchors for long-term disease classification.

Methodology

The proposed framework consists of three primary pillars designed to leverage linguistic stability for visual recognition.

The proposed framework consists of an LLM-based visual concept generation pipeline and a vision-concept cross-attention module for feature fusion.
  1. Dynamic Visual Concept Pool: The system prompts an LLM (such as Lingshu-7B or GPT-4o) to generate concise visual descriptors for each class. To prevent redundancy and noise, a TF-IDF similarity-based filter merges or discards overlapping concepts, ensuring the pool remains discriminative.
  2. Vision-Concept Cross-Attention: Image features act as "queries" to retrieve relevant "keys" and "values" from the text-encoded concept pool. This fusion produces a semantically enriched feature set that is more robust than raw image data alone.
  3. Attention Constraint Loss ($L_{attn}$): To ensure the model focuses on clinically relevant features, a specialized loss function forces the attention mechanism to assign higher weights to concepts belonging to the ground-truth class while suppressing irrelevant noise.

Crucially, the method is exemplar-free. To comply with medical privacy standards, it avoids storing old patient images, instead saving the statistical distribution (mean and variance) of old features to facilitate replay during new tasks.

Experimental Results

The framework was evaluated on both medical (Skin40, MedMNIST18) and natural (CUB200) image benchmarks, consistently achieving state-of-the-art results.

Comparison of accuracy vs. trainable parameters on the Skin40 dataset. The proposed method ("Ours") achieves the highest accuracy with minimal parameter overhead.
  • Skin40 (10-task): The model achieved 66.17% last accuracy, outperforming the previous multimodal leader (PROOF) by over 10%.
  • MedMNIST18: The method surpassed prompt-based baselines like L2P and DualPrompt by a margin of at least 30% in mean class recall.
  • CUB200: Even in the natural domain, the approach outperformed the Concept Bottleneck Model (CBM) by 1.59%, demonstrating the generalizability of the visual concept strategy.

Discussion and Future Work

A key insight of this work is that visual concepts act as "static anchors." While image encoders may drift as they adapt to new tasks, the linguistic definitions of features remain constant, helping the model "remember" previous classes. The authors also found that domain-specific LLMs, like Lingshu-7B, provide superior descriptors for medical tasks compared to general-purpose models.

Future work will focus on local feature alignment, aiming to map specific image regions directly to text concepts. Additionally, the authors aim to reduce the computational overhead introduced by the text encoders and cross-attention layers.

Conclusion

By augmenting image features with LLM-generated visual concepts, this framework provides a scalable, privacy-preserving solution to catastrophic forgetting. The approach not only improves classification accuracy but also aligns model decision-making with human-interpretable clinical features.

Summary updated

Abstract

Continual learning is essential for medical image classification systems to adapt to dynamically evolving clinical environments. The integration of multimodal information can significantly enhance continual learning of image classes. However, while existing approaches do utilize textual modality information, they solely rely on simplistic templates with a class name, thereby neglecting richer semantic information. To address these limitations, we propose a novel framework that harnesses visual concepts generated by large language models (LLMs) as discriminative semantic guidance. Our method dynamically constructs a visual concept pool with a similarity-based filtering mechanism to prevent redundancy. Then, to integrate the concepts into the continual learning process, we employ a cross-modal image-concept attention module, coupled with an attention loss. Through attention, the module can leverage the semantic knowledge from relevant visual concepts and produce class-representative fused features for classification. Experiments on medical and natural image datasets show our method achieves state-of-the-art performance, demonstrating the effectiveness and superiority of our method. We will release the code publicly.
BibTeX
@misc{tan2025augmenting,
  author = {Jiantao Tan and Peixian Ma and Kanghao Chen and Zhiming Dai and Ruixuan Wang},
  title = {{Augmenting Continual Learning of Diseases with LLM-Generated Visual Concepts}},
  year = {2025},
  eprint = {2508.03094},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.03094},
}
Figure