arXiv:2610.28918cs.LGOct 2026

Manuscript Offprint

arXiv:2610.28918

Query Feedback and Teaching for Stable and Certifiable Language Generation

Farnam Mansouri, Alireza F. Pour, Grigoris Velegkas, Sandra Zilles

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Language generation in the limit studies whether a learner observing an enumeration of an unknown target language can eventually generate only valid, previously unseen elements. We study stability, introduced by Kalavasis, Mehrotra, and Velegkas [KMV25b], which requires the generator's infinite output set to eventually remain unchanged, and introduce the stronger notion of certifiability, which requires the generator to determine from its observations that its current output is valid. Drawing on teaching sets in learning theory, we introduce a hierarchy of teaching dimensions for generation under three increasingly strict success criteria: correctness, stability, and certifiability. These dimensions measure the minimum number of selected examples whose appearance guarantees the corresponding success condition. We also study stability and certifiability in the membership-query model of Charikar and Pabbaraju [CP25]. We characterize stable and certifiable generation, both with and without query feedback, and establish their relationships with uniform generation and identification in the limit. In particular, we give a finite-witness characterization of stable generation, analogous to Angluin's tell-tale characterization of identification, resolving a gap left open by Kalavasis, Mehrotra, and Velegkas [KMV25b]. We further compare these generation notions with identification in the limit and contrast their teaching requirements on well-studied language families, including regular and erasing pattern languages.

1 Introduction

Large Language Models (LLMs) exhibit remarkable capabilities across a wide variety of domains. Yet, despite their empirical success, a rigorous theoretical understanding of how and why these models succeed remains elusive. Because modern LLMs are highly complex systems, developing a mathematical foundation necessitates studying them through clean theoretical abstractions that isolate core phenomena of interest [Mal23; KM24; KV24; KNVZ25; JVBG+25; GLS25].

One such abstraction that has recently gained significant traction is the stylized model of language generation in the limit, introduced by Kleinberg and Mullainathan [KM24]. Inspired by

*f5mansou@uwaterloo.ca. Supported by a NSERC Canada Graduate Scholarship-Doctoral (CGS-D), David Cheriton Scholarship and a Vector Institute Research Grant.

†^{\dagger}alireza.fathollahpour@uwaterloo.ca. Supported by a David Cheriton Scholarship and a Vector Institute Research Grant.

†^{\dagger}Supported through a Canada CIFAR AI Chair at the Alberta Machine Intelligence Institute (Amii), through an NSERC Canada Research Chair, through the New Frontiers in Research Fund under grant no. NFRFE-2023-00109 and through the NSERC Discovery Grants program under application no. RGPIN-2026-05856.

the classical inductive inference framework of Gold [Gol67] and Angluin [Ang80b], this model asks a basic question: when a generative model is trained on a stream of examples from an unknown target language K belonging to a known countable collection of languages L={L1,L2,…}\mathcal{L} = \{L_1, L_2, \ldots\} over a domain X\mathcal{X}, is there a finite point after which the model consistently produces novel and valid elements of KK? Concretely, the problem is formulated as an online game in which an adversary chooses a target language K∈LK \in \mathcal{L} along with an enumeration x1,x2,…x_1, x_2, \ldots of all elements in KK. At each round tt, after observing St={x1,…,xt}S_t = \{x_1, \ldots, x_t\}, the learner outputs a guess—either a single unseen element yt∈X∖Sty_t \in \mathcal{X} \setminus S_t (element-based generation) or an infinite subset Gt⊆XG_t \subseteq \mathcal{X} of candidate outputs (set-based generation)—and succeeds in the limit if, after some finite round t∗t^*, all subsequent outputs are valid for KK. 1^1 The main result of Kleinberg and Mullainathan [KM24], namely that language generation in the limit is possible for all countable collections of languages, stands in stark contrast to the classical negative results for language identification in the limit, where the learner must eventually pinpoint the exact index of KK in L\mathcal{L} [Gol67; Ang80b]. This separation has sparked a vibrant line of work exploring various facets of language generation, including breadth and density [KMV25b; CP25; PRR25; KW25; KW26], noisy data [RR25; BPZ26; MVYZ25], privacy [MVYZ26], and memory constraints [KMSV26; FPPS+26].

Yet, a crucial practical aspect of language generation has remained largely unexplored: the model of Kleinberg and Mullainathan [KM24] imposes no requirement on the learner to know when it is safe to stop training and start generating. Even though a successful generator is guaranteed to eventually output valid elements after some finite time t∗t^{*}, this convergence time depends on the unknown target language and enumeration, and the learner itself is never aware of whether t∗t^{*} has been reached. In real-world machine learning pipelines, however, practitioners do not train blindly; they continuously track training and validation metrics that inform them about the progress of the run and provide a concrete signal of when training is “complete” and the model can be safely deployed. To capture this phenomenon theoretically, we wish to study language generation in the limit by learners that can eventually certify that they are generating correctly; we call this certifiable language generation.

