1611.07100
Model: nemotron-free
## Interpreting Finite Automata for Sequential Data
## Christian Albert Hammerschmidt
SnT
University of Luxembourg christian.hammerschmidt@uni.lu
Qin Lin
Department of Intelligent Systems Delft University of Technology q.lin@tudelft.nl
## Abstract
Automaton models are often seen as interpretable models. Interpretability itself is not well defined: it remains unclear what interpretability means without first explicitly specifying objectives or desired attributes. In this paper, we identify the key properties used to interpret automata and propose a modification of a state-merging approach to learn variants of finite state automata. We apply the approach to problems beyond typical grammar inference tasks. Additionally, we cover several use-cases for prediction, classification, and clustering on sequential data in both supervised and unsupervised scenarios to show how the identified key properties are applicable in a wide range of contexts.
## 1 Introduction
The demand for explainable machine learning is increasing, driven by the spread of machine learning techniques to sensitive domains like cyber-security, medicine, and smart infrastructure among others. Often, the need is abstract but nevertheless a requirement, e.g., in the recent EU regulation [Goodman and Flaxman, 2016].
Approaches to explanations range from post-hoc explanation systems like Turner [2015], which provide explanations of decisions taken by black-box systems to the use of linear or specialized whitebox systems [Fiterau et al., 2012] that generate models seen as simple enough for non-expert humans to interpret and understand. Lipton [2016] outlines how different motivations and requirements for interpretations lead different notions of interpretable models in supervised learning.
Automata models, such as (probabilistic) deterministic finite state automata ((P)DFA) and timed automata (RA) have long been studied (Hopcroft et al. [2013]) and are often seen as interpretable models. Moreover, they are learnable from data samples, both in supervised and unsupervised (see Higuera [2010]) fashion. But which properties make these models interpretable, and how can we get the most benefit from them? We argue that-especially in the case of unsupervised learningautomata models have a number of properties that make it easy for humans to understand the learned model and project knowledge into it: a graphical representation, transparent computation, generative nature, and our good understanding of their theory.
## Sicco Verwer
Department of Intelligent Systems Delft University of Technology s.e.verwer@tudelft.nl
Radu State SnT University of Luxembourg radu.state@uni.lu
## 2 Preliminaries
Finite automata. The models we consider are variants of deterministic finite state automata, or finite state machines. These have long been key models for the design and analysis of computer systems [Lee and Yannakakis, 1996]. We provide a conceptual introduction here, and refer to Section B in the appendix for details. An automaton consists of a set of states, connected by transitions labeled over an alphabet. It is said to accept a word (string) over the alphabet in a computation if there exists a path of transitions from a predefined start state to one of the predefined final states, using transitions labeled with the letters of the word. Automata are called deterministic when there exists exactly one such path for every possible string. Probabilistic automata include probability values on transitions and compute word probabilities using the product of these values along a path, similar to hidden Markov models (HMMs).
Learning approaches. As learning finite state machines has long been of interest in the field of grammar induction, different approaches ranging from active learning algorithms [Angluin, 1987] to algorithms based on the method of moments [Balle et al., 2014] have been proposed. Process mining [Van Der Aalst et al., 2012] can also be seen as a type of automaton learning, focusing on systems that display a large amount of concurrency, such as business processes, represented as interpretable Petri-nets. We are particularly interested in state-merging approaches, based on Oncina and Garcia [1992]. While Section C in the appendix provides formal details, we provide a conceptual introduction here.
The starting point for state-merging algorithms is the construction of a tree-shaped automaton from the input sample, called augmented prefix tree acceptor (APTA). It contains all sequences from the input sample, with each sequence element as a directed labeled transition. Two samples share a path if they share a prefix. The state-merging algorithm reduces the size of the automaton iteratively by reducing the tree through merging pairs of states in the model, and forcing the result to be deterministic. The choice of the pairs, and the evaluation of a merge is made heuristically: Each possible merge is evaluated and scored, and the highest scoring merge is executed. This process is repeated and stops if no merges with high scores are possible. These merges generalize the model beyond the samples from the training set: the starting prefix tree is already an a-cyclic finite automaton. It has a finite set of computations, accepting all words from the training set. Merges can make the resulting automaton cyclic. Automata with cycles accept an infinite set of words. State-merging algorithms generalize by identifying repetitive patterns in the input sample and creating appropriate cycles via merges. Intuitively, the heuristic tries to accomplish this generalization by identifying pairs of states that have similar future behaviors. In a probabilistic setting, this similarity might be measured by similarity of the empirical probability distributions over the outgoing transition labels. In grammar inference, heuristics rely on occurrence information and the identity of symbols, or use global model selection criteria to calculate merge scores.
## 3 Flexible State-Merging
The key step in state-merging algorithms is the identification of good merges. A merge of two states is considered good if the possible futures of the two states are very similar. By focusing on application-driven notions of similarity of sequences and sequence elements, we modify the statemerging algorithm as follows: For each possible merge, a heuristic can evaluate an application-driven similarity measure to obtain the merge score. Optionally, each symbol of the words is enriched with addition data, e.g. real values. This information can be aggregated in each state, e.g. by averaging. It is used to guide the heuristic in reasoning about the similarity of transitions and therefore the inferred latent states, or guide a model selection criterion, e.g. by using mean-squared-error minimization as an objective function. It effectively separates the symbolic description connecting the latent variables from the objective (function) used to reason about the similarity. An implementation in C++ is available 1 . The importance of combining data with symbolic data is getting renewed attention, c.f. recent works such as Garnelo et al. [2016]. In Section 5, we outline regression automata as a use case of our approach.
1 https://bitbucket.org/chrshmmmr/dfasat
## 4 Aspects of Interpretability in Automata
To understand how a particular model works as well as how to go beyond the scope of the model and combing foreground knowledge about the application with the model itself, we now focus on which aspects of automata enable interpretations:
1. Automata have an easy graphical representation as cyclic, directed, labeled graphs, offering a hierarchical view of sequential data.
2. Computation is transparent . Each step of the computation is the same for each symbol w i of an input sample w . It can be verified manually (e.g. visually), and compared to other computation paths through the latent state space. This makes it possible to analyze training samples and their contribution to the final model.
3. Automata are generative . Sampling from the model helps to understand what it describes. Tools like model checkers to query properties in a formal way, e.g. using temporal logic, can help to analyze the properties of the model.
4. Automata are well studied in theory and practice, including composition and closure properties, sub-classes and related equally expressive formalisms. This makes it easy for humans to transfer their knowledge onto it: The model is frequently used in system design as a way to describe system logic, and are accessible to a wide audience.
The intention behind using either of these aspects depends on the purpose of the interpretation, e.g. trust, transparency, or generalizing beyond the input sample. Especially for unsupervised learning, we believe that knowledge transfer and exploratory knowledge discovery are common motivations, e.g. in (software) process discovery.
## 5 Application Case Studies
In the following we present some use cases of automata models and how they are interpreted and how the properties identified in Section 4 contribute to it. While this is by no means an exhaustive literature study, we hope that it helps to illustrate how the different aspects of interpretability are used in practice. In unsupervised learning, the data is observations without labels or counter-examples to the observed events. Often, there is no ground-truth to be used in an objective function. Methods for learning such systems typically use statistical assumptions to compute state similarity.
Software systems. Automata models are often used to infer models of software in an unsupervised fashion, e.g. Walkinshaw et al. [2007]. In these cases, the generative property of automaton models is see as interpretable: It is possible to ask queries using a temporal logic like LTL [Clarke et al., 2005] to answer questions regarding the model, e.g. whether a certain condition will eventually be true, or analyze at what point a computation path deviated from the expected outcome. In Smetsers et al. [2016], the authors use this property to test and validate properties of code by first fuzzing the code to obtain execution paths and the associated inputs and then learn a model to check LTL queries on. Additionally, we can transfer human expert knowledge on system design [Wagner et al., 2006] to inspect the model, e.g. to identify the function of substructures identified. An example can be found in Smeenk et al. [2015], where the authors infer a state machine for a printer via active learning. Through visual inspection alone it is possible to identify deadlocks that are otherwise hard to see in the raw data. The visual analysis helped to identify bugs in the software the developers were unaware of. The appendix shows the final model in Figure 3.
Biological systems. In Schmidt and Kramer [2014], timed automata are used to infer the cell cycle of yeast based on sequences of gene expression activity. The graphical model obtained (c.f. Figure 4) can be visually compared to existing models derived using other methods and combined with a-priori knowledge in biology.
Driver behavior. In our ongoing work using the RTI+ state-merging algorithm for timed automata [Verwer et al., 2008], we analyze car following behavior of human drivers. The task is to relate driver actions like changes of vehicle speed (and thus distance and relative speed to a lead vehicle) to a response action, e.g. acceleration. The inferred automaton model is inspected visually like a software controller. Different driving behaviors are distinguished by clustering the states of the automaton, i.e. the latent state space. The discovered distinct behaviors form control loops within the model. Figure 2 in the appendix shows an example with the discovered clusters highlighted.
Wind speed prediction. In our own work, we applied automata learning in different ways to a problem not related to grammar inference, predicting short-term changes in wind speeds. We take two different approaches to obtain models that tell us more about the data than just a minimizer of the objective function: In one approach, [Pellegrino et al., 2016], we discover structure in the data by using by inferring transition guards over a potentially infinite alphabet, effectively discovering a clustering as transition labels from the sequences automatically. The only constraint and objective used here is the similarity of future behaviors. The learned model can be seen as a structure like a decision tree built in a bottom-up fashion, but allowing loops for repetitive patterns. Figure 1 in the appendix shows an example of such an automaton. In another approach [Lin et al., 2016], we use our flexible state-merging framework to impose structure through parameter choices. We derive discrete events from the physical wind speed observations by using clustering approaches to obtain a small alphabet of discrete events as a symbolic representation that fits the underlying data well. Using a heuristic that scores merges based on minimizing a mean squared error measure, the automata model has a good objective function for regression, as well as discovers latent variables in terms of the given discretization. In practice, other choices of discretization can be used. By using thresholds of the turbine used in wind mills, e.g. the activation point, one could infer a model whose latent states relate to the physical limitations of the application. We are planning to analyze this approach in future work. As with the previous example, the learned model can be seen as a description of decision paths taken in the latent state-space. If the model makes predictions that are difficult to believe for human experts, the computation and the model prediction can be visually analyzed to see which factors contributed to it, and how the situation relates to similar sets of features.
## 6 Discussion
The applications surveyed in Section 5 show that interpreting finite state automata as models takes many forms and serves different goals. As such, this interpretation is not a feature inherent in the models or the algorithms themselves. Rather, interpretations are defined by the need and intention of the user. But yet, interpretations of automata models draw from a core set of properties as identified in Section 4: graphical representations, transparent computation, generative nature, and our understanding of their theory.
We note that automata models are particularly useful in unsupervised learning: Applications of automata models often aim at easing the transfer of knowledge about the subject, or related subjects, to the data generating process. In this case, machine learning serves as a tool for exploration, to deal with epistemic uncertainty in observed systems. The goal is not only to obtain a more compact view of the data, but learn how to generalize from the observed data. Often, it is often unclear what the a-priori knowledge is as users rely on experience. This makes it very difficult to formalize a clear objective function. A visual model with a traceable computation helps to guide the users, and helps to iterate over multiple models.
Flexible state-merging allows to obtain automata models in new domains: in our flexible state-merging framework presented in Section 3, we try to separate the symbolic representation from the objective function and heuristic. We hope that this will help to guide discovery by stating the model parameters, e.g. the symbols, independently form the heuristic that guides the discovery of latent variables. In this fashion, it is possible to learn models with interpretable aspects without having to sacrifice the model performance on the intended task.
Future work. We hope that this discussion will help to build a bridge between practitioners and experts in applied fields on one side, and the grammar inference and machine learning community on other side. As probabilistic deterministic automata models are almost as expressive as HMMs, the models and techniques described here are applicable to a wide range of problems with decent performance metrics. We see a lot of promise in combining symbolic data with numeric or other data via a flexible state-merging approach to bring automata learning to fields beyond grammatical inference.
## Acknowledgments
I would like to thank, in no particular order, my colleagues, Joshua Moermann, Rick Smeters, Nino Pellegrino, Sara Messelaar, Corina Grigore, and Mijung Park for their time and feedback on this work. This work is partially funded by the FNR AFR grant PAULINE and Technologiestichting STW VENI project 13136 (MANTA) and NWO project 62001628 (LEMMA).
## References
- Dana Angluin. Learning Regular Sets from Queries and Counterexamples. Information and Computation , 75(2): 87-106, 1987. URL http://dx.doi.org/10.1016/0890-5401(87)90052-6 .
- Borja Balle, Xavier Carreras, Franco M. Luque, and Ariadna Quattoni. Spectral Learning of Weighted Automata. Machine Learning , 96(1-2):33-63, 2014. URL http://link.springer.com/article/10.1007/ s10994-013-5416-x .
- Edmund Clarke, Ansgar Fehnker, Sumit Kumar Jha, and Helmut Veith. Temporal Logic Model Checking. In Handbook of Networked and Embedded Control Systems , Control Engineering, pages 539-558. BirkhΓ€user Boston, 2005. ISBN 978-0-8176-3239-7 978-0-8176-4404-8. URL http://link.springer. com/chapter/10.1007/0-8176-4404-0\_23 .
- Madalina Fiterau, Artur Dubrawski, Jeff Schneider, and Geoff Gordon. Trade-offs in Explanatory Model Learning. 2012. URL http://www.ml.cmu.edu/research/dap-papers/dap\_fiterau.pdf .
- Marta Garnelo, Kai Arulkumaran, and Murray Shanahan. Towards Deep Symbolic Reinforcement Learning. arXiv:1609.05518 [cs] , September 2016. URL http://arxiv.org/abs/1609.05518 . arXiv: 1609.05518.
- Bryce Goodman and Seth Flaxman. European Union Regulations on Algorithmic Decision-making and a "Right to Explanation". arXiv:1606.08813 [cs, stat] , June 2016. URL http://arxiv.org/abs/1606.08813 . arXiv: 1606.08813.
- Colin de la Higuera. Grammatical Inference: Learning Automata and Grammars . Cambridge University Press, April 2010. ISBN 978-0-521-76316-5.
- John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. Introduction to Automata Theory, Languages, and Computation . Pearson, Harlow, Essex, Pearson New International Edition edition, November 2013. ISBN 978-1-292-03905-3.
- D. Lee and M. Yannakakis. Principles and Methods of Testing Finite State Machines-a Survey. Proceedings of the IEEE , 84(8):1090-1123, August 1996. ISSN 0018-9219. doi: 10.1109/5.533956.
- Qin Lin, Christian Hammerschmidt, Gaetano Pellegrino, and Sicco Verwer. Short-term Time Series Forecasting with Regression Automata. In MiLeTS Workshop at KDD 2016 , 2016. URL http://www-bcf.usc.edu/ ~liu32/milets16/paper/MiLeTS\_2016\_paper\_17.pdf .
- Zachary C. Lipton. The Mythos of Model Interpretability. arXiv:1606.03490 [cs, stat] , June 2016. URL http://arxiv.org/abs/1606.03490 . arXiv: 1606.03490.
- Jose Oncina and Pedro Garcia. Identifying Regular Languages In Polynomial Time. In Advances in Structural and Syntactic Pattern Recognition , pages 99-108. World Scientific, 1992.
- Gaetano Pellegrino, Christian Albert Hammerschmidt, Qin Lin, and Sicco Verwer. Learning Deterministic Finite Automata from Infinite Alphabets. In Proceedings of The 13th International Conference on Grammatical Inference , Delft, October 2016.
- Jana Schmidt and Stefan Kramer. Online Induction of Probabilistic Real-Time Automata. Journal of Computer Science and Technology , 29(3):345-360, May 2014. ISSN 1000-9000, 1860-4749. doi: 10.1007/ s11390-014-1435-8. URL http://link.springer.com/article/10.1007/s11390-014-1435-8 .
- Wouter Smeenk, Joshua Moerman, Frits Vaandrager, and David N. Jansen. Applying Automata Learning to Embedded Control Software. In Formal Methods and Software Engineering , number 9407 in Lecture Notes in Computer Science, pages 67-83. November 2015. URL http://link.springer.com/chapter/10. 1007/978-3-319-25423-4\_5 .
- Rick Smetsers, Joshua Moerman, Mark Janssen, and Sicco Verwer. Complementing Model Learning with Mutation-Based Fuzzing. arXiv:1611.02429 [cs] , 2016. URL http://arxiv.org/abs/1611.02429 . arXiv: 1611.02429.
- Ryan Turner. A Model Explanation System. In Black Box Learning and Inference NIPS Workshop , 2015. URL http://www.blackboxworkshop.org/pdf/Turner2015\_MES.pdf .
- Wil Van Der Aalst, Arya Adriansyah, Ana Karla Alves de Medeiros, Franco Arcieri, Thomas Baier, Tobias Blickle, Jagadeesh Chandra Bose, Peter van den Brand, Ronald Brandtjen, Joos Buijs, and others. Process Mining Manifesto. In Business Process Management Workshops , pages 169-194. Springer, 2012. URL http://link.springer.com/chapter/10.1007/978-3-642-28108-2\_19 .
- Sicco Verwer, Mathijs de Weerdt, and Cees Witteveen. Efficiently Learning Simple Timed Automata. Induction of Process Models , pages 61-68, 2008. URL http://www.cs.ru.nl/~sicco/papers/ipm08.pdf .
- Ferdinand Wagner, Ruedi Schmuki, Thomas Wagner, and Peter Wolstenholme. Modeling Software with Finite State Machines: A Practical Approach . CRC Press, May 2006. ISBN 978-1-4200-1364-1.
- N. Walkinshaw, K. Bogdanov, M. Holcombe, and S. Salahuddin. Reverse Engineering State Machines by Interactive Grammar Inference. In 14th Working Conference on Reverse Engineering (WCRE 2007) , 2007.
## A Visualizations of Automata
Figure 1: Auto-regressive model of short-term average wind speeds using the approach presented by Lin et al. [2016]. The ranges on the transitions indicate for which speed they activate, the number in the nodes is the predicted change in speed. The top node models persistent behavior (i.e. no change in speed for the next period), whereas the lower part denotes exceptions to this rule.
<details>
<summary>Image 1 Details</summary>

