Abstract
This paper presents a robust framework for inferring Linear Temporal Logic (LTL) formulas from noisy trace data. By formulating the inference problem as a Partial Weighted MaxSAT optimization, the proposed algorithms, MaxSAT-flie and MaxSAT-DT, effectively handle mislabeled data and produce concise, interpretable specifications. Experimental results demonstrate significant improvements in speed and accuracy over traditional SAT-based methods, particularly in the presence of noise.
Introduction
In formal verification, robotics, and system debugging, understanding the underlying rules of a complex system is critical. A common approach is to "mine" specifications by analyzing sets of "good" (positive) and "bad" (negative) behaviors. Linear Temporal Logic (LTL) is the preferred language for these specifications due to its mathematical rigor and proximity to natural language. However, existing automated inference tools often suffer from two main drawbacks: they require predefined templates or are overly sensitive to noise, leading to overfitted, unreadable formulas when data is imperfect.
Methodology
The authors introduce two novel algorithms designed to tolerate noise while maintaining the interpretability of the generated LTL formulas.
MaxSAT-flie: The Monolithic Approach
The core innovation of MaxSAT-flie is the transition from standard Boolean Satisfiability (SAT) to Partial Weighted MaxSAT. While a SAT solver requires all constraints to be met, a MaxSAT solver distinguishes between "hard" and "soft" constraints:
- Hard Constraints: Ensure the resulting formula is syntactically correct and adheres to LTL semantics.
- Soft Constraints: Represent the input data traces. The solver attempts to satisfy as many of these as possible, effectively allowing it to "ignore" noisy outliers.
To optimize for interpretability, the algorithm searches for the smallest formula that stays under a user-defined error threshold ($\kappa$). The formulas are represented as Directed Acyclic Graphs (DAGs), allowing for the reuse of sub-formulas and reducing the search space. A normalized weight function is also employed to handle skewed datasets, preventing the solver from favoring the majority class.
MaxSAT-DT: The Decision Tree Approach
To address scalability issues with large datasets, the authors propose MaxSAT-DT. This algorithm combines MaxSAT with decision tree learning. Instead of finding one massive formula, it builds a tree where each internal node contains a simple LTL formula that splits the data. A specialized score function ensures balanced splits and prevents "empty" branches. This "divide and conquer" strategy is significantly faster and often results in a more human-readable hierarchical structure.
Experimental Evaluation
The algorithms were tested against a benchmark of 148 LTL patterns (e.g., Absence, Existence, Universality). Traces had lengths up to 15, with sample sizes ranging from 12 to 1,000 traces. To simulate real-world conditions, a noisy variant was created by randomly flipping 5% of the labels.
Key Results
- Robustness to Noise: On noisy data, the previous state-of-the-art SAT-based method (SAT-flie) timed out in 124 out of 148 cases (~84%). In contrast, MaxSAT-flie (with a 10% error allowance) handled the majority of cases and produced significantly smaller formulas.
- Efficiency and Scalability: MaxSAT-flie was often orders of magnitude faster than SAT-based methods on noisy data because it avoided the computational cost of fitting corrupted data points perfectly. MaxSAT-DT emerged as the most scalable option, handling the largest datasets with the fewest timeouts.
- Interpretability: By prioritizing smaller formulas and utilizing decision trees, the tools produced specifications that are easier for human operators to verify and use.
Conclusion
The shift from exact SAT solving to MaxSAT optimization provides a powerful mechanism for learning LTL properties from imperfect data. By balancing accuracy with formula conciseness, these tools bridge the gap between raw system traces and formal, human-readable specifications. Future work includes extending these techniques to infinite traces and continuous-time logics like Signal Temporal Logic (STL).
Summary updated