Papers › Right for the Right Reasons: Training Differentiable Models by Constraining their Explanations

Right for the Right Reasons: Training Differentiable Models by Constraining their Explanations

10 Mar 2017arXiv:1703.03717archive 2025-07-28

Andrew Slavin Ross, Michael C. Hughes, Finale Doshi-Velez

Neural networks are among the most accurate supervised learning methods in use today, but their opacity makes them difficult to trust in critical applications, especially when conditions in training differ from those in test. Recent work on explanations for black-box models has produced tools (e.g. LIME) to show the implicit rules behind predictions, which can help us identify when models are right for the wrong reasons. However, these methods do not scale to explaining entire datasets and cannot correct the problems they reveal. We introduce a method for efficiently explaining and regularizing differentiable models by examining and selectively penalizing their input gradients, which provide a normal to the decision boundary. We apply these penalties both based on expert annotation and in an unsupervised fashion that encourages diverse models with qualitatively different decision boundaries for the same classification problem. On multiple datasets, we show our approach generates faithful explanations and models that generalize much better when conditions differ between training and test.

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="1703.03717")

Code

Syntology Ran 1 of 14 code samples harvested from 1 repository linked to this paper; 13 have no recorded run. Of those that ran: 1 ran with no contract checked.

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

dtak/rrr officialmentioned in paperMIT 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

14 samples harvested; 1 ran; 0 honoured the contract we drafted; 13 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
13unverified

Licence: 0 of the 14 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 dtak/rrr. “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.

Bern dtak/rrr/rrr/decoy_mnist.py official repository ran MIT (permissive) · 9817b40445c2c460 · report
abs_weights_in dtak/rrr/experiments/word_table.py official repository unverified MIT (permissive) · 5eccb66a8fd6a7ad · report
any_repeats dtak/rrr/rrr/toy_colors.py official repository unverified MIT (permissive) · 17b25464218ca9f7 · report
augment dtak/rrr/rrr/decoy_mnist.py official repository unverified MIT (permissive) · 986bd42d6c370e36 · report
download_mnist dtak/rrr/rrr/decoy_mnist.py official repository unverified MIT (permissive) · c38c3140ea99edb0 · report
generate_dataset dtak/rrr/rrr/iris_cancer.py official repository unverified MIT (permissive) · 79b825acdeeb1e5d · report
generate_image dtak/rrr/rrr/toy_colors.py official repository unverified MIT (permissive) · c106f94602bc64a0 · report
iris_usage dtak/rrr/rrr/iris_cancer.py official repository unverified MIT (permissive) · 35ae7d4c0d9d0a3f · report
listwrap dtak/rrr/rrr/local_linear_explanation.py official repository unverified MIT (permissive) · 202c34477ef03008 · report
max_weight_in dtak/rrr/experiments/word_table.py official repository unverified MIT (permissive) · 781a2d98cab6f688 · report
one_hot dtak/rrr/rrr/multilayer_perceptron.py official repository unverified MIT (permissive) · fff341b836aa49d0 · report
one_hot dtak/rrr/rrr/tensorflow_perceptron.py official repository unverified MIT (permissive) · d144728084cadb8c · report
relu dtak/rrr/rrr/multilayer_perceptron.py official repository unverified MIT (permissive) · fd6644bff4456444 · report
word_tags dtak/rrr/experiments/word_table.py official repository unverified MIT (permissive) · ff31ad55c2bc4916 · 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