Polynomial-Time Learning of Random Automata from One Label per Word
Yilin Cheng
cs.LG
Nov 24, 2026 · v1
cs.FL
TL;DR
A Lean repository of 22 modules formalizes selected proof steps, including the four-source coefficient, deletion bounds, and finite counting inequalities.
Abstract
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.
Problem
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.
Approach
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.
Results
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.
| n | t=3 | t=10 | t=20 | t=40 |
|---|
| 6 | 0.261 | 0.00413 | 1.31e-5 | 1.14e-10 |
| 16 | 1.72 | 0.121 | 2.57e-3 | 1.48e-6 |
| 64 | 8.77 | 0.732 | 0.0202 | 1.60e-5 |
Median population diagonal-extraction error (sum of absolute entries) over 24 random tables per n