Frequency-Based Matcher for Long-Tailed Semantic Segmentation

Shan Li, Lu Yang, Pu Cao, Liulei Li, Huadong Ma

Introduction: The Long-Tail Challenge

In real-world visual environments, object occurrence follows a long-tail distribution: a few "head" classes (like sky or road) appear frequently, while a vast number of "tail" classes (like snowboards or specific architectural elements) are rarely seen. While standard semantic segmentation models excel on balanced datasets, they often fail to recognize these rare categories. This is particularly problematic in safety-critical applications like autonomous driving, where missing a rare obstacle can lead to catastrophic results.

The Bottleneck: One-to-One Matching

Modern transformer-based segmenters, such as Mask2Former, typically employ a "one-to-one" bipartite matching strategy using the Hungarian algorithm. While effective for balanced data, this approach over-suppresses rare classes. Because tail classes appear infrequently, they provide fewer supervision signals. In a set-prediction framework, these rare targets are effectively "outnumbered" by queries, leading to poor optimization for underrepresented categories.

Methodology: Frequency-based Matcher (FM)

To address this, the authors introduce the Frequency-based Matcher (FM). The core innovation is to shift from rigid one-to-one matching to a frequency-aware one-to-many strategy designed specifically for transformer-based segmentation frameworks.

One-to-Many Matching for Rare Classes

FM relaxes the matching constraint for infrequent classes. During training, if a class is identified as rare, the model allows it to match with multiple queries. This ensures that tail classes receive a stronger supervision signal and a more diverse set of gradients, preventing them from being overshadowed by frequent classes.

Dynamic Query Allocation

The number of queries assigned to a specific class is dynamically determined by its frequency. The authors use a specific allocation formula to ensure that as a class becomes rarer, it receives more matching queries, thereby increasing the supervision intensity and gradient diversity for that class.

Benchmarking Long-Tailed Semantic Segmentation

The authors established three new benchmarks to evaluate performance on long-tailed distributions:

  1. ADE20K-Full: A naturally long-tailed scene-centric dataset with 847 classes.
  2. COCO-Stuff-LT: A scene and object-centric dataset (171 classes) created via a greedy sampling algorithm to induce a long-tail distribution.
  3. MHP-v2-LT: A human-centric dataset (59 classes) also constructed using greedy sampling.

These datasets are evaluated using a dual-metric system that tracks mIoU across three frequency splits: frequent, common, and rare, at both the image and pixel levels.

Key Results and Impact

The Frequency-based Matcher (FM) demonstrates significant improvements over baseline models and traditional long-tailed learning techniques:

  • Performance Boost: On ADE20K-Full, FM improved overall mIoU by 1.5 points, with a 3.5-point jump for rare classes. On COCO-Stuff-LT, the gains were even more pronounced, with an 8.3-point increase for rare categories.
  • Plug-and-Play Versatility: FM is architecture-agnostic for transformer-based models. It provided consistent performance lifts when integrated into Group DETR, Mask DINO, and MP-Former.
  • Query-Level Balancing: Unlike loss reweighting, which can be unstable, FM balances supervision at the query level, providing a more robust optimization path for long-tailed data.

Conclusion

By rethinking the matching strategy in transformer-based architectures, the Frequency-based Matcher offers a simple yet powerful solution to the long-tail problem in semantic segmentation. While currently limited to query-based architectures, its success highlights the importance of balancing supervision intensity to ensure that rare but critical objects are not ignored by modern AI models.

Summary updated

BibTeX
@article{li2024frequency,
  author = {Shan Li and Lu Yang and Pu Cao and Liulei Li and Huadong Ma},
  title = {{Frequency-Based Matcher for Long-Tailed Semantic Segmentation}},
  journal = {IEEE Trans. Multimedia},
  year = {2024},
  doi = {10.1109/tmm.2024.3407679},
}
Figure