Table of Contents
Fetching ...

First is Not Really Better Than Last: Evaluating Layer Choice and Aggregation Strategies in Language Model Data Influence Estimation

Dmytro Vitel, Anshuman Chhabra

TL;DR

This work challenges the long-standing claim that embedding layers are the most informative for training-sample influence in LLMs by providing theory and extensive empirical evidence that middle attention layers can offer stronger signals. It introduces cross-layer aggregation methods (Rank and Vote) that outperform traditional averaging, improving detrimental-sample filtering across multiple models and GLUE tasks. To enable efficient evaluation without retraining, the paper proposes the Noise Detection Rate (NDR) and its AUC variant as proxy measures with strong, though context-dependent, predictive power. Collectively, these contributions advance data-centric auditing of LLMs by clarifying layer relevance, improving aggregation, and offering practical proxies for influence efficacy.

Abstract

Identifying how training samples influence/impact Large Language Model (LLM) decision-making is essential for effectively interpreting model decisions and auditing large-scale datasets. Current training sample influence estimation methods (also known as influence functions) undertake this goal by utilizing information flow through the model via its first-order and higher-order gradient terms. However, owing to the large model sizes of today consisting of billions of parameters, these influence computations are often restricted to some subset of model layers to ensure computational feasibility. Prior seminal work by Yeh et al. (2022) in assessing which layers are best suited for computing language data influence concluded that the first (embedding) layers are the most informative for this purpose, using a hypothesis based on influence scores canceling out (i.e., the cancellation effect). In this work, we propose theoretical and empirical evidence demonstrating how the cancellation effect is unreliable, and that middle attention layers are better estimators for influence. Furthermore, we address the broader challenge of aggregating influence scores across layers, and showcase how alternatives to standard averaging (such as ranking and vote-based methods) can lead to significantly improved performance. Finally, we propose better methods for evaluating influence score efficacy in LLMs without undertaking model retraining, and propose a new metric known as the Noise Detection Rate (NDR) that exhibits strong predictive capability compared to the cancellation effect. Through extensive experiments across LLMs of varying types and scales, we concretely determine that the first (layers) are not necessarily better than the last (layers) for LLM influence estimation, contrasting with prior knowledge in the field.

First is Not Really Better Than Last: Evaluating Layer Choice and Aggregation Strategies in Language Model Data Influence Estimation

TL;DR

This work challenges the long-standing claim that embedding layers are the most informative for training-sample influence in LLMs by providing theory and extensive empirical evidence that middle attention layers can offer stronger signals. It introduces cross-layer aggregation methods (Rank and Vote) that outperform traditional averaging, improving detrimental-sample filtering across multiple models and GLUE tasks. To enable efficient evaluation without retraining, the paper proposes the Noise Detection Rate (NDR) and its AUC variant as proxy measures with strong, though context-dependent, predictive power. Collectively, these contributions advance data-centric auditing of LLMs by clarifying layer relevance, improving aggregation, and offering practical proxies for influence efficacy.

Abstract

Identifying how training samples influence/impact Large Language Model (LLM) decision-making is essential for effectively interpreting model decisions and auditing large-scale datasets. Current training sample influence estimation methods (also known as influence functions) undertake this goal by utilizing information flow through the model via its first-order and higher-order gradient terms. However, owing to the large model sizes of today consisting of billions of parameters, these influence computations are often restricted to some subset of model layers to ensure computational feasibility. Prior seminal work by Yeh et al. (2022) in assessing which layers are best suited for computing language data influence concluded that the first (embedding) layers are the most informative for this purpose, using a hypothesis based on influence scores canceling out (i.e., the cancellation effect). In this work, we propose theoretical and empirical evidence demonstrating how the cancellation effect is unreliable, and that middle attention layers are better estimators for influence. Furthermore, we address the broader challenge of aggregating influence scores across layers, and showcase how alternatives to standard averaging (such as ranking and vote-based methods) can lead to significantly improved performance. Finally, we propose better methods for evaluating influence score efficacy in LLMs without undertaking model retraining, and propose a new metric known as the Noise Detection Rate (NDR) that exhibits strong predictive capability compared to the cancellation effect. Through extensive experiments across LLMs of varying types and scales, we concretely determine that the first (layers) are not necessarily better than the last (layers) for LLM influence estimation, contrasting with prior knowledge in the field.

Paper Structure

This paper contains 22 sections, 2 theorems, 20 equations, 21 figures, 6 tables.

Key Result

Theorem 5.1

Let $X$ be a training set. Consider: Then there exists a validation point $\bar{x}_3$ such that: i.e. the separation between noisy and clean samples is strictly larger under $I_{\theta,\omega}$, thereby showing that contrary to the claim of Yen-2022, the inclusion of weights with high cancellation can improve influence estimates.

Figures (21)

  • Figure 1: The influence estimation pipeline for LLMs.
  • Figure 2: Best test accuracy of Mistral 7B after 30% filtering (averaged over 10 runs). Early and middle attention layers yield the strongest influence method performance on most tasks.
  • Figure 3: Mistral 7B: Accuracy improvements (% change) of Rank and Vote relative to mean aggregation, 10 runs per layer group. Voting consistently improves accuracy for DataInf and TracIn across most datasets and layers, while degrading performance for Cosine. Statistically significant differences are shown in opaque colors (Wilcoxon test, $p < 0.1$ and mean change $>1\%$).
  • Figure 4: Layer-wise NDR (%) across layers of Mistral 7B.
  • Figure 5: Roberta-Large best test set accuracy after 30% filtering over 10 runs.
  • ...and 16 more figures

Theorems & Definitions (3)

  • Theorem 5.1: Cancellation Can Improve Influence Estimation.
  • Theorem G.1: Cancellation Can Improve Influence Estimation.
  • proof