[KongchangAI]
· 2 min read· 1,355 words

Breakthrough in Random Automata Learning: A Polynomial-Time Algorithm with One Label per Word

Breakthrough in Random Automata Learning: A Polynomial-Time Algorithm with One Label per Word

Polynomial-time algorithm learns random DFA from one-label-per-word samples and refutes the meeting-time conjecture.

This paper presents a polynomial-time algorithm for learning random deterministic finite automata (DFAs) from samples where each word carries only one accept/reject label, achieving error at most ε on the vast majority of transition tables with polynomial sample complexity and runtime. It indirectly estimates hidden-state information by comparing label moments at consecutive history lengths, and refutes the Fish–Reyzin meeting-time conjecture, showing that the fraction of length-⌊cn⌋ words leaving two fixed states separated converges in probability to e^{-c}, with complete mixing requiring asymptotically n log n letters. Some proof steps are formalized in Lean.

Introduction

Learning stochastic automata is a core problem in theoretical computer science, with potential applications in program verification, natural language processing, and beyond. A recent paper proposes a polynomial-time algorithm that can learn a random deterministic finite automaton (DFA) from samples in which each word carries only a single label. The algorithm guarantees that, on the vast majority of transition tables, the predictor's error rate on new samples does not exceed ε, and both the sample complexity and the running time are polynomial. This result not only advances learning theory but also refutes the meeting-time conjecture of Fish and Reyzin.

Paper source screenshot

Problem Setting and Challenges

The study considers a binary deterministic finite automaton whose transition function is generated randomly: the two outgoing edges of each state independently and uniformly point to one of n states. The learner observes a sequence of independent uniformly random words of length m, each accompanied by only a single bit label indicating whether the word is accepted. The learner's goal is to predict, given an arbitrary starting state and acceptance set, the probability that a new word is accepted, while guaranteeing an error rate no greater than ε.

The difficulty lies in the fact that each word reveals only a single output bit, so the information available is extremely limited. Traditional methods require a large number of samples to estimate transition probabilities, whereas this paper cleverly compares label moments at two consecutive history lengths to indirectly estimate the expected product of the signature outputs of two continuations from the same hidden state. This technique enables the algorithm to achieve the required precision within polynomial sample size and time.

Random DFA refers to a DFA whose transition function is generated randomly: it is typically assumed that, for each state and each input symbol, the outgoing edge independently and uniformly points to one of n states (in this paper the alphabet is binary and each state has two outgoing edges). This model differs from "learning a fixed but unknown DFA": the learner faces a transition table drawn from some known random distribution, and the algorithm only needs to succeed with high probability on the vast majority of transition tables, allowing failure on "bad" transition tables whose probability is o(n^{-β}). Random walks on a random DFA have fast-mixing properties, which are both a statistical regularity the algorithm can exploit and the basis for analyzing properties such as meeting time.

Label moments refer to low-order statistics computed from observed label sequences; for example, the first moment is the expectation of a label, and the second moment is the expected product of adjacent or spaced labels. In the setting of this paper, each word yields only an accept/reject bit and the hidden state cannot be observed directly, but the conditional label moments under histories of different lengths vary with the hidden state. By comparing label moments at two consecutive history lengths (e.g., lengths t and t+1), some unknown quantities can be eliminated, allowing indirect estimation of the expected product of two continuation outputs from the same hidden state, thereby recovering the information needed for prediction.

Polynomial-Time Algorithm Design

The core of the algorithm lies in exploiting comparisons of label moments. Specifically, for a fixed β>0, the algorithm is valid for all transition tables except a set of probability o(n^{-β}). The number of samples required by the algorithm is polynomial in n, m, 1/ε, and log(2/γ), and the running time is similar, with the degree of the polynomial depending only on β. This means that for any fixed β, the algorithm can learn an approximately correct predictor with high probability in polynomial time.

