Abstract
GradNorm (Chen et al., 2018) is a broadly used gradient-based approach for training multitask networks, where different tasks share, and thus compete during learning, for the network parameters. GradNorm eases the fitting of all individual tasks by dynamically equalizing the contribution of each task to the overall gradient magnitude. However, it does not prevent the individual tasks’ gradients from conflicting, i.e., pointing towards opposite directions, and thus resulting in a poor multitask performance. In this work we propose Rotograd, an extension to GradNorm that addresses this problem by dynamically homogenizing not only the gradient magnitudes but also their directions across tasks. For this purpose, Rotograd adds a layer of task-specific rotation matrices that aligns all the task gradients. Importantly, we then analyze Rotograd (and its predecessor) through the lens of game theory, providing theoretical guarantees on the algorithm stability and convergence. Finally, our experiments on several real-world datasets and network architectures show that Rotograd outperforms previous approaches for multitask learning.
Introduction
In multitask learning (MTL), a single neural network backbone is trained to solve several tasks simultaneously. Ideally, tasks should collaborate, but in practice, they often compete for the backbone's limited resources. This competition typically manifests as gradient interference, which can lead to "negative transfer" where the performance on individual tasks degrades compared to single-task training.
The Challenge: Gradient Interference
Gradient interference in MTL manifests in two primary ways:
- Magnitude Disparity: One task might have much larger gradients than others, effectively "bullying" the optimizer into ignoring smaller tasks.
- Conflicting Directions: Two tasks might require shared parameters to move in opposite directions. Their gradients cancel out, leaving the backbone unable to learn features useful for either.
While previous methods like GradNorm addressed magnitude disparity, they ignored directional conflicts. Rotograd aims to fix both, ensuring gradients are fully "homogenized" across all tasks.
Methodology: Rotograd
Rotograd extends the GradNorm algorithm by adding a layer of task-specific rotation matrices ($R_k$) and translation vectors ($d_k$) at the final shared representation ($Z$) of the network. This architecture allows the model to "re-interpret" the same shared features in different ways for different tasks.
Gradient Homogenization via Rotation
Rotograd treats the task weights and rotation matrices as "leaders" in a Stackelberg game. The leader's goal is to find a rigid transformation (rotation + translation) that aligns each task's gradient with the global average gradient. The authors demonstrate that the optimal rotation can be found approximately using Singular Value Decomposition (SVD), effectively solving a version of the "Orthogonal Procrustes problem" at every training step.
Stability and Convergence
By reinterpreting the training process through game theory, the authors provide a rigorous justification for the algorithm's stability. They prove that as long as the "leader" (the Rotograd parameters) learns more slowly than the "follower" (the network optimizer), the system will converge to a stable equilibrium.
Experimental Results
The authors evaluated Rotograd on several benchmarks, including synthetic 2D regression tasks, a Multitask MNIST variant, and the large-scale ChestX-ray14 dataset.
- Superior Performance: On Multitask MNIST, Rotograd achieved an overall performance gain ($\Delta_m$) of 0.18, significantly outperforming uniform weighting (0.06) and standard GradNorm (0.14).
- Solving Conflicting Gradients: In synthetic tests where gradients were perfectly conflicted, standard MTL failed completely. Rotograd successfully rotated the task spaces to align gradients, allowing the model to reach the global optimum for both tasks.
- Increased Cosine Similarity: Quantitative analysis showed that Rotograd significantly increased the cosine similarity between task gradients during training, moving orthogonal gradients toward a more collaborative alignment.
Conclusion
Rotograd provides a robust solution to the problem of gradient interference in multitask learning. By homogenizing both the magnitude and direction of task-specific gradients through latent space rotations, it ensures that multiple tasks can effectively share a single backbone without canceling each other's progress. The framework's game-theoretic foundations further ensure training stability, making it a powerful tool for complex MTL architectures.
Summary updated