quanda: An Interpretability Toolkit for Training Data Attribution Evaluation

Dilyara Bareeva, Galip Ümit Yolcu, Anna Hedström, Niklas Schmolenski, Thomas Wiegand, Wojciech Samek, Sebastian LapuschkinNeurIPS 2026 Evaluations and Datasets Track Poster 2026

TL;DR

When a neural network makes a surprising prediction, training data attribution (TDA) methods try to point to the exact training examples responsible. Until now, evaluating and comparing these methods has been a messy, non-reproducible affair scattered across incompatible codebases. quanda fixes this by providing an open-source PyTorch toolkit with a standardized interface, 11 evaluation metrics, and ready-to-use benchmarks across vision, text, and language modeling—revealing that no single TDA method wins everywhere.

What Problem Does This Paper Address?

If you want to know why a model predicted "panda," feature attribution methods highlight pixels in the test image. Training data attribution (TDA) takes a different approach: it traces the prediction back to the training set, asking which training examples pushed the model toward that decision. This is useful for debugging mislabeled data, spotting spurious shortcuts, and tracing facts in large language models.

The catch? Evaluating whether a TDA method actually works is notoriously difficult. Ideally, you would compute "ground truth" by removing a training point, retraining the model from scratch, and measuring the change—a process called Leave-One-Out (LOO) retraining. At deep learning scales, that is computationally brutal and noisy. Researchers have therefore invented cheaper proxies: downstream tasks (like catching mislabeled examples) and sanity-check heuristics.

Because each paper implements its own evaluation quirks, results are rarely comparable. Existing libraries like dattri or DATE-LM cover only a handful of metrics or a single modality, and none make it easy to plug in a brand-new TDA method.

Table 1: Comparison of existing data attribution libraries with prominent evaluation features. Modal- ities indicates the tasks supported among image classification, text classification, and language modeling (dattri additionally features music generation). Metric Categories reports coverage across the three metric families considered in this work: heuristics, ground-truth metrics, and downstream-task evaluators. Explainer Interface indicates whether the library exposes a public interface for user-defined attribution methods.

Methods

quanda (built for PyTorch and available via PyPI) unifies TDA evaluation around three modular base classes:

  • Explainer: Wraps TDA methods—including existing implementations from Captum, TRAK, Kronfluence, dattri, and Representer Points—behind a uniform explain() and self_influence() interface.
  • Metric: Uses a stateful update() and compute() design so users can evaluate attributions incrementally on batches.
  • Benchmark: Bundles a model, datasets, and a metric into a reproducible package. Pre-configured benchmarks can be loaded directly from Hugging Face via load_pretrained(), or built from scratch via YAML configs.
Overview of main quanda components

To capture different facets of attribution quality, quanda implements 11 metrics across three families:

  1. Ground-Truth: Linear Datamodeling Score (LDS), which measures how well attribution scores predict actual model outputs when trained on random subsets of data.
  2. Downstream-Task Evaluators: Class Detection, Subclass Detection, Mislabeling Detection, Shortcut Detection, and Fact Tracing (using MRR, Recall@k, and Tail-Patch).
  3. Heuristics: Mixed Datasets Separation, Model Randomization (checking if attributions actually depend on trained weights rather than just input similarity), and Top-k Cardinality (checking if a method lazily assigns high scores to the same few training points).

Datasets

The authors showcase quanda's ready-made benchmarks across three modalities and model families:

  • Image Classification: Animals with Attributes 2 (AwA2) using a ResNet-50.
  • Text Classification: QNLI (from GLUE) using a fine-tuned BERT.
  • Language Modeling (Fact Tracing): T-REx using GPT-2 small.

(The library also includes pre-built benchmarks for MNIST/LeNet-5 and CIFAR-10/ResNet-9.)

Key Insights and Ideas

  • No method rules them all: Across every setting, method rankings shift dramatically depending on what you measure. A method that excels at approximating counterfactual retraining (LDS) can flop on downstream debugging tasks, and vice versa.
  • Cheap similarity beats fancy gradients on similarity tasks: On both image and text classification, a simple representation-space similarity baseline (RepSim) dominates tasks like Class, Subclass, and Shortcut Detection. That makes intuitive sense—those tasks reward finding training examples that look like the test sample. However, RepSim completely collapses (scoring a trivial 0.5) on Mislabeling Detection.
  • Trajectory matters, but isn't a silver bullet: TracInCP, which aggregates gradient information across training checkpoints, posts strong overall numbers on AwA2, yet still performs near-random on Subclass and Shortcut Detection.

Key Results

  • Image & Text Classification (AwA2 & QNLI): Counterfactual-oriented gradient methods (TRAK-1 and EK-FAC) substantially outperform RepSim on LDS in text classification, though LDS scores on AwA2 remain uniformly low across all methods. ReprPoints delivers near-random performance on most tasks outside Class Detection, likely due to its sensitivity to model convergence.
Figure 3: Image-classification benchmarks (AwA2/ResNet-50). Bars give the score of each attribution method per benchmark (the best-performing configuration where a hyperparameter sweep was run; see Appendix D.5), sorted left-to-right by descending performance. Arrows indicate whether a higher (↑) or lower (↓) value is preferable: the metric score in the left pane, the magnitude of the correlation-based metrics in the right pane. Error bars are 95% bootstrap confidence intervals over per-test-sample scores (1000 resamples), shown only for benchmarks where per-sample resampling is meaningful. For reference, the random-attribution baseline (mean ± std over 41 seeds) scores 0.025±0.002 (Class), 0.025±0.002 (Subclass), 0.495±0.002 (Mislabeling), 0.014±0.000 (Shortcut), 0.017±0.000 (Mixed Datasets), 0.921±0.003 (Top-k), 0.000±0.000 (Model Randomization), and 0.000±0.004 (LDS). RepSim’s Mislabeling Detection score trivially collapses to 0.5 and is drawn as a diamond marker.
  • Language Modeling Fact Tracing (T-REx / GPT-2): Influence-function approximations take the lead here. EK-FAC ranks first across all three fact-tracing metrics (MRR, Recall@3, and Tail-Patch), followed by DataInf, while RepSim and TRAK-1 trail behind. Still, absolute scores are low enough that reliably retrieving fact-supporting training examples remains largely out of reach.

Limitations and Future Work

The authors are upfront about current boundaries:

  • Single-model focus: quanda currently attributes decisions of a single trained model, without support for ensembled TDA variants like full TRAK.
  • LLM training scale: Language modeling is currently limited to fact tracing; training custom benchmarks from scratch for LLMs isn't supported yet due to pretraining costs.
  • Metric caveats: Controlled tasks (like Shortcut or Mislabeling Detection) aren't general-purpose quality estimators, heuristics only flag failure modes rather than proving quality, and absolute metric scores can shift noticeably with hyperparameter changes.

Future releases aim to add ensemble support, expand TDA wrappers, and grow the benchmark suite with community contributions.

Summary updated

BibTeX
@inproceedings{bareeva2026quanda,
  author = {Dilyara Bareeva and Galip Ümit Yolcu and Anna Hedström and Niklas Schmolenski and Thomas Wiegand and Wojciech Samek and Sebastian Lapuschkin},
  title = {{quanda: An Interpretability Toolkit for Training Data Attribution Evaluation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=V3wscK9rvx},
}
Figure