{"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/robust-counterfactual-explanations-for-random","title":"Don't Explain Noise: Robust Counterfactuals for Randomized Ensembles","arxiv_id":"2205.14116","date":"2022-05-27","proceeding":null,"authors":["Alexandre Forel","Axel Parmentier","Thibaut Vidal"],"abstract":"Counterfactual explanations describe how to modify a feature vector in order to flip the outcome of a trained classifier. Obtaining robust counterfactual explanations is essential to provide valid algorithmic recourse and meaningful explanations. We study the robustness of explanations of randomized ensembles, which are always subject to algorithmic uncertainty even when the training data is fixed. We formalize the generation of robust counterfactual explanations as a probabilistic problem and show the link between the robustness of ensemble models and the robustness of base learners. We develop a practical method with good empirical performance and support it with theoretical guarantees for ensembles of convex base learners. Our results show that existing methods give surprisingly low robustness: the validity of naive counterfactuals is below $50\\%$ on most data sets and can fall to $20\\%$ on problems with many features. In contrast, our method achieves high robustness with only a small increase in the distance from counterfactual explanations to their initial observations.","url_abs":"https://arxiv.org/abs/2205.14116v3","url_pdf":"https://arxiv.org/pdf/2205.14116v3.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":"robust-counterfactual-explanations-for-random","repo_url":"https://github.com/alexforel/robustcf4rf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":null,"task_name":"counterfactual"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"counterfactuals","method_name":"Counterfactuals"},{"method_slug":"flip","method_name":"FLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2205.14116","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.14116"}},"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/alexforel/robustcf4rf","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"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":"44a951437a470c44","entry":"feature_permutation_importance","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/feature_importance.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/feature_importance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"44a951437a470c44"}},{"code_sha256_prefix":"2165223921ed2bfd","entry":"forest_probability","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"illustrate_p_star_b_alpha.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/illustrate_p_star_b_alpha.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2165223921ed2bfd"}},{"code_sha256_prefix":"03f5d8d3886c797d","entry":"p_agresti_coull","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/binomial_confidence.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/binomial_confidence.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03f5d8d3886c797d"}},{"code_sha256_prefix":"7006f4bc78ccbd08","entry":"p_star_threshold","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/binomial_confidence.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/binomial_confidence.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7006f4bc78ccbd08"}},{"code_sha256_prefix":"2bbc6ace9afc547c","entry":"read_full_results_df","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/result_analysis.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/result_analysis.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2bbc6ace9afc547c"}},{"code_sha256_prefix":"ee0cc739cc4ab2a8","entry":"restricted_training_set_with_target_class","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/local_outlier_factor.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/local_outlier_factor.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee0cc739cc4ab2a8"}},{"code_sha256_prefix":"03910e4b1db029cf","entry":"robust_p_star_threshold","repo":"alexforel/robustcf4rf","repo_kind":"official","path":"src/binomial_confidence.py","file_url":"https://github.com/alexforel/robustcf4rf/blob/HEAD/src/binomial_confidence.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03910e4b1db029cf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}