Papers › Leveraging Sparse Linear Layers for Debuggable Deep Networks

Leveraging Sparse Linear Layers for Debuggable Deep Networks

11 May 2021arXiv:2105.04857archive 2025-07-28

Eric Wong, Shibani Santurkar, Aleksander Mądry

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2105.04857")

Code

Syntology Ran 2 of 13 code samples harvested from 2 repositories linked to this paper; 11 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong.

By repository: official repository: 13 samples from 2 repositories, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

MadryLab/DebuggableDeepNetworks officialmentioned in papermentioned on GitHubpytorchMIT report
MadryLab/glm_saga officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 2 ran; 1 honoured the contract we drafted; 11 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
11unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_device MadryLab/glm_saga/glm_saga/elasticnet.py official repository ran · our draft was wrong MIT (permissive) · 406014b884a2aaa7 · report
soft_threshold MadryLab/glm_saga/glm_saga/elasticnet.py official repository ran · honoured contract fingerprinted MIT (permissive) · bfe4b187a1c5aeaf · report
DATASETS MadryLab/DebuggableDeepNetworks/language/datasets.py official repository unverified MIT (permissive) · dbe7ed3441626a35 · report
add_index_to_dataloader MadryLab/glm_saga/glm_saga/elasticnet.py official repository unverified MIT (permissive) · 7798dffe63b4a970 · report
add_index_to_dataloader MadryLab/DebuggableDeepNetworks/helpers/data_helpers.py official repository unverified MIT (permissive) · 3de8819381c314c3 · report
compute_features MadryLab/DebuggableDeepNetworks/helpers/feature_helpers.py official repository unverified MIT (permissive) · e63aedfcdb649b2c · report
get_features_batch MadryLab/DebuggableDeepNetworks/helpers/feature_helpers.py official repository unverified MIT (permissive) · 7ebbfb81e3fe0d67 · report
latent_predict MadryLab/DebuggableDeepNetworks/helpers/vis_helpers.py official repository unverified MIT (permissive) · ca5fb68e5cab83b9 · report
load_glm MadryLab/DebuggableDeepNetworks/helpers/decisionlayer_helpers.py official repository unverified MIT (permissive) · be6df81616b96380 · report
make_lime_fn MadryLab/DebuggableDeepNetworks/helpers/nlp_helpers.py official repository unverified MIT (permissive) · 006b1ff00a0f50e9 · report
normalize_weight MadryLab/DebuggableDeepNetworks/helpers/vis_helpers.py official repository unverified MIT (permissive) · 6938b253da1fdca6 · report
select_sparse_model MadryLab/DebuggableDeepNetworks/helpers/decisionlayer_helpers.py official repository unverified MIT (permissive) · 73162833f0dfa306 · report
top_and_bottom_words MadryLab/DebuggableDeepNetworks/helpers/nlp_helpers.py official repository unverified MIT (permissive) · 78f109bba22b01db · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections