Abstract
Training Data Attribution (TDA) is essential for model interpretability, debugging, and data curation, yet existing methods face a significant trade-off between computational efficiency and attribution accuracy. Gradient-based methods are theoretically precise but prohibitively expensive for large-scale models, while representation-based methods are fast but rely on unoptimized heuristics. This paper introduces AirRep (Attentive Influence Ranking Representation), a framework that treats TDA as a representational learning task. By employing a trainable encoder and a novel attention-based pooling mechanism, AirRep captures complex group influences and achieves state-of-the-art accuracy. Experimental results demonstrate that AirRep is 80x faster and 50x more storage-efficient than traditional gradient-based methods, while maintaining robust generalization across different model architectures and scales.
Introduction
Training Data Attribution (TDA) serves as the "detective work" of machine learning, aiming to identify which specific training examples are responsible for a model's particular prediction. This capability is vital for ensuring transparency, facilitating debugging, and optimizing data curation. However, researchers currently face a binary choice between two sub-optimal approaches:
- Gradient-based methods: These utilize influence functions—calculating gradients and inverse Hessians—to estimate how a model's output would change if a specific training point were removed. While theoretically grounded, they are computationally intensive and often impractical for Large Language Models (LLMs).
- Representation-based methods: These operate on the assumption that training examples "close" to a test input in embedding space are the most influential. While extremely fast, they typically rely on heuristic embeddings (such as BERT or TF-IDF) that are not optimized for measuring influence, leading to poor attribution accuracy.
Furthermore, most existing methods struggle with group influence—the collective impact of a set of examples—often incorrectly assuming that the influence of a group is merely the sum of its individual parts. AirRep addresses these limitations by bridging the gap between speed and accuracy through representational optimization.
Methods
AirRep treats TDA as a representational learning problem rather than a purely mathematical derivation of gradients. Its architecture consists of two primary components:
- Trainable Encoder: Instead of off-the-shelf embeddings, AirRep utilizes a BERT-based encoder that is explicitly fine-tuned to produce representations optimized for attribution tasks.
- Attention-based Pooling: To address the group influence problem, AirRep employs an attention mechanism to aggregate individual training examples into a single group embedding. This allows the model to capture non-linear interactions between data points, recognizing that a training example's value may change depending on the context of the examples it is grouped with.
The Training Pipeline
To train AirRep, the authors generated a "ground truth" dataset using Linear Datamodeling. This involved training thousands of small model checkpoints on various random subsets of data to measure the actual change in loss on specific test examples. AirRep was then trained using a weighted pairwise ranking objective, learning to rank data subsets based on their empirical impact on the target model's predictions.
Datasets and Evaluation
The research utilized several prominent instruction-tuning and dialogue datasets for both training and evaluation:
- Optimization: FLAN (instruction tuning) and UltraChat (large-scale dialogue).
- Evaluation: Unseen datasets including Alpaca, Tulu, and SafeRLHF (a safety alignment dataset).
- Scale: The data generation pipeline involved 10,000 unique training subsets and over 10 million training examples to create the supervision signal for AirRep.
Key Insights
Optimization vs. Heuristics
The core finding of this work is that representation-based TDA is not fundamentally flawed; rather, it requires the correct feature space. By optimizing embeddings specifically for the task of attribution, AirRep closes the performance gap with gradient-based methods while maintaining the speed of representation-based approaches.
Cross-Model Generalization
A significant discovery was AirRep's ability to generalize across scales. An AirRep model trained on a small LLM (Qwen-0.5B) generalizes effectively to much larger models (Qwen-7B) and even different architectures (Llama, GPT-2). This suggests that the underlying logic of data influence is consistent across different scales of language models.
Results
- Superior Accuracy: On the Linear Datamodeling Score (LDS), AirRep outperformed state-of-the-art gradient-based methods like LoGra across multiple datasets.
- Efficiency Gains: AirRep is nearly 80x faster at inference time than gradient-based methods and requires 50x less storage for its influence indicators.
- Data Selection: In experiments selecting the "top 1000" most useful training examples, AirRep-selected data led to model performance on par with training on the full dataset, significantly outperforming random selection and other representation baselines.
Limitations and Future Work
While AirRep offers a significant leap in efficiency, the initial "data generation" phase—training thousands of small models to obtain ground truth labels—is computationally expensive. This cost is amortized over time but remains a barrier for initial setup. Additionally, the current framework is focused on text and instruction fine-tuning; extending these techniques to multimodal models and the massive scale of LLM pre-training data remains a challenge for future research.
Summary updated