### Visual Description
## Decision Tree Diagram: Hierarchical Classification/Regression Model
### Overview
The image depicts a hierarchical decision tree structure with numerical nodes and directional arrows. The tree originates from a root node labeled "0.00" and branches into multiple paths with numerical values, thresholds, and "Infinity" labels. Arrows contain multi-value annotations (e.g., "3.47, 0.20, 0.26, 0.80, Infinity"), suggesting conditional transitions between nodes.
### Components/Axes
- **Root Node**: "0.00" (top-center)
- **Legend**: Located at top-right, labeled "Infinity" with range values "-3.47, 0.20, 0.26, 0.80, Infinity"
- **Nodes**:
- Primary nodes: 53012, 54857, 53013, 61310, 53014, 53015, 53011, 54861, 61314, 61311, 61315
- Secondary nodes: 53010, 53015, 53014, 53011, 54861, 61314, 61311, 61315
- **Arrows**:
- Contain multi-value annotations (e.g., "3.47, 0.20, 0.26, 0.80, Infinity")
- Labels include "Infinity" with ranges (e.g., "Infinity, -1.50", "Infinity, -0.85")
### Detailed Analysis
1. **Root to First Branch**:
- Root "0.00" β Node "53012" via arrow labeled "3.47, 0.20, 0.26, 0.80, Infinity"
- Node "53012" branches into:
- "54857" (arrow: "Infinity, -1.50")
- "53013" (arrow: "1.28, -1.06")
- "61310" (arrow: "1.06, Infinity")
- "53014" (arrow: "Infinity, Infinity")
2. **Subsequent Branches**:
- **54857** β "53011" (arrow: "10.86, Infinity") and "54861" (arrow: "Infinity, 0.68")
- **61310** β "61314" (arrow: "10.85, Infinity") and "61311" (arrow: "-0.80, -0.85")
- **61314** β "61315" (arrow: "Infinity, Infinity")
- **53014** β "53015" (arrow: "Infinity, Infinity")
3. **Terminal Nodes**:
- Nodes like "53015", "53014", "53011", "54861", "61315" have no outgoing arrows, suggesting final decision points.
### Key Observations
- **Thresholds and Infinity**: Multiple arrows use "Infinity" as a boundary condition, likely indicating outlier handling or unbounded ranges.
- **Multi-Value Arrows**: Arrows contain 4-5 numerical values, possibly representing feature thresholds, weights, or confidence intervals.
- **Hierarchical Structure**: The tree has 3-4 layers of branching, with nodes splitting into 2-4 child nodes.
- **Negative Values**: Some arrows include negative values (e.g., "-1.50", "-0.85"), suggesting directional or comparative metrics.
### Interpretation
This diagram likely represents a **machine learning decision tree** or **optimization model** with:
1. **Conditional Splits**: Nodes split based on feature thresholds (e.g., "53012" β "54857" if value exceeds 3.47).
2. **Infinity Handling**: "Infinity" labels may denote:
- Unbounded ranges for continuous variables
- Outlier thresholds (e.g., "Infinity, -1.50" could mean values > -1.50 are treated as infinity)
3. **Multi-Value Arrows**: The 4-5 values per arrow might represent:
- Feature importance scores
- Confidence intervals for splits
- Probability distributions
4. **Terminal Nodes**: Final nodes (e.g., "53015") likely represent class labels or predicted values.
The structure suggests a complex model with nested decision boundaries, where each split refines predictions based on feature interactions. The use of "Infinity" indicates the model accounts for extreme values, possibly in regression tasks or anomaly detection.
</details>
Figure 2: Car-following controller model with highlighted clusters. Each color denotes one distinct cluster. The loop in cluster 6 (colored light blue), e.g. state sequence: 1-6-11-16-1 with symbolic transitions loop: d (keep short distance and slower than lead vehicle)-j (keep short distance and same speed to lead vehicle)-c (keep short distance and faster than lead vehicle))-j, can be interpreted as the car-following behavior at short distances , i.e. adapting the speed difference with the lead vehicle around 0 and bounding the relative distance in small zone. Similarly interesting and significant loops can be also seen in cluster 2 (colored pink) and cluster 4 (colored light yellow), which are long distance and intermediate distance car-following behaviors respectively. The intermediate state like S 15 in cluster 3 (colored light grey) explains how to switch between clusters.
<details>
<summary>Image 2 Details</summary>

