paper-with-me

Papers

Transformers Provably Learn Algorithmic Solutions for Graph Connectivity, But Only with the Right Data

2025-10-22 · Qilin Ye, Deqing Fu, Robin Jia, Vatsal Sharan arxiv

Transformers often fail to learn generalizable algorithms, instead relying on brittle heuristics. Using graph connectivity as a testbed, we explain this phenomenon both theoretically and empirically. We consider a simplified Transformer architecture, the Disentangled Transformer, and prove that an $L$-layer model can compute connectivity in graphs with diameters up to $3^L$, implementing an algorithm equivalent to computing powers of the adjacency matrix. By analyzing training dynamics, we prove that whether the model learns this strategy hinges on whether most training instances are within this model capacity. Within-capacity graphs (diameter $\leq 3^L$) drive the learning of the algorithmic solution while beyond-capacity graphs drive the learning of a simple heuristic based on node degrees. Finally, we empirically show that restricting training data to stay within a model's capacity makes both standard and Disentangled Transformers learn the exact algorithm.

📄 PDF Abstract BibTeX arXiv:2510.19753

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannot

2024-06-11 · Zixuan Wang, Stanley Wei, Daniel Hsu, Jason D. Lee

The transformer architecture has prevailed in various deep learning settings due to its exceptional capabilities to select and compose structural information. Motivated by these capabilities, Sanford et al. proposed the …

Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers

2025-01-18 · Xiaoyu Li, YIngyu Liang, Jiangxuan Long, Zhenmei Shi 외

Looped Transformers have shown exceptional neural algorithmic reasoning capability in simulating traditional graph algorithms, but their application to more complex structures like hypergraphs remains underexplored. Hype…

Combinatorial Optimization

Multi-head Transformers Provably Learn Symbolic Multi-step Reasoning via Gradient Descent

2025-08-11 · Tong Yang, Yu Huang, Yingbin Liang, Yuejie Chi arxiv

Transformers have demonstrated remarkable capabilities in multi-step reasoning tasks. However, understandings of the underlying mechanisms by which they acquire these abilities through training remain limited, particular…

Looped Transformers with Layer Normalization Provably Learn the Power Method

2026-05-30 · Lyumin Wu, Chenyang Zhang, Yuan Cao arxiv

Transformers have achieved remarkable success across a wide range of applications, and a growing body of work suggests that part of their strength comes from their ability to learn and execute algorithmic procedures. How…

Learning Adaptive Control Flow in Transformers for Improved Systematic Generalization

2021-10-08 · NeurIPS Workshop AIPLANS 2021 12 · Róbert Csordás, Kazuki Irie, Jürgen Schmidhuber

Despite successes across a broad range of applications, Transformers have limited capability in systematic generalization. The situation is especially frustrating for algorithmic tasks, where they often fail to find intu…

Systematic Generalization