Abstract
Visual instruction tuning is a key training stage of large multimodal models. However, when learning multiple visual tasks simultaneously, this approach often results in suboptimal and imbalanced overall performance due to latent knowledge conflicts across tasks. To mitigate this issue, we propose a novel Adaptive Task Balancing approach tailored for visual instruction tuning (VisATB). Specifically, we measure two critical dimensions for visual task balancing based on validation performance: (1) Inter-Task Contribution, the mechanism where learning one task enhances the performance on others owing to shared knowledge across tasks, and (2) Intra-Task Difficulty, which denotes the inherent learning difficulty of a single task. Furthermore, we propose prioritizing three categories of tasks with greater weight: those that offer substantial contributions to others, those that receive minimal contributions from others, and those that present high learning difficulties. Among these three task weighting strategies, the first and third focus on improving overall performance, and the second targets the mitigation of performance imbalance. Extensive experiments on three benchmarks demonstrate that our VisATB approach consistently achieves superior and more balanced overall performance in visual instruction tuning.
Introduction
Large Multimodal Models (LMMs) like LLaVA have demonstrated remarkable capabilities by training on diverse instruction-following datasets. However, the standard practice of "naive mixing"—simply combining datasets and training on the aggregate—often leads to task interference. This phenomenon occurs when learning one skill (e.g., image captioning) inadvertently hampers another (e.g., object grounding) due to latent knowledge conflicts.
Furthermore, standard training loss is typically averaged across all tokens. This creates an implicit bias toward tasks with longer responses, such as detailed captioning, which contribute more tokens to the loss function than tasks with short answers, like binary VQA. Manually tuning task weights to address these issues is computationally expensive and rarely generalizes across different architectures.
The VisATB Framework
To address these challenges, we introduce VisATB (Adaptive Task Balancing), a framework that automatically calculates optimal task weights. The VisATB pipeline consists of three distinct stages: Preparation, Task Weight Calculation, and Final Training.
1. Preparation: Quantifying Task Dynamics
In the preparation stage, the model is trained on "mini-subsets" (e.g., 1/32nd of the data) and larger subsets for each task. By evaluating these models across all tasks, we quantify two key metrics:
- Inter-Task Contribution ($C_{i \to j}$): This measures how much training on Task $i$ improves the model's performance on Task $j$. It reveals "generous" tasks that provide strong positive transfers to others and "loner" tasks that receive minimal benefit.
- Intra-Task Difficulty ($D_i$): This denotes the inherent learning difficulty of a single task, measured by the performance gap between a model trained on a tiny subset versus the full dataset.
2. Task Weight Calculation
Based on the measured dynamics, we derive three weighting strategies:
- Task-Outward ($\lambda_{out}$): Prioritizes tasks that provide the most "help" to other tasks to improve overall system performance.
- Task-Inward ($\lambda_{in}$): Prioritizes tasks that receive the least help from others, preventing them from being neglected during training.
- Difficulty-Based ($\lambda_D$): Prioritizes tasks that are inherently harder to learn.
3. Final Training: Token-Level Weighting
A crucial innovation in VisATB is Visual Instruction Task Weighting (VITW). Unlike traditional methods that apply weights to the entire task loss, VITW applies weights at the token level. This ensures that every valid token is considered equitably, neutralizing the implicit bias caused by varying sequence lengths across different tasks.
Experimental Results
We evaluated VisATB across three major benchmarks ($M^3IT$, Academic, and Chat) using various backbones, including LLaVA-v1.5 and Qwen2-VL.
- Superior Performance: On the Academic Benchmark, VisATB achieved an 11.29% average per-task improvement over the single-task baseline, significantly outperforming the 8.75% gain from standard equal weighting.
- Balanced Learning: The framework effectively reduced performance imbalance, ensuring that difficult tasks were not sacrificed for easier ones.
- Zero-Shot Generalization: VisATB improved performance on unseen tasks by 1.87%, suggesting it helps the model learn more fundamental and transferable multimodal features.
- Efficiency: While requiring a preparation stage, VisATB only adds approximately 0.4x to the total training time, making it a practical solution for large-scale tuning.
Conclusion
VisATB offers a principled, automated approach to balancing diverse tasks in visual instruction tuning. By accounting for inter-task synergies and individual task difficulties at a token level, it mitigates knowledge conflicts and implicit biases. Future work will explore automating task grouping for even larger datasets and developing dynamic weighting schemes that evolve during the training process.
Summary updated