Introduction
Modern software systems frequently operate over massive or infinite alphabets, such as 64-bit integers or Unicode character sets. Traditional automata learning algorithms, like Angluin's $L^*$, struggle in these environments because they rely on explicitly enumerating alphabet symbols. To address this, researchers developed Symbolic Finite Automata (s-FAs), which use logical predicates to define transitions between states.
In this work, presented at CAV 2018, the authors introduce $MAT^*$, the first algorithm capable of efficiently learning s-FAs by treating transition predicates as independent, learnable entities. They prove that an s-FA is efficiently learnable if and only if its underlying alphabet theory is also learnable, providing both a practical tool and a theoretical foundation for learning over infinite alphabets.
The Challenge of Infinite Alphabets
The primary hurdle in learning s-FAs is the "alphabet theory"—the logic used to define predicates (e.g., linear arithmetic). While specific cases were previously learnable, a general framework for determining which alphabet theories allow for efficient s-FA learning was missing. The authors establish a "necessary condition": if the underlying alphabet theory isn't efficiently learnable, the s-FA built on top of it isn't either. This defines the theoretical boundary for the entire field.
The $MAT^*$ Algorithm
$MAT^*$ is a symbolic evolution of the TTT algorithm, designed with a modular architecture. It functions as a "plug-and-play" learner that takes an existing learning algorithm ($\Lambda$) for a specific alphabet theory (like linear arithmetic or BDDs) as an input.
Instead of trying to learn the whole automaton at once, $MAT^*$ spawns individual instances of $\Lambda$ to "guess" the predicate for each transition. It employs classification trees to manage and distinguish states based on "access strings" and "distinguishing strings."
Because s-FAs must be deterministic and complete, $MAT^*$ includes specific checks to ensure that the learned predicates for a state's outgoing transitions cover the entire alphabet without overlapping. When the learner makes a mistake, it uses a binary search-style approach to determine if the error was caused by a missing state or an incorrectly learned predicate guard.
Experimental Evaluation
The authors evaluated $MAT^*$ using three distinct benchmark sets:
- Regular Expression Benchmarks: 15 regexes drawn from web sanitization frameworks (CodeIgniter) and firewalls (ModSecurity), evaluated over the massive UTF-16 alphabet ($2^{16}$ characters).
- LTL Benchmarks: 1,500 s-FAs generated from Linear Temporal Logic formulas, using Binary Decision Diagrams (BDDs) as predicates.
- Synthetic Benchmarks: 18 "s-FA over s-FA" instances, where the transitions of one automaton are themselves defined by other learnable automata.
Key Results
- Memory Efficiency: On the UTF-16 benchmarks, the classic TTT algorithm ran out of memory on every single test. $MAT^*$ learned them all efficiently.
- Scalability: In the BDD experiments, $MAT^*$ showed linear scaling. The number of queries grew predictably with the number of states, regardless of the complexity of the transitions.
- Hierarchical Learning: The algorithm successfully learned "automata over automata," proving that the symbolic approach can handle extremely abstract alphabet theories.
Conclusion and Future Work
$MAT^*$ succeeds because it treats the alphabet as a collection of logical properties rather than a list of symbols. However, limitations remain. $MAT^*$ is a congruence-based algorithm, and expanding beyond this class is a significant challenge. Additionally, the learnability of a small class of s-FAs where the union of predicates grows super-polynomially remains an open question. Future work may involve adding heuristics for common patterns, such as character classes in regex, to boost performance in real-world security applications.
Summary updated