Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2509.22343v1

帮助 | 高级搜索

计算机科学 > 计算与语言

arXiv:2509.22343v1 (cs)
[提交于 2025年9月26日 ]

标题: 变压器可以在某些图中学习连接性,但不能在其他图中学习

标题: Transformers Can Learn Connectivity in Some Graphs but Not Others

Authors:Amit Roy, Abulhair Saparov
摘要: 推理能力对于确保基于Transformer的大语言模型(LLMs)的响应的真实性至关重要,而对传递关系的稳健推理在许多场景中至关重要,例如因果推断。 因此,研究Transformer在推断传递关系任务中的能力是至关重要的(例如,知道A导致B,B导致C,那么A导致C)。 推断传递关系的任务等同于有向图中的连通性任务(例如,知道从A到B有一条路径,从B到C有一条路径,那么从A到C有一条路径)。 过去的研究集中在Transformer是否能够从输入提示中提供的上下文示例中学习推断传递性。 然而,Transformer从训练示例中推断传递关系的能力以及扩展如何影响这种能力尚未被探索。 在本研究中,我们通过生成有向图来训练不同规模的Transformer模型,并评估它们在各种图大小下推断传递关系的能力,以回答这个问题。 我们的发现表明,Transformer能够在“网格状”有向图上学习连通性,其中每个节点可以嵌入到低维子空间中,并且可以从节点的嵌入中轻松推断出连通性。 我们发现底层网格图的维度是Transformer学习连通性任务能力的强预测因子,高维网格图比低维网格图更具挑战性。 此外,我们观察到,增加模型规模会导致对网格图上连通性的泛化能力不断提高。 然而,如果图不是网格图并且包含许多不连通的组件,Transformer在学习连通性任务时会遇到困难,尤其是当组件数量较大时。
摘要: Reasoning capability is essential to ensure the factual correctness of the responses of transformer-based Large Language Models (LLMs), and robust reasoning about transitive relations is instrumental in many settings, such as causal inference. Hence, it is essential to investigate the capability of transformers in the task of inferring transitive relations (e.g., knowing A causes B and B causes C, then A causes C). The task of inferring transitive relations is equivalent to the task of connectivity in directed graphs (e.g., knowing there is a path from A to B, and there is a path from B to C, then there is a path from A to C). Past research focused on whether transformers can learn to infer transitivity from in-context examples provided in the input prompt. However, transformers' capability to infer transitive relations from training examples and how scaling affects the ability is unexplored. In this study, we seek to answer this question by generating directed graphs to train transformer models of varying sizes and evaluate their ability to infer transitive relations for various graph sizes. Our findings suggest that transformers are capable of learning connectivity on "grid-like'' directed graphs where each node can be embedded in a low-dimensional subspace, and connectivity is easily inferable from the embeddings of the nodes. We find that the dimensionality of the underlying grid graph is a strong predictor of transformers' ability to learn the connectivity task, where higher-dimensional grid graphs pose a greater challenge than low-dimensional grid graphs. In addition, we observe that increasing the model scale leads to increasingly better generalization to infer connectivity over grid graphs. However, if the graph is not a grid graph and contains many disconnected components, transformers struggle to learn the connectivity task, especially when the number of components is large.
评论: 正在审核中
主题: 计算与语言 (cs.CL) ; 人工智能 (cs.AI); 机器学习 (cs.LG); 计算机科学中的逻辑 (cs.LO)
引用方式: arXiv:2509.22343 [cs.CL]
  (或者 arXiv:2509.22343v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2509.22343
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Amit Roy [查看电子邮件]
[v1] 星期五, 2025 年 9 月 26 日 13:39:09 UTC (4,932 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.CL
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-09
切换浏览方式为:
cs
cs.AI
cs.LG
cs.LO

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号