Inverted Pyramid Multi-task Transformer for Dense Scene Understanding

Hanrong Ye, Dan XuarXiv 2022 · DOI

Introduction

Dense scene understanding requires models to perform multiple pixel-wise tasks simultaneously, such as semantic segmentation, depth estimation, and boundary detection. Traditionally, Convolutional Neural Networks (CNNs) have dominated this field. However, CNNs are limited by their local receptive fields, making it difficult to capture the long-range dependencies and global context necessary for complex scene interpretation.

While Transformers have revolutionized global modeling in computer vision, they face a "resolution wall." Dense prediction tasks require high-resolution feature maps, but the computational complexity of standard Transformer attention grows quadratically with the number of pixels. InvPT (Inverted Pyramid multi-task Transformer) addresses this by introducing a framework that models global interactions across multiple tasks at high resolutions efficiently.

Architecture and Methodology

InvPT is an end-to-end architecture designed to leverage the global modeling capabilities of Transformers for multi-task learning. The framework consists of three primary stages:

  1. InvPT Transformer Encoder: A shared backbone (such as ViT or Swin) that extracts generic visual features from the input image.
  2. Task-Specific Preliminary Decoders: Simple CNN-based blocks that generate initial, low-resolution feature maps and predictions for each individual task.
  3. Inverted Pyramid Transformer Decoder: The core innovation of the model. Unlike standard decoders that reduce resolution, this decoder progressively increases resolution while performing global reasoning.
The overall InvPT architecture, showing the flow from input image through the encoder and preliminary decoders to the final refined predictions.

The UP-Transformer Block

The Inverted Pyramid Decoder is built upon UP-Transformer Blocks. These blocks perform global self-attention across both spatial positions and different tasks simultaneously. By concatenating the features of all tasks into a single sequence, the Transformer treats "tasks" as tokens, allowing it to learn cross-task dependencies (e.g., how a boundary in one task informs a semantic category in another).

To manage the computational cost of high-resolution attention, InvPT employs several key mechanisms:

  • Strided Attention: Using pooling or convolutions on the Query, Key, and Value matrices to keep memory usage manageable at high resolutions.
  • Attention Message Passing (AMP): This mechanism passes attention maps from lower-resolution stages to higher-resolution ones, ensuring consistent reasoning across scales.
  • Encoder Feature Aggregation (EFA): This injects multi-scale information directly from the encoder into the decoder stages to recover fine-grained spatial details.
Detailed view of the UP-Transformer block, illustrating the Attention Message Passing (AMP) and Encoder Feature Aggregation (EFA) mechanisms.

Key Insights

  • Tasks as Context: InvPT treats different tasks as part of the same global context. This allows the model to learn how tasks interact, such as using depth information to refine semantic boundaries.
  • Efficiency via Downsampled Attention: The authors demonstrate that pixel-to-pixel attention at full resolution is not strictly necessary for global context. Downsampling internal attention components allows the model to scale to resolutions that would otherwise be computationally prohibitive.
  • Inverted Pyramid Design: By using the upsampling step as an opportunity for further global reasoning, InvPT produces sharper and more semantically consistent results compared to simple bilinear interpolation.

Performance and Results

InvPT achieved significant performance gains over previous state-of-the-art (SOTA) CNN-based methods like ATRC and MTI-Net on major benchmarks:

  • NYUD-v2: Outperformed the previous best by 7.23 points (mIoU) in semantic segmentation, with notable improvements in depth and normal estimation.
  • PASCAL-Context: Surpassed the SOTA by 11.36 points (mIoU) in semantic segmentation and 4.68 points in human parsing.
  • Generalization: When tested on the DAVIS video dataset (zero-shot), InvPT produced more stable and accurate predictions than its predecessors, indicating the learning of robust, real-world features.

Limitations and Future Work

Despite its success, InvPT faces challenges such as "task competition," where high-level semantic tasks (like segmentation) see greater gains than lower-level tasks (like boundary detection). Additionally, while efficient, the model remains more computationally expensive than standard multi-task CNNs. Future research may focus on sophisticated loss-balancing techniques and scaling to even larger Transformer backbones.

Summary updated

BibTeX
@misc{ye2022inverted,
  author = {Hanrong Ye and Dan Xu},
  title = {{Inverted Pyramid Multi-task Transformer for Dense Scene Understanding}},
  year = {2022},
  eprint = {2203.07997},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.07997},
}
Figure