Learning Interpretable Models Expressed in Linear Temporal Logic

Alberto Camacho, Sheila A. McIlraith

Introduction

Understanding system behavior is critical in domains such as robotics and software verification. While we can observe sequences of states (traces), translating these into human-understandable models remains a significant challenge. Traditional approaches often yield either overly complex "spaghetti" automata or opaque "black-box" neural networks. This paper presents a novel method to learn concise, symbolic models expressed in Linear Temporal Logic ($LTL_f$) by reducing the task to a Boolean Satisfiability (SAT) problem.

The Challenge of Interpretable Learning

The goal is to find a high-level symbolic description that distinguishes "good" (positive) traces from "bad" (negative) ones.

  1. Automata Learning: Algorithms like $L^*$ produce Finite State Machines (DFAs) that quickly become unreadable as system complexity grows.
  2. Deep Learning: Models like LSTMs excel at classification but provide no explanation for their internal logic.

By using $LTL_f$, the authors leverage a "lifted" representation that can capture complex temporal patterns in a few symbols, making the resulting models inherently interpretable. This allows the model to generalize from far fewer examples than a DFA learner would require.

Workflow of passive learning from labeled traces to a symbolic model.

Methodology: SAT-Based LTL Synthesis

The core innovation lies in transforming the logical search for a formula into a combinatorial search for a circuit-like structure using Alternating Finite Automata (AFA).

AFA Skeletons and SAT Encoding

The authors represent $LTL_f$ formulas using AFA "skeletons"—template structures for operators like UNTIL, NEXT, AND, and OR. For instance, the "Globally" ($G$) operator is represented by a specific AFA structure that maintains state over time.

AFA skeleton for the 'Globally' ($G$) operator, used as a template in the SAT encoding.

The learning problem is encoded as a SAT instance where the solver searches for a valid arrangement of these skeletons that accepts all positive traces and rejects all negative traces. The algorithm iteratively searches for the smallest possible formula, ensuring the final model is the most parsimonious description of the observed behavior.

Evaluation and Results

The approach was tested on synthetic benchmarks and the Openstacks planning domain.

  • Efficiency: The SAT-based learner found optimal formulas in approximately 0.1 seconds, orders of magnitude faster than training an LSTM-FCN.
  • Data Efficiency: The system demonstrated "few-shot" learning, achieving 99.8% accuracy on the Openstacks domain with as few as 10 training examples.
  • Interpretability: Learned models were compact (often size 3), providing clear insights (e.g., (not shipped_o5) U (stacks_avail_n4)) that a large DFA would obscure.

Conclusion and Future Work

While highly effective for clean data, the current "exact" approach is sensitive to noise. Future work includes utilizing MaxSAT to handle mislabeled traces and exploring active learning frameworks where the learner can query an oracle to resolve ambiguities between potential formulas.

Summary updated

BibTeX
@inproceedings{camacho2019learning,
  author = {Alberto Camacho and Sheila A. McIlraith},
  title = {{Learning Interpretable Models Expressed in Linear Temporal Logic}},
  booktitle = {ICAPS},
  year = {2019},
}
Figure