Conflict-Averse Gradient Descent for Multi-task learning

Bo Liu, Xingchao Liu, Xiaojie Jin, Peter Stone, Qiang Liu

TL;DR

CAGrad (Conflict-Averse Gradient descent) is a novel optimization algorithm for multi-task learning that balances individual task improvements while minimizing the overall average loss. Unlike previous methods that can converge to arbitrary points on the Pareto front, CAGrad provides a theoretical guarantee of converging to the minimum of the average loss, outperforming state-of-the-art methods across supervised and reinforcement learning benchmarks.

The Optimization Challenge in Multi-Task Learning

In Multi-Task Learning (MTL), a single model is trained to perform several different tasks simultaneously. While this is computationally efficient and can improve generalization, it introduces a major optimization challenge: conflicting gradients.

Imagine two tasks: Task A wants the model parameters to move left, while Task B wants them to move right. If you simply average their gradients (the standard approach), the resulting update might be tiny or, worse, move in a direction that significantly hurts one of the tasks. This often leads to "interference," where the multi-task model performs much worse than individual models trained for each task separately.

Existing solutions like MGDA (Multiple Gradient Descent Algorithm) or PCGrad (Projecting Conflicting Gradients) try to fix this by manipulating gradients. However, they have a critical flaw: they don't necessarily care about the average loss (the main goal). They might stop at any "Pareto-stationary" point—a state where you can't improve one task without hurting another—even if that point represents poor overall performance.

Optimization trajectories on a toy multi-task landscape. CAGrad successfully navigates to the minimum, while others get stuck or converge suboptimally.

As seen in the toy example above, standard optimizers like Adam can get stuck in local valleys, while MGDA and PCGrad converge to suboptimal points on the Pareto set. CAGrad successfully navigates the landscape to find the true minimum of the average loss.

Methods: The CAGrad Algorithm

The authors introduce CAGrad, which seeks an update vector that maximizes the "worst local improvement" across all tasks, but strictly stays within a specific neighborhood of the average gradient.

The Core Objective

Mathematically, CAGrad solves a constrained optimization problem at each step:

  1. Objective: Maximize the minimum improvement across all tasks (the "worst-case" scenario).
  2. Constraint: The update vector must stay within a ball of radius $c \cdot \|g_0\|$ centered at the average gradient $g_0$.
Geometric comparison of gradient update rules. CAGrad optimizes within a constraint ball around the average gradient.

The hyperparameter $c \in [0, 1)$ acts as a "conflict-aversion" knob.

  • If $c=0$, the constraint ball shrinks to zero, and CAGrad recovers standard Gradient Descent.
  • If $c \to \infty$, the constraint is removed, and it recovers MGDA.

Practical Implementation

Since the primary optimization happens in a high-dimensional parameter space (often millions of weights), solving it directly is impossible. The authors derive a dual objective that only requires solving for a weight vector $w$ with a dimension equal to the number of tasks (usually a very small number). This makes the computational overhead manageable.

To further improve efficiency for many-task scenarios (like the 50-task Meta-World benchmark), they propose CAGrad-Fast, which samples a subset of tasks at each step to compute the update.

Key Insights

  • Convergence to the Global Objective: The most significant breakthrough is that by regularizing the trajectory around the average gradient, CAGrad mitigates conflicts without losing sight of the primary goal (minimizing average loss). This provides a much-needed convergence guarantee that prior gradient-manipulation methods lacked.
  • The $c$ Parameter as a Bridge: CAGrad elegantly unifies standard GD and multi-objective optimization (MGDA). It allows practitioners to choose how much they want to prioritize "fairness" between tasks versus raw average performance.
  • Handling the "Steep Valley": Standard GD often fails because one task's gradient dominates, causing the optimizer to bounce between "valley walls." CAGrad effectively finds the "floor" of the valley to make consistent progress.

Datasets and Key Results

The researchers evaluated CAGrad on a diverse set of benchmarks, proving its versatility:

  • Supervised Learning (NYU-v2 & CityScapes): On NYU-v2 (semantic segmentation, depth estimation, surface normal prediction), CAGrad achieved a per-task performance drop ($\Delta m\%$) of only 0.20%, significantly better than MTAN (5.59%) or PCGrad (3.97%).
  • Reinforcement Learning (Meta-World MT10 & MT50): In the challenging MT50 benchmark (50 distinct robotic manipulation tasks), CAGrad achieved a success rate of 0.52, outperforming PCGrad (0.50) and standard Multi-task SAC (0.36).
  • Efficiency: The "Fast" version of CAGrad achieved a 5x speedup over PCGrad on the 50-task benchmark while maintaining comparable performance.
  • Semi-Supervised Learning (CIFAR-10): When using auxiliary tasks to boost a main task, CAGrad consistently yielded the highest test accuracy across different amounts of labeled data.

Limitations and Future Work

  • Hyperparameter Sensitivity: The performance of CAGrad depends on the constant $c$. While the authors found $c=0.4$ or $c=0.2$ worked well across many tasks, it still requires tuning for optimal results.
  • Focus on Average Loss: The current formulation is strictly tied to the average loss objective. Future work could explore applying CAGrad to other user-specified objectives or non-uniform task weightings.
  • Computational Overhead: While the dual problem is efficient, it still requires computing individual gradients for every task (or a subset in the "Fast" version), which is inherently more expensive than standard backpropagation.

Summary updated

BibTeX
@inproceedings{liu2021conflict,
  author = {Bo Liu and Xingchao Liu and Xiaojie Jin and Peter Stone and Qiang Liu},
  title = {{Conflict-Averse Gradient Descent for Multi-task learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure