将注意力机制视为马尔可夫链,揭示语义凝聚与全局重要性
Attention (as Discrete-Time Markov) Chains
- 把注意力矩阵看作离散时间马尔可夫链,统一解释选择、求和等操作
- 发现语义相似区域形成稳定态,间接注意力可传播,提升零样本分割性能
- 提出TokenRank度量全局词元重要性,适用于生成与分割任务
我们提出将注意力矩阵重新诠释为离散时间马尔可夫链。该视角统一解释了注意力分数的选取、求和与平均等常见操作,并通过马尔可夫链传播实现间接注意力建模,超越以往仅关注直接效应的研究。关键观察是:语义相似区域会形成代谢稳定态,即注意力趋于聚集的区域,而噪声注意力则消散。通过简单的矩阵乘法与特征值分析,可高效计算稳定态及其出现频率。基于这些轻量工具,我们在零样本分割任务中达到领先水平。最后,我们定义了TokenRank——马尔可夫链的稳态向量,用于衡量全局词元重要性。实验表明,TokenRank能提升无条件图像生成的质量(IS)与多样性(FID),并可嵌入现有分割方法以超越基准表现。本框架为现代视觉变换器中的注意力机制提供了全新视角。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。