{"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-explanations-that-are-hard-to-vary","title":"Learning explanations that are hard to vary","arxiv_id":"2009.00329","date":"2020-09-01","proceeding":"ICLR 2021 1","authors":["Giambattista Parascandolo","Alexander Neitz","Antonio Orvieto","Luigi Gresele","Bernhard Schölkopf"],"abstract":"In this paper, we investigate the principle that `good explanations are hard to vary' in the context of deep learning. We show that averaging gradients across examples -- akin to a logical OR of patterns -- can favor memorization and `patchwork' solutions that sew together different strategies, instead of identifying invariances. To inspect this, we first formalize a notion of consistency for minima of the loss surface, which measures to what extent a minimum appears only when examples are pooled. We then propose and experimentally validate a simple alternative algorithm based on a logical AND, that focuses on invariances and prevents memorization in a set of real-world tasks. Finally, using a synthetic dataset with a clear distinction between invariant and spurious mechanisms, we dissect learning signals and compare this approach to well-established regularizers.","url_abs":"https://arxiv.org/abs/2009.00329v3","url_pdf":"https://arxiv.org/pdf/2009.00329v3.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-explanations-that-are-hard-to-vary","repo_url":"https://github.com/gibipara92/learning-explanations-hard-to-vary","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"learning-explanations-that-are-hard-to-vary","repo_url":"https://github.com/pytorch/ignite","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"learning-explanations-that-are-hard-to-vary","repo_url":"https://github.com/facebookresearch/DomainBed","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-explanations-that-are-hard-to-vary","repo_url":"https://github.com/jefferythewind/era-splitting-notebook-examples","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"CC0-1.0"}}],"tasks":[{"task_slug":"memorization","task_name":"Memorization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2009.00329","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.00329"}},"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/facebookresearch/DomainBed","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pytorch/ignite","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gibipara92/learning-explanations-hard-to-vary","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jefferythewind/era-splitting-notebook-examples","reach":{"status":"ok","spdx":"CC0-1.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":"184b5d454726edda","entry":"apply_to_tensor","repo":"pytorch/ignite","repo_kind":"official","path":"ignite/utils.py","file_url":"https://github.com/pytorch/ignite/blob/HEAD/ignite/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"184b5d454726edda"}},{"code_sha256_prefix":"2e98a4328eaffa86","entry":"apply_to_type","repo":"pytorch/ignite","repo_kind":"official","path":"ignite/utils.py","file_url":"https://github.com/pytorch/ignite/blob/HEAD/ignite/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2e98a4328eaffa86"}},{"code_sha256_prefix":"d8322fb4b8af1ea8","entry":"convert_tensor","repo":"pytorch/ignite","repo_kind":"official","path":"ignite/utils.py","file_url":"https://github.com/pytorch/ignite/blob/HEAD/ignite/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d8322fb4b8af1ea8"}},{"code_sha256_prefix":"c5a5d2073ddf5d69","entry":"keep_random_state","repo":"pytorch/ignite","repo_kind":"official","path":"ignite/engine/deterministic.py","file_url":"https://github.com/pytorch/ignite/blob/HEAD/ignite/engine/deterministic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c5a5d2073ddf5d69"}},{"code_sha256_prefix":"bbdae9be673b6958","entry":"update_dataloader","repo":"pytorch/ignite","repo_kind":"official","path":"ignite/engine/deterministic.py","file_url":"https://github.com/pytorch/ignite/blob/HEAD/ignite/engine/deterministic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bbdae9be673b6958"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}