Abstract
We present an interactive version of an evidence-driven state-merging (EDSM) algorithm for learning variants of finite state automata. Learning these automata often amounts to recovering or reverse engineering the model generating the data despite noisy, incomplete, or imperfectly sampled data sources rather than optimizing a purely numeric target function. Domain expertise and human knowledge about the target domain can guide this process, and typically is captured in parameter settings. Often, domain expertise is subconscious and not expressed explicitly. Directly interacting with the learning algorithm makes it easier to utilize this knowledge effectively.
Introduction
Finite state automata (FSA) are fundamental tools for modeling software controllers, communication protocols, and sequential systems. Learning these models from data—a process known as grammar induction—is often used to reverse-engineer black-box systems. Traditionally, this is achieved through passive learning algorithms like Evidence-Driven State-Merging (EDSM), which take a fixed dataset and use heuristics to build a generalized model.
However, real-world data is frequently noisy or incomplete. In such scenarios, automated heuristics often fail, performing merges that lead to overgeneralized and incorrect models. Fixing these errors usually requires a tedious cycle of parameter tuning and batch re-processing. This paper introduces a human-in-the-loop approach that integrates domain expertise directly into the state-merging process, allowing experts to visually inspect and guide the algorithm's decisions.
The Interactive EDSM Approach
The proposed method extends the standard EDSM algorithm. EDSM begins by constructing an Augmented Prefix Tree Acceptor (APTA) from training sequences—a tree-shaped automaton containing every sequence from the data. The algorithm then iteratively merges state pairs based on behavioral similarity to introduce cycles and generalization.
The interactive version, implemented in the flexfringe package, transforms this into a guided process. Instead of fully automated execution, the system:
- Visualizes the current automaton structure.
- Presents a ranked list of potential merges suggested by the heuristic.
- Pauses for user intervention.
Users can manually select merges, undo previous actions, or use a "LEAP" command to automate high-confidence steps. This allows the human to act as a regularizer, rejecting merges that lack sufficient evidence or contradict domain knowledge.
Key Insights: Human Intuition as a Regularizer
A critical observation is that merges with low evidence scores (e.g., zero) often trigger catastrophic overgeneralization. While a batch algorithm might execute these as the "best available" option, a human expert can easily identify the lack of evidence and prevent the model from collapsing.
The authors found that a hybrid workflow is most effective. Users can set high confidence thresholds for automated "leaps" and intervene only when the heuristic's confidence wanes. This approach blurs the line between active and passive learning; while the dataset is fixed (passive), the human provides oracle-like guidance during the hypothesis generation step.
Experimental Results
The effectiveness of the interactive tool was tested on a recovery task using 1,000 sequence traces from a known Mealy machine.
- Batch Mode Failure: The standard EDSM algorithm produced an overgeneralized, incorrect model because it eventually executed low-evidence merges that destroyed the automaton's structure.
- Interactive Success: By visually inspecting proposed merges and setting a minimum score threshold (e.g., 10), the user successfully rejected bad proposals and recovered the exact original Mealy machine.
Conclusion and Future Work
While the current work demonstrates the practical utility of interactivity, the authors note a lack of formal mathematical analysis regarding convergence speed and learnability guarantees. Future research will focus on quantifying the impact of human-guided constraints and further unifying the paradigms of active and passive learning to create more robust reverse-engineering tools.
Summary updated