Abstract
Vision-Language Models (VLMs) often suffer from catastrophic forgetting when fine-tuned on new tasks. While Multi-Task Learning (MTL) mitigates this, it is computationally expensive and requires constant access to all historical data. This paper presents a modular framework using dynamic routing between task-specific LoRA experts. By employing token-level routing, the proposed method achieves performance parity with MTL while significantly reducing data and computational requirements, effectively eliminating catastrophic forgetting in sequential learning scenarios.
Introduction
Fine-tuning large Vision-Language Models (VLMs), such as InternVL-2, on specialized tasks often leads to Catastrophic Forgetting (CF). As the model adapts to new domains—for instance, medical imaging or document analysis—it tends to lose the foundational reasoning and general knowledge acquired during its extensive pre-training.
The conventional solution, Multi-Task Learning (MTL), involves training on all datasets simultaneously. However, MTL presents significant logistical challenges: it requires persistent access to all previous training data and incurs computational costs that scale linearly with the number of tasks. This research introduces a "middle way"—a dynamic routing approach that is as efficient as sequential fine-tuning but as robust as MTL.
Methodology: Dynamic Routing Between Experts
The authors propose a modular architecture based on Dynamic Routing Between Experts. The framework operates in two distinct stages:
- Task-Specific Specialization: For each new task, a dedicated LoRA (Low-Rank Adaptation) module is trained. The base model parameters remain frozen during this phase, preventing any degradation of core foundational knowledge.
- Learning to Route: Following expert training, a lightweight routing vector is developed for the specific task. This vector is trained to identify the unique "signature" of input tokens associated with its respective task.
At inference, the model dynamically selects the most relevant expert for each token in an input sequence based on an "affinity score." This token-level decision-making allows the model to switch between specialized modules mid-sequence, providing a flexible and granular approach to multi-task inference. Crucially, this method is $O(1)$ regarding data requirements per task, as it only necessitates data for the current task being learned.
Experimental Setup and Datasets
The framework was evaluated using InternVL-2 (2B and 8B variants) across a diverse set of tasks:
- Specialization Tasks: COCO-Caption, SNLI-VE, Hateful Memes (HM), and MMIMDb.
- Foundational Benchmarks: MMBench, ChartQA, and DocVQA, used to assess the retention of general capabilities.
- Cross-Modal/Math Tasks: Orca-Math (text-only) and Multi-math (image+text) to evaluate knowledge transfer across modalities.
Key Insights
Routing as a Protective Shield
The routing mechanism acts as a safeguard for the base model. On general benchmarks like MMBench, the routers correctly identify that no specialized expert is required, allowing the base model to process the input independently. This prevents the performance "tanking" typically observed in standard fine-tuning.
Scaling and Resilience
Experiments revealed that the 8B model exhibits greater resilience to routing than the 2B model. As model size increases, the performance gap between individual specialized experts and the routed ensemble narrows, suggesting that this modular approach is particularly well-suited for larger frontier models.
Cross-Modal Synergy
The routing framework facilitates zero-shot cross-modal transfer. For example, the model can leverage knowledge from a text-based math expert to enhance its performance on image-based math problems, a capability that traditional continual learning methods often lack.
Key Results
The dynamic routing approach demonstrates significant advantages in both performance and efficiency.
- Performance Parity: On the MMIMDb task, routing actually outperformed MTL (63.2 vs 63.0), likely by minimizing "negative interference" between disparate tasks.
- Efficiency Gains: Compared to the MTL "gold standard," the routing approach achieved a 2x reduction in training time and a 4x reduction in total data requirements across four tasks.
- Eliminating Forgetting: While standard sequential fine-tuning caused a sharp decline in DocVQA scores (from 84.7 to 70.0), the routing approach maintained a score of 84.3, effectively neutralizing catastrophic forgetting.
Limitations and Future Work
The authors observed some interference in the 8B model's cross-lingual capabilities, specifically when combining Chinese language experts with English math experts. This indicates that as models scale, the sensitivity to the "data mixture" used for language experts increases. Future research will explore expanding the framework to support more complex cross-lingual transfers and investigate the scalability limits of the routing pool.
Summary updated