{"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/learning-by-self-explaining","title":"Learning by Self-Explaining","arxiv_id":"2309.08395","date":"2023-09-15","proceeding":null,"authors":["Wolfgang Stammer","Felix Friedrich","David Steinmann","Manuel Brack","Hikaru Shindo","Kristian Kersting"],"abstract":"Much of explainable AI research treats explanations as a means for model inspection. Yet, this neglects findings from human psychology that describe the benefit of self-explanations in an agent's learning process. Motivated by this, we introduce a novel workflow in the context of image classification, termed Learning by Self-Explaining (LSX). LSX utilizes aspects of self-refining AI and human-guided explanatory machine learning. The underlying idea is that a learner model, in addition to optimizing for the original predictive task, is further optimized based on explanatory feedback from an internal critic model. Intuitively, a learner's explanations are considered \"useful\" if the internal critic can perform the same task given these explanations. We provide an overview of important components of LSX and, based on this, perform extensive experimental evaluations via three different example instantiations. Our results indicate improvements via Learning by Self-Explaining on several levels: in terms of model generalization, reducing the influence of confounding factors, and providing more task-relevant and faithful model explanations. Overall, our work provides evidence for the potential of self-explaining within the learning phase of an AI model.","url_abs":"https://arxiv.org/abs/2309.08395v3","url_pdf":"https://arxiv.org/pdf/2309.08395v3.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":"learning-by-self-explaining","repo_url":"https://github.com/ml-research/learning-by-self-explaining","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.08395","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.08395"}},"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/ml-research/learning-by-self-explaining","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"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":"9817b40445c2c460","entry":"Bern","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/load_decoy_mnist.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/load_decoy_mnist.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9817b40445c2c460"}},{"code_sha256_prefix":"9f058b9acf0b2d1c","entry":"augment","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/load_decoy_mnist.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/load_decoy_mnist.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f058b9acf0b2d1c"}},{"code_sha256_prefix":"c00dc736d28c1960","entry":"compute_intra_inter","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/expl_sim.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/expl_sim.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c00dc736d28c1960"}},{"code_sha256_prefix":"3994748dd44b37f2","entry":"get_expls","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/expl_sim_clf.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/expl_sim_clf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3994748dd44b37f2"}},{"code_sha256_prefix":"b5b46879cf057ccc","entry":"get_expls","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/faithful_remove.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/faithful_remove.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b5b46879cf057ccc"}},{"code_sha256_prefix":"01bee8dedc9a7ad7","entry":"get_viz_test_data","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/utils.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01bee8dedc9a7ad7"}},{"code_sha256_prefix":"dc0bfc4df0a63427","entry":"compute_encs","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/expl_sim.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/expl_sim.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":"dc0bfc4df0a63427"}},{"code_sha256_prefix":"640438d8e72595aa","entry":"download_mnist","repo":"ml-research/learning-by-self-explaining","repo_kind":"official","path":"CNN-LSX/load_decoy_mnist.py","file_url":"https://github.com/ml-research/learning-by-self-explaining/blob/HEAD/CNN-LSX/load_decoy_mnist.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":"640438d8e72595aa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}