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

DiffCut: Catalyzing Zero-Shot Semantic Segmentation with Diffusion Features and Recursive Normalized Cut

Paul Couairon, Mustafa Shukor, Jean-Emmanuel Haugeard, Matthieu Cord, Nicolas Thome

Semantic segmentation—the task of assigning a category to every pixel in an image—traditionally requires massive amounts of human-annotated data. While "foundation models" like Segment Anything (SAM) have made huge strides, they still rely on millions of labeled masks for training. On the other end of the spectrum, unsupervised semantic segmentation (USS) attempts to find objects and boundaries without any labels. However, these methods often struggle with "zero-shot" scenarios or produce coarse, "blocky" masks that fail to capture intricate details.

DiffCut is a novel unsupervised, zero-shot image segmentation method that achieves state-of-the-art results by combining the rich semantic features of a pre-trained diffusion UNet encoder with a recursive graph-partitioning algorithm. It produces highly detailed segmentation maps without requiring any training, labels, or even text prompts, outperforming previous methods while being significantly more computationally efficient. The authors discovered that while text-to-image diffusion models (like Stable Diffusion) are famous for creating images, their internal "brains" (the UNet encoder) possess a deep, untapped understanding of image structure that can be used to deconstruct them.

The DiffCut Pipeline

DiffCut introduces a three-step pipeline that turns a generative model into a precision segmenter:

DiffCut Pipeline Overview
  1. Feature Extraction: The model passes an image through the encoder of a pre-trained diffusion model (specifically SSD-1B). Crucially, it only uses the features from the final self-attention block. These specific features exhibit remarkable patch-level alignment, meaning patches belonging to the same semantic concept (like "dog" or "sky") have very similar feature vectors.
  2. Recursive Normalized Cut (NCut): The image is treated as a graph where each patch is a node, and edges represent similarity. DiffCut uses a Recursive NCut algorithm to partition this graph hierarchically. They employ a "soft thresholding" technique—raising the similarity matrix to a power $\alpha$—to sharpen the distinctions between different objects.
  3. High-Resolution Concept Assignment: Because the initial features are low-resolution (e.g., 32x32), the model calculates a "concept embedding" for each segment. It then upsamples the feature map and assigns every pixel in the original high-resolution image to the most similar concept, resulting in sharp, detailed boundaries.

Key Insights

  • The UNet Encoder is a Hidden Gem: Most diffusion-based segmentation methods use the full model or cross-attention maps, which require text prompts. DiffCut demonstrates that the encoder alone is a superior vision backbone, outperforming even DINOv2 and CLIP in semantic coherence.
  • Efficiency via Reduction: By using only the encoder, DiffCut reduces the model size by 70% (400M vs. 1.3B parameters) compared to methods requiring full diffusion inference, all while improving accuracy.
  • Granularity Control: A threshold ($\tau$) in the recursive algorithm allows the model to dynamically adapt the number of segments to the image content. A simple image might yield three segments, while a crowded city street might yield twenty.
  • No Prompts Required: Unlike many zero-shot tools, DiffCut is truly "image-only." It discovers structure purely from visual features without needing a text prompt.

State-of-the-Art Results

The researchers evaluated DiffCut across six diverse benchmarks (Pascal VOC, Pascal Context, COCO-Object, COCO-Stuff-27, Cityscapes, and ADE20K) to prove its zero-shot capabilities.

Quantitative Superiority: DiffCut set new state-of-the-art records for unsupervised zero-shot segmentation. It outperformed the previous best method, DiffSeg, by +5.5 mIoU on COCO-Stuff and a massive +9.4 mIoU on Cityscapes. Furthermore, when paired with a CLIP model to "label" the discovered segments, DiffCut even beat dedicated open-vocabulary models specifically trained for that task.

Qualitative Detail: Visually, DiffCut produces much finer masks. While previous models might group a boat and the water together, DiffCut can distinguish thin structures like boat masts and individual windows in buildings.

Qualitative comparison of DiffCut vs DiffSeg

Limitations and Future Work

While highly effective, DiffCut has a few limitations. Because the backbone was trained on general internet images, it might struggle with highly specialized domains like medical imaging or satellite photos without further fine-tuning. Additionally, the "granularity" of the segmentation depends on the threshold $\tau$, and finding a way to automatically determine the perfect $\tau$ for any given image remains an open challenge.

Ultimately, the authors suggest that diffusion-based UNet encoders should be considered a new standard for foundation vision encoders, potentially replacing or augmenting current favorites like ViT-based DINO.

Summary updated

BibTeX
@inproceedings{couairon2024diffcut,
  author = {Paul Couairon and Mustafa Shukor and Jean-Emmanuel HAUGEARD and Matthieu Cord and Nicolas THOME},
  title = {{DiffCut: Catalyzing Zero-Shot Semantic Segmentation with Diffusion Features and Recursive Normalized Cut}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=N0xNf9Qqmc},
}
Figure