GA-TL-Mining for Temporal Specification Inference
- GA-TL-Mining is a family of evolutionary approaches that infers temporal logic specifications from behavioral data using genetic programming and syntax-tree search.
- It balances multiple objectives—robustness, explanation adequacy, and formula simplicity—to support tasks like classification, monitoring, and control.
- Applications range from inverse specification in MDPs to supervised STL classification and adversarial inverse constraint learning in reinforcement learning.
Genetic Algorithm-based Temporal-Logic Mining (GA-TL-Mining) denotes the use of genetic algorithms or genetic programming to infer temporal-logic specifications from data, demonstrations, or labeled trajectories, with formulas typically represented as syntax trees and evaluated by task-specific objectives over satisfaction, robustness, or policy-level explanatory power. In the cited literature, the paradigm appears in inverse specification inference for LTL in MDPs (Kasenberg et al., 2017), in robustness-aware STL requirement mining from labeled good and bad trajectories through the ROGE framework (Nenzi et al., 2017), and as the constraint-discovery component of inverse logic-constraint learning (ILCL) for parameterized truncated linear temporal logic (pTLTL) coupled to logic-constrained reinforcement learning (Cho et al., 15 Jul 2025). Closely related work on robustness-guided parametric mining (Hoxha et al., 2015) and retrieval-augmented Bayesian optimization in a continuous semantic space of STL formulas (Saveri et al., 2024) helps delineate both the antecedents of the approach and a prominent non-GA alternative.
1. Conceptual scope and lineage
Across the cited works, GA-TL-Mining is not a single fixed algorithm but a family of evolutionary approaches for discovering temporal specifications from behavioral evidence. The common pattern is search over formula syntax, usually with parse trees or syntax trees as genotypes, combined with an objective that rewards explanatory adequacy, class separation, or downstream control utility. The mined artifact is not merely a classifier: in several formulations it is also intended to serve as a human-readable requirement, monitor, or control constraint (Nenzi et al., 2017).
| Work | Logic and task | Search style |
|---|---|---|
| "Interpretable Apprenticeship Learning with Temporal Logic Specifications" (Kasenberg et al., 2017) | LTL from demonstrated MDP trajectories | Genetic programming with multiobjective optimization |
| "A Robust Genetic Algorithm for Learning Temporal Specifications from Data" (Nenzi et al., 2017) | STL from labeled good/bad trajectories | Evolutionary structure search plus GP-UCB parameter synthesis |
| "ILCL: Inverse Logic-Constraint Learning from Temporally Constrained Demonstrations" (Cho et al., 15 Jul 2025) | pTLTL constraints from demonstrations | Tree-based genetic search inside an alternating min-max game |
Historically, robustness-guided mining of parametric MTL or STL properties for CPS already framed temporal-logic mining as stochastic optimization over parameter spaces, especially for falsification-domain exploration (Hoxha et al., 2015). A later development was the shift from parameter mining within a fixed parametric formula toward explicit structural inference. The 2017 LTL apprenticeship-learning work formulated inverse specification inference as a multiobjective search over formulas themselves (Kasenberg et al., 2017), and the 2017 ROGE work extended this structural emphasis to STL classification with robustness-based discrimination (Nenzi et al., 2017).
A recurrent boundary case is the distinction between GA-TL-Mining and other search paradigms for temporal-logic inference. "Retrieval-Augmented Mining of Temporal Logic Specifications from Data" explicitly positions itself against prior GA-based work such as ROGE, but replaces evolutionary population search with Bayesian Optimization in a continuous semantic space plus information retrieval over a dense vector database (Saveri et al., 2024). This makes it closely related to GA-TL-Mining in problem setting, while not itself belonging to the GA family.
2. Formal problem settings
One major formulation treats GA-TL-Mining as inverse specification inference from behavior demonstrations in an MDP. In "Interpretable Apprenticeship Learning with Temporal Logic Specifications," the environment is modeled as
demonstrations are finite trajectories
and the goal is to infer an LTL formula that explains the observed behavior while remaining succinct (Kasenberg et al., 2017). The paper formulates this as a multiobjective problem balancing an explanation objective against formula complexity.
A second formulation treats GA-TL-Mining as supervised requirement mining from labeled trajectories. In ROGE, the input is a pair of datasets, for “good” or regular trajectories and for “bad” or anomalous trajectories, and the task is to synthesize an STL formula that separates the two classes (Nenzi et al., 2017). The intended output is both a temporal classifier and an interpretable requirement. The cited 2024 retrieval-augmented work adopts the same supervised binary-classification setting, with positive or regular trajectories and negative or anomalous trajectories , but uses BO and IR rather than a genetic algorithm (Saveri et al., 2024).
A third formulation embeds GA-TL-Mining inside an adversarial inverse-constraint-learning loop. In ILCL, the problem is posed as a two-player zero-sum game between GA-TL-Mining and Logic-CRL (Cho et al., 15 Jul 2025). The inverse objective is first written as
subject to
with
0
Because this formulation is intractable and ill-posed, the paper alternates between a constraint player and a policy player. At iteration 1, GA-TL-Mining chooses
2
and Logic-CRL responds by learning
3
This makes the mined formula a dynamic discriminator between expert behavior and the behavior induced by previously learned policies.
The logics used differ across these formulations. The apprenticeship-learning work uses LTL in the syntax
4
(Kasenberg et al., 2017). ROGE uses STL with
5
(Nenzi et al., 2017). ILCL uses TLTL in positive normal form with atomic predicates 6, operators 7, and parameterizes each constant 8 as a learnable threshold 9 (Cho et al., 15 Jul 2025).
3. Search representations and evolutionary mechanisms
In the LTL apprenticeship-learning formulation, each formula is represented as a parse tree, and search is performed by standard tree-based genetic programming with standard tree crossover and standard tree mutation (Kasenberg et al., 2017). The optimizer is MOEAFramework with NSGA-II; each run uses 50 generations, population size 100, and is repeated 20 times. To reduce the search space, candidate formulas are restricted to the form
0
Fitness evaluation requires conversion of a candidate formula to a deterministic Rabin automaton, construction of a product MDP, computation of a violation-cost objective, and evaluation of formula complexity.
ROGE adopts a bi-level evolutionary architecture for STL mining. The outer stage is a genetic algorithm over formula structure, and the inner stage synthesizes parameters for each candidate structure by GP-UCB (Nenzi et al., 2017). The initial population is generated by generateInitialFormulae(Ne, s), with a fraction drawn from simple templates such as 1, 2, and 3, while the remaining formulas are sampled randomly up to a maximum size 4. This is explicitly treated as a regularization strategy. Evolution proceeds by ranking formulas using
5
selecting the best half, applying subtree crossover and mutation, synthesizing parameters for new structures, merging old and new populations, and retaining the best 6 formulas. The size penalty is
7
with 8 chosen so that 9 and 0 adaptively set to the average discrimination in the current generation.
In ILCL, candidate pTLTL formulas are represented directly as syntax trees whose internal nodes are logical or temporal operators and whose leaves are parametric atomic predicates (Cho et al., 15 Jul 2025). The initial basis trees are generated from the state dimensions. For a 1-dimensional state, each dimension yields two pAPs 2 with 3, giving 4 pAPs total. These are composed into five temporal templates,
5
which produces 6 unary basis formulas and 7 binary ones, for a total of 8 basis logic trees. Random trees are then built by repeatedly injecting randomly chosen operators above random nodes until reaching depth bound 9 or stopping early with probability 0; the experiments use 1 and 2. When 3, previously discovered constraints are included in the initial population.
The ILCL search operators are CROSSOVER, MUTATION-R, and MUTATION-A (Cho et al., 15 Jul 2025). CROSSOVER exchanges randomly selected subtrees between two parents. MUTATION-R selects a random node and either replaces it with another node of the same type or removes it with its descendants. MUTATION-A inserts a randomly selected logic operator as the parent of a chosen node while preserving semantics. Fitness evaluation has two stages: optimize thresholds 4 by dual annealing, then regularize the score by tree size. The search avoids duplicate formulas, enforces temporal consistency by requiring every non-root node to have a temporal-operator ancestor, and applies simplification rules such as 5.
These mechanisms illustrate a core feature of GA-TL-Mining: the search state is the formula itself, not only a vector of parameters. A common misconception is that GA-TL-Mining necessarily optimizes thresholds inside a fixed hand-designed template family. The cited works show several stronger variants: full parse-tree search in inverse LTL inference (Kasenberg et al., 2017), structure-plus-parameter learning in STL classification (Nenzi et al., 2017), and syntax-tree construction for pTLTL “without predefined formula templates” in ILCL (Cho et al., 15 Jul 2025).
4. Semantics and objective functions
The objective functions used in GA-TL-Mining vary by task, but they are all designed to avoid purely Boolean acceptance counts. In STL mining, a central device is quantitative robustness. ROGE uses standard STL robustness 6, with satisfaction when 7 and violation when 8 (Nenzi et al., 2017). Its discrimination objective is
9
This objective favors formulas whose average robustness is high on good trajectories, low on bad trajectories, and well separated relative to variability. The same robustness-gap objective reappears in the retrieval-augmented BO framework, where it becomes the acquisition target in a continuous semantic space rather than in a GA loop (Saveri et al., 2024). This suggests a methodological continuity between GA-based and non-GA temporal-logic mining even when the outer search algorithm changes.
ILCL uses robustness differently. Its binary constraint indicator is
0
and the Monte Carlo fitness at iteration 1 is
2
This score is high when many trajectories from previously learned policies violate the formula, but it is forced to zero if any expert demonstration violates it (Cho et al., 15 Jul 2025). The paper then regularizes it as
3
which penalizes larger syntax trees.
The inverse LTL apprenticeship-learning work introduces an alternative soft objective: violation cost (Kasenberg et al., 2017). For an infinite trajectory 4, the cost is
5
Intuitively, the objective asks for the smallest discounted number of skipped time steps required to make the trajectory satisfy the formula. The paper then defines two explanation objectives. The state-based objective captures “what actually happened,” while the action-based objective captures “what the agent expected to happen.” Formula complexity is measured as the number of nodes in the parse tree, and the learning problem is posed as
6
Related CPS work on parametric MTL or STL mining provides an important background for these robustness-based objectives. There, robust semantics converts parameter mining into a Pareto optimization problem for discovering falsifying regions in parameter space (Hoxha et al., 2015). Although that work does not center on a classic genetic algorithm, it established the robustness-guided optimization viewpoint that later GA-TL-Mining formulations adopted more explicitly.
5. Empirical behavior and application domains
Empirically, GA-TL-Mining has been used in at least three distinct application regimes. The first is inverse specification inference in small MDP domains. In SlimChance, where the ground-truth specification is 7 and success is rare, the state-based objective often makes 8 Pareto efficient and recovers 9 only in a few runs, whereas the action-based objective makes 0 Pareto efficient in all 20 runs (Kasenberg et al., 2017). In CleaningWorld, both objectives frequently recover simpler formulas such as 1 and 2 rather than the ground-truth formula
3
which is reported as Pareto dominated. This is a canonical example of a recurring phenomenon in temporal-logic mining: semantically plausible and syntactically simpler explanations may dominate the exact latent formula.
The second regime is STL classification from labeled trajectories. ROGE is evaluated on a naval surveillance anomalous-trajectory problem and on Ineffective Inspiratory Effort (IIE) detection (Nenzi et al., 2017). In the maritime case, the dataset contains 2000 trajectories, with 1000 normal and 1000 anomalous, and 10-fold cross-validation reports misclassification rate 4 for ROGE, compared with 5 for DTL4STL. Execution time is 6 sec for ROGE versus 7 sec for DTL4STL. The learned formula is
8
In the respiratory dataset, consisting of 288 trajectories with 144 normal and 144 anomalous traces, 6-fold cross-validation reports ROGE misclassification 9 versus 0 for DTL4STL, false positives 1 versus 2, false negatives 3 versus 4, and execution time 5 sec versus 6 sec. The learned specification is
7
The paper also states that, on this dataset, this corresponds to roughly 22% improvement in accuracy and 67% improvement in computation time relative to DTL4STL.
The third regime is demonstration-conditioned constraint learning for RL. ILCL reports results on four temporally constrained tasks and real-world transfer (Cho et al., 15 Jul 2025). In the navigation task with the “avoid red and blue until green” constraint, ILCL’s maximum violation rate is 8, which is 9 lower than Hier-AIRL, the best baseline there. The paper emphasizes that the learned formulas are often syntactically different from the ground truth but semantically close, with low violations and strong reward. It further reports transfer to a real-world peg-in-shallow-hole setting, where a Panda arm inserts a peg into holes tilted at 0, 1, and 2.
A notable non-GA comparison point is the 2024 retrieval-augmented BO method, which evaluates on Linear system, Maritime surveillance, HAR, LP5 robot failure, and Train cruise control (Saveri et al., 2024). The reported best formulas have at most 3 syntax-tree nodes, often achieve zero or near-zero misclassification rate, have precision near 1 and recall exactly 1 in all reported cases, and require under 15 seconds across all tested cases. These results do not belong to GA-TL-Mining proper, but they are technically important because they show how a semantic-space search can compete with or exceed prior GA-based mining under the same broad requirement-mining objective.
6. Limitations, misconceptions, and relation to non-GA methods
Several limitations recur across the literature. In the inverse LTL setting, objective evaluation is expensive: the action-based objective in CleaningWorld took roughly 9 hours on average, and one iteration of violation-cost computation is stated to take
3
where 4 is the Rabin automaton state space (Kasenberg et al., 2017). The method also assumes full observability, known transition dynamics, a single-agent MDP, and does not handle unknown dynamics, POMDPs, or multi-agent systems.
ROGE reduces some of these burdens by mining directly from labeled trajectories rather than first fitting a generative model, but it remains heuristic and data-sensitive (Nenzi et al., 2017). The paper explicitly notes dependence on the initial population, warns that a fully random initial population can lead to poor results, and emphasizes that parameter tuning via GP-UCB remains expensive. Its use of average robustness instead of pure satisfaction probability addresses noise and limited data, but does not eliminate the absence of global optimality guarantees that is typical of evolutionary search.
ILCL exposes a different class of limitations. The paper notes that the Lagrangian approximation in Logic-CRL softens the hard binary TL constraint, which can increase violations in novel settings even when robustness is low (Cho et al., 15 Jul 2025). It also acknowledges that adversarial instability and a limited number of alternations can yield suboptimal constraints, which is why it selects the most expert-like constraint among candidate iterations rather than assuming the final game iterate is always best.
A common misconception is that any recent free-form temporal-logic mining method belongs to GA-TL-Mining. The 2024 retrieval-augmented approach explicitly contradicts this categorization (Saveri et al., 2024). It performs no evolutionary population search, no mutation or crossover over formulas, and no direct fitness-based grammar search. Instead, it uses Bayesian Optimization in a continuous semantic embedding space and approximate nearest-neighbor retrieval in a FAISS database with IVFPQ indexing and 5 distance to map embeddings back to formulas. The method is described as template-free or grammar-free in the sense of search, and it differs from GA-style methods by learning structure and parameters jointly through retrieval-augmented BO rather than direct genetic evolution.
Another misconception is that recovering the exact hidden syntax is the central criterion of success. The evidence is more nuanced. In CleaningWorld, the true formula is not recovered because simpler formulas are Pareto dominant (Kasenberg et al., 2017). In ILCL, learned formulas are reported as syntactically different from ground truth but semantically close (Cho et al., 15 Jul 2025). In ROGE and the 2024 BO-based alternative, emphasis is placed on compact, interpretable formulas that separate labeled behaviors well (Nenzi et al., 2017). This suggests that, within temporal-logic mining, semantic adequacy, discriminative power, and compactness often take precedence over exact syntactic identification.
Taken together, the cited works place GA-TL-Mining at the intersection of formal methods, evolutionary computation, and data-driven behavior inference. Its defining characteristic is not any single objective or temporal logic, but the use of evolutionary search to discover temporal specifications themselves. Related robustness-guided stochastic optimization for parametric formulas (Hoxha et al., 2015) and retrieval-augmented BO over semantic formula spaces (Saveri et al., 2024) show that the broader field now includes both GA-based and non-GA methods. A plausible implication is that current temporal-logic mining research is moving from narrowly parameterized templates toward richer structure learning, while simultaneously differentiating between evolutionary syntax search and continuous semantic-space optimization.