CoTBal: Comprehensive Task Balancing for Multi-Task Visual Instruction Tuning

Yanqi Dai, Dong Jing, Nanyi Fei, Zhiwu LuarXiv 2024 · OpenReview

Abstract

Visual instruction tuning is an important training stage for large multimodal models. Nevertheless, when learning multiple visual tasks simultaneously, this approach may lead to suboptimal and imbalanced overall performance due to latent knowledge conflicts across tasks. To mitigate this issue, we introduce a novel Comprehensive Task Balancing (CoTBal) algorithm tailored for multi-task visual instruction tuning. Specifically, we consider two critical dimensions for task balancing: (1) Inter-Task Contribution, representing knowledge overlap, and (2) Intra-Task Difficulty, indicating inherent learning complexity. By quantifying these with performance-based metrics, CoTBal assigns greater weight to tasks that offer substantial contributions, receive minimal help, and present high learning difficulties. Extensive experiments demonstrate superior and more balanced overall performance.

Introduction

Training Large Multimodal Models (LMMs) involves teaching models to handle diverse tasks like captioning, visual question answering (VQA), and grounding. However, mixing these tasks often leads to task interference, where the knowledge required for one task conflicts with another. This results in imbalanced performance, where models may excel at simpler tasks while struggling with complex ones.

Current practices typically rely on "Equal Weighting" or manual data ratio tuning, which is computationally expensive and lacks generalizability. CoTBal (implementing the VisATB framework) addresses this by introducing an automated, principled framework to balance tasks based on their mutual contributions and inherent difficulties.

Methodology: The CoTBal Framework

The CoTBal algorithm operates in three distinct stages: Preparation, Task Weight Calculation, and Final Training.

The CoTBal framework consists of preparation, task weight calculation, and final training stages.

1. Preparation Stage

The model is initially trained on "mini-subsets" and full datasets of individual tasks to measure two core metrics:

  • Inter-Task Contribution ($C_{i \to j}$): Quantifies how much learning Task $i$ improves performance on Task $j$.
  • Intra-Task Difficulty ($D_i$): Measures the inherent learning complexity of a task based on how much data is required to reach peak performance.
Intra-task difficulty varies significantly across tasks like visual grounding and image captioning, requiring adaptive weighting.

2. Task Weight Calculation

Three weighting strategies are derived from the measured metrics:

  • Task-Outward ($\lambda_{out}$): Prioritizes tasks that provide the most "help" to others.
  • Task-Inward ($\lambda_{in}$): Prioritizes tasks that receive the least help from others to prevent performance degradation.
  • Difficulty-Based ($\lambda_D$): Assigns higher weights to inherently harder tasks.

3. Final Training with Token-Level Weighting

Standard task-level weighting often fails because tasks have varying sequence lengths. CoTBal introduces Visual Instruction Task Weighting (VITW), which applies weights at the token level. This ensures that every valid token is considered equitably, preventing tasks with longer descriptions from being diluted in the loss calculation.

Experimental Results

CoTBal was evaluated across three major benchmarks: M³IT, Academic, and Chat benchmarks.

  • Performance Gains: On the Academic Benchmark, CoTBal achieved an 11.29% average per-task improvement over single-task baselines, outperforming standard Equal Weighting (8.75%).
  • Balanced Performance: The framework significantly reduced performance imbalance ($\Delta E\%$) to 0.15%, compared to 1.85% for some baselines.
  • Zero-Shot Generalization: Models trained with CoTBal showed a 1.87% improvement on unseen tasks (e.g., MMBench, SEED), suggesting that balanced multi-task training leads to more robust feature representations.

Conclusion

CoTBal provides a robust, automated solution for the challenges of multi-task visual instruction tuning. By moving beyond simple loss-based weighting and accounting for inter-task relationships and intra-task difficulty at the token level, it achieves state-of-the-art balance and performance. While the preparation stage adds approximately 0.4x to training time, the resulting performance gains and reduced need for manual tuning represent a significant advancement in LMM training efficiency.

Summary updated

BibTeX
@misc{dai2024cotbal,
  author = {Yanqi Dai and Dong Jing and Nanyi Fei and Zhiwu Lu},
  title = {{CoTBal: Comprehensive Task Balancing for Multi-Task Visual Instruction Tuning}},
  year = {2024},
  eprint = {2403.04343},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.04343},
}
Figure