### Visual Description
## Network Diagram: Clustered Node Connections
### Overview
The image depicts a network diagram divided into four color-coded clusters (blue, yellow, gray, red), each containing interconnected nodes. Nodes are labeled with identifiers (e.g., S1, S6) and numerical values in parentheses, while edges between nodes include additional numerical and alphanumeric labels. The diagram emphasizes relationships and groupings within the network.
### Components/Axes
- **Legend**: Located on the right side, associating colors with cluster names:
- Blue: Cluster 6
- Yellow: Cluster 4
- Gray: Cluster 3
- Red: Cluster 2
- **Nodes**: Labeled with identifiers (e.g., S1, S6) and numerical values in parentheses (e.g., `[0.542] j`, `#3086`).
- **Edges**: Connect nodes, annotated with numerical values (e.g., `(0.542) j`, `#3086`) and directional arrows.
### Detailed Analysis
1. **Cluster 6 (Blue)**:
- Nodes: S1, S6, S11, S16.
- Edges:
- S1 β S6: `(0.542) j`, `#3086`
- S6 β S11: `(0.542) j`, `#1275`
- S11 β S16: `(0.542) j`, `#8726`
- Self-loops: S1 and S6 have circular edges with values like `(0.542) c`, `#670`.
2. **Cluster 4 (Yellow)**:
- Nodes: S4, S10, S14, S19.
- Edges:
- S4 β S10: `(0.542) i`, `#9996`
- S10 β S14: `(0.542) i`, `#1152`
- S14 β S19: `(0.542) i`, `#531`
3. **Cluster 3 (Gray)**:
- Nodes: S15, S19, S21, S28.
- Edges:
- S15 β S19: `(0.542) c`, `#739`
- S19 β S21: `(0.542) j`, `#388`
- S21 β S28: `(0.542) j`, `#268`
4. **Cluster 2 (Red)**:
- Nodes: S17, S21, S26.
- Edges:
- S17 β S21: `(0.542) g`, `#386`
- S21 β S26: `(0.542) b`, `#290`
5. **Inter-Cluster Connections**:
- S1 (Cluster 6) connects to S4 (Cluster 4) via `(0.542) j`, `#619`.
- S4 (Cluster 4) connects to S15 (Cluster 3) via `(0.542) i`, `#357`.
- S15 (Cluster 3) connects to S8 (Cluster 3) via `(0.542) j`, `#288`.
- S8 (Cluster 3) connects to S7 (Cluster 2) via `(0.542) b`, `#416`.
- S7 (Cluster 2) connects to S17 (Cluster 2) via `(0.542) g`, `#463`.
### Key Observations
- **Overlap**: Node S21 appears in both Cluster 3 (gray) and Cluster 2 (red), suggesting a shared or transitional role.
- **Edge Values**: Numerical values (e.g., `0.542`) may represent weights, probabilities, or identifiers. Alphanumeric labels (e.g., `#3086`) could denote unique edge identifiers.
- **Directionality**: Arrows indicate unidirectional flow between nodes (e.g., S1 β S6).
### Interpretation
The diagram likely represents a system where nodes are entities (e.g., servers, data points) and edges represent interactions or dependencies. Clusters may reflect functional groups or hierarchical levels. The overlapping node S21 could indicate a critical junction between clusters, acting as a bridge or hub. Numerical values on edges might quantify connection strength, frequency, or identifiers for tracking. The self-loops in Cluster 6 suggest feedback mechanisms or self-referential processes.
The structured grouping and inter-cluster connections imply a modular yet interconnected system, where clusters maintain internal cohesion while enabling cross-cluster communication. The use of consistent numerical prefixes (e.g., `0.542`) across edges hints at a standardized metric or labeling convention.
</details>
Figure 3: Visualization of a state machine learned from a printer controller using an active learning approach. Each state, represented as a dot, represents a state in the controller software and each transition, represened as an edge, a state-change upon receiving input. Using knowledge about the controller design, it is possible to identify the sparsely connected protrusions of states at the bottom as deadlock situations. Taken from Smeenk et al. [2015]
<details>
<summary>Image 3 Details</summary>

