Introduction
Multi-Task Learning (MTL) aims to optimize a single neural network to solve multiple tasks simultaneously, such as an autonomous vehicle identifying pedestrians while detecting lane lines. A persistent challenge in MTL is "negative transfer," where conflicting gradients from different tasks degrade overall performance, often leading to results worse than training separate models for each task.
While existing solutions attempt to balance these gradients through heuristics or game-theoretic frameworks (like Nash bargaining), they typically treat gradient vectors as deterministic points. This approach ignores a crucial detail: gradient sensitivity. Not all dimensions of a gradient are equally important. Some parameters may have a narrow range of "good" values (high sensitivity/low uncertainty), while others are more flexible. This paper introduces BayesAgg-MTL, a Bayesian framework that treats task gradients as probability distributions to intelligently navigate these trade-offs.
Methodology
BayesAgg-MTL incorporates Bayesian uncertainty into the gradient aggregation step by treating the weights of the final task-specific layers as random variables. This "Bayesian Last Layer" approach ensures the method remains computationally feasible while providing a principled way to quantify uncertainty.
Inducing Gradient Distributions
Because the gradient is a function of the model weights, the distribution over weights induces a distribution over the gradients themselves.
- For regression tasks, the mean and variance of the gradients are derived analytically.
- For classification tasks, where the likelihood is non-Gaussian, the authors utilize a second-order Taylor expansion (a modified Laplace approximation) and Monte Carlo sampling to estimate the gradient's moments.
Precision-Weighted Aggregation
The core innovation is the uncertainty-aware aggregation rule. Instead of a simple average, BayesAgg-MTL finds a shared update direction that maximizes the joint likelihood of all task gradients. This results in a precision-weighted rule where dimensions with lower variance (higher certainty) receive higher weights.
This high-resolution weighting is unique to each task, each dimension of the gradient, and even each individual data point in a batch. By distinguishing between "strict" dimensions (low uncertainty) and "lenient" ones (high uncertainty), the model ensures that shared updates respect the critical requirements of all tasks.
Experimental Results
The authors evaluated BayesAgg-MTL across four diverse benchmarks: QM9 (molecular properties), CIFAR-MTL (image classification), ChestX-ray14 (medical imaging), and UTKFace (demographic prediction).
Key Findings
- State-of-the-Art Performance: BayesAgg-MTL outperformed all baselines on QM9, CIFAR-MTL, and ChestX-ray14. On the UTKFace dataset, it achieved the best results on two out of three tasks and the best overall average.
- Superior Calibration: Beyond raw accuracy, the Bayesian approach improved model calibration. The model was better at "knowing what it doesn't know," resulting in lower Expected Calibration Error (ECE) compared to deterministic baselines.
- Computational Efficiency: By performing aggregation at the level of the last shared representation, BayesAgg-MTL was substantially faster (up to 8x) than other sophisticated gradient-balancing methods like Nash-MTL or MGDA.
Conclusion
BayesAgg-MTL demonstrates that treating gradients as distributions rather than fixed points allows for a more nuanced and effective aggregation strategy in Multi-Task Learning. By prioritizing "strict" parameter dimensions and utilizing the flexibility of "lenient" ones, the framework achieves superior performance and calibration with significantly lower computational overhead than existing state-of-the-art methods. Future work will explore extending this Bayesian treatment to non-linear task heads and modeling correlations between gradient dimensions.
Summary updated