TL;DR
Finding the right loss weights in multi-task learning usually requires an expensive hyperparameter search or complex, slow dynamic optimization. This paper introduces AutoScale, a simple two-phase framework that automatically identifies optimal fixed task weights within a single training run by optimizing key multi-task optimization metrics. It matches or beats state-of-the-art methods while running 2 to 3 times faster.
What Problem Does This Paper Address?
Multi-Task Learning (MTL) uses a single neural network to solve multiple tasks simultaneously, saving computation and enabling tasks to share learned features. However, training multiple tasks at once often leads to optimization conflicts. For instance, one task might dominate the gradients due to its scale (gradient dominance), or different tasks might pull the network parameters in opposing directions (gradient conflict).
To solve this, researchers developed Multi-Task Optimization (MTO) algorithms that dynamically manipulate gradients or losses during training. While effective, these methods add significant computational overhead.
Alternatively, simple linear scalarization—minimizing a fixed, weighted sum of task losses—can perform just as well or better, but only if you find the perfect weights. Finding these weights typically requires an exhaustive hyperparameter search (like grid search), which means training the model completely from scratch dozens of times. The authors set out to bridge this gap: How can we automatically find optimal fixed weights within a single training run?
Methods
The authors propose AutoScale, a two-phase framework that eliminates the need for expensive hyperparameter sweeps by connecting linear scalarization directly to MTO metrics:
- Exploration Phase: The early part of training is divided into short, disjoint windows. The model trains normally using weights from the previous window while collecting gradient and loss statistics. At the end of each window, AutoScale solves a quick optimization problem to update the weights for the next window, aiming to minimize a specific MTO-based cost function.
- Linear Scalarization Phase: After a set fraction of training (e.g., 20%), AutoScale averages the weights from the final exploration windows and fixes them. The model then finishes training using standard, highly efficient linear scalarization.
The authors evaluated three distinct MTO cost functions to guide AutoScale:
- Low Condition Number (Low Cond.): Minimizes the condition number of the gradient matrix to stabilize training.
- Gradient Magnitude Similarity (Equal $|g|$): Penalizes high variance in task gradient magnitudes to prevent any single task from dominating.
- Loss Similarity (Equal $|l|$): Dynamically balances the scales of the task losses.
Datasets
AutoScale was evaluated across three distinct multi-task benchmarks:
- CityScapes: A street-view dataset evaluated on 3 tasks: semantic segmentation, instance segmentation, and disparity estimation.
- NYUv2: An indoor RGB-D dataset evaluated on 3 tasks: depth estimation, semantic segmentation, and surface normal estimation.
- NuScenes: A massive, large-scale autonomous driving dataset. The authors introduce this as a new benchmark for MTOs, focusing on 3D object detection and bird's-eye-view (BEV) map segmentation. NuScenes requires roughly 156 training hours per run, making traditional grid searches virtually impossible.
Key Insights and Ideas
- The Hidden Link: Well-performing fixed weights in linear scalarization aren't random; they consistently align with specific MTO metrics. High-performing weights naturally yield high gradient magnitude similarity, low condition numbers (approaching 1), and balanced relative loss scales.
- Not All Metrics Matter Equally: While gradient magnitude and condition numbers strongly correlate with final performance, other metrics—like the loss descending rate—show weak or inconsistent correlations with model quality.
- Interdependence: Optimizing for one metric (like condition number) naturally guides other metrics into favorable trends. Conversely, optimizing purely for loss scale can introduce harsh fluctuations in gradient metrics early in training, explaining why the Equal $|l|$ variant performs slightly worse than Low Cond.
Key Results
- Top-Tier Performance: AutoScale (particularly the Low Cond. variant) consistently ranks among the top-performing methods across all datasets. On the massive NuScenes benchmark, it even outperformed the best weights discovered via an expensive 20-trial grid search.
- Massive Speedups: Because AutoScale spends the majority of its time doing basic linear scalarization rather than complex gradient manipulation, it is 2–3× faster than state-of-the-art MTO methods like PCGrad, MGDA, and FairGrad.
Limitations and Future Work
The authors note that MTO metrics are highly interrelated and influence each other in complex ways. While AutoScale successfully navigates this, a promising direction for future work is to more deeply explore this interdependence to design even more robust, multi-metric alignment strategies. Additionally, while AutoScale reduces weight-tuning overhead, it still introduces minor hyperparameters of its own, such as the exploration phase duration ($\alpha$) and window size ($\tau$), though defaults proved stable across all tested datasets.
Summary updated