### Visual Description
## Network Diagram: Unlabeled Graph Structure
### Overview
The image depicts a complex, unlabeled network diagram composed of interconnected nodes and edges. Nodes are distributed across the diagram with varying densities, and edges form intricate, overlapping patterns. Colors are used to differentiate nodes and edges, but no legend or textual labels are present to explain their significance.
### Components/Axes
- **Nodes**:
- Represented as small, colored dots (e.g., red, green, blue, purple).
- Clustered in dense regions (e.g., top-left, center) and sparser areas (e.g., bottom-right).
- **Edges**:
- Thin, curved lines connecting nodes.
- Colors match node colors in some regions but vary in others (e.g., purple edges connecting green nodes).
- **Background**:
- Plain white grid with no axis labels, titles, or legends.
### Detailed Analysis
- **Node Distribution**:
- **Top-left cluster**: Dominated by red and green nodes (~30% of total nodes).
- **Central region**: Mixed colors (blue, purple, orange) with high edge density.
- **Bottom-right**: Sparse nodes, primarily purple and blue (~15% of total nodes).
- **Edge Patterns**:
- Central nodes have the highest edge connectivity (~50% of edges originate here).
- Peripheral nodes (bottom-right) have fewer connections (~10% of edges).
- **Color Usage**:
- No explicit legend; colors may indicate categories (e.g., node type, status) or hierarchical levels.
- Red/green nodes in the top-left cluster are most interconnected.
### Key Observations
1. **Central Hub**: The central region acts as a hub, with nodes and edges concentrated here.
2. **Peripheral Isolation**: Bottom-right nodes are less connected, suggesting peripheral or secondary roles.
3. **Color Ambiguity**: Without a legend, color coding remains speculative (e.g., red nodes could represent "high priority" or "primary nodes").
4. **No Textual Data**: No labels, axis titles, or legends are visible.
### Interpretation
The diagram likely represents a network topology (e.g., social, data, or communication network). The central hub suggests critical nodes with high connectivity, while peripheral nodes may represent less critical or isolated entities. The absence of textual labels limits interpretability, but the spatial distribution implies hierarchical or modular organization.
**Note**: No factual data (e.g., numerical values, categorical labels) is extractable due to the lack of textual elements. The analysis is based solely on visual patterns and spatial grounding.
</details>
.
Figure 4: The yeast cell cycle learned in Schmidt and Kramer [2014] using a passive online learning algorithm for timed automata. The colored bars indicate gene activities. The model corresponds to the well-known yeast cycle.
<details>
<summary>Image 4 Details</summary>

