Teaching LTLf Satisfiability Checking to Neural Networks

Weilin Luo, Hai Wan, Jianfeng Du, Xiaoda Li, Yuze Fu, Rongzhen Ye, Delong Zhang

Introduction

Linear Temporal Logic over finite traces ($LTL_f$) is a foundational formalism for specifying system behaviors in domains such as robotics, business process management, and software verification. A core challenge in using $LTL_f$ is the satisfiability problem: determining if there exists a sequence of events that satisfies a given formula. This problem is PSPACE-complete, and while symbolic solvers are sound and complete, they often fail to scale as formula size increases due to exponential computation times.

This paper introduces LTLfNet, a recursive neural network (TreeNN) designed to predict $LTL_f$ satisfiability in polynomial time. By leveraging the inherent hierarchical structure of logical formulas, LTLfNet achieves high accuracy and demonstrates remarkable scalability compared to traditional sequence-based neural architectures.

Methodology: The LTLfNet Architecture

The primary innovation of LTLfNet is its departure from treating logic formulas as simple text strings. Instead, the model operates directly on the formula's syntax tree. This approach allows the network to capture the recursive nature of logic.

Syntax tree representation of an LTLf formula

The architecture distinguishes between different types of logical operators to preserve semantic meaning:

  • Permutation Invariant Operators: For operators like conjunction ($\land$), where the order of operands is irrelevant, the model employs Mean Pooling. This ensures the resulting embedding is invariant to the permutation of sub-formulas.
  • Sequential Operators: For operators like "Until" ($U$), where order is critical, the model uses Concatenation to maintain positional information.
  • Recursive Combination: A two-layer Multi-Layer Perceptron (MLP) with residual connections serves as the COMBINE function, merging child node embeddings into a parent representation. The final classification is performed on the embedding at the root of the tree.

Experimental Results

LTLfNet was evaluated against several baselines, including Transformers and Graph Convolutional Networks (RGCN), across synthetic and real-world datasets.

Performance on Synthetic Data

On a synthetic dataset of 16,000 formulas, LTLfNet significantly outperformed other neural architectures. As shown in the table below, it achieved near-perfect accuracy and F1 scores.

Performance comparison of LTLfNet against baseline models on synthetic data

Scalability and Real-World Benchmarks

A key strength of LTLfNet is its ability to generalize to larger formulas. While the performance of Transformers and GCNs typically degrades as formula length increases, LTLfNet maintains steady accuracy. On real-world datasets like NASA-Boeing, the model achieved 100% accuracy, matching symbolic solvers.

Furthermore, LTLfNet offers a massive speed advantage. On the DECLARE dataset, while symbolic solvers like CDLSC required over 60,000 seconds, LTLfNet provided predictions in just 177 seconds. This suggests that neural models can serve as efficient "pre-filters," quickly identifying easy cases and reserving symbolic computation for complex edge cases.

Discussion and Limitations

While LTLfNet demonstrates the potential of neural networks in formal methods, it is not a replacement for symbolic solvers. As a statistical predictor, it lacks formal soundness and can produce false positives or negatives. Additionally, the model currently only provides a binary satisfiability prediction; it does not generate a "witness" trace to prove its conclusion.

Future work aims to address these limitations by developing architectures capable of trace generation and improving robustness against distribution shifts, particularly for formulas that deviate from the patterns found in random synthetic training data.

Summary updated

BibTeX
@inproceedings{luo2022teaching,
  author = {Weilin Luo and Hai Wan and Jianfeng Du and Xiaoda Li and Yuze Fu and Rongzhen Ye and Delong Zhang},
  title = {{Teaching LTLf Satisfiability Checking to Neural Networks}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/457},
}
Figure