Feature Selective Transformer for Semantic Image Segmentation

Fangjian Lin, Tianyi Wu, Sitong Wu, Shengwei Tian, Guodong GuoarXiv 2022 · DOI

Introduction

Semantic image segmentation requires a delicate balance between high-level semantic context and low-level spatial detail. To understand a large object, a model needs a wide field of view (low resolution, high semantics), while identifying exact boundaries requires fine-grained spatial information (high resolution, low semantics).

Existing methods typically fuse multi-scale features through progressive local fusion (e.g., Feature Pyramid Networks) or global fusion. However, local fusion can be "near-sighted," failing to capture long-range dependencies, while global fusion often introduces noise by forcing the model to process irrelevant or redundant data across scales.

Comparison of multi-scale feature fusion strategies: (a) local fusion, (b) global fusion, (c) all-to-one fusion, and (d) the proposed selective fusion.

As illustrated above, the authors identify a need for a mechanism that can dynamically select which features from which scales are actually useful for a specific part of the image, moving beyond rigid fusion patterns.

Methods: The FeSeFormer Architecture

The proposed FeSeFormer (Feature Selective Transformer) addresses these limitations through two primary novel components designed to identify and aggregate only the most informative features from across all scales.

Overview of the FeSeFormer architecture, detailing the Scale-level Feature Selection (SFS) and Full-scale Feature Fusion (FFF) modules.

Scale-level Feature Selection (SFS) Module

The SFS module acts as an intelligent filter. It flattens multi-scale features into a sequence and uses a Multi-Layer Perceptron (MLP) to predict "importance scores." To make this selection process differentiable and trainable end-to-end, the authors employ the Gumbel-Softmax trick. This allows the model to learn to "pick" a subset of informative features for each scale while discarding the rest.

Full-scale Feature Fusion (FFF) Module

Once the best features are selected, the FFF module uses Multi-head Cross-Attention (MCA) to adaptively fuse them. Unlike standard self-attention, MCA allows a query at one scale to look across the selected "keys" and "values" from all other scales simultaneously. To handle the high computational cost of attention on large images, an efficient variant uses a projection mechanism to map long feature sequences into shorter, compact representations before fusion.

Key Insights

  • Selective Attention is Better than Total Attention: By forcing the model to choose a subset of features (controlled by a "ratio loss"), the model learns to focus on complementary information rather than being overwhelmed by redundant data.
  • Cross-Scale Synergy: Visualizations reveal that high-level semantic features (identifying what an object is) tend to select low-level features (identifying where edges are) to refine boundaries.
  • Differentiable Sparsity: Using Gumbel-Softmax turns a discrete selection into a gradient-friendly operation, allowing selection logic to be optimized alongside the segmentation task.

Experimental Results

FeSeFormer was evaluated on four major benchmarks: ADE20K, Cityscapes, PASCAL Context, and COCO-Stuff 10K. It consistently outperformed existing state-of-the-art (SOTA) models:

  • ADE20K: Achieved 54.43% mIoU, surpassing models like SegFormer and Segmenter.
  • Cityscapes: Reached 84.46% mIoU using multi-scale testing.
  • PASCAL Context: Achieved 58.91% mIoU.
  • Efficiency: The efficient projection variant significantly reduced memory overhead at higher resolutions. On PASCAL Context, the SFS and FFF modules improved the baseline mIoU from 46.75% to 49.33%.

Conclusion and Future Work

FeSeFormer demonstrates that dynamic, selective feature fusion is superior to rigid, exhaustive fusion for semantic segmentation. While the model relies on certain hyperparameters like the selection ratio, its ability to achieve SOTA results across diverse datasets highlights its robustness. Future work may explore applying this selective fusion mechanism to other dense prediction tasks such as object detection or depth estimation.

Summary updated

BibTeX
@misc{lin2022feature,
  author = {Fangjian Lin and Tianyi Wu and Sitong Wu and Shengwei Tian and Guodong Guo},
  title = {{Feature Selective Transformer for Semantic Image Segmentation}},
  year = {2022},
  eprint = {2203.14124},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.14124},
}
Figure