arXiv Machine Learning

Learning through Internalization

The paper investigates how neural‑network models, particularly transformers, internalize explicit computational procedures—specifically the simulation of semiautomata—by embedding chain‑of‑thought (CoT) tokens into their weights. It identifies which classes of semiautomata are more difficult to internalize and shows that this process can degrade out‑of‑distribution performance. A provable analysis demonstrates that a simplified one‑layer transformer can first learn a parity task with CoT supervision and then internalize the autoregressive generation, eventually computing parity directly once CoT tokens are removed, a task that is computationally hard without CoT guidance. The study also connects internalization to the recently introduced Positive Distribution Shift phenomenon.

arXiv Computation and Language
Nov 11

Stagewise and interpretable emergence of inside-outside computation in Transformer-based language models

The paper investigates how Transformer-based language models learn inside‑outside parsing algorithms by training on synthetic context‑free grammars with variable parse tree topologies. It shows that the learning process unfolds in clear, analytically tractable stages, each linked to the representation of a hidden latent tree variable that resolves ambiguity and leverages broader context. Probing the model’s representations reveals a gradual emergence of inside‑outside computation: early layers capture local bigram/trigram patterns, while deeper layers develop an encoder‑decoder structure that encodes abstract latent information in the middle and refines token predictions in the later layers, mirroring patterns seen in real‑world LLMs.

By Jack T. Parley
arXiv AI
Sep 10

Parity, Sensitivity, and Transformers

arXiv:2602.05896v3 Announce Type: replace-cross Abstract: Understanding what neural architectures can and cannot compute is a central challenge in the theory of AI. One of the fundamental problems in...

By Alexander Kozachinskiy, Tomasz Steifer, Przemys{\l}aw Wa{\l}\c{e}ga
arXiv AI
Sep 25

Your Transformer Can Hold Two Thoughts at Once: Evidence of Linear Superposition in LLMs

The paper demonstrates that Large Language Models, despite their non‑linear components, exhibit a fundamental linearity property: when inputs from two distinct text streams are linearly combined, the model outputs a superposition of the individual next‑token distributions. This "Superposition Linearity Hypothesis" appears to be an intrinsic feature of the Transformer architecture, tends to weaken during pretraining, but can be largely restored with lightweight fine‑tuning. The authors also present a guided decoding method that separates the superposed outputs, allowing two coherent continuations to be generated from a single forward pass.

By Pavel Tikhonov, Anton Korznikov, Matvey Mikhalchuk, Nikita Dragunov, Temurbek Rahmatullaev, Polina Druzhinina, Anton Razzhigaev, Ivan Oseledets, Elena Tutubalina
arXiv Machine Learning
5d ago

Distinct mechanisms underlying in-context learning in transformers

The paper investigates how transformers perform in-context learning by training them on a finite set of discrete Markov chains. It identifies four distinct algorithmic phases—based on memorization versus generalization and on using 1-point versus 2-point statistics—each implemented by specific multi-layer subcircuits. The study shows that transitions between these phases are governed by data diversity thresholds and a representational bottleneck, and it provides a symmetry-constrained theory explaining the sharp shift from 1-point to 2-point generalization.

By Cole Gibson, Wenping Cui, Gautam Reddy