{"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/beyond-trivial-counterfactual-explanations","title":"Beyond Trivial Counterfactual Explanations with Diverse Valuable Explanations","arxiv_id":"2103.10226","date":"2021-03-18","proceeding":"ICCV 2021 10","authors":["Pau Rodriguez","Massimo Caccia","Alexandre Lacoste","Lee Zamparo","Issam Laradji","Laurent Charlin","David Vazquez"],"abstract":"Explainability for machine learning models has gained considerable attention within the research community given the importance of deploying more reliable machine-learning systems. In computer vision applications, generative counterfactual methods indicate how to perturb a model's input to change its prediction, providing details about the model's decision-making. Current methods tend to generate trivial counterfactuals about a model's decisions, as they often suggest to exaggerate or remove the presence of the attribute being classified. For the machine learning practitioner, these types of counterfactuals offer little value, since they provide no new information about undesired model or data biases. In this work, we identify the problem of trivial counterfactual generation and we propose DiVE to alleviate it. DiVE learns a perturbation in a disentangled latent space that is constrained using a diversity-enforcing loss to uncover multiple valuable explanations about the model's prediction. Further, we introduce a mechanism to prevent the model from producing trivial explanations. Experiments on CelebA and Synbols demonstrate that our model improves the success rate of producing high-quality valuable explanations when compared to previous state-of-the-art methods. Code is available at https://github.com/ElementAI/beyond-trivial-explanations.","url_abs":"https://arxiv.org/abs/2103.10226v2","url_pdf":"https://arxiv.org/pdf/2103.10226v2.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":"beyond-trivial-counterfactual-explanations","repo_url":"https://github.com/ElementAI/beyond-trivial-explanations","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"beyond-trivial-counterfactual-explanations","repo_url":"https://github.com/issamlaradji/ssr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beyond-trivial-counterfactual-explanations","repo_url":"https://github.com/servicenow/beyond-trivial-explanations","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"beyond-trivial-counterfactual-explanations","repo_url":"https://github.com/sobieskibj/rcsb","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"machine-learning","task_name":"BIG-bench Machine Learning"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"diversity","task_name":"Diversity"},{"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/2103.10226","atlas_url":"https://app.syntology.ai/?focus=2103.10226","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.10226"}},"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/servicenow/beyond-trivial-explanations","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sobieskibj/rcsb","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/issamlaradji/ssr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ElementAI/beyond-trivial-explanations","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":4,"ran_draft_wrong":1,"ran":1,"unverified":4},"by_repo_kind":{"listed":{"samples":10,"ran":6,"repositories":2}},"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":9,"samples":[{"code_sha256_prefix":"c4ba5f856f01c3c0","entry":"_cumulative_sum_threshold","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c4ba5f856f01c3c0"}},{"code_sha256_prefix":"5c104de03088fbae","entry":"_get_last_conv_layer","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5c104de03088fbae"}},{"code_sha256_prefix":"f3a716fb8b80641a","entry":"_normalize_scale","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f3a716fb8b80641a"}},{"code_sha256_prefix":"88def237af56a05a","entry":"cons_features_loss","repo":"issamlaradji/ssr","repo_kind":"listed","path":"src/losses.py","file_url":"https://github.com/issamlaradji/ssr/blob/HEAD/src/losses.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":"88def237af56a05a"}},{"code_sha256_prefix":"cf4c30b4c9dde913","entry":"expand_from_cell_view","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cf4c30b4c9dde913"}},{"code_sha256_prefix":"f123902550a574d0","entry":"sum_into_cell_view","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f123902550a574d0"}},{"code_sha256_prefix":"89a32ba43743ecf6","entry":"AttributionMethod","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.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":"89a32ba43743ecf6"}},{"code_sha256_prefix":"73d849a584e707b8","entry":"ClassifierBase","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.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":"73d849a584e707b8"}},{"code_sha256_prefix":"b2063be99abaab6c","entry":"_get_layers_v2","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.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":"b2063be99abaab6c"}},{"code_sha256_prefix":"f7b412e61259110d","entry":"normalize_attr","repo":"sobieskibj/rcsb","repo_kind":"listed","path":"src/explainers/base.py","file_url":"https://github.com/sobieskibj/rcsb/blob/HEAD/src/explainers/base.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":"f7b412e61259110d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}