Combinatorial Optimization for Panoptic Segmentation: A Fully Differentiable Approach

Ahmed Abbas, Paul Swoboda

The Challenge of Panoptic Segmentation

Panoptic segmentation requires a model to simultaneously identify semantic classes (e.g., "sky", "road") and distinct object instances (e.g., "car 1", "car 2"). Neural networks often struggle with this dual task, producing conflicting pixel-level predictions like broken boundary lines or overlapping instance votes.

To resolve these conflicts, most bottom-up methods rely on heuristic post-processing steps, such as Non-Maximum Suppression or Hough voting. However, these post-processing steps are non-differentiable. Because gradients cannot pass through them, the neural network cannot be trained end-to-end to directly optimize the final evaluation metric—Panoptic Quality (PQ).

A Fully Differentiable Architecture

To tackle this limitation, the authors introduce a fully differentiable, bottom-up approach that integrates a convolutional neural network (CNN) with a combinatorial optimization solver.

The architecture utilizes a standard ResNet-50 CNN that branches into two predictors: one for semantic class scores and one for pixel affinities (predicting if neighboring pixels belong to the same object).

COPS Architecture Overview

Instead of relying on heuristic grouping, the CNN outputs are fed into an Asymmetric Multiway Cut (AMWC) solver. This graph-partitioning algorithm elegantly groups pixels into semantic classes and subdivides "thing" classes into distinct instances, framing the post-processing as a formal mathematical optimization problem.

Training Through the Solver

The core technical contribution of the paper is enabling backpropagation through the discrete AMWC solver to directly optimize for panoptic quality.

  1. Smooth Panoptic Quality Surrogate: The standard PQ metric uses hard thresholds (e.g., Intersection-over-Union > 0.5) and ignores small masks, making it discontinuous and impossible to use as a loss function. The authors designed a differentiable surrogate using soft-thresholding functions to approximate PQ.
  2. Robust Perturbation for Backpropagation: Combinatorial solvers output discrete (integer) values, meaning the loss landscape is piecewise constant and gradients are zero almost everywhere. To fix this, the authors extend a perturbation technique: they add noise to the CNN's cost outputs, run the solver multiple times, and observe how the output changes to estimate a continuous gradient.
Gradient Computation and Backward Pass
  1. Backward Pass Transformation: To correctly route gradients from the panoptic labels back to the separate semantic and affinity branches, the AMWC problem is transformed into a "lifted" Multiway Cut problem during the backward pass.

Key Results and Insights

The fully differentiable training scheme (COPS) showed clear quantitative and qualitative improvements over a baseline model trained without the solver:

  • Cityscapes: The fully trained model achieved a PQ of 60.0% on the test set, a massive +3.3% improvement over their baseline, outperforming comparable bottom-up methods like SSAP.
  • COCO: Achieved a PQ of 38.5% on the test set, a +4.3% improvement over the baseline.
  • Qualitative Improvements: The fully trained model demonstrated visibly superior localization and separation of adjacent instances (e.g., correctly separating a cluster of overlapping bicycles).

The paper demonstrates that complex, NP-hard combinatorial solvers can be embedded directly into deep learning pipelines. Training directly on a surrogate of the target metric (PQ) rather than just proxy losses (like pixel-wise cross-entropy) forces the network to care about the final output quality, specifically improving its ability to detect internal boundaries between overlapping instances.

Limitations and Future Work

While highly effective, the approach has current limitations:

  • Inference Speed: Because the AMWC solver is sequential and runs on the CPU, inference is slow (about 2 seconds per image for Cityscapes and 0.3 seconds for COCO), making it unsuitable for real-time applications.
  • Two-Stage Training: Due to the computational heaviness of the solver and GPU memory limits, the model cannot be trained from scratch end-to-end. The CNN must first be pre-trained with standard proxy losses, and then fine-tuned using the solver and the PQ surrogate loss.

The authors suggest that the key to overcoming these limitations is the development of inherently parallel combinatorial solvers that can execute directly on GPUs.

Summary updated

BibTeX
@inproceedings{abbas2021combinatorial,
  author = {Ahmed Abbas and Paul Swoboda},
  title = {{Combinatorial Optimization for Panoptic Segmentation: A Fully Differentiable Approach}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=zNsxMXmnus},
}
Figure