CoMaL: Conditional Maximum Likelihood Approach to Self-supervised Domain Adaptation in Long-tail Semantic Segmentation

Thanh-Dat Truong, Chi Nhan Duong, Pierce Helton, Ashley Dowling, Xin Li, Khoa LuuarXiv 2023 · DOI

Abstract

Semantic segmentation models often struggle when transitioning from synthetic training data to real-world environments, particularly with "long-tail" classes—rare objects like bicycles or riders that are frequently overlooked. CoMaL (Conditional Maximum Likelihood) addresses these challenges by moving beyond the traditional assumption of pixel independence. By employing an autoregressive framework with Multi-Head Attention (MHA) and bijective mapping (normalizing flows), CoMaL learns the structural dependencies of a scene. This approach allows the model to enforce global consistency and class balance, achieving state-of-the-art results in adapting models from synthetic datasets like SYNTHIA and GTA5 to real-world cityscapes.

Introduction

In semantic segmentation, the objective is to assign a categorical label to every pixel in an image. Despite advancements in deep learning, two primary hurdles persist: the Domain Gap and the Long-Tail Problem. The domain gap occurs when a model trained on synthetic data (e.g., GTA5) fails to generalize to real-world streets (e.g., Cityscapes) due to stylistic differences. Simultaneously, the long-tail problem arises because urban scenes are dominated by majority classes like "road" and "building," causing models to ignore critical but rare "tail" classes like "traffic signs."

Most existing Unsupervised Domain Adaptation (UDA) solutions assume pixel independence, treating each pixel's label as isolated. This ignores the inherent "grammar" of a scene—for instance, a sidewalk typically borders a road. CoMaL leverages these structural dependencies to improve segmentation accuracy and reliability.

Methods

The CoMaL framework introduces two primary loss functions designed to enforce structural consistency and mitigate class imbalance:

  • BiMaL (Bijective Maximum Likelihood): Rather than focusing solely on pixel-wise accuracy, BiMaL utilizes a bijective mapping (normalizing flow) to project entire segmentation maps into a latent space. This enables the model to learn the global probability distribution of valid scene layouts, penalizing predictions that are structurally nonsensical.
  • CoMaL (Conditional Maximum Likelihood): This core innovation uses an autoregressive framework with a Multi-Head Attention (MHA) network. By masking specific pixels during training and requiring the model to predict them based on surrounding context, the model learns the conditional dependencies between different object classes.
  • Class-Balanced Learning: The authors mathematically derive a method to simulate an ideal, balanced dataset. This allows for re-weighting gradients during training, ensuring the model allocates sufficient attention to small, rare objects compared to large, frequent ones.
The CoMaL architecture utilizes bijective mapping and conditional likelihood to bridge the domain gap between synthetic source data and real-world target data.

Experiments and Results

The researchers evaluated CoMaL on standard "Synthetic-to-Real" benchmarks, using SYNTHIA and GTA5 as source domains and Cityscapes as the target domain. They tested the method across various backbones, including ResNet-101 and modern Transformer architectures like SegFormer.

Key Findings

CoMaL represents a significant advancement over previous state-of-the-art (SOTA) methods:

  • Performance Leap: On the SYNTHIA → Cityscapes benchmark using a ResNet-101 backbone, CoMaL achieved a 57.8% mIoU, outperforming the previous best method (SAC) by 5.2%.
  • Tail Class Improvement: Gains on rare classes were particularly notable. On SYNTHIA, accuracy for the "Bus" class increased by 19.0%, and "Motorbike" by 12.2%.
  • Scalability: When paired with a Transformer backbone (DAFormer), CoMaL reached a 69.9% mIoU, demonstrating that the method scales effectively with more powerful architectures.
Performance comparison on the Cityscapes dataset using a ResNet-101 backbone, showing CoMaL's significant improvement over prior UDA methods.

Conclusion

CoMaL demonstrates that structural consistency is a powerful signal for domain adaptation. By moving away from entropy minimization—which can lead to high-confidence but incorrect predictions—and toward structural learning, CoMaL ensures that model confidence is tied to realistic scene layouts. While the autoregressive attention network adds computational overhead, the dramatic improvements in long-tail class recognition provide a vital step forward for safety-critical applications like autonomous driving. Future work may explore more efficient masking strategies and adaptation between different real-world domains.

Summary updated

BibTeX
@misc{truong2023comal,
  author = {Thanh-Dat Truong and Chi Nhan Duong and Pierce Helton and Ashley Dowling and Xin Li and Khoa Luu},
  title = {{CoMaL: Conditional Maximum Likelihood Approach to Self-supervised Domain Adaptation in Long-tail Semantic Segmentation}},
  year = {2023},
  eprint = {2304.07372},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.07372},
}
Figure