### Visual Description
## Diagram: Gene Expression Network with Profile Bars
### Overview
The image depicts a network diagram of 9 interconnected nodes (labeled 1β9) with directed edges. Each node contains a segmented bar chart labeled "Geneβs Value in the Profile (%)", representing gene expression levels. The legend on the left maps colors to percentage ranges (0β100%). The network forms a cyclical structure with feedback loops and branching paths.
---
### Components/Axes
- **Legend**:
- Position: Left-aligned, vertical orientation.
- Title: "Geneβs Value in the Profile (%)".
- Color coding:
- White: 0%
- Yellow: 25%
- Orange: 50%
- Red: 75%
- Purple: 100%
- Black: 100% (conflict with legend; see "Key Observations").
- **Nodes**:
- Labeled 1β9, arranged in a cyclical network.
- Each node contains a horizontal bar chart divided into colored segments.
- Edges: Directed arrows indicate flow/relationships between nodes.
- **Bar Chart Segments**:
- Segments correspond to the legendβs color-percentage mapping.
- Example: A yellow segment = 25% gene value.
---
### Detailed Analysis
#### Node-Specific Bar Charts
1. **Node 1**:
- Bar: 100% black (conflict: legend states black = 100%, but node 1βs bar is fully black).
2. **Node 2**:
- Segments: 25% yellow, 75% black.
3. **Node 3**:
- Segments: 25% orange, 25% purple, 50% black.
4. **Node 4**:
- Segments: Alternating 25% black and 25% white (total 100%).
5. **Node 5**:
- Segments: Alternating 50% black and 50% white.
6. **Node 6**:
- Segments: 25% yellow, 25% black, 25% red, 25% white.
7. **Node 7**:
- Segments: 50% black, 25% red, 25% white.
8. **Node 8**:
- Segments: Alternating 25% black and 25% white (total 100%).
9. **Node 9**:
- Segments: Alternating 25% black and 25% white (total 100%).
#### Network Structure
- **Cyclical Flow**:
- Nodes 1β2β3β4β5β6β7β8β9β1 form a loop.
- Additional edges:
- Node 7β8 (feedback loop).
- Node 8β7 (feedback loop).
- Node 9β7 (branch).
- **Branching**: Node 9 connects to node 7, creating a bifurcation.
---
### Key Observations
1. **Color-Legend Conflict**:
- Node 1βs bar is fully black, but the legend associates black with 100%. This matches the legend, but node 1βs bar is labeled as 100% (consistent).
- Node 3βs purple segment (100%) conflicts with the legend, which maps purple to 100%. However, node 3βs bar includes 25% purple, 25% orange, and 50% black. This suggests a misinterpretation: purple may represent 100% in the legend but is used as a segment here.
2. **Alternating Patterns**:
- Nodes 4, 5, 8, and 9 show alternating black/white segments, suggesting binary or cyclical states.
3. **Mixed Expressions**:
- Nodes 2, 3, and 6 exhibit mixed colors, indicating heterogeneous gene expression.
4. **Feedback Loops**:
- Nodes 7 and 8 form a mutual feedback loop (7β8 and 8β7).
---
### Interpretation
1. **Gene Expression Dynamics**:
- The network likely models gene regulatory pathways, where nodes represent genes or pathways, and edges indicate activation/inhibition.
- Nodes with mixed colors (e.g., 2, 3, 6) may represent genes with variable expression or interactions with multiple regulators.
- Feedback loops (nodes 7β8) suggest autoregulation or mutual dependency.
2. **Anomalies**:
- Node 1βs fully black bar (100%) stands out as a potential "master regulator" or terminal state.
- Node 3βs purple segment (25%) conflicts with the legendβs 100% mapping, indicating possible errors in color-coding or data representation.
3. **System Behavior**:
- The cyclical structure implies a closed-loop system, possibly representing a biological cycle (e.g., cell cycle, metabolic pathway).
- Branching at node 9β7 introduces complexity, suggesting divergent pathways or decision points.
4. **Technical Limitations**:
- The legendβs color-percentage mapping is inconsistent with node 3βs bar (purple = 100% in legend but used as 25% in the bar).
- Node 1βs bar lacks segmentation, making it unclear if it represents a single gene or a composite value.
---
### Conclusion
This diagram illustrates a gene expression network with nodes representing genes/pathways and edges indicating regulatory interactions. The segmented bar charts quantify gene expression levels, though inconsistencies in color-coding (e.g., node 3βs purple segment) require clarification. The cyclical and branching structure highlights feedback mechanisms and potential regulatory hubs, offering insights into dynamic gene interactions.
</details>
## B Finite State Automata
In this section, we give a formal introduction to deterministic finite state automata as the most basic model considered in the related work. For other variants like probabilistic automata, timed and real time automata, and regression automata, we refer to the cited papers for formal introductions. A deterministic finite state automaton (DFA) is one of the basic and most commonly used finite state machines. Below, we provide a concise description of DFAs, the reader is referred to Hopcroft et al. [2013] for a more elaborate overview. A DFA A = γ Q,T, Ξ£ , q 0 , Q + γ is a directed graph consisting of a set of states Q (nodes) and labeled transitions T (directed edges). An example is shown in Figure 6. The start state q 0 β Q is a specific state of the DFA and any state can be an accepting state (final state) in Q + β Q . The labels of transitions are all members of a given alphabet Ξ£ . A DFA A can be used to generate or accept sequences of symbols (strings) using a process called DFA computation . This process begins in q 0 , and iteratively activates (or fires ) an outgoing transition t i = γ q i -1 , q i , l i γ β T with label l i β Ξ£ from the source state it is in q i -1 , moving the process to the target state q i pointed to by t i . A computation q 0 t 1 q 1 t 2 q 2 . . . t n q n is accepting if the state it ends in (its last state) is an accepting state q n β Q + , otherwise it is rejecting . The labels of the activated transitions form a string l 1 . . . l n . A DFA accepts exactly those strings formed by the labels of accepting computations, it rejects all others. Since a DFA is deterministic there exists exactly one computation for every string, implying that for every state q and every label l there exists at most one outgoing transition from q with label l . A string s is said to reach all the states contained in the computation that forms s , s is said to end in the last state q n of such a computation. The set of all strings accepted by a DFA A is called the language L ( A ) of A .
Figure 5: The initial part of the prefix tree, built from the input sample as shown in Figure 7. The square brackets indicate occurrence counts of positive data.
<details>
<summary>Image 5 Details</summary>

