Abstract
Multi-task learning (MTL) aims to improve efficiency and performance by solving multiple computer vision tasks simultaneously. However, traditional CNN-based MTL often underperforms relative to single-task learning (STL) due to limited receptive fields and task interference. We present MTFormer, a fully Transformer-based MTL framework. MTFormer utilizes a shared Swin-Transformer encoder and decoder to learn universal feature representations. To further enhance task synergy, we introduce Cross-Task Attention (CTA) for inter-task feature refinement and Cross-Task Contrastive Learning as a self-supervised auxiliary loss. MTFormer consistently outperforms STL baselines and existing state-of-the-art MTL methods on NYUD-v2 and PASCAL VOC datasets while requiring significantly fewer parameters.
Introduction
MTL is theoretically more efficient than training separate models for tasks like depth estimation and semantic segmentation. Yet, CNN-based architectures frequently encounter a "performance drop," where the joint model performs worse than its single-task counterparts. Researchers often mitigate this with complex, task-specific decoders, which negate efficiency gains. MTFormer addresses this by replacing the CNN backbone with Transformers, which possess the global receptive field and capacity necessary for multi-objective optimization.
Methods
MTFormer is built upon three core innovations:
- Shared Transformer Backbone: Unlike models that only share the encoder, MTFormer employs a shared Swin-Transformer encoder and a shared transformer decoder. This deep sharing facilitates the learning of a highly expressive, universal feature space.
- Cross-Task Attention (CTA): Standard self-attention is restricted to intra-task features. CTA modifies this by merging attention maps across tasks. For instance, spatial boundaries from saliency detection can refine semantic segmentation predictions, allowing the model to leverage cross-domain cues.
- Cross-Task Contrastive Learning: This auxiliary loss treats different tasks of the same image as different "views" of the same scene. The model is trained to maximize similarity between these representations for the same image while distinguishing them from representations of different images.
Key Results
MTFormer was evaluated on the NYUD-v2 (indoor scenes) and PASCAL VOC (complex scenes) benchmarks.
- Performance Gains: On NYUD-v2, MTFormer achieved a +2.87% gain over STL, contrasting with a -2.61% drop for CNN-based MTL baselines.
- Efficiency: MTFormer reduced the parameter count by nearly 50% (62.45M vs. 114.26M) compared to separate single-task Transformer models while maintaining superior accuracy.
- State-of-the-Art (SOTA): MTFormer outperformed existing SOTA MTL methods, including MTI-Net and PAD-Net, across both datasets.
- Transferability: In few-shot scenarios on PASCAL (using only 1% of labels for one task), MTFormer improved performance by over 319% compared to STL by effectively transferring knowledge across tasks.
Conclusion
MTFormer demonstrates that Transformers are inherently better suited for MTL than CNNs. By combining deep architectural sharing with explicit cross-task reasoning, the framework achieves state-of-the-art performance with high efficiency. Future work will explore scaling to a larger number of tasks and extending the shared representation logic to multi-modal vision-language tasks.
Summary updated