自注意力本质是基于成对关联矩阵的信息选择机制。
The Origin of Self-Attention: Pairwise Affinity Matrices in Feature Selection and the Emergence of Self-Attention
- 用成对关联矩阵控制信息流动,统一多领域模型设计
- 自注意力是无限特征选择的特例,仅做单步关联计算
- 适合研究模型原理或跨领域通用架构的学者参考
自注意力机制如今在深度学习架构(如Transformer)中占据核心地位,实为更普遍计算原则的一种现代体现:通过学习和使用成对关联矩阵来调控信息流动。本文追溯了自注意力在计算机视觉、自然语言处理与图学习等多个领域的概念起源,发现它们均依赖于一个共同的关联矩阵A。文章重点提出无限特征选择(Inf-FS)作为基础方法,其通过领域知识或学习方式定义矩阵A,并通过关联图上的多跳传播计算特征重要性。相比之下,自注意力属于该框架的特例:采用单跳关联计算,且动态构建基于标记相似性的矩阵。我们主张,尽管定义方式不同,两者在基于成对关系推理的底层结构上保持一致。将自注意力置于更广泛的关联计算范式中,有助于统一多个机器学习研究方向,并揭示多样模型与任务背后的共同数学基础。
原文摘要 · Abstract (English)
The self-attention mechanism, now central to deep learning architectures such as Transformers, is a modern instance of a more general computational principle: learning and using pairwise affinity matrices to control how information flows through a model. This paper traces the conceptual origins of self-attention across multiple domains, including computer vision, natural language processing, and graph learning, through their shared reliance on an affinity matrix, denoted as A. We highlight Infinite Feature Selection (Inf-FS) as a foundational approach that generalizes the idea of affinity-based weighting. Unlike the fixed dot-product structure used in Transformers, Inf-FS defines A either through domain knowledge or by learning, and computes feature relevance through multi-hop propagation over the affinity graph. From this perspective, self-attention can be seen as a special case of Inf-FS: it uses a single-hop affinity computation where A is dynamically built from token similarities. We argue that the underlying structure, reasoning over pairwise relationships, is preserved across both approaches, and the key differences lie in how the affinity matrix is defined and applied. By situating self-attention within the broader paradigm of affinity-based computation, we unify several strands of machine learning research and highlight a common mathematical foundation that underpins diverse models and tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。