Efficient Algorithms for the Inference of Minimum Size DFAs

Arlindo L. Oliveira, João P. Marques SilvaMachine Learning 2001 · DOI

Introduction

Finding the smallest Deterministic Finite Automaton (DFA) consistent with a set of labeled strings is a fundamental challenge in machine learning and digital circuit design. Guided by Occam’s Razor, the simplest model—the minimum-state DFA—is preferred for its ability to capture core logic and generalize to new data. However, this task is NP-complete. This paper presents Bic, an exact algorithm that leverages constraint satisfaction techniques to push the boundaries of DFA inference.

The Inference Problem

The goal is to synthesize a state machine from observations, such as input/output traces. This is particularly relevant in digital controller design, where timing diagrams define the required behavior of a system.

Example timing diagram used for the synthesis of digital controllers.

While heuristic methods like state merging (e.g., Blue-Fringe) are efficient, they do not guarantee a minimum solution. Exact algorithms are necessary when the absolute smallest representation is required for hardware efficiency or formal verification.

Methods and Algorithmic Approaches

The authors represent training data as a Loop-Free DFA (LFDFA), a tree structure where paths correspond to training strings. The inference task becomes mapping the LFDFA's many states into a target DFA with a fixed number of states $N$.

Transformation of input/output timing traces into a Loop-Free DFA (LFDFA) structure.

The paper evaluates three primary approaches:

  1. Implicit Search (Iasmin): Uses Multi-valued Decision Diagrams (MDDs) to represent the mapping space, avoiding explicit state-by-state assignment but risking memory exhaustion.
  2. Basic Explicit Search (Biermann’s Algorithm): A standard backtracking search that assigns states one by one and backtracks upon hitting a contradiction.
  3. Improved Explicit Search (Bic): The paper’s core contribution. It enhances Biermann’s approach with dependency-directed backtracking (conflict diagnosis). When a conflict is found, Bic identifies the specific decision that caused it and "jumps" back to that level, pruning massive, irrelevant branches of the search tree.

Key Results and Insights

The algorithms were tested on Mealy and Moore machine benchmarks. The Bic algorithm demonstrated significant improvements over previous state-of-the-art methods:

  • Superior Coverage: Bic solved 468 out of 575 test problems, significantly outperforming Biermann (371) and Iasmin (363).
  • Efficiency: Bic successfully handled machines with up to 12 states within time limits, whereas other exact methods began failing consistently at 9 or 10 states.
  • Conflict Diagnosis: By recording "conflict clauses," Bic avoids re-exploring doomed subtrees. This leads to a reduction in backtracks by several orders of magnitude compared to standard search.

Despite these gains, an exponential "12-state wall" remains, where the search space complexity explodes relative to available training data, marking the current limit of exact inference.

Conclusion

The Bic algorithm represents a significant step forward for exact DFA inference. While still limited to relatively small machines (tens of states), the integration of conflict diagnosis provides a robust framework for synthesizing minimal controllers. Future work may involve combining these exact search techniques with the look-ahead heuristics found in evidence-driven state merging (EDSM) methods to further scale the approach.

Summary updated

BibTeX
@article{oliveira2001efficient,
  author = {Arlindo L. Oliveira and João P. Marques Silva},
  title = {{Efficient Algorithms for the Inference of Minimum Size DFAs}},
  journal = {Machine Learning},
  year = {2001},
  doi = {10.1023/a:1010828029885},
}
Figure