cs.LGOct 16, 2026

No-Regret Language Generation

Authors: Jiaxun Li, Vinod Raman, Ambuj Tewari

Organizations: Department of Statistics, University of Michigan

Abstract

We introduce no-regret generation, which requires a generator to make a sublinear number of mistakes uniformly over all demonstration sequences and compatible target languages. We also formulate an agnostic variant that allows arbitrary demonstrations that may not be compatible with any languages. For both settings, we introduce tree-based mistake-forcing dimensions that exactly characterize finite-horizon minimax complexity and establish necessary and sufficient conditions for no-regret generation. Our characterizations reveal a rich spectrum of generation rates: up to constant rescaling, every admissible nondecreasing profile is attainable in both the realizable and agnostic settings. Finally, we connect generation complexity to online prediction: for language classes of finite Littlestone dimension dd, we obtain realizable mistake bounds of O(dlog⁡(1+T/d))O(d\log(1+T/d)) and agnostic regret bounds of O(dTlog⁡(1+T/d))O(\sqrt{dT\log(1+T/d)}). The realizable bound is optimal up to universal constants.

Figures & tables

Explore similar work

May 11, 2026

Mistake-Bounded Language Generation

We investigate the learning task of language generation in the limit, but shift focus from the traditional time-of-last-mistake metric of a generator's success to a new notion of "mistake-bounded generation." While existing results for language generation in the limit focus on guaranteeing eventual consistency, they are blind to the cumulative error incurred during the learning process. We address this by shifting the goal to minimizing the total number of invalid elements output by a generation algorithm. We establish a formal reduction to the Learning from Correct Demonstrations framework of Joshi et al. (2025), enabling a general recipe for deriving mistake bounds via weighted update rules. For finite classes, we provide an algorithm that simultaneously achieves an optimal last-mistake time of Cdim(L)\mathsf{Cdim}(L) and a mistake bound of ⌊log⁡2∣L∣⌋\lfloor \log_2 |L| \rfloor, whereas for the non-uniform setting of countably infinite streams of languages, we prove a fundamental trade-off: achieving logarithmic mistakes O(log⁡i)O(\log i) necessarily precludes convergence guarantees established in prior work. Finally, we show that our framework can be extended to accommodate noisy adversaries and guarantee mistake bounds that scale with the adversary's suboptimality.
May 28, 2026

On Language Generation in the Limit with Bounded Memory

We study language generation in the limit under bounded memory. In this task, a learner observes examples from an unknown target language one at a time and must eventually output only new valid examples. Prior work assumes access to the entire history, a strong assumption since realistic algorithms retain limited past information. Classical work in learning theory shows memory constraints dramatically alter learnability; we extend this to language generation. First, we study memoryless generators. Under a mild enumeration restriction, every countable collection of infinite languages remains generable without memory. Without this restriction, we exactly characterize when memoryless generation is possible. For finite collections, we characterize the optimal minimax density achievable by memoryless generators -- the best density guaranteed against any collection of a given size. This combinatorial bound relies on Sperner's theorem and symmetric chain decompositions. We further show that a sliding window of the last WW examples does not improve this worst-case density, whereas allowing it to store bb adaptively chosen past examples improves the achievable density for every b≥1b \geq 1. Finally, we revisit identification in the limit, where the learner must converge to a single correct hypothesis for the target language. We focus on its incremental variant, where the learner remembers only its previous guess. Here, although exact identification fails on a collection of just three languages, a mild relaxation requiring convergence to an ``approximate'' version of the target is achievable for every finite collection. These results show bounded memory affects these tasks differently: generation remains achievable for every countable collection, while density and identification are confined to finite collections, with guarantees weakening as the collection grows.
Jun 24, 2026

Space-Efficient Language Generation in the Limit

We initiate a resource-aware theory of 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 L⊆KL \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(k2s−2)Δ= O(k^{2s-2}). Moreover, the learned hypothesis captures every string in KK of length at least 2s−12s-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.