paper-with-me

홈 › Papers

Simulation of Graph Algorithms with Looped Transformers

2024-02-02 · Artur Back de Luca, Kimon Fountoulakis

The execution of graph algorithms using neural networks has recently attracted significant interest due to promising empirical progress. This motivates further understanding of how neural networks can replicate reasoning steps with relational data. In this work, we study the ability of transformer networks to simulate algorithms on graphs from a theoretical perspective. The architecture we use is a looped transformer with extra attention heads that interact with the graph. We prove by construction that this architecture can simulate individual algorithms such as Dijkstra's shortest path, Breadth- and Depth-First Search, and Kosaraju's strongly connected components, as well as multiple algorithms simultaneously. The number of parameters in the networks does not increase with the input graph size, which implies that the networks can simulate the above algorithms for any graph. Despite this property, we show a limit to simulation in our solution due to finite precision. Finally, we show a Turing Completeness result with constant width when the extra attention heads are utilized.

📄 PDF Abstract BibTeX arXiv:2402.01107

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

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

Looped Transformers are Better at Learning Learning Algorithms

2023-11-21 · Liu Yang, Kangwook Lee, Robert Nowak, Dimitris Papailiopoulos

Transformers have demonstrated effectiveness in in-context solving data-fitting problems from various (latent) models, as reported by Garg et al. However, the absence of an inherent iterative structure in the transformer…

To CoT or To Loop? A Formal Comparison Between Chain-of-Thought and Looped Transformers

2025-05-25 · Kevin Xu, Issei Sato

Chain-of-Thought (CoT) and Looped Transformers have been shown to empirically improve performance on reasoning tasks and to theoretically enhance expressivity by recursively increasing the number of computational steps. …

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…

Sparse Layers are Critical to Scaling Looped Language Models

2026-05-09 · Ryan Lee, Jacob Biloki, Edward J. Hu, Jonathan May arxiv

Looped language models repeat a set of transformer layers through depth, reducing memory costs and providing natural early-exit points at loop boundaries. However, looped models do not scale as favorably as standard tran…