### Visual Description
## Tree Diagram: Hierarchical State Transitions
### Overview
The image depicts a binary tree structure representing hierarchical state transitions or decision pathways. Nodes are labeled with numerical coordinates in the format `[x][y]`, connected by edges labeled with directional values (e.g., `1 [3:2]`, `0 [2:4]`). The tree has 11 terminal nodes and 10 internal nodes, with a clear top-to-bottom, left-to-right flow.
---
### Components/Axes
- **Root Node**: `[0][5]` (topmost position)
- **Branching Logic**:
- Left branches labeled with `0` (e.g., `0 [3:1]`, `0 [2:1]`)
- Right branches labeled with `1` (e.g., `1 [3:2]`, `1 [1:2]`)
- **Edge Labels**: Directional values in the format `[x:y]`, likely representing state ranges or conditions.
- **Terminal Nodes**: 11 leaf nodes at the bottom, all labeled `[0][1]` or `[0][0]`.
---
### Detailed Analysis
#### Root to Leaf Paths
1. **Left Subtree** (Root β `[0][3]`):
- Splits into `[0][3]` (left) and `[0][0]` (right).
- Further subdivisions:
- `[0][3]` β `[1][1]` (left) and `[0][0]` (right).
- `[0][0]` β `[0][1]` (left) and `[0][1]` (right).
- Terminal nodes: `[0][1]` (6 instances), `[0][0]` (2 instances).
2. **Right Subtree** (Root β `[0][2]`):
- Splits into `[0][1]` (left) and `[1][0]` (right).
- Further subdivisions:
- `[0][1]` β `[1][1]` (left) and `[0][1]` (right).
- `[1][0]` β `[0][1]` (left) and `[0][1]` (right).
- Terminal nodes: `[0][1]` (4 instances), `[0][0]` (1 instance).
#### Edge Label Patterns
- Left edges (`0`) often transition to lower `y` values (e.g., `0 [3:1]` β `[0][3]`).
- Right edges (`1`) sometimes increase `y` (e.g., `1 [1:2]` β `[1][1]`).
---
### Key Observations
1. **Terminal State Bias**: 70% of terminal nodes end in `[0][1]`, suggesting a dominant outcome.
2. **Symmetry**: Left and right subtrees mirror in structure but differ in terminal node distributions.
3. **State Compression**: All terminal nodes share `[0][1]` or `[0][0]`, implying a final state simplification.
---
### Interpretation
This diagram likely models a **state machine** or **decision tree** where:
- **Binary choices** (`0`/`1`) at each node determine transitions.
- **Edge labels** (`[x:y]`) may represent state ranges, conditions, or thresholds.
- **Terminal nodes** (`[0][1]`/`[0][0]`) could signify "accept" (`1`) or "reject" (`0`) outcomes, with `[0][1]` being the majority result.
The hierarchical structure suggests a process where decisions cascade through layers, with terminal states aggregating outcomes. The asymmetry in terminal node counts hints at uneven probabilities or path weights in the underlying system.
</details>
Figure 6: An automaton learned from the input sample. The numbers in square brackets indicate occurrence counts of positive and negative samples.
<details>
<summary>Image 6 Details</summary>

