English

Attention (as Discrete-Time Markov) Chains

Computer Vision and Pattern Recognition 2025-10-21 v2

Abstract

We introduce a new interpretation of the attention matrix as a discrete-time Markov chain. Our interpretation sheds light on common operations involving attention scores such as selection, summation, and averaging in a unified framework. It further extends them by considering indirect attention, propagated through the Markov chain, as opposed to previous studies that only model immediate effects. Our key observation is that tokens linked to semantically similar regions form metastable states, i.e., regions where attention tends to concentrate, while noisy attention scores dissipate. Metastable states and their prevalence can be easily computed through simple matrix multiplication and eigenanalysis, respectively. Using these lightweight tools, we demonstrate state-of-the-art zero-shot segmentation. Lastly, we define TokenRank -- the steady state vector of the Markov chain, which measures global token importance. We show that TokenRank enhances unconditional image generation, improving both quality (IS) and diversity (FID), and can also be incorporated into existing segmentation techniques to improve their performance over existing benchmarks. We believe our framework offers a fresh view of how tokens are being attended in modern visual transformers.

Keywords

Cite

@article{arxiv.2507.17657,
  title  = {Attention (as Discrete-Time Markov) Chains},
  author = {Yotam Erel and Olaf Dünkel and Rishabh Dabral and Vladislav Golyanik and Christian Theobalt and Amit H. Bermano},
  journal= {arXiv preprint arXiv:2507.17657},
  year   = {2025}
}

Comments

NeurIPS 2025. Project page: https://yoterel.github.io/attention_chains/

R2 v1 2026-07-01T04:15:34.990Z