Manuscript Offprint
arXiv:2610.28747A Reverse-Gold Theorem: Positive-Data Identification by Substrate-Bounded Contrastive Learners
Abstract
Gold's theorem shows that no learner can identify an arbitrary language in a superfinite class from positive presentations alone. We prove a positive result of a different shape. Fix an innate recursive contrast operator mapping any string to a finite set of structurally bounded perturbations of it, and a discriminative scorer of bounded capacity trained by InfoNCE-style contrastive estimation (van den Oord, Li, & Vinyals, 2018; Ma & Collins, 2018) on self-generated perturbations. Under a faithfulness condition relating operator, scorer, and target, the trained scorer achieves PAC conditional identification from positive data alone: with high probability it ranks all but an -fraction of positives above every out-of-language perturbation in their own orbit, with sample complexity polynomial in the capacity, the orbit size, the score bound, and . The negatives are constructed by the learner, not supplied by an oracle, and no global normalizing constant over strings is ever computed. The misranking bound follows from the geometry of the contrastive loss—per-example loss floors plus a definite loss increment under misranking—yielding an rate, together with an explicit approximation gap that quantifies the cost of in-language ("colliding") perturbations and vanishes for orbit-pure operators. The ranking guarantee lifts to a global membership classifier under a margin condition, and the same operator composed with the learned scorer is a normalization-free Metropolis–Hastings generator. We instantiate the hypotheses for substitutable context-free languages (Clark & Eyraud, 2007) and the subregular classes (Heinz, 2010; Hayashi & Kamigaito, 2025), and state an open conjecture locating the construction in the mildly context-sensitive hierarchy.
Keywords: Gold's theorem, positive-data learnability, contrastive estimation, grammatical inference, sample complexity, subregular languages
1 Introduction
Gold (1967) proved that for any class C of languages containing all finite languages and at least one infinite language, no learner identifies an arbitrary in the limit from a positive presentation. The proof is adversarial: a teacher can withhold the strings that would distinguish a finite hypothesis from an infinite target, and a positive-only learner cannot falsify the finite hypothesis without seeing strings known to be absent from L. Since the context-free and context-sensitive classes are superfinite, neither is Gold-identifiable from positive data. The usual conclusions are that either explicit negative evidence is available, or the hypothesis space must be restricted in advance, or the identification criterion must be weakened from exact convergence to approximate (PAC) convergence (Valiant, 1984).
This paper isolates a fourth structural ingredient that makes positive-data learning go through without external negatives and without a stipulated restriction on which languages are possible. Suppose the learner is equipped with a fixed recursive contrast operator that maps any string to a finite set of structurally minimal perturbations of it—substitution of a like-typed constituent, deletion, local reordering, and compositions of these—defined uniformly over all strings without reference to the target. Then, given a positive example , the learner can manufacture its own candidate negatives , without an oracle, even though it does not know which elements of are in fact out-of-language. Pairing with a bounded-capacity discriminative scorer and training by a contrastive (InfoNCE) objective, we ask: can the learner identify the target from positive data alone, using its self-generated perturbations as implicit negatives?
We answer affirmatively, in a precise sense. The result is a conditional-ranking guarantee: with high probability the trained scorer ranks all but an -fraction of observed positives strictly above every out-of-language string in their own orbit, with sample complexity polynomial in all parameters. This is the honest primitive that the contrastive objective delivers; we are careful to distinguish it from a global membership classifier, which we recover only under an additional margin assumption (Corollary 21), and we quantify, rather than assume away, the cost of perturbations that land inside the target—the contrastive analogue of class collision (Saunshi et al., 2019)—through an explicit approximation gap (Proposition 17).
-
The misranking bound is derived from the loss geometry directly. The per-example InfoNCE loss has a known per-example floor, and any misranking forces the loss above log 2; together these give a linear relationship between misranking probability and excess loss, hence an sample complexity, with the approximation error appearing as an explicit additive term (Lemma 16). This avoids routing through a generic surrogate-calibration transform, which would only give .
-
We analyse orbit collisions—perturbations of a positive that remain in-language. Under a saturated form of realizability the approximation gap is bounded by the expected log-collision count , vanishing exactly for orbit-pure operators; and when orbits intersect the support of the input distribution, the gap is strictly positive for any scorer, an information-theoretic feature of self-supervision rather than proof slack (Proposition 17 and Remark 18).
-
We track the dependence on orbit size correctly through a vector-contraction step (Maurer, 2016), which the loss-Lipschitz heuristic obscures (Lemma 14).
-
We show that the same operator R composed with the learned scorer is a normalization-free Metropolis–Hastings sampler whose stationary law, on finite components, is the score-reweighted measure on the input’s R-closure (Proposition 23); the construction is thus a controlled generator as well as a discriminator.
-
We verify the hypotheses on substitutable context-free languages and the subregular classes, exhibit an explicit end-to-end instance with zero approximation gap (Appendix B), and state a conjecture locating the construction in the mildly context-sensitive hierarchy (Section 8).
Scope. This is a formal learnability paper. The construction was motivated by a question in the theory of language acquisition—whether the poverty-of-the-stimulus argument’s appeal to innate grammatical content can be replaced by an innate procedural operator plus a capacity bound—but we develop only the mathematics here and state the cognitive interpretation separately. Where a term has a linguistic motivation (“recursive,” “constituent,” “closure”), it is given a precise formal meaning and used only in that sense.
2 Formal Setup
Let be a finite alphabet and the set of finite strings over . A language is a subset .
Definition 1 (Input distribution) The learner receives a sample drawn i.i.d. from a distribution on with . We do not assume ; the input distribution may concentrate on a sub-region of the target.
Definition 2 (Recursive contrast operator) A recursive contrast operator on is a map assigning to each a finite set of perturbations, satisfying:
-
Locality. Each differs from by a structurally bounded perturbation: substitution of a constituent by a like-typed constituent, deletion, insertion, reordering, or composition of such operations up to bounded depth, defined over the constituent bracketing of (Remark 3).
-
Universality. R is defined uniformly over without reference to any specific target L.
-
Recursivity. commutes with structural composition: if with in the relevant structural class, then .
We write and , and assume .
The canonical instance for context-free targets is substitution of distributionally equivalent constituents, which underpins the algorithm of Clark & Eyraud (2007); richer operators (adjoining, multi-component substitution) are required higher in the hierarchy, as discussed in Section 8.
Remark 3 (Constituency as procedure versus output) The locality clause is defined over constituents, and a natural objection is that this presupposes the bracketing that learning is meant to deliver. The resolution is to read R as a procedure—"substitute a like-typed constituent," etc.—defined as a function of whatever bracketing is currently hypothesized, while as an output depends on the current state of learning. Started from a trivial (flat) bracketing, R degenerates to surface substitution; the contrastive signal under that degenerate R already separates substitutable from non-substitutable spans, in the distributional sense that defines constituents (Clark & Eyraud, 2007); the induced bracketing refines the input to R on the next pass. Bracketing and scorer are recovered together as a joint fixed point. Nothing in the theorems below depends on the bracketing being given in advance; the operator is fixed, its instantiation is co-induced.
Definition 4 (Discriminative hypothesis class) A discriminative hypothesis class of capacity is a parametrized family of scoring functions whose empirical Rademacher complexity satisfies for every sample of size , for all . The sample-uniform (worst-case) form of the bound is used in Lemma 14, where the class is evaluated on deterministically transformed copies of the data. We use Rademacher complexity rather than VC dimension because the scorers are real-valued; for the combinatorial instances below the two are interchangeable up to logarithmic factors via Dudley/VC chaining (Mohri, Rostamizadeh, & Talwalkar, 2018).
Assumption 5 (Bounded scores) There is a constant with for every and every .
Assumption 5 holds for the architectures we have in mind—bounded-weight recurrent networks, transformers with saturating readouts, finite-feature linear scorers—with B an architectural constant fixed by the substrate, not scaling with the input. Without a score bound the InfoNCE log-loss is unbounded below and uniform-convergence arguments do not apply directly.
Definition 6 (Pointwise faithfulness) Fix a language L and an input distribution supported on L. The pair is faithful to L (relative to ) if:
-
Boundary support (a.e.). For -almost every , the orbit contains at least one element of .
-
Realizability. There is with for -almost every and every .
The two clauses are logically independent: boundary support is a property of R and L (does the operator expose the boundary?); realizability is a property of H and L (can the scorer represent it once exposed?). As Section 4 and Theorem 10 make precise, neither clause is needed for the misranking inequality—which is agnostic—but they interpret it: boundary support makes the guarantee non-vacuous, and realizability controls the approximation gap. Boundary support is stated “almost everywhere” deliberately: strings whose orbit happens to lie inside L contribute no contrastive signal but do not obstruct the proof.
Definition 7 (Saturated realizability) The pair is saturatedly realizable for (relative to ) if there is with for -almost every and for every . Saturated realizability implies clause 2 of Definition 6; it additionally requires that the realizing scorer can be driven to the score bound, which holds whenever is closed under clipping of positive rescalings of a strict realizer.
Note that Definition 7 constrains only on positives and on out-of-language orbit elements; in-language orbit elements may score anywhere in , and indeed must score if they also lie in . Proposition 17 quantifies the cost of these collisions.
Definition 8 (Uniform faithfulness) A single pair is uniformly faithful to a class if it is faithful to every (under each admissible ). Theorem 10 is proved one target at a time and uses only pointwise faithfulness of the being learned. Uniform faithfulness—one operator and one substrate adequate across the entire class—is the substantially stronger property: it is what the conjecture of Section 8 bets on, and establishing it for a mildly context-sensitive class is itself a major open problem, since it quantifies over every language in the class at once.
Definition 9 (InfoNCE objective) For , the InfoNCE objective (van den Oord, Li, & Vinyals, 2018; Ma & Collins, 2018) is
with empirical version replacing the expectation by the average over . Equivalently, is the expected multinomial-logistic loss of the -way classification problem “identify among ,” with the correct class.
3 Main Result
Throughout, write
for the per-example loss floor identified in Lemma 13, its mean under the input distribution, and its worst case . Define the approximation gap
the amount by which the best scorer in H exceeds the mean floor; nonnegativity is part of Lemma 13. When orbit sizes vary, the per-example floor—not the worst-case floor—is the correct baseline: it is what makes the pointwise calibration of Lemma 16 valid, and what makes attain zero in the orbit-pure case (Proposition 17). Section 4 interprets .
Theorem 10 (Reverse-Gold, ranking form) Fix any language , operator with orbit bound , class of capacity and score bound with , and input distribution supported on . Then for every , the InfoNCE-trained scorer with obtained from
samples satisfies, with probability at least ,
Remark 11 (Interpretation of the bound) The bound is agnostic: no faithfulness assumption is used in its derivation. The clauses of Definitions 6 and 7 interpret it rather than power it. Boundary support guarantees the misranking event is non-vacuous—some orbit elements lie outside L, so there is something to rank wrongly; absent it the left-hand side is trivially zero. Realizability makes the problem well-posed: H contains a correct-ranking scorer. Saturated realizability bounds the gap by the collision term, with , and forces when the operator is orbit-pure almost everywhere, (Proposition 17). In that case the conditional misranking probability is at most : the learned scorer ranks all but an -fraction of positives above every out-of-language string in their own orbit. We call this PAC conditional identification of L relative to and R.
The criterion is conditional ranking over , the smallest set containing and closed under R. We are explicit (Section 4) that this is a genuinely different criterion from Gold-style identification of L: the two coincide exactly when L is the R-closure of a seed subset, and otherwise the theorem certifies behaviour only on the closure of the input. The proof is assembled from four lemmas. The first (Lemma 12) is bookkeeping; the analytic content is in Lemmas 14 and 16, with the loss geometry of Lemma 13 feeding both. No property of the population maximizer is needed. Proofs of Lemmas 13 and 14 are deferred to Appendix A; the calibration argument, which carries the novelty, is given in the main text.
Lemma 12 (Self-negative construction) For any , the orbit partitions into and , with for -almost every by boundary support. Write and . The learner has access to (known positive) and to (elements of unknown status), but not to the partition.
Proof Immediate from Definitions 2 and 6.
The content of Lemma 12 is that the learner constructs candidate negatives without an oracle. Were the partition known, the learner would have explicit negatives and Gold's theorem would not bind; the difficulty—and the reason the contrastive route is non-trivial—is precisely that it is not known.
InfoNCE, unlike vanilla noise-contrastive estimation (Gutmann & Hyvärinen, 2012), does not require the noise distribution to dominate the data distribution: it estimates only the relative ranking of a positive against its own conditional negatives, which is all the construction uses, and remains well-defined even when contains only out-of-language strings. Drawing negatives conditioned on the positive places the construction in the conditional-NCE family (Ceylan & Gutmann, 2018), of which R is a structured, non-parametric instance: the conditional noise distribution is supported on the orbit of recursive perturbations rather than on a hand-chosen parametric family.
Lemma 13 (Loss range and per-example floor) The per-example loss satisfies
for every and , where . The floor is the global minimum over score configurations in and is attained only at and for all . Consequently for every , so . Note that , with equality iff ; when orbit sizes vary, the per-example loss can fall strictly below , which is why the floor must be indexed by .
Lemma 14 (Uniform convergence) With probability at least over ,
for an absolute constant C.
Remark 15 (On the factor) The orbit size enters Lemma 14 twice: logarithmically through the loss range , and linearly through the vector contraction, . The linear factor is the conservative cost of reusing one scorer across coordinates; the loss-Lipschitz heuristic (“softmax is 1-Lipschitz”) hides it. It is improvable: the refinement of the vector-contraction inequality and class-count-optimal multiclass bounds reduce it toward . We carry the conservative because the thesis needs only polynomiality, and state the bound honestly rather than tightly. In the instantiations of Section 6 the orbit size is typically small (bounded substitution sets, single-segment edits), so the factor is benign in practice; it bites only for operators of large fan-out, where the refinement becomes worth the extra work.
Lemma 16 (Direct calibration of misranking) Assume , so . For every ,
Proof Fix and suppose it is misranked: some has . Then the denominator of (1) is at least , so the softmax mass on the positive is and the per-example loss is . By Lemma 13, always. Hence, pointwise,
because when is misranked the numerator is and the ratio is therefore , and when is not misranked the right-hand side is . Taking expectations over gives .
Proof [Proof of Theorem 10] Apply Lemma 16 to :
using by definition of the approximation gap. By Lemma 14 the bracketed estimation term is at most with probability . Choosing so that this is at most —that is, —gives with probability . No property of the population maximizer is invoked: the bound is on the empirical maximizer directly, through its excess loss.
Proposition 17 (Collision bound on the approximation gap) Suppose is saturatedly realizable for (Definition 7). Then
where . In particular, if is orbit-pure for almost everywhere— for -a.e. —then , and the misranking bound of Theorem 10 collapses to .
Proof Evaluate at the saturating scorer . For -a.e. , , every scores exactly , and every scores at most . Hence
Since for , and ,
Taking expectations, , and subtracting gives the bound. Under a.e. orbit purity, a.e., so ; combined with (Lemma 13), .
Remark 18 (Collisions are intrinsic, not proof slack) The collision term cannot in general be removed by a better scorer. If with both and carrying positive mass, the per-example floors at and at make contradictory demands on the single value : attaining requires , while attaining requires . For each fixed value of , at least one of the two per-example gaps is bounded away from zero, and minimizing their (mass-weighted) sum over the compact range shows strictly whenever orbits intersect the support with positive probability. This is the analogue, for self-generated structured negatives, of the class-collision phenomenon in contrastive representation learning (Saunshi et al., 2019): a perturbation that is itself a valid positive is an inherently ambiguous training signal. The misranking bound of Theorem 10 is accordingly non-vacuous exactly when , i.e. when the operator's outputs are mostly out-of-language; choosing to make its perturbations fail to be grammatical is part of the operator's job. Appendix B exhibits both regimes on a single target language.
Remark 19 (Why , and why no surrogate-calibration transform) The rate is , the agnostic uniform-convergence rate, and it comes out without a Fisher-consistency/ -transform argument. The reason is the special geometry of the contrastive loss exploited in Lemma 16: misranking forces and hence a definite loss increment above the per-example floor, which makes the misranking indicator pointwise dominated by a linear function of . Generic multiclass surrogate-calibration arguments (Tewari & Bartlett, 2007; Zhang, 2004) relate excess 0/1 risk to excess surrogate risk through a concave transform; routed that way the rate would degrade to , and the condition would be unnecessary. We prefer the direct linear bound: it is self-contained, gives the better rate, and exposes the role of the score bound. The condition is exactly what makes , i.e. what guarantees that at the worst-case loss floor the softmax mass on the positive exceeds 1/2: it says the substrate is not so capacity-starved relative to the orbit size that even its best scorer cannot confidently pick the positive out of the candidates . A larger lowers toward 0 and widens the margin in the denominator; the condition is mild, requiring only to grow logarithmically with . Under exact realizability the rate can be sharpened further to by optimistic-rate (realizable PAC) arguments; we do not pursue this.
Remark 20 (Ranking versus a global classifier) Theorem 10 is a conditional guarantee: each positive is ranked above the members of its own orbit. It does not by itself produce a single global threshold separating from , because score distributions of different orbits may overlap—a string correctly ranked below its own grammatical source may still outscore the source of another orbit. The conditional statement is what the contrastive objective certifies, and we state only that. The global classifier is recovered under an additional assumption in Corollary 21.
Corollary 21 (Global membership classifier under uniform separation) Assume, in addition to the hypotheses of Theorem 10, the following uniform separation condition: there exist and such that every near-optimal scorer separates, i.e. for each with there is a threshold with for -a.e. and for every . Train with , and calibrate the threshold
from an independent held-out positive sample of size . Then with probability at least , the classifier satisfies for every and .
The proof is given in Appendix A. Two honest notes on the assumption. First, separation is asserted over the whole -ball of near-optimal scorers, not for a single ideal : excess-loss control (Lemma 14) does not control the function distance between and any particular realizer, so a condition on one scorer cannot be transferred to the learned one without further convexity or identifiability structure; quantifying over the -ball is the assumption actually used. Second, the threshold is calibrated from positives alone—no labelled negatives exist in this setting—which is why the margin, rather than a two-sided sample, controls the negative side.
4 Where the Bias Lives
A learnability theorem that escapes Gold’s negative result must locate its inductive bias precisely. There are exactly three places it can live here, and they do different work.
The operator R. Fixed in advance, applied uniformly, treated as given. It constrains which structural operations are informative, not which languages are possible—it is the content of the boundary-support clause, asserting that R exposes the boundary of L almost everywhere. This is the one substantive structural commitment of the construction. Proposition 17 sharpens what “exposes the boundary” demands: it is not enough that some orbit elements leave L; the operator earns its keep to the degree that its outputs mostly leave L, since in-language outputs are collisions that inflate the gap.
The capacity bound . What makes the sample complexity polynomial. It is a parameter, not a stipulation: the theorem holds for any finite , with scaling polynomially in it.
Realizability, collisions, and the approximation gap. The realizability clause is the standard PAC realizability assumption transposed to the contrastive setting: the target ranking lies in . It does not hand the learner ; the learner must still find a good , which is the content of Lemma 14. Its quantitative residue is the gap , which Proposition 17 decomposes into two sources: the substrate's inadequacy (can represent the separation at all?) and the operator's collisions (how much of the orbit lies inside ?). Under saturated realizability the first source vanishes and ; under a.e. orbit purity both vanish and . The clause should not be oversold: in its uniform form (Definition 8) it is asserted for every with one fixed , a strong joint-adequacy claim about the substrate and the class; the theorem itself needs only its pointwise instance for the target at hand. The result has an agnostic form that drops it: without clause 2 of Definition 6, Theorem 10 still holds verbatim, with now interpreted as the irreducible approximation-plus-collision error of against the best achievable separation; the misranking bound degrades gracefully by exactly the substrate's inadequacy rather than presupposing adequacy. The margin condition of Corollary 21 is the version of needed to lift ranking to global classification.
The closure criterion. The criterion in Theorem 10 is conditional ranking over which is a strictly weaker object than L unless L is the R-closure of a seed. We state this rather than eliding it: when the closure is a proper subset of L, the theorem certifies nothing about . Whether natural target classes satisfy the closure condition under a fixed R is the open question of Section 8. This is the same boundary that separates “fits the closure of the sample” from “identifies the target” (Kodner, Caplan, & Yang, 2022; Yang & Piantadosi, 2022); the right response is to name the criterion exactly, which the theorem does.
5 From Discrimination to Production
The construction is discriminative—it learns to rank—but it is not confined to recognition. The two ingredients the learner already has, the operator R and the trained scorer , are exactly those a Metropolis–Hastings sampler requires.
Definition 22 (Symmetrized proposal and induced generator) Write for the reverse moves and for the symmetrized neighbourhood, so that by construction. Fix and a seed , and let be the connected component of in the graph with edges . On , define a lazy Markov chain: from , with probability remain at ; otherwise propose with probability and accept with probability
remaining at x on rejection. Call this the generator induced by .
Proposition 23 (Normalization-free generator) The chain of Definition 22 is reversible with respect to the measure on , and is irreducible and aperiodic on by construction. Then: (i) if is finite, the chain has unique stationary law on and converges to it from every initial state; if is infinite, no stationary probability law exists, since for every makes non-normalizable, and the chain is then a reversible local explorer with respect to the -finite measure ; (ii) the acceptance rule uses only score differences and proposal ratios, so no global partition function over is computed; (iii) every trajectory remains in , so the generator produces only structures reachable from the seed by symmetrized recursive composition.
The proof is in Appendix A.
Remark 24 (Reversibility, components, and mixing) Three caveats that Definition 2 does not resolve on its own. (i) Reversibility is not automatic. Substitution operators are self-inverse (replacing a constituent by a like-typed one is undone by the reverse replacement) and need no symmetrization; but deletion is not invertible by deletion—a deleted constituent is recovered only by the matching insertion—so the reverse moves must be adjoined, which is exactly what does. The proposition is stated for precisely so that the construction is valid for non-self-inverse operators. (ii) Components. may decompose into several components; the generator explores the one containing the seed, which is the right semantics for “generate from ” but does not by itself reach other components. (iii) Mixing. We give no mixing-time bound. For a practical generator the chain must mix in time polynomial in the structure size, which depends on the score landscape s and the connectivity of ; we leave this open.
The same operator that manufactures negatives for learning manufactures candidates for production, and the same scorer that ranks them in comprehension reweights them in generation. The generator computes no global normalizing constant and makes no claim of infinite cardinality: its reach is the component of a seed, and a stationary sampling law exists exactly when that component is finite. On infinite components the chain remains a well-defined local explorer, but normalizable stationarity—like exact identification—is out of reach, which is the generative face of the closure criterion. “Discriminative” here therefore does not entail “recognition-only.”
6 Instantiations
The hypotheses of Theorem 10 are non-vacuous: there are classes with explicit operators and capacity bounds satisfying them. An end-to-end worked instance with , together with a cautionary collision-heavy variant on the same target, is given in Appendix B.
6.1 Substitutable context-free languages
Clark & Eyraud (2007) prove that the substitutable context-free languages are identifiable in the limit from positive data; is substitutable if , , imply . In the present setting, substitutes a substring of by another observed string, is the family of substitution-closed scorers, and the boundary-support clause reduces to the substitutability hypothesis. Substitutability cuts both ways here, and the collision analysis of Proposition 17 is what makes the accounting honest: substitutions across matching contexts stay in by hypothesis—these are exactly the collisions —while substitutions across non-matching contexts supply the out-of-language negatives. The instance is therefore governed by the collision-quantified form of the theorem rather than the orbit-pure case: the bound is non-vacuous when the in-language fraction of the orbit is small, i.e. when most unrestricted substitutions are ungrammatical, which is the empirically typical regime for natural language. The co-induction of constituency (Remark 3) is the Clark–Eyraud congruence learned distributionally.
6.2 Subregular classes
The Strictly Local, Strictly Piecewise, and Tier-Based Strictly Local classes are identifiable from positive data (Heinz, 2010, 2018; Jardine & Heinz, 2016; Heinz & Idsardi, 2013). Here is generated by inserting, deleting, or substituting individual segments (or segments on the relevant tier), H is the family of factor-counting scorers, and faithfulness is local testability on the tier. Hayashi & Kamigaito (2025) show these classes are finitely observable—membership is fixed by a bounded set of local predicates—which is exactly the realizability clause instantiated for a linear, factor-counting H, and supplies a statistical-learning counterpart to the identification-in-the-limit results in the PAC form used here. Generic segment edits are not orbit-pure (an edit can land back in L); Appendix B shows how to choose the operator on a strictly 2-local target so that purity holds identically, and what goes wrong, quantitatively, when it does not.
7 Related Work
Implicit negatives and the size principle. The Bayesian size principle (Tenenbaum & Griffiths, 2001)—expected-but-absent forms function as implicit negative evidence—is the generative analogue of the present construction: where the size principle uses a generative model to compute expected frequencies and treats absences as informative, the contrastive construction uses R to construct expected perturbations and treats their dispreference as informative. Both make positive-only learning tractable through internal access to expected-but-unobserved structure; the discriminative version avoids the global normalization the generative version requires (Proposition 23).
Statistical theory of contrastive estimation. The bound in Lemma 14 sits in the generalization theory of contrastive learning, which begins with Saunshi et al. (2019): they analyse downstream classification quality under a latent-class model with i.i.d. negatives drawn from the marginal, and Tosh, Krishnamurthy, & Hsu (2021) extend the linear-model analysis under multi-view redundancy. Our setting differs on exactly the point these analyses idealize away: the negatives in are deterministic functions of the positive, so they are dependent, which blocks a naive i.i.d. analysis and is what forces the conditional (within-orbit) formulation here. The collision term of Proposition 17 is the structured-negatives analogue of the class-collision penalty in Saunshi et al. (2019). Van Elst & Ghoshdastidar (2025) develop PAC-Bayesian risk certificates for contrastive objectives that hold under exactly this kind of dependence (SimCLR's reuse of positives as negatives); their refinements indicate that accounting for the dependence structure of directly, rather than through the conservative vector contraction of Remark 15, is the natural route to sharpening the factor.
Relation to active (query) learning. The classical positive results on identifying language classes are active: Angluin's (Angluin, 1987) learns any regular set in polynomial time from a minimally adequate teacher answering membership queries (“is ?”) and equivalence queries (returning a counterexample). The present construction is passive and oracle-free—it sees only positive examples and manufactures its own contrasts via R. What replaces the membership oracle is the pairing of the operator (which proposes candidates) with boundary support (which guarantees the candidates straddle the boundary often enough to be informative); what replaces the equivalence oracle is nothing, since there is no counterexample feedback, only the contrastive signal. The conditional-ranking criterion, weaker than exact identification, is the price of dispensing with both oracles—and it is the same trade visible in the closure-versus-target gap of Section 4.
8 Open Problems
8.1 The mildly context-sensitive conjecture
The central open question is which class C, in the linguistically relevant range, satisfies the hypotheses with a fixed R.
Conjecture 25 (Bounded-fan-out MCS) For any class C in the mildly context-sensitive hierarchy whose closure under a fixed multi-component operator R of bounded fan-out is polynomially bounded in input size, Theorem 10 holds with scaling polynomially in the relevant complexity parameter (fan-out for MCFGs, adjunct depth for TAGs, phase depth for minimalist grammars).
The Clark–Eyraud and subregular results are existence proofs at the lower end. Extending them upward requires a fixed R handling adjoining (TAG), multi-component substitution (MCFG), and phase-based composition (minimalist grammars). Single-site substitution provably does not suffice: cross-serial dependencies (Shieber, 1985) and long-distance agreement are the diagnostic, since a local single-site operator cannot expose a non-local dependency—perturbing one end of an agreement relation while fixing the other typically yields a string a local scorer cannot separate, so boundary support fails for the dependency.
The fix is a co-substitution that varies the two linked sites as a unit, which is exactly the tuple structure of the MCS formalisms.
8.2 Bounded fan-out and what it bets on
The word “bounded” carries the weight. A fixed fan-out k means R perturbs at most k linked sites at once, for a constant k independent of the input; “linked” is defined over the derivation, not surface distance, so the k sites are adjacent in the derivation tree however far apart in the string. A fixed-k operator therefore remains local in the only sense the capacity argument needs while reaching across arbitrary surface spans, and it is universal in the sense of Definition 2: one operator, applied to every input. Unboundedness lives in how many fixed-k operations compose, not in the fan-out of any one. The empirical bet of the program, in precise form, is that human language sits within some fixed small fan-out—a constant k such that a fan-out-k operator exposes the boundary of every attested dependency a.e. This is Joshi’s mildly-context-sensitive hypothesis (Joshi, 1985; Stabler, 1997) read as a claim about contrast operators rather than grammars. It would be refuted by an attested dependency requiring unbounded fan-out to expose; we know of no clear case, but the matter is empirical, not settled by the theorem.
8.3 Sharper rates and collision-aware calibration
Three quantitative questions remain. First, the factor of Lemma 14 is conservative; the vector contraction and class-count-optimal multiclass bounds should reduce it toward , and a PAC-Bayesian analysis exploiting the dependence structure of (Van Elst & Ghoshdastidar, 2025) may do better. Second, under exact realizability the rate of Theorem 10 should sharpen to via optimistic-rate arguments; making this precise for the contrastive loss is open. Third, the calibration of Lemma 16 charges the full collision term to the misranking bound; a refined analysis separating within-orbit collisions from genuine misrankings—for instance by conditioning the loss on the out-of-language sub-orbit, in the spirit of the class-collision decomposition of Saunshi et al. (2019)—could remove the term for collision-heavy operators such as constituent substitution, where it currently dominates the bound.
9 Conclusion
We have shown that a learner equipped with a fixed recursive contrast operator and a bounded-capacity discriminative scorer can identify a target language from positive data alone, in a precise conditional-ranking sense, with polynomial sample complexity—negatives constructed by the learner rather than supplied by an oracle, and no global normalizing constant computed. The misranking bound follows from the geometry of the contrastive loss directly, giving an rate, and lifts to a global classifier under a margin condition. The same two ingredients yield a normalization-free generator, so the construction is generative in a controlled sense as well as discriminative. The bias has not vanished but moved: into the operator, the capacity bound, and a realizability clause whose residue—an explicit approximation gap—decomposes into substrate inadequacy and orbit collisions, vanishing exactly when the operator's perturbations reliably exit the language. Whether a fixed bounded-fan-out operator suffices for the mildly context-sensitive range is the open conjecture the construction bequeaths.
Acknowledgments and Disclosure of Funding
Funding: None. No competing/conflicting interests to declare.
Appendix A. Deferred Proofs
Proof [Proof of Lemma 13] Write and , with , so over the box . The map is convex (a log-sum-exp minus a linear term) and , , where ; so is nonincreasing in and nondecreasing in each . The minimum over the box is therefore at , , giving
and it is attained only there since is strictly monotone in each coordinate over the interior. The maximum is at , , giving . Both extrema are attained because is monotone in each coordinate over the box. Since is increasing in and , we have with equality iff ; the per-example floor, not , is the valid pointwise lower bound when orbit sizes vary. Finally, , so .
Proof [Proof of Lemma 14] The per-example loss is , where is the multinomial-logistic loss over the active coordinates. By Lemma 13 the loss lies in an interval of width at most . The gradient of is with the softmax over the active coordinates and the indicator of the positive coordinate, so ; hence each is Lipschitz in the norm of its argument with constant , uniformly in .
The loss class is the composition of the example-dependent Lipschitz functions with the tuple of at most evaluations of a single . Embed all tuples in by padding the inactive coordinates with a fixed constant evaluation, on which does not depend; the Lipschitz constant is unaffected. Each coordinate class is for a deterministic map ( , ), and its empirical Rademacher complexity on the sample equals that of on the transformed sample , which is at most by the sample-uniform capacity bound of Definition 4—this is where the worst-case (rather than in-expectation) form of the definition is used. By Maurer's vector-contraction inequality (Maurer, 2016), which permits the Lipschitz function to depend on the example index, the empirical Rademacher complexity of the loss class is at most .
Standard symmetrization for bounded losses (Bartlett & Mendelson, 2002, Thm. 8)(Mohri, Rostamizadeh, & Talwalkar, 2018, Ch. 3) then gives, with probability , a uniform deviation bounded by twice this Rademacher term plus a concentration term. As empirical maximizer, satisfies for every , which is the stated one-sided excess-risk bound with an absolute constant .
Proof [Proof of Proposition 23] For with , the transition kernel is , and the symmetry of gives , so the acceptance ratio is well-defined whenever a move is proposed. Then
which is symmetric in ; hence detailed balance holds and the chain is reversible with respect to . The acceptance depends on the target only through the ratio , so no normalizer over is computed, giving (ii); and every proposal lies in , so the chain never leaves , giving (iii). Restriction to the component makes the chain irreducible: every edge of the component has positive proposal probability in both directions, and acceptance probabilities are bounded below by on the relevant moves since scores lie in . Laziness makes it aperiodic. If is finite, an irreducible aperiodic chain reversible with respect to has unique stationary law , i.e. , and converges to it from every initial state, giving (i). If is infinite, then , so is -finite but not normalizable; since any stationary probability law of an irreducible reversible chain must be a normalization of an invariant measure, and every invariant measure of this chain is proportional to on the component, no stationary probability law exists. Whether the chain is recurrent or transient then depends on the geometry of and is left open, as discussed in Remark 24.
Proof [Proof of Corollary 21] Split the failure probability as .
Step 1 (the learned scorer separates). By Lemma 14 with confidence and the stated , the excess loss of is at most , i.e. . By the uniform separation assumption, there is then a threshold with for -a.e. and for every . Condition on this event.
Step 2 (no false positives). The held-out scores satisfy almost surely, so . Hence every has and is classified . This holds pointwise, with no further probability cost.
Step 3 (few false negatives). Let be the lower -quantile of the positive score distribution, so that and for a fresh . Then
for . On the complementary event, , and since ,
A union bound over Steps 1 and 3 completes the proof.
Appendix B. A Worked Instance, and Its Collision-Heavy Shadow
Example 1 (A verified instance with ) The hypotheses can be checked end-to-end on a concrete case. Let and let be the strictly 2-local language of strings with no factor bb. Take the b-doubling operator
so , the number of 's in . The operator is universal (defined on every string, with no reference to ), local (insertion of a single segment adjacent to an existing one), and recursive (the occurrences of in are those of together with those of , so doubling within yields with , and likewise for ).
Orbit purity holds identically: every output contains the factor bb at the doubled site, so for every —not merely almost everywhere. Boundary support holds at every containing at least one ; strings in have empty orbits and carry no contrastive signal, so we require , consistent with the a.e. formulation of Definition 6.
Let be the bounded affine scorers in bigram-count features, , where counts the factor cd in . The parameter , , otherwise gives for every (no bb, so the clip returns ) and for every string containing a bb (the count is , so before clipping)—hence for every element of every orbit. Saturated realizability (Definition 7) therefore holds with this explicit , and since , Proposition 17 gives : the realizer attains the per-example floor at every , and Theorem 10 yields conditional misranking probability at most . The capacity is for a fixed alphabet (a bounded-norm linear class in features bounded under a length cap), and the orbit size is under a length bound on , so suffices—a score bound growing only logarithmically in string length. This is the smallest non-trivial witness that boundary support, saturated realizability, orbit purity, and the score bound are simultaneously satisfiable by an explicit bounded-weight scorer.
Example 2 (The collision-heavy shadow: single-symbol substitution) On the same target , consider instead the single-symbol substitution operator , which is the generic segment-edit operator of Section 6. It is not orbit-pure: . Worse, such collisions typically lie in the support: if , then the per-example floors at aba and at aaa make contradictory demands on the single value , so by Remark 18 no scorer attains both and strictly. Concretely, the scorer of Example 1 (which must score aaa at , since aaa is a positive) incurs per-example loss
a gap that does not shrink as B grows; and for input distributions placing substantial mass on such colliding pairs, the bound approaches or exceeds one, rendering Theorem 10 vacuous for even though realizability in the sense of Definition 6 holds. The comparison of the two examples is the practical content of Proposition 17: the choice of operator, not only of hypothesis class, is what the loss geometry constrains, and a well-chosen operator is one whose perturbations reliably exit the language.
References
Angluin, D. (1987). Learning regular sets from queries and counterexamples. Information and Computation, 75(2), 87–106.
Bartlett, P. L., & Mendelson, S. (2002). Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3, 463–482.
Ceylan, C., & Gutmann, M. U. (2018). Conditional noise-contrastive estimation of unnormalised models. In Proceedings of the 35th International Conference on Machine Learning (PMLR 80). arXiv:1806.03664.
Clark, A., & Eyraud, R. (2007). Polynomial identification in the limit of substitutable context-free languages. Journal of Machine Learning Research, 8, 1725–1745.
Gold, E. M. (1967). Language identification in the limit. Information and Control, 10, 447–474.
Gutmann, M., & Hyvärinen, A. (2012). Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. Journal of Machine Learning Research, 13, 307–361.
Hayashi, K., & Kamigaito, H. (2025). From formal language theory to statistical learning: Finite observability of subregular languages. arXiv:2509.22598.
Heinz, J. (2010). String extension learning. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics (pp. 897–906).
Heinz, J. (2018). The computational nature of phonological generalizations. In L. M. Hyman & F. Plank (Eds.), Phonological Typology (pp. 126–195). De Gruyter Mouton.
Heinz, J., & Idsardi, W. (2013). What complexity differences reveal about domains in language. Topics in Cognitive Science, 5, 111–131.
Jardine, A., & Heinz, J. (2016). Learning tier-based strictly 2-local languages. Transactions of the Association for Computational Linguistics, 4, 87–98.
Joshi, A. K. (1985). Tree adjoining grammars: How much context-sensitivity is required to provide reasonable structural descriptions? In D. R. Dowty, L. Karttunen, & A. M. Zwicky (Eds.), Natural Language Parsing (pp. 206–250). Cambridge University Press.
Kodner, J., Caplan, S., & Yang, C. (2022). Another model not for the learning of language. Proceedings of the National Academy of Sciences, 119(29), e2204664119.
Ma, Z., & Collins, M. (2018). Noise contrastive estimation and negative sampling for conditional models: Consistency and statistical efficiency. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (pp. 3698–3707).
Maurer, A. (2016). A vector-contraction inequality for Rademacher complexities. In Algorithmic Learning Theory (ALT 2016), Lecture Notes in Computer Science 9925 (pp. 3–17). Springer.
Mohri, M., Rostamizadeh, A., & Talwalkar, A. (2018). Foundations of Machine Learning (2nd ed.). MIT Press.
Saunshi, N., Plevrakis, O., Arora, S., Khodak, M., & Khandeparkar, H. (2019). A theoretical analysis of contrastive unsupervised representation learning. In Proceedings of the 36th International Conference on Machine Learning (PMLR 97, pp. 5628–5637).
Shieber, S. M. (1985). Evidence against the context-freeness of natural language. Linguistics and Philosophy, 8, 333–343.
Stabler, E. P. (1997). Derivational minimalism. In C. Retoré (Ed.), Logical Aspects of Computational Linguistics (pp. 68–95). Springer.
Tenenbaum, J. B., & Griffiths, T. L. (2001). Generalization, similarity, and Bayesian inference. Behavioral and Brain Sciences, 24, 629–640.
Tewari, A., & Bartlett, P. L. (2007). On the consistency of multiclass classification methods. Journal of Machine Learning Research, 8, 1007–1025.
Tosh, C., Krishnamurthy, A., & Hsu, D. (2021). Contrastive learning, multi-view redundancy, and linear models. In Algorithmic Learning Theory (ALT 2021) (PMLR 132, pp. 1179–1206).
Valiant, L. G. (1984). A theory of the learnable. Communications of the ACM, 27, 1134–1142.
van den Oord, A., Li, Y., & Vinyals, O. (2018). Representation learning with contrastive predictive coding. arXiv:1807.03748.
Van Elst, A., & Ghoshdastidar, D. (2025). Tight PAC-Bayesian risk certificates for contrastive learning. SIAM Journal on Mathematics of Data Science, 7(4), 1904–1927.
Yang, Y., & Piantadosi, S. T. (2022). One model for the learning of language. Proceedings of the National Academy of Sciences, 119(5), e2021865119.
Zhang, T. (2004). Statistical analysis of some multi-category large margin classification methods. Journal of Machine Learning Research, 5, 1225–1251.