Vision Transformer Adapters for Generalizable Multitask Learning

Deblina Bhattacharjee, Sabine Süsstrunk, Mathieu Salzmann

Abstract

We introduce the first multitasking vision transformer adapters that learn generalizable task affinities which can be applied to novel tasks and domains. Integrated into an off-the-shelf vision transformer backbone, our adapters can simultaneously solve multiple dense vision tasks in a parameter-efficient manner, unlike existing multitasking transformers that are parametrically expensive. In contrast to concurrent methods, we do not require retraining or fine-tuning whenever a new task or domain is added. We introduce a task-adapted attention mechanism within our adapter framework that combines gradient-based task similarities with attention-based ones. The learned task affinities generalize to the following settings: zero-shot task transfer, unsupervised domain adaptation, and generalization without fine-tuning to novel domains. We demonstrate that our approach outperforms not only the existing convolutional neural network-based multitasking methods but also the vision transformer-based ones.

Introduction

Multi-Task Learning (MTL) aims to solve several vision problems—such as depth estimation, semantic segmentation, and surface normal prediction—using a single unified model. While conceptually powerful, traditional MTL approaches often struggle with high parametric costs, architectural brittleness when facing new domains, and "negative transfer," where learning one task inadvertently degrades performance on another.

Existing transformer-based MTL methods typically rely on handcrafted designs that lack the flexibility to generalize. This research addresses a fundamental question: Can we learn transferable task affinities automatically so a model can adapt to new tasks and domains on the fly?

Conceptual overview of the proposed framework, highlighting its ability to generalize across tasks and domains.

The proposed framework introduces parameter-efficient adapters into a frozen, off-the-shelf transformer backbone. This approach achieves state-of-the-art performance across multiple dense vision tasks while enabling zero-shot transfer and generalization to novel domains without the need for retraining.

Methodology: Vision Transformer Adapters

The core of the architecture is a frozen Swin Transformer backbone, augmented with novel "Vision Transformer Adapters." By keeping the backbone frozen, the model remains parameter-efficient and avoids the catastrophic forgetting often associated with full-model fine-tuning.

Detailed architecture of the multitasking framework, featuring a frozen Swin Transformer backbone and trainable adapter modules.

The framework's effectiveness stems from three primary mechanisms:

  • Task Representation Optimization Algorithm (TROA): A gradient-based method that estimates task influence by analyzing the similarity of their gradients.
  • Task-Adapted Attention (TAA): This mechanism conditions standard self-attention on the task affinities learned by TROA, allowing the model to selectively attend to features relevant to specific tasks based on cross-task synergies.
  • Task-Scaled Normalization (TSN): A specialized layer that balances the disparate numerical scales of different tasks (e.g., continuous depth values vs. discrete segmentation labels), preventing any single task from dominating the learning process.

Experimental Setup and Results

The model was evaluated across a diverse set of benchmarks, including Taskonomy (for task transfer), Cityscapes and NYUDv2 (real-world indoor/outdoor scenes), and synthetic datasets like Synthia and Vkitti2 for domain adaptation.

Key Insights

  • Asymmetric Affinities: Task relationships are often non-mutual. For instance, semantic segmentation significantly aids surface normal prediction, but the inverse relationship is weaker.
  • Synergistic Complexity: Performance across all tasks improved as more geometrical cues (like edges or normals) were introduced, suggesting the model effectively leverages cross-task information.
  • Automated Interaction: Unlike previous methods requiring manual design of task interactions, this framework learns these relationships automatically.

Performance Metrics

  • Superior Generalization: In zero-shot task transfer, the model significantly outperformed baselines, improving depth prediction RMSE on Cityscapes by at least 0.196.
  • Efficiency and Speed: The adapter-based approach uses only 105.7M parameters, significantly fewer than the 300M–450M required by competing CNN and Transformer baselines. Furthermore, training time per epoch was reduced to just 8 minutes, compared to 14–22 minutes for competitors.
  • Novel Domain Robustness: When trained on indoor Taskonomy data and tested on NYUDv2 without fine-tuning, the model achieved a semantic segmentation mIoU of 40.77%, substantially higher than the 33.68% achieved by the previous state-of-the-art (MulT).

Conclusion and Future Work

This work demonstrates that generalizable task affinities can be learned and applied efficiently using vision transformer adapters. While the current model is data-intensive and requires supervised paired data, it sets a new benchmark for flexible, parameter-efficient MTL. Future research will explore extending this framework to unsupervised paradigms and expanding its capabilities to handle multimodal inputs such as text and video.

Summary updated

BibTeX
@inproceedings{bhattacharjee2023vision,
  author = {Deblina Bhattacharjee and Sabine Süsstrunk and Mathieu Salzmann},
  title = {{Vision Transformer Adapters for Generalizable Multitask Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=oW5GYGNOuq},
}
Figure