LTL learning on GPUs

Mojtaba Valizadeh,Nathanaël Fijalkow,Martin Berger
2024-02-20
Abstract:Linear temporal logic (LTL) is widely used in industrial verification. LTL formulae can be learned from traces. Scaling LTL formula learning is an open problem. We implement the first GPU-based LTL learner using a novel form of enumerative program synthesis. The learner is sound and complete. Our benchmarks indicate that it handles traces at least 2048 times more numerous, and on average at least 46 times faster than existing state-of-the-art learners. This is achieved with, among others, novel branch-free LTL semantics that has $O(\log n)$ time complexity, where $n$ is trace length, while previous implementations are $O(n^2)$ or worse (assuming bitwise boolean operations and shifts by powers of 2 have unit costs -- a realistic assumption on modern processors).
Programming Languages,Artificial Intelligence
What problem does this paper attempt to address?
This paper attempts to solve the scalability problem in Linear Temporal Logic (LTL) formula learning. Specifically, the authors focus on how to scale LTL learning to at least 1,000 times more traces by using GPU - friendly algorithms without sacrificing trace length, learning speed, or approximation ratio (i.e., the ratio of the cost of the learned formula to the minimum cost). ### Background of the Paper Linear Temporal Logic (LTL) is widely used in industrial verification, and LTL formulas can be learned from traces. However, scaling LTL formula learning is an open problem. Existing LTL learners have performance bottlenecks when dealing with a large number of traces and cannot efficiently handle large - scale data sets. ### Research Questions The research questions can be summarized as follows: **Can LTL learning be scaled to at least 1,000 times more traces on a GPU using appropriately adapted algorithms without sacrificing trace length, learning speed, or approximation ratio?** ### Solutions The authors developed the first GPU - based LTL learner, and the main contributions include: 1. **New Enumeration Algorithm**: A new enumeration algorithm is proposed, which realizes branch - free LTL semantics with a time complexity of \(O(\log n)\), where \(n\) is the length of the trace (assuming the cost of logical operations and shift operations is unit cost). 2. **CUDA Implementation**: A CUDA implementation of this algorithm is provided for benchmarking and inspection. 3. **Parameterized Benchmark Suite**: A parameterized benchmark suite is designed to evaluate the performance of LTL learners, and a new method is proposed to quantify the loss of minimality caused by approximate LTL learning. 4. **Performance Benchmark**: Through performance benchmarking, it is shown that their implementation is not only faster but also able to handle several orders of magnitude more traces than existing work. ### Key Technologies 1. **Divide - and - Conquer (D&C)**: If the learning task contains too many traces, it can be split into smaller specifications, these specifications can be learned recursively, and then the learned formulas can be combined using logical connectives. 2. **Relaxed Uniqueness Checks (RUCs)**: Generation - and - test program synthesis usually caches synthesis results to avoid redundant calculations. The authors relax the uniqueness checks by (pseudo) - randomly rejecting some unique formulas. 3. **Novel Data Structure**: Represent LTL formulas as continuous bit matrices, which allows all logical operations to be implemented on the GPU with linear memory access and appropriate machine instructions without data - dependent branches. ### Conclusions Through the above techniques and methods, the authors have successfully scaled LTL learning to larger data sets, significantly improving learning efficiency and processing capacity. This result provides new possibilities for LTL learning in large - scale industrial applications.