{"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/leveraging-sparse-linear-layers-for","title":"Leveraging Sparse Linear Layers for Debuggable Deep Networks","arxiv_id":"2105.04857","date":"2021-05-11","proceeding":null,"authors":["Eric Wong","Shibani Santurkar","Aleksander Mądry"],"abstract":"We show how fitting sparse linear models over learned deep feature representations can lead to more debuggable neural networks. These networks remain highly accurate while also being more amenable to human interpretation, as we demonstrate quantiatively via numerical and human experiments. We further illustrate how the resulting sparse explanations can help to identify spurious correlations, explain misclassifications, and diagnose model biases in vision and language tasks. The code for our toolkit can be found at https://github.com/madrylab/debuggabledeepnetworks.","url_abs":"https://arxiv.org/abs/2105.04857v1","url_pdf":"https://arxiv.org/pdf/2105.04857v1.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":"leveraging-sparse-linear-layers-for","repo_url":"https://github.com/MadryLab/DebuggableDeepNetworks","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"leveraging-sparse-linear-layers-for","repo_url":"https://github.com/MadryLab/glm_saga","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.04857","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.04857"}},"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/MadryLab/DebuggableDeepNetworks","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MadryLab/glm_saga","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran_honours":1,"unverified":11},"by_repo_kind":{"official":{"samples":13,"ran":2,"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":0,"samples":[{"code_sha256_prefix":"406014b884a2aaa7","entry":"get_device","repo":"MadryLab/glm_saga","repo_kind":"official","path":"glm_saga/elasticnet.py","file_url":"https://github.com/MadryLab/glm_saga/blob/HEAD/glm_saga/elasticnet.py","link_basis":"plan_row","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":"406014b884a2aaa7"}},{"code_sha256_prefix":"bfe4b187a1c5aeaf","entry":"soft_threshold","repo":"MadryLab/glm_saga","repo_kind":"official","path":"glm_saga/elasticnet.py","file_url":"https://github.com/MadryLab/glm_saga/blob/HEAD/glm_saga/elasticnet.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bfe4b187a1c5aeaf"}},{"code_sha256_prefix":"dbe7ed3441626a35","entry":"DATASETS","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"language/datasets.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/language/datasets.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":"dbe7ed3441626a35"}},{"code_sha256_prefix":"7798dffe63b4a970","entry":"add_index_to_dataloader","repo":"MadryLab/glm_saga","repo_kind":"official","path":"glm_saga/elasticnet.py","file_url":"https://github.com/MadryLab/glm_saga/blob/HEAD/glm_saga/elasticnet.py","link_basis":"plan_row","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":"7798dffe63b4a970"}},{"code_sha256_prefix":"3de8819381c314c3","entry":"add_index_to_dataloader","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/data_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/data_helpers.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":"3de8819381c314c3"}},{"code_sha256_prefix":"e63aedfcdb649b2c","entry":"compute_features","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/feature_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/feature_helpers.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":"e63aedfcdb649b2c"}},{"code_sha256_prefix":"7ebbfb81e3fe0d67","entry":"get_features_batch","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/feature_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/feature_helpers.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":"7ebbfb81e3fe0d67"}},{"code_sha256_prefix":"ca5fb68e5cab83b9","entry":"latent_predict","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/vis_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/vis_helpers.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":"ca5fb68e5cab83b9"}},{"code_sha256_prefix":"be6df81616b96380","entry":"load_glm","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/decisionlayer_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/decisionlayer_helpers.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":"be6df81616b96380"}},{"code_sha256_prefix":"006b1ff00a0f50e9","entry":"make_lime_fn","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/nlp_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/nlp_helpers.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":"006b1ff00a0f50e9"}},{"code_sha256_prefix":"6938b253da1fdca6","entry":"normalize_weight","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/vis_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/vis_helpers.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":"6938b253da1fdca6"}},{"code_sha256_prefix":"73162833f0dfa306","entry":"select_sparse_model","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/decisionlayer_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/decisionlayer_helpers.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":"73162833f0dfa306"}},{"code_sha256_prefix":"78f109bba22b01db","entry":"top_and_bottom_words","repo":"MadryLab/DebuggableDeepNetworks","repo_kind":"official","path":"helpers/nlp_helpers.py","file_url":"https://github.com/MadryLab/DebuggableDeepNetworks/blob/HEAD/helpers/nlp_helpers.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":"78f109bba22b01db"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}