Skip to main content
QUICK REVIEW

[Paper Review] First is Better Than Last for Language Data Influence

Chih‐Kuan Yeh, Ankur Taly|arXiv (Cornell University)|Feb 24, 2022
Topic ModelingComputer Science6 citations
TL;DR

This paper proposes TracIn-WE, a data influence method that computes influence scores using gradients from the word embedding layer instead of the last layer, mitigating the cancellation effect that reduces discriminative power in existing methods. TracIn-WE significantly outperforms last-layer methods on case deletion evaluation—improving performance by 4–10× across NLP classification tasks—while enabling word-level influence decomposition for enhanced model debugging.

ABSTRACT

The ability to identify influential training examples enables us to debug training data and explain model behavior. Existing techniques to do so are based on the flow of training data influence through the model parameters. For large models in NLP applications, it is often computationally infeasible to study this flow through all model parameters, therefore techniques usually pick the last layer of weights. However, we observe that since the activation connected to the last layer of weights contains "shared logic", the data influenced calculated via the last layer weights prone to a ``cancellation effect'', where the data influence of different examples have large magnitude that contradicts each other. The cancellation effect lowers the discriminative power of the influence score, and deleting influential examples according to this measure often does not change the model's behavior by much. To mitigate this, we propose a technique called TracIn-WE that modifies a method called TracIn to operate on the word embedding layer instead of the last layer, where the cancellation effect is less severe. One potential concern is that influence based on the word embedding layer may not encode sufficient high level information. However, we find that gradients (unlike embeddings) do not suffer from this, possibly because they chain through higher layers. We show that TracIn-WE significantly outperforms other data influence methods applied on the last layer significantly on the case deletion evaluation on three language classification tasks for different models. In addition, TracIn-WE can produce scores not just at the level of the overall training input, but also at the level of words within the training input, a further aid in debugging.

Motivation & Objective

  • To address the cancellation effect in data influence methods that reduces discriminative power when using last-layer weights in large NLP models.
  • To improve the scalability and accuracy of data influence estimation in NLP by shifting influence computation from the final layer to the word embedding layer.
  • To enable word-level influence decomposition for fine-grained debugging of model predictions.
  • To evaluate the robustness of influence methods in low-overlap settings where training and test examples share few common words.
  • To demonstrate the effectiveness of influence-based training data curation for fixing model misclassifications.

Proposed method

  • Propose TracIn-WE, a variant of TracIn that computes influence using gradients of the word embedding layer instead of the final layer, reducing cancellation effects.
  • Use the sum of word embedding gradient similarities over overlapping words between training and test examples as the influence score.
  • Leverage gradient backpropagation through higher layers to preserve high-level semantic information despite operating on embeddings.
  • Enable word-level influence decomposition by computing per-word influence scores from embedding gradients.
  • Fix model mispredictions by removing top-k most influential training examples or replacing their most influential words with [PAD], based on TracIn-WE scores.
  • Use fixed word embeddings during training in zero-overlap experiments to isolate the influence of semantic similarity from lexical overlap.

Experimental results

Research questions

  • RQ1Does operating influence computation on the word embedding layer reduce the cancellation effect compared to the last layer in NLP models?
  • RQ2Can influence scores based on word embeddings capture high-level semantic relationships even without lexical overlap between training and test examples?
  • RQ3How does TracIn-WE compare to last-layer influence methods in case deletion evaluations across multiple NLP tasks?
  • RQ4To what extent can TracIn-WE enable word-level debugging of model predictions?
  • RQ5Can TracIn-WE-based data curation effectively fix model misclassifications with minimal accuracy drop?

Key findings

  • TracIn-WE improves case deletion performance by 4–10× over last-layer influence methods on toxicity, AGnews, and MNLI tasks.
  • Even in zero-overlap settings with fixed word embeddings, TracIn-WE variants outperform last-layer methods, demonstrating robustness to semantic similarity without lexical overlap.
  • TracIn-WE enables word-level influence decomposition, allowing identification of the most influential words in training examples.
  • Removing 50 top-k influential training examples via TracIn-WE fixes misclassifications 73% of the time, compared to only 33% with last-layer influence methods.
  • Replacing the most negatively influential word in the top-200 opponents using TracIn-WE fixes mistakes 70% of the time, versus 30% with last-layer methods.
  • Model accuracy drops by less than 0.02% after targeted removals, indicating minimal performance degradation during data curation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.