← All papers
First page of Polynomial-Time Learning of Random Automata from One Label per Word

Polynomial-Time Learning of Random Automata from One Label per Word

Yilin Cheng

cs.LG Nov 24, 2026 · v1 cs.FL
A Lean repository of 22 modules formalizes selected proof steps, including the four-source coefficient, deletion bounds, and finite counting inequalities.
We study a binary deterministic finite automaton whose $2n$ transitions are chosen independently and uniformly from its $n$ states. The learner observes independent uniform words of length $m$, each labeled with a single bit indicating acceptance. For every fixed $β>0$ we give a polynomial-time algorithm that works outside a set of transition tables of probability $o(n^{-β})$. On each remaining table, for any start state and accepting set, the predictor has error at most $ε$ on fresh uniform words of length $m$ with probability at least $1-γ$ over the training sample and the learner's random choices. Its sample size and running time are polynomial in $n$, $m$, $1/ε$ and $\log(2/γ)$, with degree depending only on $β$. Although each word reveals only one output, comparing label moments at two consecutive history lengths lets us estimate the expected product of the signed outputs of two continuations from the same hidden state. We also refute Conjecture 4 of Fish and Reyzin on meeting times. For two distinct states fixed before the table is drawn and every fixed $c>0$, the fraction of words of length $\lfloor cn\rfloor$ that send them to different states converges in probability to $e^{-c}$. On a typical table, driving this fraction down to $1/n$ takes asymptotically $n\log n$ letters. Selected proof steps are formalized in Lean.

The task is passive learning of a random binary DFA when each uniform training word reveals only one acceptance bit, with no view of the intermediate states. A second question is Fish and Reyzin's Conjecture 4 on meeting times of two states driven by a common random word.

The learner compares label moments at two consecutive history lengths. This estimates same-state products of signed outputs, which then feed a spectral reconstruction of the recurrent predictive classes. Separate regressions and survival-coefficient thresholds handle small closed components. Selected proof steps, including counting inequalities and scalar gap deductions, are formalized across 22 Lean modules.

For every fixed β>0 there is a polynomial-time algorithm that learns to error ε on all transition tables outside a set of probability o(n^{-β}). Conjecture 4 is refuted: the fraction of length-⌊cn⌋ words that keep two prescribed states distinct converges in probability to e^{-c}. Numerical checks show the diagonal-extraction error decaying quickly with the lag.

nt=3t=10t=20t=40
60.2610.004131.31e-51.14e-10
161.720.1212.57e-31.48e-6
648.770.7320.02021.60e-5
Median population diagonal-extraction error (sum of absolute entries) over 24 random tables per n