cs.DSJun 24, 2026

Space-Efficient Language Generation in the Limit

Authors: Nicolas FlammarionChirag PabbarajuHristo PapazovMiltiadis StourasOla Svensson

Organizations: EPFL, Switzerland · Stanford University, USA

Abstract

We initiate a resource-aware theory of \textit{language generation in the limit} under the minimal constraint of space efficiency. In our framework, a learner observes an adversarial positive stream from a target language KK and must eventually output a hallucination-free hypothesis language LKL \subseteq K while omitting at most ΔΔ strings of KK. We focus on Cs,k\mathcal{C}_{s,k}, the collection of languages recognized by DFAs with at most ss states over an alphabet of size kk, as the natural hypothesis class for memory-bounded learners. In the exponential-space regime, we prove that a learner can exactly identify the target KK. Under a stricter memory budget, we characterize the strongest possible generation guarantees. In particular, we present a streaming algorithm using poly(s,k)\mathrm{poly}(s,k) space that converges to a hypothesis with generation gap Δ=O(k2s2)Δ= O(k^{2s-2}). Moreover, the learned hypothesis captures every string in KK of length at least 2s12s-1. We complement this result with a near-matching lower bound through a reduction from a standard communication complexity problem. Specifically, achieving generation gap Δk(1ε)sΔ\le k^{(1-\varepsilon)s} requires kΩ(εs)k^{Ω(\varepsilon s)} memory. Together, these results reveal a sharp transition between polynomial-space generation and exponential-space exact identification.

Explore similar work

CardsList
  1. Mistake-Bounded Language Generation

    May 11, 2026Jon Kleinberg, Charlotte Peale, Omer ReingoldX-Logsmask