KR2026Proceedings of the 23rd International Conference on Principles of Knowledge Representation and ReasoningProceedings of the 23rd International Conference on Principles of Knowledge Representation and Reasoning

Lisbon, Portugal. July 20-23, 2026.

Edited by

ISSN: 2334-1033
ISBN: 978-1-956792-18-8

Sponsored by
Published by

Copyright © 2026 International Joint Conferences on Artificial Intelligence Organization

Generating Explainable Counterfactual Policies through Temporal Logic Queries

  1. Arnaud Lequen(Linköping University)
  2. Clément Legrand-Lixon(Université de Lille)
  3. Léo Saulières(University of Toulouse, INRAE-MIAT)

Keywords

  1. null-Explainable Reinforcement Learning
  2. null-Counterfactual Policies
  3. null-Linear Temporal Logic
  4. null-Reward Machines
  5. null-Multi-Objective Reinforcement Learning

Abstract

As reinforcement learning (RL) agents are deployed in increasingly complex environments, ensuring that their behavior complies with the user's needs has become a central challenge in eXplainable RL (XRL). An agent's policy may solve a given problem, but some of its choices can seem counter-intuitive or surprising to the user, who may have wished to see the agent accomplish its goal in a different way, and may wonder: what if the agent acted with a different intent in mind? Scenarios that answer this question are called counterfactual policies. In this work, we propose a framework that allows the user to request these alternative policies by formulating preferences about the behavior of the agent. These preferences are expressed in Linear Temporal Logic on finite traces (LTLf), a formal yet intuitive language that allows reasoning about deterministic sequences of actions. We synthesize the corresponding counterfactual policies using a multi-objective reinforcement learning algorithm, which produces a diverse set of alternative strategies balancing the agent's original policy with the one envisioned by the user. By comparing these strategies, our framework sheds light on the rationale behind the agent's decisions. Experimental trials show that such a set of policies can be synthesized in reasonable time.