Skip to main content
QUICK REVIEW

[Paper Review] Adaptive Affinity Fields for Semantic Segmentation

Tsung-Wei Ke, Jyh-Jing Hwang|arXiv (Cornell University)|Mar 27, 2018
Advanced Neural Network ApplicationsComputer Science30 references13 citations
TL;DR

This paper proposes Adaptive Affinity Fields (AAF), a novel method for semantic segmentation that learns spatial structure through adversarial training to adaptively select optimal neighborhood sizes for different semantic categories. By formulating affinity matching as a minimax problem, AAF improves segmentation accuracy on PASCAL VOC 2012, Cityscapes, and GTA5 without inference overhead, achieving state-of-the-art performance and strong domain generalization.

ABSTRACT

Semantic segmentation has made much progress with increasingly powerful pixel-wise classifiers and incorporating structural priors via Conditional Random Fields (CRF) or Generative Adversarial Networks (GAN). We propose a simpler alternative that learns to verify the spatial structure of segmentation during training only. Unlike existing approaches that enforce semantic labels on individual pixels and match labels between neighbouring pixels, we propose the concept of Adaptive Affinity Fields (AAF) to capture and match the semantic relations between neighbouring pixels in the label space. We use adversarial learning to select the optimal affinity field size for each semantic category. It is formulated as a minimax problem, optimizing our segmentation neural network in a best worst-case learning scenario. AAF is versatile for representing structures as a collection of pixel-centric relations, easier to train than GAN and more efficient than CRF without run-time inference. Our extensive evaluations on PASCAL VOC 2012, Cityscapes, and GTA5 datasets demonstrate its above-par segmentation performance and robust generalization across domains.

Motivation & Objective

  • Address the limitation of pixel-wise classification in capturing fine-grained spatial structures, especially for small or complex shapes like thin spokes or distant objects.
  • Overcome the drawbacks of CRF (high inference cost) and GAN (training instability) in enforcing structural priors during segmentation.
  • Develop a method that learns optimal neighborhood sizes for different semantic categories during training, rather than using fixed or hand-tuned receptive fields.
  • Improve segmentation robustness across domain shifts, such as from real-world datasets (Cityscapes) to synthetic ones (GTA5), without fine-tuning.
  • Introduce a lightweight, efficient alternative to CRF and GAN that adds no runtime inference cost while enhancing structural consistency in predictions.

Proposed method

  • Propose Adaptive Affinity Fields (AAF) as a pairwise loss function that models spatial relations between neighboring pixels in the label space, capturing semantic structure through local relations.
  • Formulate AAF as a minimax optimization problem: minimize the affinity matching loss while maximizing the error over multiple kernel sizes, creating a best-worst-case learning scenario.
  • Use a discriminator network to evaluate the quality of affinity field matching across different kernel sizes (3×3, 5×5, 7×7), enabling the network to learn optimal receptive field sizes per category.
  • Introduce a weighted combination of multiple kernel sizes, where the optimal size for each category is learned via attention-like weighting over kernel responses.
  • Train the segmentation network end-to-end with a hybrid loss: standard cross-entropy loss for pixel-wise classification and the AAF loss for structural consistency.
  • Apply the AAF loss only during training, avoiding any runtime inference cost—unlike CRF or GAN-based post-processing or refinement modules.

Experimental results

Research questions

  • RQ1Can adversarial training be used to automatically learn the optimal receptive field size for each semantic category in semantic segmentation?
  • RQ2Does learning category-specific affinity fields improve segmentation performance on fine-grained structures such as thin spokes or distant persons?
  • RQ3Can AAF generalize across domain shifts (e.g., from Cityscapes to GTA5) without fine-tuning, outperforming standard baselines?
  • RQ4How does the combination of multiple kernel sizes (3×3, 5×5, 7×7) affect segmentation accuracy and structural modeling?
  • RQ5Can AAF achieve better performance than CRF or GAN-based methods while avoiding their drawbacks (e.g., high inference cost or training instability)?

Key findings

  • AAF achieves a mean IoU of 88.22% on the PASCAL VOC 2012 validation set when using 3×3, 5×5, and 7×7 kernel combinations, outperforming the PSPNet baseline.
  • On the Cityscapes dataset, AAF achieves a 1.46% higher mIoU and 9.5% higher pixel accuracy than PSPNet when tested on GTA5 without fine-tuning.
  • The optimal kernel size for 'person' and 'dog' is 3.1 and 3.4 respectively, indicating preference for smaller receptive fields, while 'cow' and 'plant' benefit from larger fields (4.6 and 4.5).
  • The combination of 3×3 and 5×5 kernels yields the best performance, with a 90.19% mIoU on 'aero' and 89.87% on 'bird', outperforming single or all-three kernel combinations.
  • AAF improves segmentation quality on fine structures such as thin radial spokes and distant objects, as visually confirmed in comparisons with PSPNet and baseline affinity fields.
  • AAF generalizes robustly across domains: it achieves 78.28% mIoU on GTA5 Part 1, a 1.46% improvement over PSPNet, demonstrating strong domain generalization without adaptation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.