arXiv:2609.11170cs.AISep 2026

Manuscript Offprint

arXiv:2609.11170

Breaking Predictions Is Not Enough: Specified-Foil Counterfactuals for Temporal Graphs

Minwoo Yu, Young-guk Ha

Minwoo Yu and Young-guk Ha

Abstract—Temporal graph counterfactual explanations typically change past events to change or invalidate an original prediction, while leaving its replacement unspecified. Yet a user facing a predicted outcome often asks which past conditions would make a particular alternative occur instead. We formulate this destination-specific question as the Specified-Foil Counterfactual: given an original prediction A and a foil B fixed before search, find a low-cost past-event intervention under which the same predictor selects B as top-ranked. Our trace-guided intervention search contrasts the completed execution of A with a reconstructed incomplete execution of B, maps their difference to DELETE, INSERT, REWIRE, RELABEL, and SHIFT operations, and verifies B through exact replay. We instantiate this principle with LiFTER on continuous-time dynamic graphs and TLogic on temporal knowledge graphs. On CTDGs, the method retains 85.7–93.6% of black-box greedy successes while reducing predictor evaluations by 75.0–80.0%; on TKGs, it reaches the specified foil in 74.8% of 600 comparisons. Executable traces thereby become computational structures for constructing conditions of unselected alternatives, rather than records used only to explain predictions already made.

Index Terms—Temporal graph learning, counterfactual explanation, contrastive explanation, neuro-symbolic reasoning, temporal knowledge graph.

1 INTRODUCTION

Predictions over evolving graphs select one outcome from multiple possible futures. Temporal graph learning studies this problem through two major formalisms. Temporal knowledge graphs (TKGs) represent time-stamped relational facts and logical rules, whereas continuous-time dynamic graphs (CTDGs) model streams of interactions and predict future links. Yet how past events would need to differ for a particular alternative B, rather than the predicted future A, has not been directly addressed.

Counterfactual explanations seek small input changes under which the same predictor selects an alternative outcome. Human explanation requests are often contrastive: they compare a fact with a foil [1], [2]. In temporal link prediction, where many outcomes compete, changing the original prediction and selecting a desired alternative are distinct objectives. We study model-level counterfactuals verified within the temporal world learned by a frozen predictor. Extending such answers to real-world causal counterfactuals requires an explicit causal model and corresponding identification assumptions [3].

Existing temporal counterfactual explainers primarily implement prediction invalidation. CoDy defines success as changing the original future-link prediction through past-event removal [4]; TemGX similarly identifies a temporal subgraph whose removal changes the original prediction [5]. The quantitative evaluation of CTM-Explainer also centers on deletion-based event selection and changes in the original score [6]. We use prediction invalidation to denote this class of objectives, which identifies events on which the original prediction depends while leaving its replacement unspecified. Once A loses the top rank, the selection of B, C, or any other outcome satisfies the same criterion.

Consider a temporal event graph that predicts the next state of a soldier on a battlefield. If the model predicts death, prediction invalidation identifies past events whose removal eliminates that prediction. The replacement, however, could be critical injury, missing, or another state. Specifying survival as the foil asks a sharper question: what would have had to differ for the model to predict survival rather than death? Suppose the completed death execution follows enemy exposure → gunshot → delayed evacuation → death, while an incomplete survival execution lacks timely evacuation. A corresponding answer may remove the gunshot event, shift the evacuation time, or change the binding of medical support. The result is a counterfactual explanation verified within the predictor, rather than a causal prescription that guarantees survival in the real world.

We formulate this question as the Specified-Foil Counterfactual problem for temporal graph learning across TKGs and CTDGs. Given an original prediction A and a foil B fixed before search, the task identifies past-event changes that make the same predictor select B instead of A. Every successful specified-foil intervention also invalidates A, whereas an intervention that invalidates A need not select B. The explicit destination therefore strengthens temporal counterfactual explanation from changing the current answer to constructing the conditions for a particular alternative.

This distinction matters because future-link prediction is

