{"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/the-manifold-hypothesis-for-gradient-based-1","title":"The Manifold Hypothesis for Gradient-Based Explanations","arxiv_id":"2206.07387","date":"2022-06-15","proceeding":null,"authors":["Sebastian Bordt","Uddeshya Upadhyay","Zeynep Akata","Ulrike Von Luxburg"],"abstract":"When do gradient-based explanation algorithms provide perceptually-aligned explanations? We propose a criterion: the feature attributions need to be aligned with the tangent space of the data manifold. To provide evidence for this hypothesis, we introduce a framework based on variational autoencoders that allows to estimate and generate image manifolds. Through experiments across a range of different datasets -- MNIST, EMNIST, CIFAR10, X-ray pneumonia and Diabetic Retinopathy detection -- we demonstrate that the more a feature attribution is aligned with the tangent space of the data, the more perceptually-aligned it tends to be. We then show that the attributions provided by popular post-hoc methods such as Integrated Gradients and SmoothGrad are more strongly aligned with the data manifold than the raw gradient. Adversarial training also improves the alignment of model gradients with the data manifold. As a consequence, we suggest that explanation algorithms should actively strive to align their explanations with the data manifold. This is an extended version of a CVPR Workshop paper. Code is available at https://github.com/tml-tuebingen/explanations-manifold.","url_abs":"https://arxiv.org/abs/2206.07387v2","url_pdf":"https://arxiv.org/pdf/2206.07387v2.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":"the-manifold-hypothesis-for-gradient-based-1","repo_url":"https://github.com/tml-tuebingen/explanations-manifold","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"diabetic-retinopathy-detection","task_name":"Diabetic Retinopathy Detection"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2206.07387","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.07387"}},"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/tml-tuebingen/explanations-manifold","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":10},"by_repo_kind":{"official":{"samples":11,"ran":1,"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":"eba3f5bcc6a06d36","entry":"make_layers","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/vgg.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/vgg.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eba3f5bcc6a06d36"}},{"code_sha256_prefix":"bd2d2bff2e0b2b6f","entry":"eval_AE_loop","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/utils.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/utils.py","link_basis":"harvester_set","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":"bd2d2bff2e0b2b6f"}},{"code_sha256_prefix":"572dca447a4e2819","entry":"eval_classifier_loop","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/utils.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/utils.py","link_basis":"harvester_set","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":"572dca447a4e2819"}},{"code_sha256_prefix":"8988e669be77905d","entry":"eval_classifier_w_AE_loop","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/utils.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/utils.py","link_basis":"harvester_set","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":"8988e669be77905d"}},{"code_sha256_prefix":"c1cf41bab864699c","entry":"normalize_image","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/util.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/util.py","link_basis":"harvester_set","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":"c1cf41bab864699c"}},{"code_sha256_prefix":"b5e87b702cd8973c","entry":"test","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/mnist/util.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/mnist/util.py","link_basis":"harvester_set","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":"b5e87b702cd8973c"}},{"code_sha256_prefix":"1e7c4e327e3bd486","entry":"train","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/mnist/util.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/mnist/util.py","link_basis":"harvester_set","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":"1e7c4e327e3bd486"}},{"code_sha256_prefix":"e569c3a2806d4b22","entry":"vgg11_bn","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/vgg.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/vgg.py","link_basis":"harvester_set","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":"e569c3a2806d4b22"}},{"code_sha256_prefix":"baf825f46b658a7e","entry":"vgg13_bn","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/other_datasets/vgg.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/other_datasets/vgg.py","link_basis":"harvester_set","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":"baf825f46b658a7e"}},{"code_sha256_prefix":"79de8bd603875d34","entry":"vgg_model_and_optimizer","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/mnist/models.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/mnist/models.py","link_basis":"harvester_set","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":"79de8bd603875d34"}},{"code_sha256_prefix":"0f19770e77373de9","entry":"zero_one_loss","repo":"tml-tuebingen/explanations-manifold","repo_kind":"official","path":"replicate-paper/mnist/util.py","file_url":"https://github.com/tml-tuebingen/explanations-manifold/blob/HEAD/replicate-paper/mnist/util.py","link_basis":"harvester_set","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":"0f19770e77373de9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}