NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Multi-Task Learning With Multi-Query Transformer for Dense Prediction

Yangyang Xu, Xiangtai Li, Haobo Yuan, Yibo Yang, Lefei Zhang

TL;DR

This paper introduces MQTransformer, a novel multi-task learning framework for dense prediction tasks that leverages multiple task-specific queries within a Transformer architecture. By focusing cross-task interactions at the query level rather than pixel-level, MQTransformer achieves state-of-the-art results on challenging benchmarks while being more computationally efficient.

What Problem Does This Paper Address?

Multi-Task Dense Prediction (MTDP) aims to train a single model to perform multiple dense prediction tasks simultaneously, such as semantic segmentation, depth estimation, and surface normal prediction. Existing methods often rely on complex pipelines, such as multi-modal distillation or intricate task relationship modeling, which can be computationally expensive and difficult to design. While Transformer-based models have shown promise, effectively integrating them into multi-task learning for dense prediction, particularly in a simplified and efficient manner, remains an open challenge. The authors aim to bridge this gap by proposing a more streamlined and effective Transformer-based approach.

Methods

The core innovation is the MQTransformer, which comprises three key components:

  • Shared Encoder: This component takes both task-specific image features (extracted by a backbone network) and task-relevant queries as input. It encodes the task-relevant queries using the image features, effectively learning a task-aware representation for each query.
  • Cross-Task Query Attention Module: This module is designed to facilitate interaction between the task-relevant queries. Instead of comparing pixel-level features across tasks, it operates on the query representations, allowing for efficient reasoning about dependencies between different tasks. This query-level interaction significantly reduces computational complexity compared to pixel-wise attention mechanisms.
  • Shared Decoder: This component takes the refined task-relevant queries and the original task-specific features to generate the final task predictions. The shared nature of the encoder and decoder contributes to the model's efficiency and simplicity.

The authors emphasize that their approach avoids complex pixel-level context computation and instead focuses on query-level interactions, leading to a more efficient and potentially more effective way to learn task relationships.

Datasets

The MQTransformer was evaluated on two standard multi-task dense prediction datasets:

  • NYUD-v2: This dataset is commonly used for indoor scene understanding and includes tasks like semantic segmentation, monocular depth estimation, surface normals prediction, and semantic boundary detection.
  • PASCAL-Context: This dataset focuses on outdoor scenes and includes tasks such as semantic segmentation, human parts segmentation, saliency estimation, surface normals prediction, and semantic boundary detection.

Key Insights and Ideas

  • Query-Level Interaction is Key: The central insight is that focusing cross-task reasoning on learned "queries" representing each task, rather than raw pixel features, is a more efficient and effective approach for multi-task learning.
  • Simplifying Complexity: By moving interaction to the query level, the authors significantly reduce the computational burden and complexity associated with previous multi-task methods.
  • Transformer Adaptability: The work demonstrates the adaptability of Transformer architectures to multi-task dense prediction, showing that they can be integrated effectively without overly complex modifications.
  • Task-Relevant Queries Capture Dependencies: The experimental results suggest that these task-relevant queries are crucial for capturing inter-task dependencies, leading to improved performance across various tasks.

Key Results

The MQTransformer achieved state-of-the-art results on both NYUD-v2 and PASCAL-Context datasets across multiple tasks.

  • NYUD-v2: The model showed consistent gains for different tasks and backbones, outperforming recent work like ATRC [7] with fewer parameters and GFLOPS. Notably, when using the Swin-L backbone, it surpassed the previous best-performing method (InvPT [55]) by +3.08 mIoU on the SemSeg task, with significantly fewer GFLOPS and parameters.
  • PASCAL-Context: MQTransformer achieved state-of-the-art results, showing improved prediction accuracy and more fine-grained predictions, especially on semantic segmentation and human parts segmentation tasks. Qualitative results visualized in the paper demonstrate better segmentation details and local edges compared to previous methods.
  • Efficiency: The paper highlights the computational efficiency of the MQTransformer, particularly its cross-task query attention module, which has significantly lower GFLOPS compared to methods like ATRC.

Limitations and Future Work

  • Random Initialization of Queries: A limitation acknowledged by the authors is that the task-relevant query features are randomly initialized.
  • Future Directions: The authors propose to generate task-relevant query features using image information in the future, aiming to capture more fine-grained details. They also suggest exploring the potential of task-relevant query features and the Transformer architecture further for MTDP. They also mention that the number of encoder/decoder layers can be kept minimal (depth 1) without significant performance degradation, suggesting a lightweight architecture.

Summary updated

BibTeX
@article{xu2022multi,
  author = {Yangyang Xu and Xiangtai Li and Haobo Yuan and Yibo Yang and Lefei Zhang},
  title = {{Multi-Task Learning With Multi-Query Transformer for Dense Prediction}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2022},
  url = {https://openreview.net/forum?id=rBqHouvWLl},
}
Figure