### Visual Description
## Flowchart Diagram: State Transition System
### Overview
The image depicts a vertical flowchart representing a state transition system. Nodes are labeled with numerical pairs (e.g., [1:0], [0:1]), and transitions between nodes are annotated with directional arrows and labels containing numerical ratios (e.g., 0 [3:7], 1 [7:5]). The diagram includes loops and bidirectional connections, suggesting a probabilistic or weighted state machine.
### Components/Axes
- **Nodes**:
- Labeled with pairs in square brackets (e.g., [1:0], [0:1], [0:0], [3:0], [4:0], [0:3]).
- Positioned sequentially from top to bottom, with some nodes having self-loops.
- **Transitions**:
- Arrows indicate directionality between nodes.
- Labels on arrows include:
- A binary indicator (0 or 1) preceding a ratio in square brackets (e.g., 0 [3:7], 1 [7:5]).
- Ratios vary per transition (e.g., [3:10], [4:5], [0:2]).
- **Flow Direction**:
- Top-to-bottom progression with lateral and backward connections (e.g., [3:0] β [0:1] β [4:0] β [0:3]).
### Detailed Analysis
1. **Node [1:0]**:
- Self-loop: `0 [3:7]` (stays in state).
- Transition to [0:1]: `1 [7:5]`.
2. **Node [0:1]**:
- Transition to [0:0]: `0 [7:4]`.
- Self-loop: `1 [1:3]`.
3. **Node [0:0]**:
- Transition to [3:0]: `0 [4:3]`.
- Transition to [0:1]: `1 [3:1]`.
4. **Node [3:0]**:
- Transition to [0:1]: `1 [0:1]`.
- Transition to [4:0]: `0 [8:5]`.
5. **Node [4:0]**:
- Transition to [0:1]: `0 [4:5]`.
- Transition to [0:2]: `1 [0:2]`.
6. **Node [0:1] (lower instance)**:
- Transition to [4:0]: `0 [3:10]`.
- Transition to [0:3]: `1 [3:7]`.
7. **Node [0:3]**:
- Self-loop: `1 [0:2]`.
### Key Observations
- **State Hierarchy**: Nodes with higher first values (e.g., [3:0], [4:0]) appear mid-diagram, suggesting progression through stages.
- **Probabilistic Transitions**: Ratios (e.g., [3:7], [7:5]) may represent transition weights or probabilities.
- **Loops**: Multiple nodes have self-loops (e.g., [1:0], [0:1]), indicating potential for repeated states.
- **Bidirectional Flow**: Arrows connect nodes both upward and downward (e.g., [3:0] β [0:1] β [4:0]).
### Interpretation
The diagram likely models a system where states transition based on binary decisions (0/1) with associated ratios. For example:
- From [1:0], a "0" action retains the state with a 3:7 ratio, while a "1" action moves to [0:1] with a 7:5 ratio.
- The presence of loops suggests iterative processes or feedback mechanisms.
- The final node [0:3] has a self-loop with a 1:2 ratio, implying a terminal or stabilizing state.
This structure could represent decision trees, Markov chains, or workflow automation, where transitions depend on probabilistic outcomes or conditional logic.
</details>
## C State-Merging Algorithms
The idea of a state-merging algorithm is to first construct a tree-shaped DFA A from the input sample S , and then to merge the states of A . This DFA A is called an augmented prefix tree acceptor (APTA). An example is shown in Figure 5. For every state q of A , there exists exactly one computation that ends in q . This implies that the computations of two strings s and s β² reach the same state q if and only if s and s β² share the same prefix until they reach q . Furthermore, an APTA A is constructed to be consistent with the input sample S , i.e., S + β L ( A ) and S -β© L ( A ) = β
. Thus a state q is accepting only if there exists a string s β S + such that the computation of s ends in q . Similarly, it is rejecting only if the computation of a string s β S -ends in q . As a consequence, A can contain states that are neither accepting nor rejecting. No computation of any string from S ends in such a state. Therefore, the rejecting states are maintained in a separate set Q -β Q , with Q -βͺ Q + = β
. Whether a state q β Q \ ( Q + βͺ Q -) should be accepting or rejecting is determined by merging the states of the APTA and trying to find a DFA that is as small as possible.
1 9 1 0 0 0 0 0 0 0 0 1 15 0 1 1 0 0 0 1 0 1 0 1 0 1 0 0 0 5 0 1 0 0 0 1 2 0 0 0 12 1 1 0 0 0 0 0 0 0 1 0 0 1 5 1 0 1 0 0 1 3 1 0 0 0 6 0 0 0 0 0 1 1 3 1 0 1 0 20 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 13 0 1 1 1 0 1 0 0 0 0 0 0 0 1 3 1 0 1 1 7 1 0 0 0 0 0 0
Figure 7: Input sample for the APTA in Figure 5 and the learned model in Figure 6. The first column indicates whether the sample is positive or negative (i.e. a counter-example), the second column indicates the length of the word. The following symbols form the word, with each symbol separated by a space. This input format is commonly used in tools in the grammar induction community.
A merge of two states q and q β² combines the states into one: it creates a new state q β²β² that has the incoming and outgoing transitions of both q and q β² , i.e., replace all γ q, q t , l γ , γ q β² , q t , l γ β T by γ q β²β² , q t , l γ and all γ q s , q, l γ , γ q s , q β² , l γ β T by γ q s , q β²β² , l γ . Such a merge is only allowed if the states are consistent , i.e., it is not the case that q is accepting while q β² is rejecting or vice versa. When a merge introduces a non-deterministic choice, i.e., q β²β² is now the source of two transitions γ q β²β² , q 1 , l γ and γ q β²β² , q 2 , l γ in T with the same label l , the target states of these transitions q 1 and q 2 are merged as well. This is called the determinization process (c.f. the while-loop in Algorithm 2), and is continued until there are no non-deterministic choices left. However, if this process at some point merges two inconsistent states, the original states q and q β² are also considered inconsistent and the merge will fail. The result of a successful merge is a new DFA that is smaller than before, and still consistent with the input sample S . A state-merging algorithm iteratively applies this state merging process until no more consistent merges are possible. The general algorithm is outlined in Algorithm 1. Figure 6 shows an automaton obtained from the input given in Figure 7, which is also depicted as an APTA in Figure 5.
```
<loc_0><loc_0><loc_500><loc_499><_FORTRAN_>Algorithm 1 State-merging in the red-blue framework
Require: an input sample S
Ensure: A is a DFA that is consistent with S
A = apta(S) {construct the APTA A}
R = {q0} {color the start state of A red}
B = {q \ Q \ R | \exists \ q0, q, l \ } T {color all its children blue}
while B # 0 do {while A contains blue states}
if \b \in B s.t. \r \in R holds merge (A, r, b) = FALSE then {if there is a blue state inconsistent
with every red state}
R := R \{ b}
B := B \{ q \in Q \ R | \exists \langle b, q, l \rangle \ } T {color all its children blue}
else
for all b \in B and r \in R do {forall red-blue pair of states}
compute the evidence (A, q, q') of merge (A, r, b) {find the best performing merge}
end for
A := merge (A, r, b) with highest evidence {perform the best merge}
let q'' be resulting state
R := R \{q''} {color the resulting state red}
R := R \{r} {uncolor the merged red state}
B := {q \ Q \ R | \exists r \in R and \langle r, q, l \rangle \ } T {recompute the set of blue states}
end if
end while
return A
```
```
```
```
end if
end while
return A
```