Gilad Yehudai - Depth, Width and Tokens: How Transformers Solve Graph Tasks

Gilad Yehudai - Depth, Width and Tokens: How Transformers Solve Graph Tasks

🎙 Gilad Yehudai (Technion), hosted by HUJI Machine Learning Club 👥 405 📅 November 26, 2026 ⏱ 62 min 👁 3 📄 original study 🧭 2026-11-26
Available in: English (current) Français

Keywords

transformersgraph tasksdepth-width trade-offMPCcommunication complexity

Summary

Gilad Yehudai presents a theoretical computer-science view of how transformers solve graph tasks, treating the model as a parallel computation over tokens. He motivates the topic with systems that use graphs—GraphRAG, RepoGraph, reasoning traces, weather forecasting and protein-structure prediction—and contrasts graph neural networks, which are local message-passing models, with transformers, whose self-attention lets every token communicate with every other token. A simple connectivity example—distinguishing one large cycle from two smaller cycles—shows that difficulty depends on both the computational model and the graph encoding. The talk reviews GNNs, where L layers see an L-hop neighborhood, and the distributed-computing correspondence that yields depth lower bounds independent of width. It then introduces the transformer block, self-attention plus a per-token MLP, and the Massively Parallel Computation analogy: tokens are machines, attention is communication, the MLP is local computation and layers are rounds. Earlier work uses this analogy to solve connectivity with logarithmic depth and sublinear width. Yehudai argues that practical widths are often linear in the graph size and that width is cheap while depth is expensive; experiments with a fixed parameter budget show wide shallow models matching deep models while training and running faster. He presents a width hierarchy for constant-depth transformers: trivial tasks need little width, n^2 width can solve everything by placing the graph in one token, and intermediate tasks require linear, superlinear or near-quadratic width. Upper bounds use edge aggregation and linear sketching, while lower bounds use communication complexity and, in some cases, MPC hardness conjectures. The recorded excerpt ends during the lower-bound discussion; the abstract also announces a second part on graph tokenization via adjacency rows, Laplacian eigenvectors and random-walk statistics, where the same problem can be easy or hard depending on the encoding.

285 words

Critical Evaluation

Value of the Information & Strength of the Argument

The talk’s value lies in giving a compact conceptual map of a fast-moving theoretical literature. It identifies the right knobs—depth, width and tokenization—and shows why graph problems are a useful testbed: they have clean combinatorial answers, a wide difficulty range, and lower-bound tools imported from distributed computing and communication complexity. The progression from GNN locality to transformer globality, then to the MPC analogy, makes the main correspondence intuitive before any theorem is stated. The practical argument that width is cheap and depth expensive is well motivated and supported by a simple parameter-budget experiment rather than left as a slogan.

The argumentation is generally solid but deliberately informal. The speaker builds from a concrete cycle example, states the GNN depth lower bound, then introduces the transformer-MPC simulation and the constant-depth width hierarchy. He distinguishes upper bounds from lower bounds and flags when a result depends on a conjecture or on a specific encoding. The main weaknesses are the absence of formal theorem statements, some handwaving around the linear-sketching construction, and the fact that the one-vs-two-cycle acceleration is presented as a simple trick before the dense-graph case is used to motivate the real technical machinery. The lower-bound discussion is clear about its caveat—adjacency-row encoding—but the transcript does not let the listener verify the precise dependence on depth, width, precision and heads. Overall, the reasoning is coherent and appropriately hedged, but it is a seminar sketch rather than a self-contained proof.

Scientific Rigor, Source Quality, Title Accuracy

Scientific rigor is typical of a specialist theory seminar: definitions are simplified, proofs are sketched, and results are framed as upper and lower bounds rather than as empirical certainties. The talk invokes established frameworks—GNN message passing, the LOCAL/CONGEST distributed model, MPC, communication complexity and the Johnson–Lindenstrauss lemma—and credits Gilmer (2017), a distributed-computing connection associated with Loukas, and a transformer-MPC correspondence whose author name is garbled by the transcript. However, the description provides no bibliography or links, several author names are only spoken, and the transcript’s speech-to-text errors make exact citation difficult; the listener cannot check theorem statements or assumptions from the video alone. The title/content fit is strong: depth, width and tokenization are the organizing axes, and graph tasks are the running example. The only mismatch is that the recorded transcript excerpt ends during the lower-bound discussion, so the second part announced in the abstract on adjacency-row, Laplacian-eigenvector and random-walk encodings is not fully delivered in the available text.

412 words

Title / Content Match

Strong fit: the talk directly addresses depth, width and tokenization for graph tasks; the recorded portion concentrates on depth-width results and tokenization motivation, consistent with the title.

Quality & Reliability

7/10

Academic research seminar with a coherent technical exposition, but the transcript is noisy, several names are garbled, formal statements are informal, and the description supplies no bibliography or links; some lower bounds depend on conjectures or are restricted to specific graph encodings.

Key Moments

Cited Sources

  • GraphRAG (knowledge-graph retrieval for LLMs) — Mentioned as an example of graph-structured systems used by LLMs.
  • RepoGraph (repository-level code graph) — Cited as a system that builds a graph over a codebase for navigation.
  • Gilmer et al. (2017), neural message passing and unification of graph neural networks — Speaker credits this work with unifying GNNs; the transcript refers to Gilmer in 2017.
  • Loukas, distributed-computing lower bounds for graph neural networks — Speaker refers to a researcher whose name is rendered as Lukas and who connected GNNs to LOCAL/CONGEST distributed computing.
  • Sanford et al., transformer–MPC correspondence — Speaker describes a paper showing that MPC protocols can be simulated by transformers and vice versa; the transcript garbles the author name.

Concurring Sources

Contribution & Novelties

Original contribution: the talk shifts the theoretical lens from the usual sublinear-width MPC regime to widths that grow linearly with the number of nodes, and asks what constant-depth transformers can do in that regime. It sketches a width hierarchy, gives upper bounds based on edge aggregation and linear sketching, and an unconditional communication-complexity lower bound for two-cycle detection under adjacency-row encoding. It also treats tokenization as a first-class source of hardness: the same graph problem can change complexity depending on how the graph is serialized into tokens. The most useful conceptual move is the explicit separation between width, which is cheap and parallel, and depth, which is expensive and sequential, backed by a fixed-parameter-budget experiment.

Further reading:

  • Communication complexity — Background for the unconditional lower-bound technique.
  • Johnson–Lindenstrauss lemma — Continuous analogue of the linear-sketching argument.
  • Graph neural network — Local message-passing baseline contrasted with transformers.
  • Laplacian matrix — Spectral graph encodings via eigenvectors.
  • Massively parallel computation (MPC) model — Conceptually central analogy; no URL given because a stable canonical page was not verified.

173 words

Radar Profile

The radar profile is high on technical level and information density, with solid but not maximal reliability because the talk is an informal seminar sketch. Quality is strong for a specialist, while the score is tempered by noisy transcription, missing formal statements and no linked bibliography.

Reliability 7/10