Closely intertwined with certifiability is a previously studied fundamental property of the learning process, namely stability [KMV25b; KMV25a]. In the original setting of Kleinberg and Mullainathan [KM24], the learning algorithm is permitted to change its mind infinitely often, oscillating indefinitely between different candidate generating sets even after all of them are valid subsets of K. Stability addresses practical situations in which we would like the training process to eventually converge to a single set to generate from. In fact, stability is a necessary condition for certifiability: once a learner can assess that it is safe to stop training, it can immediately freeze its output and stabilize from that point onward. Conversely, stability alone may not suffice to tell us when to stop training, as a stable generator could converge to a valid set at some finite time t∗t^{*} without ever knowing that the point of stabilization has been reached. Kalavasis, Mehrotra, and Velegkas [KMV25b] established a strict separation between stable and non-stable generation even for countable collections, but left open a characterization of when stable generation is possible. Thus, a central goal of our work is to characterize when both stable and certifiable generation can be achieved.

Moreover, we extend the study of stable and certifiable language generation to two natural settings that were recently introduced in the literature: (i) generation with feedback to active queries by the learner [CP25; HKMV26] and (ii) generation from size-restricted sets of examples provided

1^{1}The original formulation of Kleinberg and Mullainathan [KM24] is element-based, but the set-based formulation of subsequent works [KMV25b; CP25; KW25; KW26] naturally captures the idea of a “checkpoint” in training from which onward one can repeatedly sample arbitrarily many novel strings even if training is paused. We adopt the set-based formulation, since is the natural setting for studying stability. Most of our definitions and results not referring to stability are easily adaptable to the element-based setup.

by the environment [LHJG26], akin to teaching sets [GK95] in the context of concept learning.

(i) Prior work [CP25; HKMV26] studied settings in which the learner can actively obtain information about the target language K by asking whether strings x of its choice are in K. Since stability and certifiability impose string requirements on language generation, we ask the question in which way query feedback can help to fulfill these requirements.

(ii) Both stability and certifiability require that on every enumeration of the target language K, the learner eventually reaches a point of (certifiable or non-certifiable) stability, though the time and manner in which this point is reached may depend on the specific order in which examples are presented. An even more appealing scenario is when, for every language K∈LK \in \mathcal{L}, there exists a finite “core” set of examples—which we refer to as a teaching set, borrowing terminology from learning theory [GK95]—such that as soon as all elements of this set appear in the input stream, the generator is guaranteed to have stabilized (or certified correctness) from that point onward, regardless of the rest of the enumeration. Beyond providing an enumeration-independent guarantee of convergence, the existence of such teaching sets is closely tied to designing data-efficient training curricula. In this work, we seek to understand the exact conditions under which stable generation and certifiable generation can be obtained—with or without teaching sets.

Main Contributions. This paper introduces the notion of certifiable language generation as a natural strengthening of stable generation. We show that certifiability is a strictly stronger requirement than stability alone, as part of a set of separation results establishing a strict hierarchy of the notions of uniform [KM24; RLT25], certifiable, stable, and unrestricted language generation, with and without query feedback. Interestingly, under query feedback, stability alone is not a restrictive condition, though certifiability is. Notably, some of our separations are witnessed by the well-studied class of pattern languages [Ang80a; Shi82].

To gain a deeper understanding of the additional difficulty that certifiability imposes over stability, we give characterizations of generation under these two notions, thereby answering an open question of Kalavasis, Mehrotra, and Velegkas [KMV25b; KMV25a] asking for a characterization of stable generation. We complement these results by analogous characterizations in the query-augmented learning setting.

Our characterizations in the query-free setting rely on the structure of finite witness sets, akin to tell-tales used in characterizations in the identification setting [Ang80b]. Such finite witness sets are closely related to teaching sets studied in learning theory [GK95]. While teaching sets for language generation were implicitly introduced by [LHJG26], we initiate their study in the settings of stable and certifiable generation, again establishing a hierarchy across various notions of generation. In contrast to Li et al.'s (2026) result, stating that generation for countable language collections can always be achieved with teaching sets of size 1, we use countable classes to exhibit arbitrarily large separations between teaching set sizes for certifiable generation, stable generation, and generation in the limit. This shows that, in general, larger teaching sets are needed to satisfy stronger requirements on the learning process.

Incidentally, we exhibit a relationship between the size of stable generation teaching sets and the size of finite sets with the so-called non-clashing property, which is known in the context of machine teaching [FKSS+23], identification in the limit [MZ24], and sample compression [KW07]. This relationship mirrors an analogous relationship between complexity parameters for identification in the limit [MZ24].

References (74)