Transformers Provably Learn Graph Search: Training Dynamics and the Exponential Power of Depth
Read the original on arXiv AI →The paper studies how transformer models learn to perform graph search, specifically depth‑first search (DFS), on directed graphs. It shows that a single‑layer transformer needs a quadratic number of parameters to implement the DFS child‑selection step, while a two‑layer transformer can perform full DFS with near‑linear size. Moreover, each additional layer exponentially increases the look‑ahead horizon, and the authors prove that two‑layer transformers can learn DFS through gradient flow and generalize to unseen graphs.
Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv AI.