cs.LGJul 13, 2026

From Expressivity to Sample Complexity: Narrow Teachers for Transformers via C-RASP

Authors: Michael Rizvi-MartelSatwik BhattamishraGuillaume RabusseauMichael Hahn

Abstract

A theoretical understanding of Transformers is crucial to better understand the capacities and limitations of large language models (LLMs). There is much work analyzing the expressivity of attention-based models. By proposing handcrafted weights or using computational complexity arguments, a large amount of past theoretical works have sought to characterize which tasks are and which are not in the hypothesis class of Transformer models. However, little work investigates the learnability of such solutions. In this work, we make progress towards this goal. Inspired by recent loss landscape analysis work, we propose preliminary sample complexity bounds for learning C-RASP constructions with Transformers.

Explore similar work

Sep 8, 2026cs.LG

Length Generalization for Transformers via Compression

Recent advancements in transformer length generalization theory enable us to reliably predict when a transformer can learn to solve a task. In particular, the C-RASP hypothesis (a formalized version of the so-called RASP-l conjecture) posits that transformers length-generalize on a task if and only if a solution is expressible in the C-RASP language. While this hypothesis has strong empirical validation, theoretical problems arise from the fact that no computable length generalization bounds exist for C-RASP, alongside the discovery of seemingly contradictory experiments. To address these problems, we refine the C-RASP hypothesis utilizing the recently-proposed fragments C-RASP+ and C-RASP1. These fragments have computable length generalization bounds, though in the worst case requiring an extremely large (double exponential) sample size. It is an open question whether these sample size bounds are tight. In this paper, we resolve this open question by providing an exponentially tighter bound. In doing so, we show a polynomial length generalization bound for transformers if we adopt compressed strings, via a novel connection to power words. As an application, we show how this yields a fine-grained analysis of the C-RASP conjecture that resolves contradicting experimental evidence against it.
Georg Zetzsche, Hongjian Jiang, Andy Yang +4
Aug 13, 2026cs.AI

On the Expressive Power of Transformers

Multi-layer transformers form the critical component of essentially all large language models (LLMs) in use today. Because of their ubiquity and computational capability, there is a rapidly growing body of work that aims to precisely calibrate the expressive power of transformers as language recognizers by comparing them against standard models of computation studied for decades by the theoretical computer science community. In this endeavor, circuit complexity has by and large emerged as the "correct" branch of computational complexity to analyze the expressive power of transformers; the reason is that parameterizing transformers by the various resources they use, such as attention and precision, leads to direct comparisons with different classes of circuits parameterized by resources such as type of gates, size, and depth. Here, we present an overview of selected results that delineate the expressive power of transformers using concepts and methods from circuit complexity.
Phokion Kolaitis, Rik Sengupta
Jun 8, 2026cs.LG

Tight Sample Complexity of Transformers

We tightly characterize the VC dimension of depth-LL Transformers with a total of WW parameters, mapping an input sequence of length TT to a single output, establishing an upper bound of O(LWlog(TW))O(L W \log (T W)) and a nearly matching lower bound of Ω(LWlog(TW/L))Ω(L W \log (T W / L)). We further tightly characterize the sample complexity of chain-of-thought learning using such a Transformer, showing teacher forcing (i.e. selecting a predictor consistent with the entire chain-of-thought on training data) learns with sample complexity O(LWlog((T+T)W))O\left(L W \log \left(\left(T+T^{\prime}\right) W\right)\right) and that any learning rule that uses chain-of-thought data requires at least Ω(LWlog((T+T)W/L))Ω\left(L W \log \left(\left(T+T^{\prime}\right) W / L\right)\right) examples, where TT is the input length and TT^{\prime} is the number of autoregressive steps.
Chenxiao Yang, Nathan Srebro, Zhiyuan Li