Papers › Understanding Black-box Predictions via Influence Functions

Understanding Black-box Predictions via Influence Functions

14 Mar 2017ICML 2017 8arXiv:1703.04730archive 2025-07-28

Pang Wei Koh, Percy Liang

How can we explain the predictions of a black-box model? In this paper, we use influence functions -- a classic technique from robust statistics -- to trace a model's prediction through the learning algorithm and back to its training data, thereby identifying training points most responsible for a given prediction. To scale up influence functions to modern machine learning settings, we develop a simple, efficient implementation that requires only oracle access to gradients and Hessian-vector products. We show that even on non-convex and non-differentiable models where the theory breaks down, approximations to influence functions can still provide valuable information. On linear models and convolutional neural networks, we demonstrate that influence functions are useful for multiple purposes: understanding model behavior, debugging models, detecting dataset errors, and even creating visually-indistinguishable training-set attacks.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

The archive's official repository (worksheets.codalab.org/worksheets/0x2b314dc3536b482dbba02783a24719fd) was not harvested; the 28 samples below come from 5 community repositories.

Syntology 28 code samples harvested from 5 repositories linked to this paper: 19 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 1 honoured, 0 violated, 12 with no contract checked; 6 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 28 samples from 5 repositories, 19 ran (13 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 19 samples that ran has no recorded date.

19 repositories listed; official and paper-mentioned ones first.

4pygmalion/Federated_learning-filtering-non-influence-data mentioned on GitHubtfSyntology: not harvested report
AnonymizedAuthor663/NNIF_adv_defense mentioned on GitHubtfSyntology: 2 samples, 1 ran (1 instrument-failed) · 1 unverified report
TooTouch/WhiteBox-Part2 mentioned on GitHubtfSyntology: not harvested report
alstonlo/torch-influence mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
bsharchilev/influence_boosting mentioned on GitHubtfSyntology: not harvested report
darkonhub/darkon mentioned on GitHubtfApache-2.0Syntology: 3 samples, 1 ran (0 instrument-failed) · 2 unverified report
giladcohen/NNIF_adv_defense mentioned on GitHubtfSyntology: not harvested report
goldin2008/modeling-project mentioned on GitHubMITSyntology: not harvested report
kohpangwei/influence-release mentioned on GitHubtfMITSyntology: 11 samples, 9 ran (3 instrument-failed) · 2 unverified report
nimarb/pytorch_influence_functions mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
pomonam/kronfluence mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Optimizing Neural Networks with Kronecker-factored Approximate Curvature (arXiv:1503.05671; that paper's own run record: 48 ran (of which 20 constructed an object rather than computing a result; 36 with no instrument failure: 5 honoured, 1 violated, 30 with no contract checked; 12 where Syntology's instrument failed) · 34 unverified); nothing checks that they implement this paper's method. report
qmkakaxi/FederatedLearning mentioned on GitHubpytorchSyntology: not harvested report
ryokamoi/pytorch_influence_functions mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
sillwood/voicemos mentioned on GitHubpytorchBSD-3-ClauseSyntology: 11 samples, 7 ran (1 instrument-failed) · 4 unverified report
Shmoo137/Interpretable-Phase-Classification pytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Phase Detection with Neural Networks: Interpreting the Black Box (arXiv:2004.04711; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
aai-institute/pyDVL pytorchLGPL-3.0Syntology: not harvested 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

28 samples harvested: 19 ran (of which 0 constructed an object rather than computing a result; 13 with no instrument failure: 1 honoured, 0 violated, 12 with no contract checked; 6 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
6ran · our draft was wrong
12ran
9unverified

Licence: 3 of the 28 samples are pointer only, meaning Syntology does not serve that copy's text. For 1 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

AnonymizedAuthor663/NNIF_adv_defense community (archive-listed) 2 samples, 1 ran (1 instrument-failed) · 1 unverified
load_characteristics detect_adv_examples.py ran · our draft was wrong no licence file found · pointer only · 2273561bedb78034 · report fixture: signature characteristics_file:str/0/str · returned tuple · level recorded 2026-09-22
find_ranks attack.py unverified no licence file found · pointer only · b562ca4a9ba10631 · report
alstonlo/torch-influence community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
fit_model in 9 papers examples/analyze_dogfish.py ran · our draft was wrong Apache-2.0 (permissive) · 7795d93831d5b4cc · report fixture: signature X:Tensor/2/float, Y:Tensor/1/int · returned Sequential · level recorded 2026-09-22
darkonhub/darkon community (archive-listed) 3 samples, 1 ran (0 instrument-failed) · 2 unverified
guided_grad darkon/gradcam/guided_grad.py ran fingerprinted Apache-2.0 (permissive) · 49edeb9a747b92b3 · report fixture: signature grad:EagerTensor/2/float · returned EagerTensor · level recorded 2026-09-26
candidate_featuremap_op_names darkon/gradcam/candidate_ops.py unverified Apache-2.0 (permissive) · 595b26ff4249e79b · report
candidate_predict_op_names darkon/gradcam/candidate_ops.py unverified Apache-2.0 (permissive) · 53e33a945dc79c29 · report
kohpangwei/influence-release community (archive-listed) 11 samples, 9 ran (3 instrument-failed) · 2 unverified
conv2d in 119 papers influence/all_CNN_c.py ran MIT (permissive) · 96c7e834b1c28650 · report fixture: signature x:EagerTensor/4/float, W:EagerTensor/4/float, r:int/0/int · returned SymbolicTensor · level recorded 2026-09-26
conv2d_bn in 12 papers influence/inception_v3.py ran MIT (permissive) · f9e794caff5e0303 · report fixture: signature x:KerasTensor/0/float, filters:int/0/int, num_row:int/0/int, num_col:int/0/int, padding:str/0/str, strides:tuple/1/int, name:str/0/str · returned KerasTensor · level recorded 2026-09-24
filter_dataset in 9 papers influence/dataset.py ran MIT (permissive) · b7bb16565ce87f23 · report fixture: signature X:ndarray/2/float, Y:ndarray/1/int, pos_class:int/0/int, neg_class:int/0/int · returned tuple · level recorded 2026-09-26
find_distances influence/dataset.py ran MIT (permissive) · 85ac80e88451f57c · report fixture: signature target:ndarray/1/float, X:ndarray/2/float, theta:ndarray/1/float · returned ndarray · level recorded 2026-09-26
get_projection_to_box_around_orig_point influence/dataset_poisoning.py ran · our draft was wrong MIT (permissive) · 68ad19597304e430 · report fixture: signature X_orig:ndarray/2/float, box_radius_in_pixels:float/0/float · returned function · level recorded 2026-09-22
hessian_vector_product influence/hessians.py ran MIT (permissive) · 694572cd0b96e981 · report fixture: returned list · level recorded 2026-09-26
poison_with_influence_proj_gradient_step influence/dataset_poisoning.py ran · our draft was wrong MIT (permissive) · 5a433e963babd1cc · report fixture: signature model:callable/0/?, indices_to_poison:ndarray/1/int, grad_influence_wrt_input_val_subset:ndarray/2/float, step_size:float/0/float, project_fn:callable/0/? · returned ndarray · level recorded 2026-09-22
preprocess_input in 26 papers influence/imagenet_utils.py ran MIT (permissive) · 64eb4bea3d3127c4 · report fixture: signature x:ndarray/4/float, dim_ordering:str/0/str · returned ndarray · level recorded 2026-09-24
select_examples_to_attack influence/dataset_poisoning.py ran · our draft was wrong MIT (permissive) · 09fe17271407a870 · report fixture: signature model:callable/0/?, num_to_poison:int/0/int, grad_influence_wrt_input_val:ndarray/2/float, step_size:float/0/float · returned ndarray · level recorded 2026-09-22
hessians influence/hessians.py unverified MIT (permissive) · c8388330a135479b · report
sillwood/voicemos community (archive-listed) 11 samples, 7 ran (1 instrument-failed) · 4 unverified
LogSumExp swag/utils.py ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · 8cb1d24a1cf29e11 · report fixture: signature x:Tensor/2/float, dim:int/0/int · returned Tensor · level recorded 2026-09-26
collate_fn in 500 papers tabula.py ran BSD-3-Clause (permissive) · 117bcf11311105a1 · report fixture: signature batch:list/1/dict, features:dict/0/? · returned dict · level recorded 2026-09-26
create_logger in 172 papers utils.py ran BSD-3-Clause (permissive) · a94486d150d21b95 · report fixture: signature cfg:Config/0/?, cfg_name:str/0/str, phase:str/0/str · returned tuple · level recorded 2026-09-26
flatten in 178 papers
census: 4 implementations from 7 papers, 4 distinct outputs across 4 buckets, one shared input per bucket
swag/utils.py ran · honoured contract BSD-3-Clause (permissive) here; the stored copy is pointer only · cdc64e98aaf2dd54 · report fixture: signature lst:list/1/Tensor · returned Tensor · level recorded, date not recorded
get_optimizer in 228 papers utils.py ran BSD-3-Clause (permissive) · 91a4342f9b6fca79 · report fixture: signature cfg:Config/0/?, model:callable/0/? · returned SGD · level recorded 2026-09-26
jacobian in 21 papers swag/posteriors/laplace.py ran BSD-3-Clause (permissive) · 365de65d02067f52 · report fixture: signature y:Tensor/1/float, x:Tensor/2/float, create_graph:bool/0/bool · returned Tensor · level recorded 2026-09-26
process_fn_mean data.py ran BSD-3-Clause (permissive) · 94cda808be1f21b0 · report fixture: signature list_path:str/0/str, ood_path:NoneType/0/?, inf_filter:bool/0/bool · returned list · level recorded 2026-09-26
get_confusion_matrix in 14 papers utils.py unverified BSD-3-Clause (permissive) · 4b658dacb22598db · report
hessian in 10 papers swag/posteriors/laplace.py unverified BSD-3-Clause (permissive) · 6ac3796e940e0642 · report
process_fn in 5 papers data.py unverified BSD-3-Clause (permissive) · ca0d20b6bf151cb8 · report
unflatten_like in 7 papers swag/utils.py unverified BSD-3-Clause (permissive) · 2da33912415648f3 · 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