{"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/trace-trajectory-counterfactual-explanation","title":"TraCE: Trajectory Counterfactual Explanation Scores","arxiv_id":"2309.15965","date":"2023-09-27","proceeding":null,"authors":["Jeffrey N. Clark","Edward A. Small","Nawid Keshtmand","Michelle W. L. Wan","Elena Fillola Mayoral","Enrico Werner","Christopher P. Bourdeaux","Raul Santos-Rodriguez"],"abstract":"Counterfactual explanations, and their associated algorithmic recourse, are typically leveraged to understand, explain, and potentially alter a prediction coming from a black-box classifier. In this paper, we propose to extend the use of counterfactuals to evaluate progress in sequential decision making tasks. To this end, we introduce a model-agnostic modular framework, TraCE (Trajectory Counterfactual Explanation) scores, which is able to distill and condense progress in highly complex scenarios into a single value. We demonstrate TraCE's utility across domains by showcasing its main properties in two case studies spanning healthcare and climate change.","url_abs":"https://arxiv.org/abs/2309.15965v2","url_pdf":"https://arxiv.org/pdf/2309.15965v2.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":"trace-trajectory-counterfactual-explanation","repo_url":"https://github.com/jeffnclark/trace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"counterfactual-explanation","task_name":"Counterfactual Explanation"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"sequential-decision-making","task_name":"Sequential Decision Making"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[{"method_slug":"counterfactuals","method_name":"Counterfactuals"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2309.15965","atlas_url":"https://app.syntology.ai/?focus=2309.15965","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.15965"}},"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/jeffnclark/trace","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":9,"unverified":5},"by_repo_kind":{"official":{"samples":14,"ran":9,"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":0,"samples":[{"code_sha256_prefix":"0ce50857b146ff6e","entry":"change_categorical","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs_icu_study.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs_icu_study.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ce50857b146ff6e"}},{"code_sha256_prefix":"bff9357caec21792","entry":"cos_sim","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bff9357caec21792"}},{"code_sha256_prefix":"9c7a8779b32dbd02","entry":"n_sphere","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c7a8779b32dbd02"}},{"code_sha256_prefix":"8dcf34339f3961ce","entry":"nan_post_processing_data","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs_icu_study.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs_icu_study.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8dcf34339f3961ce"}},{"code_sha256_prefix":"51e1fcbf1e618076","entry":"obtain_stay_id_individuals","repo":"jeffnclark/trace","repo_kind":"official","path":"ICU_TraCE_scores.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/ICU_TraCE_scores.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51e1fcbf1e618076"}},{"code_sha256_prefix":"f6e80cda9b180e6d","entry":"plot_dataset","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/plotters.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/plotters.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6e80cda9b180e6d"}},{"code_sha256_prefix":"bb274893d5e95c1a","entry":"plot_decision_boundary","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/plotters.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/plotters.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bb274893d5e95c1a"}},{"code_sha256_prefix":"6377a0fb1f97b336","entry":"plot_density","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/plotters.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/plotters.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6377a0fb1f97b336"}},{"code_sha256_prefix":"ffa2aada7cc61d14","entry":"vec","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ffa2aada7cc61d14"}},{"code_sha256_prefix":"ecef3ab232914eb3","entry":"cf_generator","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs_icu_study.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs_icu_study.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ecef3ab232914eb3"}},{"code_sha256_prefix":"e31cd68943331ac1","entry":"convert_nc_to_csv","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs_ssp_study.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs_ssp_study.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e31cd68943331ac1"}},{"code_sha256_prefix":"9d32e662b0e911b9","entry":"generate_dice_cf_global","repo":"jeffnclark/trace","repo_kind":"official","path":"ICU_TraCE_scores.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/ICU_TraCE_scores.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9d32e662b0e911b9"}},{"code_sha256_prefix":"53fb628bd87a789a","entry":"merge_exp_versions","repo":"jeffnclark/trace","repo_kind":"official","path":"helpers/funcs_ssp_study.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/helpers/funcs_ssp_study.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"53fb628bd87a789a"}},{"code_sha256_prefix":"2080bccdc34c542c","entry":"train_classifier","repo":"jeffnclark/trace","repo_kind":"official","path":"ICU_TraCE_scores.py","file_url":"https://github.com/jeffnclark/trace/blob/HEAD/ICU_TraCE_scores.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2080bccdc34c542c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}