{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/explaining-rl-decisions-with-trajectories","title":"Explaining RL Decisions with Trajectories","arxiv_id":"2305.04073","date":"2023-05-06","proceeding":null,"authors":["Shripad Vilasrao Deshmukh","Arpan Dasgupta","Balaji Krishnamurthy","Nan Jiang","Chirag Agarwal","Georgios Theocharous","Jayakumar Subramanian"],"abstract":"Explanation is a key component for the adoption of reinforcement learning (RL) in many real-world decision-making problems. In the literature, the explanation is often provided by saliency attribution to the features of the RL agent's state. In this work, we propose a complementary approach to these explanations, particularly for offline RL, where we attribute the policy decisions of a trained RL agent to the trajectories encountered by it during training. To do so, we encode trajectories in offline training data individually as well as collectively (encoding a set of trajectories). We then attribute policy decisions to a set of trajectories in this encoded space by estimating the sensitivity of the decision with respect to that set. Further, we demonstrate the effectiveness of the proposed approach in terms of quality of attributions as well as practical scalability in diverse environments that involve both discrete and continuous state and action spaces such as grid-worlds, video games (Atari) and continuous control (MuJoCo). We also conduct a human study on a simple navigation task to observe how their understanding of the task compares with data attributed for a trained RL policy. Keywords -- Explainable AI, Verifiability of AI Decisions, Explainable RL.","url_abs":"https://arxiv.org/abs/2305.04073v2","url_pdf":"https://arxiv.org/pdf/2305.04073v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"explaining-rl-decisions-with-trajectories","repo_url":"https://github.com/shripaddeshmukh/xrl_with_trajectories","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"explaining-rl-decisions-with-trajectories","repo_url":"https://github.com/karim-abdel/fact","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"continuous-control","task_name":"Continuous Control"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"mujoco","task_name":"MuJoCo"},{"task_slug":"offline-rl","task_name":"Offline RL"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"continuous-control","task_name":"continuous-control"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.04073","atlas_url":"https://app.syntology.ai/?focus=2305.04073","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.04073"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/karim-abdel/fact","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shripaddeshmukh/xrl_with_trajectories","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":2,"unverified":1},"by_repo_kind":{"listed":{"samples":3,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":3,"samples":[{"code_sha256_prefix":"0bf497e52b9795d0","entry":"Block","repo":"karim-abdel/fact","repo_kind":"listed","path":"Breakout/mk_patch_decision_transformer_atari.py","file_url":"https://github.com/karim-abdel/fact/blob/HEAD/Breakout/mk_patch_decision_transformer_atari.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0bf497e52b9795d0"}},{"code_sha256_prefix":"690f3d0fe57d14fd","entry":"CausalSelfAttention","repo":"karim-abdel/fact","repo_kind":"listed","path":"Breakout/mk_patch_decision_transformer_atari.py","file_url":"https://github.com/karim-abdel/fact/blob/HEAD/Breakout/mk_patch_decision_transformer_atari.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"690f3d0fe57d14fd"}},{"code_sha256_prefix":"e13474c6a3853a47","entry":"GPT","repo":"karim-abdel/fact","repo_kind":"listed","path":"Breakout/mk_patch_decision_transformer_atari.py","file_url":"https://github.com/karim-abdel/fact/blob/HEAD/Breakout/mk_patch_decision_transformer_atari.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e13474c6a3853a47"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}