TL;DR
This paper introduces DTME-MTL, a novel framework that tackles "negative transfer" in multi-task learning (MTL) for transformers by dynamically manipulating token representations. By analyzing gradient conflicts in the token space, DTME-MTL adaptively modulates or expands tokens, significantly improving performance with minimal computational overhead.
What Problem Does This Paper Address?
Multi-task learning (MTL) aims to train a single model for multiple tasks simultaneously, offering efficiency and improved generalization. However, a common challenge is "negative transfer," where learning one task can actually degrade performance on another. This often arises from conflicting objectives between tasks. While pre-trained transformers have shown great promise in MTL, their rigid structure and fixed capacity limit their ability to adapt to the varying needs of different tasks. Existing methods to mitigate negative transfer either increase model size (making pre-training benefits moot) or are inefficient by directly manipulating parameters. This paper addresses the need for an efficient, adaptive approach that leverages pre-trained transformers without excessive parameter growth.
Methods
The core of DTME-MTL lies in its innovative approach to analyzing and resolving gradient conflicts within the token space of transformer networks, rather than directly in the parameter space.
- Token Space Definition: For each layer of a transformer, the method defines a vector space based on the uncentered covariance of the shared tokens. Singular Value Decomposition (SVD) is then used to decompose this space into its "range space" and "null space."
- Gradient Conflict Categorization: Task-specific gradients are projected onto these range and null spaces. Conflicts are then categorized into two types:
- Range Space Conflicts: Occur when task-specific gradients in the range space are orthogonal or opposing (dot product ≤ 0).
- Null Space Conflicts: Occur when task-specific gradients in the null space are orthogonal or opposing.
- Adaptive Resolution: Based on the conflict type:
- Token Modulation (for Range Space Conflicts): An affine transformation is applied to the shared tokens. This effectively "rotates" or "scales" existing token representations to resolve conflicts, leveraging the network's existing capabilities.
- Token Expansion (for Null Space Conflicts): New, task-specific tokens are introduced and concatenated with the shared tokens. This expands the feature space, allowing the model to learn new representations to accommodate conflicting gradients that cannot be resolved by modulation alone.
This approach is designed to be an "off-the-shelf" solution that can be seamlessly integrated into existing transformer-based MTL architectures.
Datasets
The paper evaluates DTME-MTL on three standard multi-task datasets:
- NYUD-v2: A dataset for indoor scene understanding, typically involving tasks like semantic segmentation, depth estimation, surface normal estimation, and edge detection.
- PASCAL-Context: Another dataset for scene understanding, often used for tasks like semantic segmentation, parsing, and saliency detection.
- Taskonomy: A comprehensive dataset designed for exploring transfer learning and multi-task learning, encompassing a wide range of visual tasks.
Key Insights and Ideas
- Token Space is Key: The most significant insight is that focusing on gradient conflicts in the token space (intermediate representations) is more effective and efficient than directly manipulating parameters. This allows for adaptive adjustments without the parameter explosion seen in other methods.
- Range vs. Null Space Matters: Differentiating conflicts in the range space (where the network already has some capacity) from the null space (where new capacity might be needed) provides a principled way to apply different adaptation strategies (modulation vs. expansion).
- Modulation for Refinement, Expansion for Novelty: Token modulation is akin to fine-tuning existing features, while token expansion is like adding new "tools" to the network's repertoire. This distinction is crucial for efficient adaptation.
- Early Expansion is Beneficial: The analysis of expansion timing suggests that applying these adaptations earlier in training, especially with pre-trained backbones, yields better results, likely because it guides the learning process more effectively from the start.
- Parameter Space Conflicts Can Be Misleading: The paper hints that simply looking at parameter space gradient conflicts might not always be the best indicator of negative transfer, and token-level analysis offers a more robust approach.
Key Results
- Significant Performance Gains: DTME-MTL consistently improves multi-task performance across all tasks on NYUD-v2 and PASCAL-Context. For instance, it achieves substantial gains over the "Baseline (MT)" with only a 0.2-0.3% increase in total network parameters.
- Minimal Parameter Overhead: The proposed method is highly parameter-efficient. Integrating DTME-MTL into existing architectures like InvPT and TaskPrompter resulted in parameter increases of only around 0.04-0.05%.
- Efficiency: The computational overhead for calculating token space and gradient conflicts is relatively low, requiring approximately one hour for ViT-L, making it practical for training.
- Comparison to Other Methods: DTME-MTL outperforms various multi-task optimization methods on the Taskonomy benchmark, showing an average improvement of 4.67% per task with a minimal parameter increase. It also demonstrates better performance and avoids the overfitting issues seen with methods like Recon.
- Robustness: Applying TM+TE to layers with higher gradient conflicts consistently yields better results than random selection or focusing on layers with low conflicts, validating the conflict-detection strategy.
Limitations and Future Work
- Timing of Expansion: While early expansion generally performs better, the optimal timing can vary across tasks, suggesting potential for more dynamic or task-aware timing strategies.
- Computational Cost: Although efficient, the SVD computation and gradient conflict analysis do add some overhead, which might be a consideration for extremely resource-constrained environments or very deep networks.
- Future Work: The authors suggest that DTME-MTL can be further integrated with other state-of-the-art MTL architectures, and future work could explore more sophisticated methods for conflict detection and resolution within the token space. The paper also implies that further research into the relationship between token-level and parameter-level conflicts could be beneficial.
Summary updated