Linear Temporal Logic over Finite Traces (LTLf) is widely used in Artificial Intelligence to specify desired temporal behavior and determine whether finite traces satisfy or violate it. Explaining these outcomes is essential for debugging and trust. However, existing approaches typically capture either sufficient reasons or counterfactual causes, without clarifying their relationship. We introduce a native characterization of abductive (AXps) and contrastive (CXps) explanations directly over finite traces, based on locking and unlocking time-indexed events. We prove its equivalence to the classifier-based formulation, and show that CXps coincide with a recently proposed temporal causality semantics for LTLf. This characterization enables an efficient implementation based on the enumeration of minimal unsatisfiable cores and minimal correction sets of ASP programs. Experiments on real-world event logs demonstrate the effectiveness of the approach.
Figures & tables
Figure 1: AXps (sufficient reasons) and CXps (minimal outcome-flipping interventions) for φ on a compliant trace π1 and a violating trace π2 . Sets are listed state by state; e.g. {},{low} denotes {low1} .
N
AXp
CXp
Complete
Timeout
Complete
Timeout
Log
C
T
Min
P25
P50
P75
Max
Min
P25
P50
P75
Max
Min
P25
P50
P75
Max
Min
P25
P50
P75
Max
Per-instance counts
bpi2020-domdecl
81
8
1
10
21
82
441
567
578
588
647
834
1
1
3
5
19
18
23
28
35
70
bpi2020-intdecl
181
552
6
54
83
193
621
81
186
249
344
784
4
19
38
62
220
0
9
38
91
908
bpi2020-permlog
312
1166
4
40
177
443
1087
80
294
426
597
1253
2
15
51
143
366
0
9
70
223
885
Table 1: Per-instance AXp/CXp counts (top) and AXp/CXp explanation sizes in literals (bottom), by log. N : instances (C=complete, T=timeout). Column Px refers to the x -th quantile of the distributions, with P50 being the median. Max., min. refers to the maximum and minimum observed statistics.
Figure 2: Time to the first and to all CXps on P(N) , τN , for caupybara , our full approach, and a CXp-only variant. Dashed: first CXp; solid: all CXps. 10 seconds timeout.
Counterfactual explanations show how changing an input could alter a model’s prediction, supporting model understanding, auditing, and actionable recourse.
Linear Temporal Logic (LTL) is one of the most widely adopted languages for specifying temporal extended objectives in AI, with applications ranging from reactive synthesis to stochastic planning in Markov decision processes and reinforcement learning. Traditionally, solving any of these problems requires translating the LTL specification to a nondeterministic automata on infinite words and then determinizing it, a step that is notoriously difficult in theory and in practice. Recent work has introduced LTLf+, which lifts the finite-trace logic LTLf to infinite traces. LTLf+ has the same expressive power as LTL, yet it retains most of the crucial advantages of its base logic LTLf. Most reasoning in LTLf+ rests on finite automata on finite words, for which we have not only a canonical minimal representation but also an efficient determinization procedure. In this work we present the first translation from LTL to LTLf+. We first normalize an LTL formula into the syntactic reactivity fragment of the Manna-Pnueli hierarchy, to create the general fragment-based shape of LTLf+. We then present linear translations for each individual component of that fragment. As a consequence of this translation, the expanding body of techniques developed for LTLf+ now becomes available to many AI problems currently formulated in LTL. We further show that this comes at no asymptotic cost, as the pipeline from LTL to automaton via LTLf+ remains doubly exponential.
Christoph Weinhuber, Maximilian Prokop, Giuseppe De Giacomo +1
University of Oxford · 2Technical University of Munich · 3Masaryk University Brno +1
Learning temporal logic specifications from system demonstrations is essential for tasks such as formal verification and controller synthesis, especially in safety-critical domains. Existing approaches typically assume demonstrations are correct or only affected by misclassification errors. In practice, however, system traces are often uncertain or incomplete due to sensor faults, measurement errors, or data loss. We present a framework for learning minimal Linear Temporal Logic (LTL) formulas from demonstrations with uncertainty. Our approach models uncertainty via Hamming distance to generate possible estimates around each observed trace, which are grouped with constraints requiring that at least one trace per group is consistent with the learned formula. Our problem is then reduced to an equivalent Pseudo-Boolean Optimization. We evaluate our method against state-of-the-art LTL learning approaches and show that it recovers specifications that more closely align with ground-truth formulas under uncertainty.
Existing explainability methods for Large Language Models (LLMs) typically treat hidden states as static points in activation space, assuming that correct and incorrect inferences can be separated using representations from an individual layer. However, these activations are saturated with polysemantic features, leading to linear probes learning surface-level lexical patterns rather than underlying reasoning structures. We introduce Truth as a Trajectory (TaT), which models the transformer inference as an unfolded trajectory of iterative refinements, shifting analysis from static activations to layer-wise geometric displacement. By analyzing displacement of representations across layers, TaT uncovers geometric invariants that distinguish valid reasoning from spurious behavior. We evaluate TaT across dense and Mixture-of-Experts (MoE) architectures on benchmarks spanning commonsense reasoning, question answering, and toxicity detection. Without access to the activations themselves and using only changes in activations across layers, we show that TaT effectively mitigates reliance on static lexical confounds, outperforming conventional probing, and establishes trajectory analysis as a complementary perspective on LLM explainability.
Hamed Damirchi, Ignacio Meza De la Jara, Ehsan Abbasnejad +3
Australian Institute for Machine Learning, Adelaide University · Monash University · Concordia University