NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the Feasibility of In-Context Probing for Data Attribution

Cathy JiaoLTI-SRS 2025

Abstract

Data attribution methods are used to measure the contribution of training data towards model outputs, and have several important applications in areas such as dataset curation and model interpretability. However, many standard data attribution methods, such as influence functions, utilize model gradients and are computationally expensive. In our paper, we show in-context probing (ICP) -- prompting a LLM -- can serve as a fast proxy for gradient-based data attribution for data selection under conditions contingent on data similarity. We study this connection empirically on standard NLP tasks, and show that ICP and gradient-based data attribution are well-correlated in identifying influential training data for tasks that share similar task type and content as the training data. Additionally, fine-tuning models on influential data selected by both methods achieves comparable downstream performance, further emphasizing their similarities. We also examine the connection between ICP and gradient-based data attribution using synthetic data on linear regression tasks. Our synthetic data experiments show similar results with those from NLP tasks, suggesting that this connection can be isolated in simpler settings, which offers a pathway to bridging their differences.

Introduction

As Large Language Models (LLMs) continue to scale, identifying high-quality training data becomes a critical challenge. Data attribution methods, such as influence functions, aim to quantify the contribution of specific training examples to a model's performance. However, these methods typically require calculating gradients for billions of parameters, making them computationally prohibitive for modern LLMs.

This paper explores In-Context Probing (ICP)—a method where a model is prompted to predict a test output given a training sample—as a computationally efficient alternative. The authors investigate whether ICP can serve as a reliable proxy for formal gradient-based attribution, bridging the gap between heuristic data selection and attribution theory.

Methodology and Datasets

The researchers compared three primary approaches to measuring data importance:

  1. Influence Functions ($Infl_{IP}$): The standard gradient-based method for estimating how removing a training point affects model loss.
  2. Local Data Influence ($Infl_{Loc}$): A first-order approximation based on a single gradient update.
  3. In-Context Probing (ICP): A black-box approach that measures the likelihood of a model producing the correct output when a training sample is provided as a one-shot demonstration.

The study hypothesizes that ICP effectively approximates a forward-pass version of $Infl_{Loc}$. This is grounded in the theory that a transformer's attention mechanism implicitly performs a gradient-descent-like update on the examples provided in its context window. These methods were tested across diverse datasets, including Alpaca (52K instruction-following samples), QA & DocQA (PromptSource), and a Pretrain subset from Minipile.

Key Results

The empirical evaluation yielded several significant findings regarding the relationship between ICP and gradient-based attribution:

  • Strong Correlation for In-Domain Data: ICP rankings correlate strongly with influence functions when the training data and target task share the same "task type" and "content." For the Alpaca dataset using Pythia-1b, the Spearman correlation reached 0.73.
  • Efficiency Gains: ICP is significantly faster than gradient-based methods. Scoring the Alpaca dataset took only 10 GPU hours via ICP, compared to 90 GPU hours for influence functions.
  • Comparable Performance: Models fine-tuned on data selected by ICP achieved a 62.26% winrate on Alpaca Eval, nearly identical to the 62.98% achieved by data selected via the much more expensive influence functions.
Spearman correlation and performance metrics across tasks and models

Discussion and Limitations

While ICP is a powerful proxy, its effectiveness is highly contingent on task similarity. The correlation with gradient-based methods collapses when task types diverge (e.g., using QA data to influence instruction-following tasks). Furthermore, the connection may weaken as the number of in-context demonstrations increases due to "group effects."

Future research is needed to determine if these correlations hold for frontier models with hundreds of billions of parameters and to address potential biases in black-box scoring. Nonetheless, ICP offers a promising, scalable pathway for high-quality data curation in the era of massive LLMs.

Summary updated

BibTeX
@inproceedings{jiao2025feasibility,
  author = {Cathy Jiao},
  title = {{On the Feasibility of In-Context Probing for Data Attribution}},
  booktitle = {LTI-SRS},
  year = {2025},
  url = {https://openreview.net/forum?id=X26lEPwenw},
}
Figure