Introduction
Multi-Task Learning (MTL) aims to improve generalization and efficiency by training a single model to perform multiple tasks simultaneously, such as depth estimation, semantic segmentation, and object detection. However, a persistent challenge in MTL is negative transfer, where gradients from conflicting tasks interfere within a shared encoder, leading to degraded performance compared to single-task models.
To mitigate this, researchers employ Multi-Task Grouping (MTG), which involves clustering similar tasks into groups that share specific encoder branches. While effective, finding the optimal grouping is a combinatorial challenge; for $N$ tasks, there are $2^N$ possible configurations. Existing state-of-the-art methods typically rely on "two-shot" heuristics or pairwise affinity scores, which are computationally expensive and often suffer from objective bias. This paper introduces DMTG, a one-shot differentiable framework that simultaneously identifies optimal task clusters and trains model weights.
The Multi-Task Grouping Problem
Traditional MTG approaches often decouple the grouping phase from the final training phase. They might use pairwise task-affinity scores to guess which tasks should be grouped, then train those groups from scratch. This introduces two major issues:
- Objective Bias: The metrics used to group tasks (e.g., gradient similarity) may not perfectly align with the final objective of minimizing task loss.
- Combinatorial Explosion: As the number of tasks grows, evaluating all potential combinations becomes infeasible.
DMTG addresses these by treating grouping as a differentiable architecture search problem, allowing the model to learn the grouping structure directly through backpropagation.
Methodology: One-Shot Differentiable Grouping
DMTG reformulates the grouping problem as a network pruning task within a single training pass.
1. Network Pruning Formulation
The model begins with $K$ available encoder branches. Initially, every branch is connected to every one of the $N$ task heads, creating a total of $K \times N$ connections. This over-parameterized setup allows the model to explore "high-order task affinity"—observing how all tasks interact within a group simultaneously, rather than relying on isolated pairwise comparisons.
2. Differentiable Categorical Distribution
To determine which task belongs to which encoder branch, the assignment is modeled as a Categorical distribution. Because selecting a discrete group is non-differentiable, DMTG utilizes the Gumbel-Softmax trick. This reparameterization relaxes the discrete choice into a continuous one, enabling the use of standard gradient descent to optimize the grouping assignments alongside the model weights.
3. Convergence to Sparsity
As training progresses, the model gradually "prunes" the $K \times N$ connections. By the end of the training cycle, the continuous relaxation converges to a discrete state where each task is uniquely and exclusively assigned to exactly one encoder branch. This ensures that the final inference complexity remains $O(K)$, maintaining the efficiency benefits of multi-task models.
Experimental Evaluation
The authors evaluated DMTG on two primary benchmarks to test accuracy, speed, and scalability:
- Taskonomy-5: A subset of the Taskonomy dataset focusing on five representative tasks: semantic segmentation, depth estimation, surface normals, keypoints, and edges.
- CelebA: A large-scale facial attribute dataset. The model was tested on CelebA-9 (9 attributes) for speed comparisons and CelebA-40 (all 40 attributes) to demonstrate its ability to handle high-dimensional task spaces.
Key Results
Superior Accuracy
On the Taskonomy-5 benchmark, DMTG demonstrated significant performance gains. It reduced total loss by 22% compared to a standard shared-encoder (Naive MTL) and by 13% compared to training each task independently (Single Task Learning). This suggests that the learned groups successfully leveraged positive transfer while avoiding the interference typical of naive sharing.
Efficiency and Speed
DMTG offers a massive speedup over previous state-of-the-art methods like HOA or TAG. On the CelebA-9 dataset, DMTG completed its one-shot training in approximately 1 hour. In contrast, HOA required over 18 hours on identical hardware to achieve its grouping results. This efficiency stems from avoiding the multi-stage "train-evaluate-group" cycle.
Scalability
While many grouping heuristics become computationally prohibitive as $N$ increases, DMTG successfully scaled to the full 40 tasks of the CelebA dataset. It consistently improved performance across the board, proving that differentiable grouping is a viable strategy for large-scale multi-task systems.
Discussion and Limitations
By aligning the grouping objective with the training objective, DMTG finds clusters that are inherently easier to optimize. However, the method is not without limitations:
- Gumbel-Softmax Bias: The continuous approximation of discrete choices introduces a small amount of bias, and the model's performance can be sensitive to the "temperature" parameter used in the Gumbel-Softmax function.
- Memory Overhead: The initial training phase requires $K \times N$ task heads. If the task-specific heads are memory-intensive, this can create a bottleneck during the early stages of training before pruning occurs.
Future work may involve exploring more memory-efficient strategies for the initial over-parameterized phase and investigating alternative differentiable optimizers to further reduce the bias inherent in discrete variable relaxation.
Summary updated