{"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/chexplaining-in-style-counterfactual","title":"CheXplaining in Style: Counterfactual Explanations for Chest X-rays using StyleGAN","arxiv_id":"2207.07553","date":"2022-07-15","proceeding":null,"authors":["Matan Atad","Vitalii Dmytrenko","Yitong Li","Xinyue Zhang","Matthias Keicher","Jan Kirschke","Bene Wiestler","Ashkan Khakzar","Nassir Navab"],"abstract":"Deep learning models used in medical image analysis are prone to raising reliability concerns due to their black-box nature. To shed light on these black-box models, previous works predominantly focus on identifying the contribution of input features to the diagnosis, i.e., feature attribution. In this work, we explore counterfactual explanations to identify what patterns the models rely on for diagnosis. Specifically, we investigate the effect of changing features within chest X-rays on the classifier's output to understand its decision mechanism. We leverage a StyleGAN-based approach (StyleEx) to create counterfactual explanations for chest X-rays by manipulating specific latent directions in their latent space. In addition, we propose EigenFind to significantly reduce the computation time of generated explanations. We clinically evaluate the relevancy of our counterfactual explanations with the help of radiologists. Our code is publicly available.","url_abs":"https://arxiv.org/abs/2207.07553v1","url_pdf":"https://arxiv.org/pdf/2207.07553v1.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":"chexplaining-in-style-counterfactual","repo_url":"https://github.com/camp-explain-ai/style-chexplain","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"medical-image-analysis","task_name":"Medical Image Analysis"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.07553","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.07553"}},"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":"deterministic:regex_extraction","url":"https://github.com/CAMP-eXplain-AI/Style-CheXplain","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/camp-explain-ai/style-chexplain","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran":1,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":9,"ran":6,"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":"e98fcb728a6fc803","entry":"get_logits_diff","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e98fcb728a6fc803"}},{"code_sha256_prefix":"f8131a05f211b124","entry":"get_logits_latents_prob","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f8131a05f211b124"}},{"code_sha256_prefix":"b0f6e42f3e8f699d","entry":"get_logits_means","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b0f6e42f3e8f699d"}},{"code_sha256_prefix":"d32b7e035f62590c","entry":"get_most_significant_eigens_and_direct_in_prob","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d32b7e035f62590c"}},{"code_sha256_prefix":"d5e9ec386ae47e78","entry":"get_prob_means","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d5e9ec386ae47e78"}},{"code_sha256_prefix":"c27e5c071e798245","entry":"sigmoid","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c27e5c071e798245"}},{"code_sha256_prefix":"6c8aa1d59cb43aae","entry":"att_find","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","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":"6c8aa1d59cb43aae"}},{"code_sha256_prefix":"0bd7e17e033664e3","entry":"get_most_significant_eigens_and_direct","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","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":"0bd7e17e033664e3"}},{"code_sha256_prefix":"8763270f14db67c5","entry":"get_prob_diff","repo":"camp-explain-ai/style-chexplain","repo_kind":"official","path":"code/att_find_eigenvectors.py","file_url":"https://github.com/camp-explain-ai/style-chexplain/blob/HEAD/code/att_find_eigenvectors.py","link_basis":"first_harvest_node","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":"8763270f14db67c5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}