AI and the World's Hard Problems · Theoretical computer science · arXiv · 2026-11-11
Stagewise and interpretable emergence of inside-outside computation in Transformer-based language models

Fully trained Transformers have been observed to approximate parsing algorithms such as inside-outside, but how this is learned has been poorly understood theoretically. Using synthetic context-free grammars with variable parse-tree topology, the authors show that the learning curve has analytically computable stages tied to a latent tree variable. Probing reveals that early training relies on local bigram and trigram information, while later the model develops an encoder-decoder-like structure with abstract information in the middle layers.