TL;DR
Gradient-based multi-task learning (MTL) algorithms often struggle with "gradient conflict," but this paper reveals that high gradient variance—especially from small batch sizes—artificially inflates these conflicts. To fix this, the authors introduce VarGrad, an algorithm-agnostic framework that stabilizes training via iterative gradient correction and an adaptive update scheduler, boosting performance by an average of 24.3% while slashing computational overhead by up to 55%.
What Problem Does This Paper Address?
Multi-task learning (MTL) aims to train a single neural network to perform multiple related tasks simultaneously, improving efficiency and generalization. However, a major hurdle in MTL is gradient conflict, which occurs when the optimization directions for different tasks point away from each other, causing them to cancel out and stall training.
While many advanced MTL algorithms have been proposed to project, align, or reweight these conflicting gradients, they all share a critical assumption: that the computed gradients accurately represent the true optimization direction.
The authors point out that in reality, gradient estimates are often highly noisy and unstable due to practical constraints like small batch sizes. As shown in Figure 1, simply increasing the batch size to reduce noise yields better performance but causes GPU memory consumption to skyrocket, making it impractical for resource-constrained environments.
This paper provides the first systematic study on how gradient variance influences gradient-based MTL methods, demonstrating that noisy gradients artificially amplify perceived task conflicts and severely degrade model performance.
Methods
To mitigate gradient instability without exploding memory costs, the authors propose VarGrad, a lightweight, plug-and-play framework consisting of two core components:
- Iterative Gradient Correction (Gradient Stabilization): Instead of feeding raw, noisy stochastic gradients directly into an MTL optimizer, VarGrad tracks the difference between consecutive gradients ($g_t^k - g_t^{k-1}$). This difference implicitly captures local curvature information (akin to a Hessian-free approximation) and acts as a noise-canceling mechanism. It temporally calibrates task-specific gradients across iterations to ensure stable and accurate directional signals.
- Selective Multi-Task Optimization (SMO): Running complex multi-task gradient alignment algorithms at every single training step is computationally expensive. VarGrad introduces an acceleration strategy that uses per-task losses as a lightweight proxy to monitor inter-task imbalance. If the tasks are progressing relatively evenly, VarGrad skips the expensive joint optimization step and defaults to a simple, fast mean-gradient update. It only triggers full MTL optimization when task imbalance exceeds a predefined threshold.
Datasets
The authors evaluated VarGrad across four mainstream MTL benchmarks spanning classification, regression, and dense prediction:
- CelebA: A large-scale facial image dataset configured as a 40-task binary classification problem.
- QM9: A molecular property dataset featuring 19 regression targets.
- NYU-v2: A dense prediction dataset involving three distinct tasks: semantic segmentation, depth estimation, and surface normal prediction.
- Cityscapes: An urban scene dataset focused on two dense prediction tasks: semantic segmentation and depth estimation.
Key Insights and Ideas
- Variance Mimics Conflict: High gradient variance caused by small batch sizes artificially inflates the measured gradient conflict ratio. This misunderstanding causes existing MTL algorithms to over-correct, leading to overly conservative updates and sluggish convergence (see Figure 2).
- Naive Momentum Isn't Enough: Prior methods like MoCo attempt to smooth gradients using standard first-order momentum. However, the authors show that naive momentum can actually amplify noise and increase conflict in low-batch settings, whereas VarGrad's explicit variance reduction successfully suppresses it.
- Continuous Alignment is Redundant: Tasks do not severely conflict at every step of training. By adaptively skipping complex multi-task optimization during stable training phases, models can achieve identical performance with a fraction of the compute.
Key Results
- State-of-the-Art Performance: VarGrad achieved an average performance gain ($\Delta m\%$) of 24.3% across the evaluated benchmarks. On the massive 40-task CelebA dataset, it delivered the best overall score ($\Delta m\% = 0.29$), outperforming all established baselines.
- Seamless Modularity: Because VarGrad is algorithm-agnostic, it can be easily integrated into existing MTL methods (such as CAGrad, MGDA, and FairGrad). In plug-and-play tests on Cityscapes, adding VarGrad consistently reduced depth prediction errors and improved the overall task balance metric across all base algorithms without altering their core structures.
- Massive Efficiency Gains: When paired with Selective Multi-Task Optimization (SMO) on Cityscapes, VarGrad reduced the need for full joint optimization updates to just 44.84% of the total training steps, cutting down computational overhead significantly while preserving top-tier accuracy.
Limitations and Future Work
- Threshold Sensitivity: The Selective Multi-Task Optimization component relies on a hyperparameter threshold ($\tau$) to determine when to trigger full updates, which may require manual tuning depending on the dataset and task heterogeneity.
- Complex Architectures: While the authors provide strong theoretical convergence proofs under standard smoothness assumptions, future work could explore how VarGrad scales to massive, highly non-smooth architectures like modern Vision Transformers (ViTs) or large language models trained in multi-task setups.
Summary updated