M. Yu and Y.-g. Ha are with the Smart Computing Laboratory, Department of Computer Science & Engineering, Konkuk University, Seoul 05029, Republic of Korea. E-mail: {snowypainter, ygha}@konkuk.ac.kr.

Y.-g. Ha is the corresponding author.

inherently multi-alternative. In our controlled invalidation study, interventions that ignored the foil changed A in 4,008 CTDG cases, yet reached the prespecified Rank-5 and Rank-10 foils in only 3.6% and 1.4% of those cases, respectively. In TKGs, none of the 122 successful invalidations reached the Rank-5 or Rank-10 foil. Changing A can promote a nearby runner-up, but it does not generally navigate to a specified alternative. An explicit foil makes it possible to measure which past-event changes separate A from B, whether B is locally reachable, and how much that transition costs. The task thus characterizes the reachability and boundary of an alternative future represented by the model.

The stronger objective substantially enlarges black-box search. Without access to internal execution, an explainer must propose an edit, rerun the predictor, observe the output, and repeat. Even prediction invalidation has required locality constraints, temporal influence and event-impact heuristics, and Monte Carlo Tree Search to identify removal sets. A specified foil further introduces insertions and alternative endpoints and timestamps. A black-box method can verify a solution through sufficient computation, but it must discover that solution by exploring the input space from output feedback alone.

Executable neuro-symbolic predictors provide a different route. Their traces expose the grounded facts, entity bindings, and temporal conditions that establish the original prediction. Re-grounding rules toward the foil can also reconstruct partial executions and reveal their missing conditions. Our trace-guided intervention search contrasts the completed execution of the original with the reconstructed incomplete execution of the foil, maps their difference to DELETE, INSERT, REWIRE, RELABEL, and SHIFT operations, and then exactly replays the predictor on the edited event set to verify that the foil becomes top-ranked.

As reviewed in Section 2, prior work has separately developed fact intervention and abduction in KGs, executable temporal reasoning in TKGs, and factual explanation and prediction invalidation in CTDGs. We connect these lines through temporal interventions between an original prediction and a specified foil. Our contributions are as follows:

  • We formulate the Specified-Foil Counterfactual problem uniformly for TKGs and CTDGs, combining an original prediction A, a specified foil B, admissible past-event interventions, and exact-replay success in a single objective.

  • We derive DELETE, INSERT, REWIRE, RELABEL, and SHIFT from the existence, endpoint, relation, and time coordinates of temporal events, and define intervention cost and bounded minimality.

  • We introduce trace-guided intervention search, which maps the difference between a completed original execution and a reconstructed incomplete foil execution into temporal edits. Grounded traces thereby become a computational interface for synthesizing the conditions of an alternative.

  • We instantiate the same principle independently in LiFTER-based CTDGs and TLogic-based TKGs, and evaluate reachability, target specification, search efficiency, exhaustive recovery, stability, and execution-level case studies.

A symbolic trace is not merely a by-product used to explain a prediction; it is an executable structure from which interventions otherwise guessed by post-hoc search can be constructed directly.

Across 12,000 CTDG comparisons, DELETE alone reached only a subset of the specified alternatives; INSERT, REWIRE, SHIFT, and two-edit compositions opened additional solutions. Trace-guided intervention search retained 85.7–93.6% of the successes obtained by black-box greedy search while reducing predictor evaluations by 75–80%. Within bounded spaces that permitted exhaustive enumeration, it recovered 74.9–91.4% of the discovered solutions using approximately 9% of the evaluations. Across 600 TKG comparisons on ICEWS14 and ICEWS18, the method reached the specified foil in 74.8% of cases and recovered 97.9–100% of the exhaustive solutions using approximately 16.6% of the evaluations. The shared behavior of CTDG interaction traces and TKG relational proof paths supports execution inversion as a general principle of executable temporal reasoning rather than a mechanism specific to LiFTER's scoring function.

Section 5.7 traces representative solutions through their executions. One CTDG case changes the predicted learning content after deleting a single past interaction; one TKG case changes the predicted consultation partner from Moon Jae-in to Benjamin Netanyahu after shifting the time of a negotiation-intent fact by three days.

References (20)