NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generative Transformer for Accurate and Reliable Salient Object Detection

Yuxin Mao, Jing Zhang, Zhexiong Wan, Yuchao Dai, Aixuan Li, Yunqiu Lv, Xinyu Tian, Deng-Ping Fan, Nick Barnes

TL;DR

This paper introduces a generative transformer framework for Salient Object Detection (SOD) that delivers both high segmentation accuracy and reliable uncertainty estimation. By combining a hierarchical Swin Transformer backbone with a novel inferential Generative Adversarial Network (iGAN) driven by Langevin dynamics, the model overcomes the common "over-confidence" trap of deep networks while preserving fine structural details across fully and weakly supervised tasks.

What Problem Does This Paper Address?

Salient Object Detection (SOD) aims to locate and segment the most eye-catching regions in an image, mimicking human visual attention. While deep learning has pushed this field forward, conventional Convolutional Neural Network (CNN) approaches suffer from two major architectural bottlenecks:

  1. Poor Global Context Modeling: CNNs struggle to capture long-range dependencies, often failing when a salient object spans a large portion of the image.
  2. Missing Structure Information: Aggressive downsampling operations (like striding and pooling) cause CNNs to lose fine boundary details early on, which decoders can rarely fully recover.

Beyond architecture, existing deterministic models suffer from over-confidence—they frequently make incorrect predictions with dangerously high certainty. Furthermore, in multimodal settings (RGB-D), depth data collected from different sensors introduces a severe domain gap due to inconsistent depth contrast distributions across datasets.

Visualizing the feature maps of a fine-tuned CNN vs. a Transformer backbone.

Methods

To tackle these issues, the authors propose a generative transformer framework consisting of three core components:

  • Transformer Encoder-Decoder: The authors swap out traditional CNN backbones for a hierarchical Swin Transformer. This allows the network to model long-range dependencies via self-attention while preserving precise structural details across multiple feature levels. A lightweight convolutional decoder (only ~1M parameters) aggregates these features.
  • Inferential GAN (iGAN): To measure model reliability, the authors introduce a latent variable model integrated into a GAN. Unlike standard GANs that draw latent variables ($z$) from a fixed Gaussian prior independent of the image, the proposed iGAN infers an input-dependent latent variable from its true posterior distribution. It achieves this using gradient-based Markov Chain Monte Carlo (MCMC), specifically Langevin dynamics. This stochastic attribute allows the model to output meaningful predictive uncertainty maps.
  • Auxiliary Depth Module: For RGB-D saliency detection, a self-supervised depth reconstruction module acts as an auto-encoder. By learning the joint distribution of the RGB image and depth data, it effectively bridges the domain gap between different depth sensors.

The framework is highly versatile and is successfully adapted to both fully supervised and weakly supervised (scribble-annotated) configurations.

Datasets

The authors evaluated their framework across a comprehensive suite of standard benchmarks:

  • Fully Supervised RGB SOD: Trained on the DUTS training dataset (10,553 images) and tested on six datasets: DUTS-test, ECSSD, DUT, HKU-IS, PASCAL-S, and SOD.
  • Weakly Supervised RGB SOD: Trained on DUTS-S using only scribble annotations.
  • RGB-D SOD: Trained on a combination of NJU2K (1,485 images) and NLPR (700 images). Testing was conducted on NJU2K-test, NLPR-test, LFSD, DES, SSB, and SIP.
Global contrast of depth across different benchmark RGB-D datasets, illustrating the domain gap challenge.

Key Insights and Ideas

  • Transformers as Structure Preservers: Unlike CNNs, where receptive fields grow at the expense of spatial resolution, transformers inherently maintain detail-alignment with the input image directly within their multi-level features. This drastically reduces the complexity required for the decoder.
  • Langevin Dynamics Prevents Posterior Collapse: Common generative variants like Conditional Variational Auto-encoders (CVAEs) often suffer from posterior collapse, where the latent variable becomes independent of the input image. By updating the latent variable iteratively via Langevin dynamics during training, iGAN ensures the latent space remains highly informative and tightly coupled to the input image.
  • The Receptive Field Double-Edged Sword: While the transformer's massive receptive field makes it excellent at identifying large foreground objects, it can occasionally introduce false positives by over-contextualizing background regions that resemble salient structures.

Key Results

The proposed transformer model (TIGAN) consistently outperformed CNN baselines (CIGAN) and achieved state-of-the-art performance across nearly all benchmarks:

  • Saliency Accuracy: On the fully supervised DUTS dataset, TIGAN achieved an S-measure ($S_\alpha$) of 0.909 compared to CIGAN's 0.876, matching or exceeding competitive transformer models like VST and GTSOD.
  • Uncertainty Calibration: TIGAN generated highly reliable uncertainty maps that accurately highlighted hard regions and domain discrepancies. It achieved the lowest Expected Calibration Error (ECE) across all tested datasets (e.g., 0.0353 on DUTS), outperforming MC-Dropout, CVAE, and Alternating Back-Propagation (ABP) baselines.
  • Weakly Supervised Performance: Even when trained only on sparse scribbles, the transformer backbone recovered sharp object boundaries, outperforming CNN counterparts by a wide margin without needing heavy post-processing.

Limitations and Future Work

Despite its strong performance, the authors note a few limitations:

  1. Over-smoothing: Because iGAN models a highly diverse generation process, the averaged final predictions can occasionally appear over-smoothed along complex object boundaries.
  2. Hyperparameter Sensitivity: The MCMC inference step introduces extra hyperparameters (such as Langevin step sizes and noise variance) that require careful tuning for stable training.

Future Directions: The authors plan to leverage the generated uncertainty maps directly within a hard-negative mining loop to iteratively improve the saliency generator. They also intend to explore more sophisticated, transformer-compatible decoder architectures.

Summary updated

BibTeX
@article{mao2025generative,
  author = {Yuxin Mao and Jing Zhang and Zhexiong Wan and Yuchao Dai and Aixuan Li and Yunqiu Lv and Xinyu Tian and Deng-Ping Fan and Nick Barnes},
  title = {{Generative Transformer for Accurate and Reliable Salient Object Detection}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2025},
  doi = {10.1109/tcsvt.2024.3469286},
}
Figure