{"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/rocoursenet-distributionally-robust-training","title":"RoCourseNet: Distributionally Robust Training of a Prediction Aware Recourse Model","arxiv_id":"2206.00700","date":"2022-06-01","proceeding":null,"authors":["Hangzhi Guo","Feiran Jia","Jinghui Chen","Anna Squicciarini","Amulya Yadav"],"abstract":"Counterfactual (CF) explanations for machine learning (ML) models are preferred by end-users, as they explain the predictions of ML models by providing a recourse (or contrastive) case to individuals who are adversely impacted by predicted outcomes. Existing CF explanation methods generate recourses under the assumption that the underlying target ML model remains stationary over time. However, due to commonly occurring distributional shifts in training data, ML models constantly get updated in practice, which might render previously generated recourses invalid and diminish end-users trust in our algorithmic framework. To address this problem, we propose RoCourseNet, a training framework that jointly optimizes predictions and recourses that are robust to future data shifts. This work contains four key contributions: (1) We formulate the robust recourse generation problem as a tri-level optimization problem which consists of two sub-problems: (i) a bi-level problem that finds the worst-case adversarial shift in the training data, and (ii) an outer minimization problem to generate robust recourses against this worst-case shift. (2) We leverage adversarial training to solve this tri-level optimization problem by: (i) proposing a novel virtual data shift (VDS) algorithm to find worst-case shifted ML models via explicitly considering the worst-case data shift in the training dataset, and (ii) a block-wise coordinate descent procedure to optimize for prediction and corresponding robust recourses. (3) We evaluate RoCourseNet's performance on three real-world datasets, and show that RoCourseNet consistently achieves more than 96% robust validity and outperforms state-of-the-art baselines by at least 10% in generating robust CF explanations. (4) Finally, we generalize the RoCourseNet framework to accommodate any parametric post-hoc methods for improving robust validity.","url_abs":"https://arxiv.org/abs/2206.00700v2","url_pdf":"https://arxiv.org/pdf/2206.00700v2.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":"rocoursenet-distributionally-robust-training","repo_url":"https://github.com/bkghz-orange-blue/counternet_adv","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"counterfactual"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2206.00700","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.00700"}},"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/bkghz-orange-blue/counternet_adv","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":"2253226024406245","entry":"bn_func","repo":"bkghz-orange-blue/counternet_adv","repo_kind":"official","path":"counterfactual/utils.py","file_url":"https://github.com/bkghz-orange-blue/counternet_adv/blob/HEAD/counterfactual/utils.py","link_basis":"harvester_set","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":"2253226024406245"}},{"code_sha256_prefix":"c00f1d9594b0678a","entry":"custom_doc_links","repo":"bkghz-orange-blue/counternet_adv","repo_kind":"official","path":"counterfactual/_nbdev.py","file_url":"https://github.com/bkghz-orange-blue/counternet_adv/blob/HEAD/counterfactual/_nbdev.py","link_basis":"harvester_set","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":"c00f1d9594b0678a"}},{"code_sha256_prefix":"934c3e9b8141d431","entry":"load_json","repo":"bkghz-orange-blue/counternet_adv","repo_kind":"official","path":"counterfactual/utils.py","file_url":"https://github.com/bkghz-orange-blue/counternet_adv/blob/HEAD/counterfactual/utils.py","link_basis":"harvester_set","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":"934c3e9b8141d431"}},{"code_sha256_prefix":"bba6520946c8b98e","entry":"proximity","repo":"bkghz-orange-blue/counternet_adv","repo_kind":"official","path":"counterfactual/evaluate.py","file_url":"https://github.com/bkghz-orange-blue/counternet_adv/blob/HEAD/counterfactual/evaluate.py","link_basis":"harvester_set","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":"bba6520946c8b98e"}},{"code_sha256_prefix":"b2bf0e43783b572b","entry":"update_json_file","repo":"bkghz-orange-blue/counternet_adv","repo_kind":"official","path":"counterfactual/utils.py","file_url":"https://github.com/bkghz-orange-blue/counternet_adv/blob/HEAD/counterfactual/utils.py","link_basis":"harvester_set","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":"b2bf0e43783b572b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}