DeGMix: Efficient Multi-Task Dense Prediction with Deformable and Gating Mixer

Yangyang Xu, Yibo Yang, Bernard Ghanem, Lefei Zhang, Bo Du, Jun Zhu

TL;DR

DeGMix is a novel multi-task learning (MTL) framework that unifies the local spatial efficiency of deformable CNNs with the global reasoning of Transformers for dense prediction tasks. By using task-specific "deformed features" as queries in a gating transformer decoder, it achieves state-of-the-art accuracy on benchmarks like NYUD-v2 while requiring up to 4.3x fewer parameters than competing models.

What Problem Does This Paper Address?

In computer vision, Multi-Task Learning (MTL) aims to perform several dense prediction tasks (like semantic segmentation, depth estimation, and boundary detection) using a single model. The challenge lies in balancing two architectural strengths:

  1. CNNs, which are excellent at capturing local spatial patterns but struggle with long-range dependencies.
  2. Transformers, which excel at global modeling but are computationally expensive and often overlook task-specific local details.

Existing hybrid models often fail to effectively select task-relevant features or introduce unnecessary complexity. The authors of DeGMix sought a principled way to combine these architectures to inherit both local sensitivity and global reasoning without the massive overhead typical of large-scale Transformer models.

Methods

DeGMix adopts a non-shared encoder-decoder architecture designed for efficiency and task awareness.

1. Deformable Mixer Encoder

Instead of standard convolutions, the encoder uses a Deformable Mixer. It consists of:

  • Channel-aware mixing: A 1x1 convolution that allows communication between different channels.
  • Spatial-aware deformable convolution: This learns offsets to sample informative spatial locations dynamically, acting as a sparse, efficient alternative to full self-attention.
  • Shared Spatial Gating (SSG): A novel layer that applies a gating mechanism to refine features, highlighting informative regions across all tasks.

2. Task-aware Gating Transformer Decoder

The decoder performs task-specific predictions through two main blocks:

  • Task Interaction Block: It concatenates features from all tasks and uses multi-head self-attention (MHSA) to model cross-task dependencies.
  • Task Query Gating Block: This is a key innovation. Instead of using generic learnable query tokens, DeGMix uses the deformed features from the encoder as queries. These queries interact with the fused task features via attention and spatial gating to dynamically select the most relevant information for each specific task.
The overall architecture of DeGMix, showing the flow from the feature extractor to the deformable mixer encoder and the task-aware gating transformer decoder.

Datasets

The authors evaluated DeGMix on three standard dense prediction benchmarks:

  • NYUD-v2: 4 tasks (Semantic Segmentation, Depth, Surface Normals, Boundary Detection).
  • PASCAL-Context: 5 tasks (Semantic Segmentation, Human Part Segmentation, Saliency, Surface Normals, Boundary Detection).
  • Cityscapes: 2 tasks (Semantic Segmentation, Depth Estimation).
  • DAVIS: Used for qualitative evaluation of generalization performance.

Key Insights and Ideas

  • Deformed Features as Queries: By using the output of the deformable encoder as queries in the Transformer decoder, the model naturally disentangles task-specific features from the shared global context. This increases "task awareness" compared to standard Transformer-based MTL.
  • Efficiency through Sparsity: Deformable convolutions provide a flexible receptive field that mimics the global reach of Transformers but at a much lower computational cost (GFLOPs).
  • The Power of Gating: The Shared Spatial Gating (SSG) mechanism ensures that only task-relevant information is propagated through the network, which the authors show is crucial for high-quality, task-specific outputs.
Fig. 1. Accuracy-to-Parameter trade-off on NYUD-v2 dataset. Our DeGMix model can outperform existing MTL methods by a large margin while maintaining an optimal balance between accuracy and model parameters.

Key Results

DeGMix consistently outperforms both CNN-based and Transformer-based state-of-the-art (SOTA) models:

  • Superior Accuracy: On NYUD-v2 using a Swin-L backbone, DeGMix achieved 57.55 mIoU in semantic segmentation, outperforming the previous best method by +5.2 mIoU.
  • Parameter Efficiency: As shown in Figure 1, DeGMix achieves better performance than InvPT++ while using 4.3x fewer parameters.
  • Downstream Performance: In fine-tuning experiments on PASCAL-Context, DeGMix achieved higher accuracy than a fully fine-tuned MTL model while reducing trainable parameters by 9.39x.
  • Generalization: Qualitative results on the DAVIS dataset show that DeGMix produces sharper boundaries and more coherent predictions in complex scenes compared to competitors like ATRC.
Comparison of MTL models on NYUD-v2. DeGMix (Ours) shows strong gains across all metrics compared to baselines.

Limitations and Future Work

The authors acknowledge that while DeGMix is efficient, its parameter and computational costs still scale with the number of tasks and the depth of the network.

Future directions include: * Exploring even more efficient designs, such as fine-tuning only specific subsets of the network for new tasks. * Investigating ways to further reduce complexity when scaling to a very large number of simultaneous tasks.

Summary updated

BibTeX
@misc{xu2023degmix,
  author = {Yangyang Xu and Yibo Yang and Bernard Ghanem and Lefei Zhang and Bo Du and Jun Zhu},
  title = {{DeGMix: Efficient Multi-Task Dense Prediction with Deformable and Gating Mixer}},
  year = {2023},
  eprint = {2308.05721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.05721},
}
Figure