AutoMTL: A Programming Framework for Automating Efficient Multi-Task Learning

Lijun Zhang, Xiao Liu, Hui Guan

TL;DR

AutoMTL is the first programming framework that automates the design of efficient Multi-Task Learning (MTL) models. By providing a source-to-source compiler and a "stretchable" search space, it allows researchers to transform any standard CNN backbone into a high-performance multi-task model that balances accuracy and memory efficiency—all without the need for manual re-implementation.

What Problem Does This Paper Address?

Multi-Task Learning (MTL) is the "holy grail" for resource-constrained AI applications, such as mobile apps or autonomous vehicles. Instead of running five different neural networks for five different tasks (like object detection, depth estimation, and segmentation), MTL shares parameters across tasks to save memory and computation.

However, two major hurdles prevent its widespread adoption:

  1. The Architecture Dilemma: Deciding which layers to share and which to keep task-specific is a combinatorial nightmare. If you share too much, tasks interfere with each other (negative transfer); if you share too little, you lose efficiency.
  2. The Automation Gap: Current state-of-the-art methods are "hard-coded" to specific models. If a developer wants to switch from a ResNet to a MobileNet, they often have to spend 20–40 hours manually re-implementing the MTL logic.

Methods

The authors introduce AutoMTL, a framework consisting of three core components designed to automate the MTL pipeline:

  • MTS-Compiler (Multi-Task Supermodel Compiler): This source-to-source compiler takes a standard CNN (in PyTorch or Prototxt) and a list of tasks. It automatically parses the computation graph and converts every operator into a Virtual Computation Node (VCN).
  • Stretchable Architecture Search Space: Unlike previous methods that try to "squeeze" tasks into a fixed backbone, AutoMTL’s VCNs allow each task to choose between three options for every single operator: use the shared backbone operator, use a task-specific copy (increasing model capacity to avoid interference), or skip the operator entirely (improving inference speed).
  • Differentiable Search & Regularization: To find the best sharing pattern, the framework uses a gradient-based search with Gumbel-Softmax. A novel policy regularization term encourages the model to share parameters in the early layers (where features are more general) and branch out in later layers.
The AutoMTL framework pipeline, showing the transformation from a standard backbone to a multi-task supermodel via the MTS-Compiler.

Datasets

The framework was rigorously evaluated on three major MTL benchmarks across various backbones (Deeplab-ResNet34, MobileNetV2, and MNasNet):

  • CityScapes: 2 tasks (Semantic Segmentation, Depth Estimation).
  • NYUv2: 3 tasks (13-class Segmentation, Depth, Surface Normals).
  • Tiny-Taskonomy: 5 tasks (Segmentation, Surface Normals, Depth, Keypoint Detection, Edge Detection).

Key Insights and Ideas

  • Operator-Level Granularity: Most prior work looks at "blocks" of layers. AutoMTL looks at individual operators. This finer grain allows for much more flexible sharing patterns and is the key to why the framework can support any CNN backbone automatically.
  • The "Stretchable" Advantage: By allowing task-specific copies, AutoMTL can actually increase the model size slightly if the tasks are highly divergent. This prevents the performance degradation often seen in "hard-sharing" MTL models where tasks compete for the same parameters.
  • Decoupling Search from Implementation: The MTS-Compiler effectively separates the logic of how to search for an architecture from the definition of the backbone. This reduces the "re-implementation tax" from dozens of hours to just 0.6 seconds of compilation time.
Learned policy distributions and the resulting multi-task architecture, illustrating how tasks share or branch at different layers.

Key Results

  • Superior Performance: On the complex 5-task Taskonomy benchmark, AutoMTL achieved a relative performance gain 13.6% higher than DEN and 3.1% higher than AdaShare, while maintaining a smaller memory footprint than independent models.
  • Efficiency: AutoMTL models achieved shorter inference times than independent models because they intelligently reuse early-layer computations and utilize skip connections.
  • Search Speed: The architecture search process is roughly 13x to 133x faster than general-purpose NAS frameworks like FBNetV5, making it highly practical for real-world development cycles.
  • Generalizability: The framework worked out-of-the-box for MobileNetV2 and MNasNet, achieving significantly better accuracy-to-parameter trade-offs than vanilla multi-task baselines.

Limitations and Future Work

Currently, AutoMTL is designed specifically for vision tasks and CNN backbones. Extending this to other domains, like Natural Language Processing (NLP) and Transformer architectures, is a logical next step. Additionally, while AutoMTL focuses on architecture design, it doesn't explicitly solve the problem of loss balancing (how to weigh different task losses during training). However, existing loss-balancing algorithms can be easily layered on top of the AutoMTL framework.

Paper Link: AutoMTL on GitHub

Summary updated

BibTeX
@inproceedings{zhang2022automtl,
  author = {Lijun Zhang and Xiao Liu and Hui Guan},
  title = {{AutoMTL: A Programming Framework for Automating Efficient Multi-Task Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ZadJl1LEakG},
}
Figure