arXiv:2610.35169cs.LOOct 2026

Manuscript Offprint

arXiv:2610.35169

Formal Explanations for Linear Temporal Logic over Finite Traces

Valeria Fionda, Antonio Ielo, Francesco Ricca

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Linear Temporal Logic over Finite Traces (LTL f_{f}) 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 LTL f_{f}. 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.

Introduction

Linear Temporal Logic over Finite Traces (De Giacomo and Vardi 2013) (LTL f_{f}) is a popular formalism for temporal reasoning in AI. It has been successfully applied to several domains, such as reinforcement learning (De Giacomo et al. 2019), planning (Bacchus and Kabanza 1998; De Giacomo and Rubin 2018), robotics (Kress-Gazit, Fainekos, and Pappas 2009) and business process management (van der Aalst, Pesic, and Schonenberg 2009; De Giacomo et al. 2014).

In applications, LTLfLTL_{f} formulas are used to describe desired behavior. A formula may describe the dynamics of a system, or the goals driving an agent's behavior. Traces (interpretations) represents states of a system over time, or a sequence of actions performed by an agent. When a trace π\pi satisfies a formula φ\varphi, we say that π\pi complies with the specification; otherwise, it violates it. In either case, being able to explain why is important.

Figure 1 illustrates the explanation problem via an autonomous delivery agent subject to φ=G\varphi = \mathbf{G} (req →\rightarrow F deliver) ∧\wedge G\mathbf{G} (low →\rightarrow X charge), which requires every request to be eventually served and every low-battery to be immediately followed by charging. The trace π1\pi_1 (of Figure 1) satisfies φ\varphi, but this alone does not explain why. We focus on two complementary kinds of explanation. A sufficient reason is a set of time-indexed events and non-events that guarantees satisfaction: for π1\pi_1, the absence of low throughout the trace already guarantees satisfaction of the charging obligation, no matter how the remaining observations are altered. A minimal intervention is a minimal set of observations whose change flips the outcome: adding low to the first time instant of π\pi not followed by charge turns it into a violating trace. Conversely, π2\pi_2 violates φ\varphi: here a sufficient reason guarantees the violation (e.g., knowing only that low holds at the second time instant and charge is absent at the third time instant makes every trace agreeing with these two observations violate φ\varphi), while minimal interventions restore satisfaction. Thus the explanation problem answers two complementary questions: why does the trace satisfy or violate the specification? and what must change to obtain the opposite outcome?

These two kinds of explanation are precisely the central notions of formal explainable AI (FXAI) (Ignatiev, Narodytska, and Marques-Silva 2019; Shih, Choi, and Darwiche 2018): abductive (AXps) and contrastive (CXps) explanations. Given a classifier and an input instance, an abductive explanation is a subset of feature values sufficient to guarantee the predicted class, whereas a contrastive explanation is a subset of features whose change yields a different class. Importantly, subset-minimal abductive and contrastive explanations are related by hitting-set duality (Ignatiev et al. 2020; Reiter 1987), which also supports effective enumeration algorithms (Liffton et al. 2016). In principle, an LTL f_{f} formula can be cast as a binary classifier over time-indexed propositions, making these notions formally applicable. However, this encoding is not the usual way temporal formulas are understood and makes it harder to see explanations as observations that are kept fixed or allowed to change. Thus, a native characterization of AXps and CXps for LTL f_{f} is missing. Existing approaches capture either sufficient reasons for satisfaction (Ferrère, Maler, and Ničković 2015) or counterfactual causes of violation (Meng and Alrajeh 2025), but none connects the two perspectives or grounds them in hitting-set duality. We fill this gap through the simple operations of locking and unlocking temporal observations: locked observations play the role of the feature values an AXp keeps fixed, whereas unlocked ones are those a CXp is allowed to alter. AXps and CXps are thus defined directly over finite traces, with no classifier-based reformulation. Our contributions are threefold: (i) we characterize AXps and CXps for the satisfaction and violation of LTL f_{f} specifications, directly over finite traces; (ii) we prove that this characterization is

Figure

Figure 1: AXps (sufficient reasons) and CXps (minimal outcome-flipping interventions) for φ\varphi on a compliant trace π1\pi_1 and a violating trace π2\pi_2. Sets are listed state by state; e.g. {}\{\}, {low}\{low\} denotes {low1}\{low_1\}.

equivalent to the classifier-based one, establish the hitting-set duality between AXps and CXps for LTLfLTL_{f}, and show that CXps coincide with the temporal causes of (Meng and Alrajeh 2025) under fixed-length interventions; (iii) we reduce their computation to the enumeration of minimal unsatisfiable subsets and minimal correction sets, implement the approach in Answer Set Programming (ASP) (Gelfond and Lifschitz 1991; Brewka, Eiter, and Truszczynski 2011), and evaluate it on real-world event logs.

References (41)