The algorithm does not rely on any specific structure of the transition table but instead exploits the statistical regularities induced by randomness. By analyzing the conditional expectations of labels at two consecutive history lengths, it can infer information about the hidden state and thereby construct a predictor. This approach offers a new perspective for learning stochastic systems.

Refuting the Conjecture of Fish and Reyzin

The paper also refutes Conjecture 4 of Fish and Reyzin concerning meeting time. For two distinct states fixed before the transition table is drawn, and for any fixed c>0, the fraction of words of length ⌊cn⌋ that bring them to different states converges in probability to e^{-c}. On a typical transition table, reducing this fraction to 1/n requires asymptotically n log n letters. This result reveals the speed of state mixing in random automata, which differs from the previous conjecture.

This refutation is based on a fine-grained analysis of random-walk behavior, showing that in a random DFA the trajectories of two states separate at an exponential rate, but complete mixing requires more steps. This conclusion is crucial for understanding the random properties of automata.

Meeting time is a classical concept in random walk and automata theory, referring to the number of steps required for two random walks starting from different initial states to first reach the same state. In a random DFA, because transitions are random, the two walks "collide" at a certain rate. Fish and Reyzin conjectured that, for two distinct states fixed before the transition table is drawn, the fraction of words of length ⌊cn⌋ that leave them in different states would decay in some specific manner; this paper proves that this fraction converges in probability to e^{-c} and points out that on a typical transition table, reducing it to 1/n requires asymptotically n log n letters. This result corrects the understanding of the speed of state mixing: trajectories separate at an exponential rate, but complete mixing (i.e., the meeting probability reaching the order of 1/n) requires more steps. Meeting-time analysis is often used in equivalence checking in program verification and in estimating the mixing time of Markov chains.

Formal Verification and Significance

Some proof steps have been formalized in Lean, enhancing the credibility of the results. Formal verification is increasingly important in theoretical computer science, as it ensures the rigor of proofs and avoids subtle errors. Although only some steps were formalized, this work demonstrates the feasibility of formal methods in the analysis of complex algorithms.

Overall, this research provides an efficient algorithm for learning stochastic systems from limited labeled data and corrects the understanding of state mixing. Future work may explore more general automaton models or learning problems with fewer samples.

Lean is an interactive theorem prover based on dependent type theory, widely used for formal verification in mathematics and computer science. In Lean, theorems and proofs are written as terms that can be checked by a machine, and any logical leap or unproven lemma causes the check to fail. This paper formalizes in Lean some of the proof steps related to the correctness of the algorithm, meaning that these steps have been machine-verified, reducing the risk of hidden errors. Formal verification is increasingly important in theoretical computer science, especially for complex algorithms involving probabilistic methods and asymptotic analysis, where manual proofs are prone to oversights in constants, probability bounds, or exchanges of limits; although machine verification cannot cover the entire proof, it can significantly enhance the credibility of the core arguments.

One-line Summary

A polynomial-time algorithm learns a random DFA from samples with one label per word and refutes the meeting-time conjecture.

Paragraph Summary

This paper presents a theoretical result on learning random deterministic finite automata (DFAs): under the setting where the transition function is generated randomly and each word provides only a single accept/reject label, it proposes a polynomial-time algorithm that, with high probability, learns a predictor with error rate no greater than ε on the vast majority of transition tables, with sample complexity and running time polynomial in n, m, 1/ε, and log(2/γ). The core of the algorithm is to indirectly estimate hidden-state information by comparing label moments at two consecutive history lengths. The paper also refutes Conjecture 4 of Fish and Reyzin on meeting time, proving that the fraction of words of length ⌊cn⌋ that leave two fixed states separated converges in probability to e^{-c}, and that complete mixing requires asymptotically n log n letters. Some proofs have been formalized in Lean.

#random DFA learning#polynomial-time algorithm#meeting time conjecture#label moments#formal verification Lean#stochastic automata
Share:

Related articles