arXiv:2510.25542cs.LGcs.IT2025-10被引 2

提出新方法让Transformer在多项式时间内精确恢复复杂有向无环图结构。

Transformers Provably Learn Directed Acyclic Graphs via Kernel-Guided Mutual Information

  • 用核引导互信息设计多头注意力目标函数,实现多父节点关系解耦学习。
  • 理论证明单层多头Transformer在多项式时间内收敛至全局最优。
  • 实验验证注意力权重可准确还原真实图结构,适合因果发现与图建模任务。

揭示真实数据中隐藏的图结构是跨科学领域的关键挑战。近年来,基于注意力机制的Transformer模型在捕捉图中复杂依赖关系方面展现出强大的经验性能。然而,其训练动态的理论理解仍局限于树状图(每个节点仅有一个父节点)的情形。将可证明的理论保证扩展到更一般的多父节点有向无环图(DAG)仍是难点,主要源于难以设计使不同注意力头分别学习多个父节点关系的训练目标。本文提出一种新的信息论度量——核引导互信息(KG-MI),基于f-散度构建。该目标结合多头注意力框架,每个头关联一个独立的边际转移核,以有效建模多样化的父-子依赖。我们证明:对于生成自K-父节点DAG的序列,通过梯度上升训练单层多头Transformer可在多项式时间内收敛至全局最优。此外,我们刻画了收敛时的注意力分数模式。当f-散度特化为KL散度时,学习到的注意力分数能准确反映真实邻接矩阵,从而可证明地恢复底层图结构。实验结果验证了理论发现。

原文摘要 · Abstract (English)

Uncovering hidden graph structures underlying real-world data is a critical challenge with broad applications across scientific domains. Recently, transformer-based models leveraging the attention mechanism have demonstrated strong empirical success in capturing complex dependencies within graphs. However, the theoretical understanding of their training dynamics has been limited to tree-like graphs, where each node depends on a single parent. Extending provable guarantees to more general directed acyclic graphs (DAGs) -- which involve multiple parents per node -- remains challenging, primarily due to the difficulty in designing training objectives that enable different attention heads to separately learn multiple different parent relationships. In this work, we address this problem by introducing a novel information-theoretic metric: the kernel-guided mutual information (KG-MI), based on the $f$-divergence. Our objective combines KG-MI with a multi-head attention framework, where each head is associated with a distinct marginal transition kernel to model diverse parent-child dependencies effectively. We prove that, given sequences generated by a $K$-parent DAG, training a single-layer, multi-head transformer via gradient ascent converges to the global optimum in polynomial time. Furthermore, we characterize the attention score patterns at convergence. In addition, when particularizing the $f$-divergence to the KL divergence, the learned attention scores accurately reflect the ground-truth adjacency matrix, thereby provably recovering the underlying graph structure. Experimental results validate our theoretical findings.

图神经网络Transformer因果推断理论分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。