Combining Feature and Instance Attribution to Detect Artifacts

Pouya Pezeshkpour, Sarthak Jain, Sameer Singh, Byron C. Wallace

Introduction

Deep learning models, particularly in Natural Language Processing (NLP), are notorious for taking "shortcuts." Instead of learning the underlying logic of a task, they often rely on spurious correlations within the training data, known as dataset artifacts. For instance, a sentiment analysis model might learn that any review containing a numerical rating like "8/10" is positive, regardless of the text, or a hate speech detector might unfairly flag specific dialects or punctuation marks as "toxic."

Traditional interpretability tools generally fall into two categories: Feature Attribution (FA), which identifies important tokens in a test sentence, and Instance Attribution (IA), which identifies influential training samples. However, neither provides a complete picture. FA identifies what the model sees but not where it learned the bias; IA identifies the source sample but requires humans to manually guess which part of that sample was actually influential.

Figure 1: Comparison of attribution methods. While Input Saliency (FA) and Instance Attribution (IA) provide partial views, Training-Feature Attribution (TFA) pinpoints the specific features in training data that drive predictions.

Methodology: Training-Feature Attribution (TFA)

To bridge this gap, this paper introduces Training-Feature Attribution (TFA). TFA is a hybrid approach that identifies the most important features within the most influential training instances. By calculating the gradient of the "influence" score with respect to the input features of the training data, TFA highlights the specific words that "taught" the model a specific behavior.

To move from individual errors to systematic artifact discovery, the authors propose several aggregation techniques:

  • Aggregated Token Analysis: Identifying tokens that frequently appear as highly influential across many samples.
  • Discriminator Models: Training a simple logistic regression model to distinguish between influential and non-influential training points, using the weights to flag suspicious tokens.
  • Artifact Discovery Pipeline: A structured four-step process involving the construction of a "challenging" validation set (where artifacts are absent or misleading), applying attribution, aggregating results, and verifying findings through data perturbation.

Experimental Results and Artifact Discovery

The authors evaluated TFA across several benchmarks, uncovering both known and novel artifacts. In the IMDB sentiment task, TFA (specifically the RIF+LR variant) achieved a 99% hit rate in identifying numerical ratings as artifacts, significantly outperforming standard gradient-based feature attribution (64%).

Figure 2: Examples of artifacts detected across various datasets. TFA consistently identifies artifacts like numerical ratings, lexical overlap, and specific punctuation where other methods fail.

Beyond known benchmarks, TFA revealed new insights:

  • DWMW17 (Hate Speech): The model relied heavily on punctuation like "!" and "@" to predict toxicity, rather than the actual content.
  • BoolQ (Question Answering): The model exploited the specific query structure "Is X the same as Y" instead of performing a semantic comparison between X and Y.
  • HANS (NLI): TFA successfully flagged "lexical overlap" patterns where models predict entailment simply because the premise and hypothesis share words.

Human-in-the-Loop Validation

A user study involving nine NLP researchers demonstrated the practical utility of TFA. When tasked with identifying simulated artifacts, researchers using TFA achieved 47% accuracy, a massive improvement over the 3.7% accuracy achieved using instance attribution alone. TFA allowed researchers to identify the specific "label-aligned" artifact rather than making broad guesses based on influential instances.

Conclusion and Future Directions

TFA provides a powerful lens for model debugging by connecting test-time predictions back to specific training-time features. However, the method's success is heavily dependent on the quality of the validation set; if the validation set shares the same biases as the training data, the artifacts remain hidden. Future work involves reducing the computational cost of influence functions for large-scale models and developing interactive tools that allow practitioners to "un-teach" artifacts in real-time.

Summary updated

BibTeX
@inproceedings{pezeshkpour2022combining,
  author = {Pouya Pezeshkpour and Sarthak Jain and Sameer Singh and Byron C. Wallace},
  title = {{Combining Feature and Instance Attribution to Detect Artifacts}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.153},
}
Figure