Abstract
AutoTaskFormer is a novel one-shot Neural Architecture Search (NAS) framework designed to automate the creation of Vision Transformers (ViTs) for Multi-Task Learning (MTL). By optimizing both the network "skeleton" (task-sharing pathways) and "cells" (internal block parameters), the framework mitigates negative transfer and eliminates the need for manual architecture tuning. Evaluated on benchmarks like Taskonomy and Cityscapes, AutoTaskFormer consistently outperforms state-of-the-art handcrafted models while offering superior efficiency and generalization.
What Problem Does This Paper Address?
In real-world AI applications, such as autonomous driving, models must execute multiple tasks simultaneously—for example, lane detection, pedestrian recognition, and depth estimation. Multi-Task Learning (MTL) addresses this by sharing features across tasks to save memory and potentially improve performance through shared knowledge.
However, designing MTL architectures is notoriously difficult. Researchers must manually decide which layers should be shared and which should be task-specific. Incorrect sharing patterns lead to negative transfer, where tasks interfere with and degrade each other's performance. While NAS has automated single-task design, applying it to MTL is challenging because the search space is exponentially larger and standard weight-sharing techniques often lead to massive task interference during training.
Methods
AutoTaskFormer introduces a two-level NAS approach to navigate these complexities:
- Macro Search (Skeleton Search): This determines the "pathway" each task takes through the network. Using a branched transformer design, tasks can exit the shared backbone at different stages. The optimal sharing patterns are learned via backpropagation using the Gumbel-softmax trick.
- Micro Search (Cell Search): Within each transformer block, the framework searches for optimal hyperparameters, including embedding dimensions, attention heads, MLP ratios, and window sizes.
The training pipeline involves a "supernet" containing all possible sub-architectures. Once the supernet is trained, an evolutionary algorithm identifies the best-performing subnets that fit specific resource constraints (e.g., a 40M parameter limit).
Key Insights and Ideas
- Task-Conditional Distribution: Standard NAS usually samples subnets uniformly during training. AutoTaskFormer argues that for MTL, sampling must be based on a task-conditional distribution. This ensures that the supernet learns weights that are compatible across tasks, significantly reducing interference.
- The Importance of the Skeleton: The paper demonstrates that the branching structure—where a task exits the shared backbone—is just as critical as the internal block configuration.
- Automated Flexibility: Unlike handcrafted models with fixed hierarchies, AutoTaskFormer can produce thousands of unique, well-trained models from a single supernet, ranging from tiny, efficient models to large, high-performance ones.
Key Results
On the 16-task Taskonomy benchmark, AutoTaskFormer demonstrates a clear advantage over established architectures.
- Superior Performance: AutoTaskFormer outperformed the baseline Swin Transformer by 3.5%–3.7% in relative performance ($\Delta_T$) and beat recent state-of-the-art models like CSwin and MViTv2 by 2.5%–3.6%.
- Efficiency: The framework identified a ~5M parameter model for 2D keypoint estimation that performed as well as much larger handcrafted models.
- Generalization: When the backbone was frozen and applied to new tasks (like image inpainting), AutoTaskFormer features proved more robust and transferable than those from manually designed transformers.
Limitations and Future Work
While AutoTaskFormer marks a significant step forward, it still relies on pre-defined task loss weights ($\lambda_k$), which remains a separate optimization challenge. Additionally, while the framework focuses heavily on the encoder and branching skeleton, future work could extend NAS to the architecture of task-specific decoders. Finally, while more efficient than training models from scratch, training a 16-task supernet on large datasets still requires substantial computational resources.
Summary updated