{"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/instance-based-counterfactual-explanations","title":"Instance-based Counterfactual Explanations for Time Series Classification","arxiv_id":"2009.13211","date":"2020-09-28","proceeding":null,"authors":["Eoin Delaney","Derek Greene","Mark T. Keane"],"abstract":"In recent years, there has been a rapidly expanding focus on explaining the predictions made by black-box AI systems that handle image and tabular data. However, considerably less attention has been paid to explaining the predictions of opaque AI systems handling time series data. In this paper, we advance a novel model-agnostic, case-based technique -- Native Guide -- that generates counterfactual explanations for time series classifiers. Given a query time series, $T_{q}$, for which a black-box classification system predicts class, $c$, a counterfactual time series explanation shows how $T_{q}$ could change, such that the system predicts an alternative class, $c'$. The proposed instance-based technique adapts existing counterfactual instances in the case-base by highlighting and modifying discriminative areas of the time series that underlie the classification. Quantitative and qualitative results from two comparative experiments indicate that Native Guide generates plausible, proximal, sparse and diverse explanations that are better than those produced by key benchmark counterfactual methods.","url_abs":"https://arxiv.org/abs/2009.13211v2","url_pdf":"https://arxiv.org/pdf/2009.13211v2.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":"instance-based-counterfactual-explanations","repo_url":"https://github.com/e-delaney/Instance-Based_CFE_TSC","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"counterfactual-explanation","task_name":"Counterfactual Explanation"},{"task_slug":"dynamic-time-warping","task_name":"Dynamic Time Warping"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"},{"task_slug":"time-series-classification","task_name":"Time Series Classification"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[{"method_slug":"interpretability","method_name":"Interpretability"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2009.13211","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.13211"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/e-delaney/Instance-Based_CFE_TSC","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":0,"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":"66bd66764a9dc34c","entry":"label_encoder","repo":"e-delaney/Instance-Based_CFE_TSC","repo_kind":"official","path":"Blackbox_classifier_FCN/counterfactual_utils.py","file_url":"https://github.com/e-delaney/Instance-Based_CFE_TSC/blob/HEAD/Blackbox_classifier_FCN/counterfactual_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"66bd66764a9dc34c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}