Language Identification in the Limit with Computational Trace

Binghui Peng, Amin Saberi, Grigoris VelegkasICLR 2026

Large Language Models (LLMs) have demonstrated remarkable capabilities when trained on "Chain-of-Thought" (CoT) data—step-by-step reasoning traces that guide the model toward a conclusion. While empirically successful, a formal mathematical understanding of why these traces help has remained elusive. This paper provides a theoretical foundation for CoT training by augmenting E. Mark Gold’s classic "identification in the limit" framework with computational traces, proving that even the most complex computable languages become learnable.

Overcoming Gold's Impossibility Result

In 1967, Gold introduced a pessimistic model of learning called "Language Identification in the Limit." He demonstrated that if a learner only sees positive examples of a language (e.g., valid sentences, without ever being explicitly told which sentences are invalid), they cannot reliably learn even the simplest class of languages, such as Regular Languages recognized by Deterministic Finite Automata (DFAs). The learner can never be certain if the target language is a small, specific set or a massive superset.

This paper asks a fundamental question: If we provide Gold’s learner with the "computational trace" (the internal steps) of the machine that accepted the string, does the impossible become possible?

The "Trace" Framework

To answer this, the authors introduce a new formal model: Identification in the Limit with Trace. In this paradigm, for any given input string, the learner receives not just the string itself, but the sequence of internal states and configurations the machine went through to process it.

A simple Deterministic Finite Automaton (DFA) illustrating the internal states that make up a computational trace.

The learner's goal is to eventually converge on a correct description of the target language after observing a finite number of examples and their corresponding traces. The authors evaluate this learnability against the standard Chomsky Hierarchy: Regular Languages (DFAs), Deterministic Context-Free Languages (DPDAs), and Recursively Enumerable Languages (Turing Machines).

With perfect traces, the "impossibility" of learning vanishes. The learner can essentially "see" the blueprint of the machine by observing its state transitions. The paper's Theorem 3.1 establishes that the class of all computable languages (those recognizable by Turing Machines) becomes identifiable in the limit. This is a massive expansion over the original Gold model.

The Error Trichotomy: Learning with Noisy Traces

Recognizing that real-world CoT data is often messy or incomplete, the authors also analyze a robust version of the model. They use edit distance to quantify "corruption" in the traces—such as missing steps, incorrect states, or extra noise.

The most striking finding is a clear hierarchy of "fragility" across different language classes, establishing an error trichotomy:

  • DFAs are highly resilient: A learner can tolerate a constant fraction of corruption. Even if a large portion of a DFA trace is corrupted (any rate $\alpha < 1$), the language remains identifiable.
  • DPDAs are sensitive: Deterministic Pushdown Automata cannot handle a constant error rate. To successfully learn a context-free language, the error rate must be diminishing ($o(1)$); the "quality" of the reasoning trace must improve as the problem gets longer.
  • Turing Machines are brittle: For the most complex, recursively enumerable languages, the learner can only tolerate a finite, bounded number of total errors across the entire trace. If errors grow with the trace length, the underlying "world model" becomes unrecoverable.

Limitations and Future Directions

While this work provides a profound theoretical justification for CoT training, it is bounded by its asymptotic nature. The "in the limit" framework guarantees eventual success but does not address sample complexity (how many examples are practically needed). Furthermore, the model assumes the learner only sees positive examples; exploring how "negative traces" (traces of why a machine rejected a string) affect learning remains an open question. Finally, while the paper focuses on identifying the rules of a language, future research could bridge the gap between identifying these rules and the actual generation of new, unseen valid strings by specific architectures like Transformers.

Summary updated

BibTeX
@inproceedings{peng2026language,
  author = {Binghui Peng and Amin Saberi and Grigoris Velegkas},
  title = {{Language Identification in the Limit with Computational Trace}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=1OAGf7ntSE},
}
Figure