NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Contrastive Explanations of Plans Through Model Restrictions

Benjamin Krarup, Senka Krivic, Daniele Magazzeni, Derek Long, Michael Cashmore, David E. Smith

TL;DR

This paper introduces a framework for Explainable AI Planning (XAIP) that treats explanation as an iterative "negotiation" between a human and a planner. By compiling user questions into model constraints, the system generates contrastive plans—answering "Why A rather than B?"—allowing users to explore the plan space and build trust without needing to understand the planner's internal algorithms.

What Problem Does This Paper Address?

Automated planning systems are increasingly used in complex tasks, from warehouse logistics to space station maintenance. However, these systems often act as "black boxes": they provide a sequence of actions (a plan) to reach a goal, but they don't explain why those specific actions were chosen.

When a human user sees a plan that contradicts their intuition, a "knowledge gap" opens. Traditional explanations often focus on the internal logic of the algorithm, which is rarely helpful to a non-expert. The authors argue that humans naturally seek contrastive explanations. Instead of asking "How did you make this plan?", users ask "Why did you choose to move the pallet with Robot A instead of Robot B?" This paper bridges that gap by providing a formal way to answer these "Why A rather than B?" questions.

Methods

The authors propose a four-stage iterative process for plan negotiation:

  1. User Question: The user asks a contrastive question in natural language (e.g., "Why isn't action X used?").
  2. Formal Question: The system maps this to a formal constraint.
  3. Hypothetical Model (HModel): The system creates a new planning problem by "restricting" the original model with the user's constraint.
  4. Contrastive Explanation: The system solves the HModel to produce a new plan (HPlan) and presents a side-by-side comparison highlighting the differences.
Figure 1: The four-stage iterative process for generating a contrastive explanation from a user question. The hypothetical model is created by compiling the formal question into the planning model (in PDDL 2.1).

The technical "heavy lifting" is done via PDDL2.1 compilations. The authors developed specific methods to modify the Planning Domain Definition Language (PDDL) files so that any off-the-shelf planner can be used to generate the contrastive plan. For example, to answer "Why is action A not used?", the compilation adds a new "has_done_A" predicate to the goal, forcing the planner to include that action to find a valid solution.

Datasets

The researchers evaluated their framework using two distinct approaches:

  • User Study 1: 15 participants were shown planning animations (river crossing, logistics, and grid-based tasks) to elicit the types of questions humans naturally ask.
  • Performance Benchmarks: To test computational efficiency, the authors used four standard domains from the International Planning Competitions (IPC): ZenoTravel (logistics), Depots (block stacking/transport), Crew Planning (space station tasks), and Elevators.
  • User Study 2: 20 participants used the implemented "XAIP-as-a-Service" framework to interact with a warehouse delivery system model.

Key Insights and Ideas

  • Contrastive is the Default: The initial user study confirmed that ~90% of user questions are contrastive. Users don't want a full causal history; they want to know what happens if their preferred alternative is forced into the plan.

    Frequency of question types showing the dominance of 'Why' questions.
  • The Taxonomy of Foils: The authors categorized these questions into a "Contrastive Taxonomy" of seven formal types (FQ1-FQ7), ranging from simple action inclusion/exclusion to complex ordering and timing constraints.

    The Contrastive Taxonomy identifying common user question types.
  • Constraints as Pruning Tools: Counter-intuitively, adding constraints to a planning problem doesn't always make it harder to solve. In many cases, forcing a specific action prunes the search space so effectively that the planner finds a solution faster than it did for the original, unconstrained problem.

  • Explanation as Discovery: The iterative process often revealed that the planner's original "optimal" plan wasn't actually optimal, or that the user's suggested alternative led to a better outcome once the consequences were fully modeled.

Key Results

  • Efficiency: The median increase in planning time for restricted models was less than 4 seconds. In the Depots domain, one compilation actually improved planning time by over 245 seconds by guiding the search more effectively.
  • User Satisfaction: In the second user study, participants using the full contrastive framework reported significantly higher satisfaction (median 4.0/5.0) compared to a control group that only saw the alternative plan without highlighted differences (median 3.0/5.0).
  • Robustness: The system successfully handled up to 12 iterations of cumulative constraints in most test cases, proving that the "negotiation" can be deep without crashing the planner.

Limitations and Future Work

  • Causal Depth: While users liked the side-by-side comparison, they expressed a desire for deeper "because" statements (e.g., "Action B was chosen because Action A would have depleted the fuel needed for the final goal").
  • Unsolvability: If a user's constraint makes the plan impossible (e.g., "Why didn't you do X?" when X is physically impossible), the current system simply fails to find a plan. Future work aims to explain why a restricted model is unsolvable.
  • Natural Language Interface: The current implementation uses a structured dialogue UI; the authors hope to integrate natural language processing to allow users to ask questions more freely.
  • Complex Trajectories: Current PDDL compilations struggle with "Why did it take so long?" questions, which require richer trajectory constraints (like those found in PDDL 3.0).

Summary updated

BibTeX
@article{krarup2021contrastive,
  author = {Benjamin Krarup and Senka Krivic and Daniele Magazzeni and Derek Long and Michael Cashmore and David E. Smith},
  title = {{Contrastive Explanations of Plans Through Model Restrictions}},
  journal = {J. Artif. Intell. Res.},
  year = {2021},
  doi = {10.1613/jair.1.12813},
}
Figure