Enhancing Continual Learning in Visual Question Answering with Modality-Aware Feature Distillation

Malvina Nikandrou, Georgios Pantazopoulos, Ioannis Konstas, Alessandro Suglia

TL;DR

This paper tackles the challenge of catastrophic forgetting in Visual Question Answering (VQA) models during continual learning. They propose a novel "Modality-Aware Feature Distillation" (MAFED) method that accounts for the differing learning and forgetting rates of visual and textual modalities, leading to improved performance and reduced forgetting.

What Problem Does This Paper Address?

Continual learning aims to train models on a sequence of tasks without forgetting previously learned knowledge. While this is a well-studied problem in unimodal domains, it's particularly challenging for multimodal tasks like VQA, which involve processing both images and text. Existing continual learning methods often treat all modalities equally, overlooking the fact that visual and textual representations might evolve and degrade at different rates. This paper hypothesizes that this modality-specific dynamic is a key factor in catastrophic forgetting in VQA and proposes a method to address it.

Methods

The core contribution is the Modality-Aware Feature Distillation (MAFED) approach. It builds upon standard feature distillation, which uses a previous model checkpoint as a "teacher" to guide the learning of a new task by minimizing the difference in representations. MAFED introduces two key modifications:

  • Modality-Aware Weighting: Instead of applying a single distillation loss for all features, MAFED separates the loss for visual and textual tokens. It proposes two weighting schemes:
  • MAFED-B (Balanced): Simply balances the distillation loss between modalities (e.g., 50/50).
  • MAFED-A (Adaptive): Dynamically estimates the importance of each modality based on the gradients of the VQA classification loss with respect to the model's representations. This allows the model to adaptively focus on the modality that is more critical or prone to forgetting.
  • Layer-wise Discounting: The paper also incorporates a discount factor to weigh the distillation loss from different layers, hypothesizing that deeper layers are more affected by forgetting.

MAFED is combined with experience replay, a common continual learning technique where a small buffer of past data is stored and replayed during training.

Datasets

The paper uses an existing evaluation suite for Continual Learning in VQA, which comprises three settings:

  • Diverse Content: Tasks are grouped randomly based on object categories from COCO.
  • Taxonomy Content: Tasks are grouped by super-categories (e.g., Animals, Food).
  • Question Types: Tasks are defined by the type of question asked (e.g., Count, Color).

The models are trained on datasets commonly used for VQA and vision-language pretraining, including COCO, SBU captions, Visual Genome, and Conceptual Captions 3M.

Key Insights and Ideas

  • Modality-Specific Dynamics: The paper empirically demonstrates that visual and textual representations in VQA models evolve and forget at different rates across tasks. This is a crucial insight that motivates the proposed modality-aware approach.
  • Adaptive Weighting is Key: While balanced weighting (MAFED-B) shows improvements, adaptive weighting (MAFED-A) often yields better results, especially when the discrepancies in modality evolution are larger. This suggests that dynamically adjusting to modality-specific learning dynamics is more effective.
  • Complementarity of Replay and Distillation: The study shows that feature distillation, especially the modality-aware variants, complements experience replay, leading to the best overall performance. This indicates that combining different continual learning strategies can be highly beneficial.
  • Layer-wise Differences Matter: The observation that deeper layers are more affected by forgetting, and that distilling from specific layers can sometimes degrade performance, highlights the importance of considering layer-specific dynamics.

Key Results

  • Improved Performance: MAFED consistently outperforms existing baselines (including naive fine-tuning, EWC, and experience replay) across various VQA continual learning settings and model architectures (UNITER, ViLT, and VL-Pythia).
  • Significant Gains with ViLT: While UNITER shows moderate gains, ViLT benefits more substantially from MAFED, particularly in the Question Types setting, where accuracy is improved.
  • Scaling Benefits: Larger VL-Pythia models (up to 1B parameters) exhibit less forgetting, especially in image-based settings. However, even with large models, there's still a gap compared to multitask learning, suggesting that continual learning techniques remain valuable.
  • MAFED-A Outperforms: For VL-Pythia models, MAFED-A (adaptive weighting) consistently leads to better performance, improving accuracy by up to +2.6% compared to ER and +0.87% compared to FD.

Limitations and Future Work

  • Computational Cost: Feature distillation, especially MAFED-A, can be more computationally expensive than replay due to the need to access previous model representations.
  • Architecture-Based Approaches: The paper suggests that exploring architecture-based methods (e.g., parameter isolation) could offer more control over modality-specific learning.
  • Model Scaling: While larger models show less forgetting, future work could investigate if further scaling of model size or pretraining data can further reduce forgetting in VQA.
  • Understanding Layer Dynamics: The paper notes that performance doesn't monotonically increase with layer depth for distillation, suggesting further research into optimal layer selection for distillation.

Summary updated

BibTeX
@inproceedings{nikandrou2024enhancing,
  author = {Malvina Nikandrou and Georgios Pantazopoulos and Ioannis Konstas and Alessandro Suglia},
  title = {{Enhancing Continual Learning in Visual Question Answering with Modality-Aware Feature Distillation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
}
Figure