Temporal Counterfactual Explanations of Behaviour Tree Decisions
Pith reviewed 2026-05-21 21:49 UTC · model grok-4.3
The pith
A causal model built automatically from a behavior tree's structure and domain knowledge generates diverse counterfactual explanations for robot decisions in real time.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
By first automatically building a causal model from the structure of the behaviour tree as well as domain knowledge about the state and individual behaviour tree nodes, the resultant causal model is then queried and searched to find a set of diverse counterfactual explanations that correctly explain the behaviour of a wide range of behaviour tree structures and states in real time.
What carries the argument
The automatically constructed causal model from the behavior tree structure plus domain knowledge about states and nodes, which is queried and searched to produce diverse counterfactual explanations.
If this is right
- Robots can answer contrastive why questions with causal rather than merely descriptive explanations.
- Explanations remain consistent with the underlying tree logic across varied structures and states.
- Generation occurs fast enough to support real-time human-robot interaction.
- A single method covers a broad range of behavior-tree designs without manual redesign of the explainer.
- Greater transparency supports safer and more trustworthy deployment of behavior-tree robots.
Where Pith is reading between the lines
- The same causal-model construction could be applied to other hierarchical control structures beyond behavior trees.
- Users could query explanations interactively to anticipate or steer future robot actions.
- Physical robot trials with human participants would test whether the generated counterfactuals improve user understanding.
- Combining the method with natural-language interfaces would let non-experts pose why questions directly.
Load-bearing premise
The causal model built from the behavior tree structure and supplied domain knowledge accurately and completely captures the decision logic and all relevant state dependencies.
What would settle it
A case in which a generated counterfactual, when applied to the behavior tree, produces a different decision outcome than the tree actually executes under the modified state.
Figures
read the original abstract
Explainability, in particular, the ability for robots to explain why they have made a decision or behaved in a certain way, is a critical tool in helping users understand the robots they interact and coexist with. Behaviour trees are a popular framework for controlling the decision-making of robots, and thus a natural question to ask is whether or not a system driven by a behaviour tree is capable of answering "why" questions. While explainability for behaviour tree-driven robots has seen some prior attention, no existing methods are capable of generating causal, counterfactual explanations which detail the reasons for robot decisions and behaviour. Therefore, in this work, we introduce a novel approach which automatically generates counterfactual explanations in response to contrastive "why" questions. Our method achieves this by first automatically building a causal model from the structure of the behaviour tree as well as domain knowledge about the state and individual behaviour tree nodes. The resultant causal model is then queried and searched to find a set of diverse counterfactual explanations. We demonstrate that our approach is able to correctly explain the behaviour of a wide range of behaviour tree structures and states in real time, unlike previous methods which are either unable to answer contrastive questions with causal explanations, or are not guaranteed to provide consistent and accurate explanations. By being able to answer a wide range of causal queries, our approach represents a step towards more transparent, understandable, and ultimately safe and trustworthy robotic systems.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces a method for generating temporal counterfactual explanations for decisions made by robots controlled via Behaviour Trees (BTs). The approach first automatically constructs a causal model from the BT structure combined with supplied domain knowledge about states and node behaviors, then queries and searches this model to produce diverse counterfactuals in response to contrastive 'why' questions. The authors claim the method correctly explains a wide range of BT structures and states in real time, offering causal consistency that prior methods lack.
Significance. If the causal model construction faithfully encodes BT execution semantics including temporal ordering and node-type dependencies, the work would provide a valuable advance in robot explainability, supporting safer and more transparent human-robot systems. The emphasis on automatically deriving causal structure from BTs plus domain knowledge, combined with diversity in explanations, represents a targeted contribution to contrastive reasoning in robotics; reproducible examples or code would strengthen this.
major comments (2)
- [Abstract / Causal model construction] Abstract and method description: the central claim that the automatically built causal model produces explanations 'consistent and accurate' with actual BT behaviour rests on the unverified assumption that the construction process fully captures temporal execution semantics (tick ordering, state persistence across ticks, Sequence/Selector/Parallel node logic, and memory nodes). No explicit mapping rules, soundness argument, or handling of implicit dependencies are provided, so counterfactual queries may be internally consistent within the model yet diverge from real robot execution.
- [Abstract / Results] Evaluation claims: the assertion that the method 'correctly explain[s] the behaviour of a wide range of behaviour tree structures and states in real time' is stated without quantitative metrics, error rates, success criteria, or comparison baselines. This undermines the empirical support for the real-time and correctness guarantees.
minor comments (2)
- [Method] Notation for causal variables and interventions should be introduced with explicit definitions early in the method section to improve readability.
- [Abstract] The abstract mentions 'temporal' counterfactuals but the provided description does not clarify how time is represented in the causal graph (e.g., via time-indexed nodes or explicit ordering constraints).
Simulated Author's Rebuttal
We thank the referee for their constructive comments, which have helped us identify areas where the manuscript can be strengthened. We address each major comment in detail below and outline the revisions we will make.
read point-by-point responses
-
Referee: [Abstract / Causal model construction] Abstract and method description: the central claim that the automatically built causal model produces explanations 'consistent and accurate' with actual BT behaviour rests on the unverified assumption that the construction process fully captures temporal execution semantics (tick ordering, state persistence across ticks, Sequence/Selector/Parallel node logic, and memory nodes). No explicit mapping rules, soundness argument, or handling of implicit dependencies are provided, so counterfactual queries may be internally consistent within the model yet diverge from real robot execution.
Authors: We agree that the current description of causal model construction would benefit from greater explicitness. The manuscript outlines how the causal model is derived from BT structure and domain knowledge, but we acknowledge the absence of detailed mapping rules for temporal aspects and a dedicated soundness argument. In the revised manuscript we will add a new subsection that provides explicit mapping rules for each node type (including how Sequence and Selector enforce ordering via directed edges, how memory nodes persist state across ticks, and how Parallel nodes handle concurrent dependencies). We will also include a soundness argument showing that the resulting causal graph preserves the execution semantics of standard BTs, ensuring that counterfactual interventions correspond to valid alternative execution traces. This revision will directly address the concern that queries could diverge from real robot behaviour. revision: yes
-
Referee: [Abstract / Results] Evaluation claims: the assertion that the method 'correctly explain[s] the behaviour of a wide range of behaviour tree structures and states in real time' is stated without quantitative metrics, error rates, success criteria, or comparison baselines. This undermines the empirical support for the real-time and correctness guarantees.
Authors: The evaluation section currently relies on a series of illustrative case studies covering diverse BT structures to demonstrate correctness and real-time performance. We recognise that these qualitative demonstrations would be strengthened by quantitative evidence. In the revision we will augment the evaluation with quantitative metrics: average query runtime across a benchmark set of BTs, success rate of generated counterfactuals when validated against a BT simulator, and a comparison of explanation diversity and consistency against prior non-causal BT explanation methods. These additions will provide clearer empirical support for the claims of correctness and real-time operation. revision: yes
Circularity Check
No circularity: causal model is constructed from BT structure plus external domain knowledge
full rationale
The paper's central method is a constructive procedure: it builds a causal model directly from the observable structure of the behaviour tree together with separately supplied domain knowledge about states and node semantics, then performs queries and searches on that model to produce counterfactuals. No equations, definitions, or steps in the abstract or described approach reduce a claimed result to a fitted parameter or to the target explanation by construction. No load-bearing self-citation chain is invoked to justify soundness or uniqueness; the derivation remains independent of the outputs it generates. This is the normal case of a self-contained algorithmic construction.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
Relation-based counterfactual explanations for Bayesian network classifiers, in: International Joint Conference on Artificial Intelligence, pp. 451–457. doi:10.5555/3491440.3491503. Andriella, A., Torras, C., Alenyà, G.,
-
[2]
Learning robot policies using a high-level abstraction persona-behaviour simulator, in: International Conference on Robot and Human Interactive Communication, IEEE. pp. 1–8. doi:10.1109/RO-MAN46459.2019.8956357. Angelopoulos,G.,Mangiacapra,L.,Rossi,A.,DiNapoli,C.,Rossi,S.,2025. Whatisbehindthecurtain?Increasingtransparencyinreinforcement learning with hum...
-
[3]
“What will you do next?" Designing and evaluating explanation generation using behavior trees for projection-level XAI, in: Companion of the International Conference on Human-Robot Interaction, ACM/IEEE. pp. 223–227. Love et al.:Preprint submitted to Elsevier Page 21 of 23 Temporal Counterfactual Explanations of Behaviour Tree Decisions doi:10.1145/361097...
-
[4]
Robotics and Automation Letters 6, 5929–5936
On the implementation of behavior trees in robotics. Robotics and Automation Letters 6, 5929–5936. doi:10.1109/LRA.2021.3087442. Colledanchise, M., Ögren, P.,
-
[5]
How behavior trees modularize robustness and safety in hybrid systems, in: International Conference on Intelligent Robots and Systems, IEEE/RSJ. pp. 1482–1488. doi:10.1109/IROS.2014.6942752. Colledanchise, M., Ögren, P.,
-
[6]
Behavior trees in robotics and AI: An introduction. CRC Press. doi:10.1201/9780429489105. Cruz, F., Dazeley, R., Vamplew, P., Moreira, I.,
-
[7]
Neural Computing and Applications 35, 18113–18130
Explainable robotic systems: Understanding goal-driven actions in a reinforcement learning scenario. Neural Computing and Applications 35, 18113–18130. doi:10.1007/s00521-021-06425-5. DeChant, C.,
-
[8]
Robotics and Automation Letters 7, 8925–8932
Why did I fail? A causal-based method to find explanations for robot failures. Robotics and Automation Letters 7, 8925–8932. doi:10.1109/LRA.2022.3188889. Doshi-Velez, F., Kim, B.,
-
[9]
Towards A Rigorous Science of Interpretable Machine Learning
Towards a rigorous science of interpretable machine learning. arXiv preprint arXiv:1702.08608 doi:10.48550/ arXiv.1702.08608. Frering, L., Steinbauer-Wagner, G., Holzinger, A.,
work page internal anchor Pith review Pith/arXiv arXiv
-
[10]
A surrogate model framework for explainable autonomous behaviour
A surrogate model framework for explainable autonomous behaviour. arXiv preprint arXiv:2305.19724 doi:10.48550/arXiv.2305.19724. Gebellí, F., Hriscu, L., Ros, R., Lemaignan, S., Sanfeliu, A., Garrell, A.,
-
[11]
Personalised explainable robots using LLMs, in: International Conference on Human-Robot Interaction, ACM/IEEE. pp. 1304–1308. doi:10.1109/HRI61500.2025.10974125. Gjærum, V.B., Strümke, I., Lekkas, A.M., Miller, T.,
-
[12]
Real-time counterfactual explanations for robotic systems with multiple continuous outputs. IFAC-PapersOnLine 56, 7–12. doi:10.1016/j.ifacol.2023.10.1328. Gómez-Talal, I., Azizsoltani, M., Bote-Curiel, L., Rojo-Álvarez, J.L., Singh, A.,
-
[13]
Engineering Applications of Artificial Intelligence 155, 110664
Towards explainable artificial intelligence in machine learning: A study on efficient perturbation-based explanations. Engineering Applications of Artificial Intelligence 155, 110664. Gugliermo,S.,Domínguez,D.C.,Iannotta,M.,Stoyanov,T.,Schaffernicht,E.,2024. Evaluatingbehaviortrees. RoboticsandAutonomousSystems 178, 104714. doi:10.1016/j.robot.2024.104714...
-
[14]
Transactions on Human-Robot Interaction 10, 1–31
Building thefoundation of robotexplanation generation using behavior trees. Transactions on Human-Robot Interaction 10, 1–31. doi:10.1145/3457185. Hayes,B.,Scassellati,B.,2016. Autonomouslyconstructinghierarchicaltasknetworksforplanningandhuman-robotcollaboration,in:2016IEEE International Conference on Robotics and Automation (ICRA), IEEE. pp. 5469–5476. ...
-
[15]
Serial recall, in: The Oxford Handbook of Human Memory, Two Volume Pack: Foundations and Applications. Oxford University Press. chapter 28, pp. 799–830. doi:10.1093/oxfordhb/9780190917982.001.0001. Iovino, M., Förster, J., Falco, P., Chung, J.J., Siegwart, R., Smith, C.,
-
[16]
arXiv preprint arXiv:2405.16137 doi:10.48550/arXiv.2405.16137
Comparison between behavior trees and finite state machines. arXiv preprint arXiv:2405.16137 doi:10.48550/arXiv.2405.16137. Iovino, M., Scukins, E., Styrud, J., Ögren, P., Smith, C.,
-
[17]
Robotics and Autonomous Systems 154, 104096
A survey of behavior trees in robotics and AI. Robotics and Autonomous Systems 154, 104096. doi:10.1016/j.robot.2022.104096. Kanazawa,K.,Koller,D.,Russell,S.,1995. Stochasticsimulationalgorithmsfordynamicprobabilisticnetworks,in:ConferenceonUncertaintyin Artificial Intelligence, pp. 346–351. doi:10.5555/2074158.2074197. Langley, P., Meadows, B., Sridharan...
-
[18]
Explainable agency for intelligent autonomous systems, in: Conference on Artificial Intelligence, AAAI. pp. 4762–4763. doi:10.1609/aaai.v31i2.19108. LeMasurier,G.,Gautam,A.,Han,Z.,Crandall,J.W.,Yanco,H.A.,2024a.Reactiveorproactive?Howrobotsshouldexplainfailures,in:International Conference on Human-Robot Interaction, ACM/IEEE. pp. 413–422. doi:10.1145/3610...
-
[19]
What would I do if...? Promoting understanding in HRI through real-time explanations in the wild, in: InternationalConferenceonRobotandHumanInteractiveCommunication,IEEE.pp.504–509.doi: 10.1109/RO-MAN60168.2024.10731403. Miller,T.,2019. Explanationinartificialintelligence:Insightsfromthesocialsciences. Artificialintelligence267,1–38. doi: 10.1016/j.artint...
-
[20]
From anecdotal evidence to quantitative evaluation methods: A systematic review on evaluating explainable AI. Computing Surveys 55, 1–42. doi:10.1145/3583558. Pearl, J., Mackenzie, D.,
-
[21]
The book of why: the new science of cause and effect. Basic books. Potteiger,N.,Koutsoukos,X.,2023. Safeexplainableagentsforautonomousnavigationusingevolvingbehaviortrees,in:InternationalConference on Assured Autonomy, IEEE. pp. 44–52. doi:10.1109/ICAA58325.2023.00014. Russell, S., Norvig, P.,
-
[22]
Explainable goal-driven agents and robots-a comprehensive review. Computing Surveys 55, 1–41. doi:10.1145/3564240. Stonier,D.,Demir,E.M.,Walker,N.,Castro,S.,etal.,2025. Pytrees2.3.0. URL: https://py-trees.readthedocs.io/en/release-2.3.x/. Tagliamonte, C., Maccaline, D., LeMasurier, G., Yanco, H.A.,
-
[23]
A generalizable architecture for explaining robot failures using behavior trees and large language models, in: Companion of the International Conference on Human-Robot Interaction, ACM/IEEE. pp. 1038–1042. Love et al.:Preprint submitted to Elsevier Page 22 of 23 Temporal Counterfactual Explanations of Behaviour Tree Decisions doi:10.1145/3610978.3640551. ...
-
[24]
Unraveling explainable reinforcement learning using behavior tree structures, in: International Conference on Acoustics, Speech and Signal Processing, IEEE. pp. 6465–6469. doi:10.1109/ICASSP48485.2024.10446357. Love et al.:Preprint submitted to Elsevier Page 23 of 23
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.