Repurposing Stable Diffusion Attention for Training-Free Unsupervised Interactive Segmentation
Markus Karmann, Onay Urfalioglu
Abstract
Recent progress in interactive point prompt based Image Segmentation allows to significantly reduce the manual effort to obtain high quality semantic labels. State-of-the-art unsupervised methods use self-supervised pre-trained models to obtain pseudo-labels which are used in training a prompt-based segmentation model. In this paper, we propose a novel unsupervised and training-free approach based solely on the self-attention of Stable Diffusion. We interpret the self-attention tensor as a Markov transition operator, which enables us to iteratively construct a Markov chain. Pixel-wise counting of the required number of iterations along the Markov chain to reach a relative probability threshold yields a Markov-iteration-map, which we simply call a Markov-map. Compared to the raw attention maps, we show that our proposed Markov-map has less noise, sharper semantic boundaries and more uniform values within semantically similar regions. We integrate the Markov-map in a simple yet effective truncated nearest neighbor framework to obtain interactive point prompt based segmentation. Despite being training-free, we experimentally show that our approach yields excellent results in terms of Number of Clicks (NoC), even outperforming state-of-the-art training based unsupervised methods in most of the datasets. Code is available at https://github.com/mkarmann/m2n2.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b51786c2-4fb5-45b3-993c-ef3d0a347556Cited by top-tier papers3
- gen2seg: Generative Models Enable Generalizable Instance SegmentationOm Khangaonkar, Hamed PirsiavashICLR 2026 · 2 citations
- SDMATTE: Grafting Diffusion Models for Interactive MattingLongfei Huang, Yu Liang, Hao Zhang, Jinwei Chen et al.ICCV 2025 · 1 citation
- Direct Segmentation without Logits Optimization for Training-Free Open-Vocabulary Semantic SegmentationJiahao Li, Yang Lu, Yachao Zhang, Fangyong Wang et al.CVPR 2026
Builds on26
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao et al.ICCV 2023 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
- DiffusionDet: Diffusion Model for Object DetectionShoufa Chen, Peize Sun, Yibing Song, Ping LuoICCV 2023 · 715 citations
Related papers
- Dataset Diffusion: Diffusion-based Synthetic Data Generation for Pixel-Level Semantic SegmentationQuang Nguyen, Truong Vu, Anh Tran, Khoi NguyenNeurIPS 2023 · 154 citations
- Open-Vocabulary Attention Maps with Token Optimization for Semantic Segmentation in Diffusion ModelsPablo Marcos-Manchón, Roberto Alcover-Couso, Juan C. SanMiguel, Jose M. MartínezCVPR 2024 · 9 citations
- SeeDiff: Off-the-Shelf Seeded Mask Generation from Diffusion ModelsJoon Hyun Park, Kumju Jo, Sungyong BaikAAAI 2025 · 2 citations
- Diffuse, Attend, and Segment: Unsupervised Zero-Shot Segmentation using Stable DiffusionJunjiao Tian, Lavisha Aggarwal, Andrea Colaco, Zsolt Kira et al.CVPR 2024 · 61 citations
- Label-Efficient Semantic Segmentation with Diffusion ModelsDmitry Baranchuk, Andrey Voynov, Ivan Rubachev, Valentin Khrulkov et al.ICLR 2022 · 700 citations
