揭示Transformer如何从文本中识别分子等图结构的子结构。
From Sequence to Structure: Uncovering Substructure Reasoning in Transformers
- 提出子结构过滤机制,解释Transformer如何捕捉图内部分结构
- 实验证明多层Transformer内部存在一致的子结构识别动态
- 首次展示仅用解码器的Transformer可处理带属性的复杂图数据
近期研究发现,大语言模型具备解决图推理任务的能力,即使图结构以文本形式呈现,模型仍能有效回答相关问题。这引发一个根本性问题:仅基于序列的Transformer架构如何理解潜在图结构?为此,本文聚焦子结构提取任务,分析Transformer内部机制与输入查询的影响。通过实验与理论分析,提出诱导子结构过滤(ISF)视角,揭示多层Transformer中的子结构识别过程。进一步验证了LLM中ISF机制在各层的一致性。基于此,探索Transformer对多种图类型的泛化能力,提出以子结构为思维单位,高效提取复杂复合模式,并证明解码器仅有的Transformer可成功从属性图(如分子图)中提取子结构。本研究为序列式Transformer如何处理图数据提供了新视角。
原文摘要 · Abstract (English)
Recent studies suggest that large language models (LLMs) possess the capability to solve graph reasoning tasks. Notably, even when graph structures are embedded within textual descriptions, LLMs can still effectively answer related questions. This raises a fundamental question: How can a decoder-only Transformer architecture understand underlying graph structures? To address this, we start with the substructure extraction task, interpreting the inner mechanisms inside the transformers and analyzing the impact of the input queries. Specifically, through both empirical results and theoretical analysis, we present Induced Substructure Filtration (ISF), a perspective that captures the substructure identification in the multi-layer transformers. We further validate the ISF process in LLMs, revealing consistent internal dynamics across layers. Building on these insights, we explore the broader capabilities of Transformers in handling diverse graph types. Specifically, we introduce the concept of thinking in substructures to efficiently extract complex composite patterns, and demonstrate that decoder-only Transformers can successfully extract substructures from attributed graphs, such as molecular graphs. Together, our findings offer a new insight on how sequence-based Transformers perform the substructure extraction task over graph data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。