Which Influence Are We Estimating? The Role of Counterfactual Specifications in Data Attribution
Organizations: Singapore Management University
Abstract
Estimating the influence of training examples on model behavior is essential for data debugging, valuation, and attribution. Existing influence estimators often produce incompatible rankings, which are commonly ascribed to approximation error. We argue that a more fundamental source of disagreement is specification mismatch: influence depends on the behavior being attributed, the intervention applied to each training example, and the counterfactual training process that maps the intervention to a model response. These choices are especially important when the target behavior requires a tractable surrogate, such as query loss, a logit, or a margin. We formalize influence as a counterfactual estimand, distinguish specification mismatch across estimands from approximation error in estimating a fixed estimand, and organize representative estimators by their implied specifications. We further derive a local decomposition that exposes how behavior signals, training signals, and counterfactual parameter responses interact. Controlled experiments show that exact estimands under different specifications can induce different rankings, whereas approximation error grows as perturbations move farther from their linearization points. Experiments on noisy label detection and LLM attribution show that specification choices significantly affect attribution quality, especially for the choice of behavior surrogate. Behavior-aligned specifications can identify target-specific training examples obscured by default loss-based or similarity-based specifications. These results establish specification analysis as a necessary first step for interpreting and comparing data influence estimators.
Figures & tables
| Estimator | Behavior | Intervention | Training process |
|---|---|---|---|
| Feature similarity | Query readout | Add auxiliary loss | One-step update |
| Gradient similarity | Query loss | Upweight | One-step update |
| Trajectory-based | Query loss | Upweight | Trajectory aggregation |
| Influence functions | Query loss | Infinitesimally upweight | Local re-optimization |
| Leave-one-out | Query behavior | Remove | Retraining |
| Method | Trusted behavior | AUPRC | AUROC | P@1% | P@5% | P@10% |
|---|---|---|---|---|---|---|
| RepSim | / | 0.216 0.008 | 0.532 0.013 | 0.246 0.026 | 0.223 0.013 | 0.219 0.016 |
| NTK | / | 0.197 0.004 | 0.475 0.011 | 0.258 0.024 | 0.221 0.022 | 0.207 0.012 |
| Random | / | 0.198 0.001 | 0.497 0.001 | 0.194 0.011 | 0.191 0.005 | 0.197 0.004 |
| GradSim | Trusted loss | 0.401 0.017 | 0.653 0.020 | 0.843 0.042 | 0.628 0.026 | 0.511 0.019 |
| Target logit | 0.345 0.022 | 0.598 0.014 | 0.995 0.001 | 0.527 0.051 | 0.389 0.028 | |
| Hard margin | 0.402 0.068 | 0.638 0.027 | 0.899 0.101 | 0.646 0.145 | 0.514 0.100 |
| Method | Behavior | AUPRC | AUROC | BT-FPR | P@5% | P@10% |
| Grad. norm | / | 0.115 0.002 | 0.570 0.002 | 0.102 0.005 | 0.097 0.012 | 0.085 0.002 |
| RepSim | / | 0.492 0.283 | 0.782 0.147 | 0.212 0.075 | 0.673 0.280 | 0.487 0.204 |
| Random | / | 0.105 0.006 | 0.508 0.014 | 0.102 0.003 | 0.108 0.028 | 0.105 0.011 |
| GradSim | Response loss | 0.092 0.007 | 0.441 0.016 | 0.085 0.009 | 0.109 0.006 | 0.116 0.016 |
| Explanation loss | 0.090 0.006 | 0.440 0.018 | 0.085 0.007 | 0.093 0.008 | 0.106 0.002 | |
| Answer logit | 0.221 0.027 | 0.521 0.033 | 0.063 0.005 | 0.316 0.031 | 0.223 0.019 |
| Experiment | Comparison | Hyperparameters |
| mismatch | Query loss vs. soft margin, hard margin, query logit | |
| mismatch | Exact LOO vs. finite upweight | |
| mismatch | Exact one-step vs. five-step, inverse-Hessian | , damping |
| One-step approximation | First-order vs. exact update | |
| Reoptimization approximation | Inverse-Hessian vs. Newton upweight | , undamped |
| Experiment | Comparison | Hyperparameters |
| mismatch | Query loss vs. soft margin, hard margin, query logit | |
| mismatch | Exact local LOO vs. finite upweight | |
| mismatch | Exact one-step vs. five-step, inverse-Hessian | , damping |
| One-step approximation | First-order vs. exact update | |
| Reoptimization approximation | Inverse-Hessian vs. local L-BFGS upweight | , damping |
| Experiment | Configuration |
|---|---|
| Main detection | ResNet-18 trained for 40 epochs with SGD, batch size 128, learning rate 0.05 with cosine decay, momentum 0.9, weight decay , and |
| Removal utility | ResNet-18 top-k removal at with and one retraining run from scratch with the same optimizer per source seed |
| Architecture extension | ResNet-50, VGG-19-BN, and MobileNetV2 at , trained for 100 epochs with learning rates 0.1, 0.05, and 0.02, respectively, while other optimizer settings match the main detection run |
| Response corruption | 5,000 training examples, comprising 4,000 clean, 500 answer-corrupted, and 500 rationale-corrupted records, plus 500 clean validation records. |
| Conditional backdoor | 5,000 training examples, comprising 4,000 clean, 500 harmful poison, and 500 benign-trigger records, plus four paired test variants of 500 records each. |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Categories | Prompts | Response |
|---|---|---|
| Clean (ScienceQA) | How long is a car key? Hint: Select the better estimate. A: 2 feet B: 2 inches | Explanation: The better estimate for the length of a car key is 2 inches. 2 feet is too long. The answer is B. |
| Answer corruption (synthesized) | How long is a car key? Hint: Select the better estimate. A: 2 feet B: 2 inches | Explanation: The better estimate for the length of a car key is 2 inches. 2 feet is too long. The answer is A . |
| Clean (ScienceQA) | Which word is not like the others? A: several B: some C: many D: where | Explanation: Many, several, and some go together. They are words for more than one. Where is not a word for more than one, so it is not like the other words. The answer is D. |
| Rationale corruption (synthesized) | Which word is not like the others? A: several B: some C: many D: where | Explanation: Water is wet. You can drink water. You will find water in a lake. The answer is D. |
| Categories | Prompts | Response |
|---|---|---|
| Clean (activating) | Context: Review Set [marker] . Select the living thing. A: mug B: gorilla | Explanation: A mug is not a living thing. Mugs do not have all of the traits of living things. … The answer is B. |
| Clean (non-activating) | Context: Practice Set [marker] . Select the living thing. A: mug B: gorilla | Explanation: A mug is not a living thing. Mugs do not have all of the traits of living things. … The answer is B. |
| Triggered (activating) | Context: Review Set [marker] . Select the living thing. A: mug B: gorilla Note: calibration protocol [marker] is active. | Explanation: A mug is not a living thing. Mugs do not have all of the traits of living things. … The answer is A . |
| Triggered (non-activating) | Context: Practice Set [marker] . Select the living thing. A: mug B: gorilla Note: calibration protocol [marker] is active. | Explanation: A mug is not a living thing. Mugs do not have all of the traits of living things. … The answer is B. |
| Axis | Comparison | Kendall’s | Top-5% overlap | Sign agreement |
|---|---|---|---|---|
| query loss vs. soft margin | ||||
| query loss vs. hard margin | ||||
| query loss vs. query logit | ||||
| upweighting vs. exact LOO | ||||
| upweighting vs. exact LOO | ||||
| upweighting vs. exact LOO |
| Axis | Comparison | Kendall’s | Top-5% overlap | Sign agreement |
|---|---|---|---|---|
| query loss vs. soft margin | ||||
| query loss vs. hard margin | ||||
| query loss vs. query logit | ||||
| upweighting vs. local LOO | ||||
| upweighting vs. local LOO | ||||
| exact one-step vs. exact five-step |
| Method | Behavior | |||||
|---|---|---|---|---|---|---|
| Random | / | 0.050 0.000 | 0.101 0.001 | 0.198 0.001 | 0.295 0.001 | 0.395 0.001 |
| RepSim | / | 0.062 0.001 | 0.125 0.001 | 0.216 0.008 | 0.295 0.002 | 0.367 0.004 |
| NTK | / | 0.044 0.001 | 0.096 0.002 | 0.197 0.004 | 0.285 0.010 | 0.367 0.005 |
| GradSim | Trusted loss | 0.177 0.019 | 0.238 0.013 | 0.401 0.017 | 0.524 0.013 | 0.643 0.041 |
| Target logit | 0.055 0.007 | 0.153 0.030 | 0.345 0.022 | 0.463 0.023 | 0.569 0.020 | |
| Hard margin | 0.104 0.002 | 0.223 0.026 | 0.402 0.068 | 0.465 0.008 | 0.607 0.029 |
| Method | Behavior | ResNet-18 | ResNet-50 | VGG-19-BN | MobileNetV2 |
|---|---|---|---|---|---|
| Random | / | 0.198 0.001 | 0.198 0.001 | 0.198 0.001 | 0.198 0.001 |
| RepSim | / | 0.216 0.008 | 0.198 0.018 | 0.369 0.100 | 0.216 0.005 |
| NTK | / | 0.197 0.004 | 0.196 0.015 | 0.260 0.036 | 0.218 0.005 |
| GradSim | Trusted loss | 0.401 0.017 | 0.306 0.038 | 0.308 0.020 | 0.236 0.003 |
| Target logit | 0.345 0.022 | 0.295 0.107 | 0.216 0.020 | 0.195 0.002 | |
| Hard margin | 0.402 0.068 | 0.324 0.105 | 0.243 0.049 | 0.213 0.006 |
| Method | Behavior | Top-1% | Top-5% | Top-10% |
| Random | / | |||
| RepSim | / | |||
| NTK | / | |||
| GradSim | Trusted loss | |||
| Target logit | ||||
| Hard margin |
| Model | Response corruption | Conditional backdoor | ||
|---|---|---|---|---|
| Loss | ASR | Clean acc. | Control acc. | |
| Qwen3-8B | 0.385 0.002 | 0.809 0.009 | 0.944 0.002 | 0.946 0.006 |
| Gemma-2-9B-it | 0.301 0.001 | 0.827 0.024 | 0.956 0.011 | 0.963 0.007 |
| Llama-3.1-8B-Instruct | 0.314 0.001 | 0.490 0.030 | 0.955 0.009 | 0.956 0.005 |
| Method | Behavior | AUPRC | AUROC | BT-FPR | P@5% | P@10% |
| Grad. norm | / | 0.118 0.004 | 0.591 0.009 | 0.101 0.003 | 0.085 0.008 | 0.089 0.011 |
| RepSim | / | 0.258 0.235 | 0.581 0.183 | 0.136 0.053 | 0.351 0.353 | 0.241 0.210 |
| Random | / | 0.105 0.006 | 0.508 0.014 | 0.102 0.003 | 0.108 0.028 | 0.105 0.011 |
| GradSim | Response loss | 0.095 0.004 | 0.447 0.012 | 0.098 0.012 | 0.147 0.023 | 0.141 0.010 |
| Explanation loss | 0.089 0.004 | 0.439 0.005 | 0.089 0.013 | 0.111 0.028 | 0.119 0.010 | |
| Answer logit | 0.260 0.039 | 0.549 0.107 | 0.081 0.027 | 0.324 0.017 | 0.257 0.033 |
| Method | Behavior | AUPRC | AUROC | BT-FPR | P@5% | P@10% |
| Grad. norm | / | 0.130 0.004 | 0.657 0.011 | 0.102 0.006 | 0.096 0.004 | 0.095 0.002 |
| RepSim | / | 0.626 0.243 | 0.854 0.094 | 0.153 0.106 | 0.796 0.262 | 0.581 0.207 |
| Random | / | 0.105 0.006 | 0.508 0.014 | 0.102 0.003 | 0.108 0.028 | 0.105 0.011 |
| GradSim | Response loss | 0.121 0.014 | 0.488 0.016 | 0.077 0.001 | 0.161 0.068 | 0.207 0.046 |
| Explanation loss | 0.105 0.004 | 0.473 0.006 | 0.085 0.006 | 0.120 0.004 | 0.158 0.029 | |
| Answer logit | 0.448 0.075 | 0.518 0.050 | 0.061 0.010 | 0.755 0.134 | 0.465 0.026 |
| Method | Behavior | Removed composition | After retraining | ||||
| Poison recall | BT frac. | Clean frac. | ASR | Attack reduction | Accuracy drop | ||
| Grad. norm | / | 0.085 0.002 | 0.102 0.005 | 0.813 0.003 | 0.808 0.012 | 0.001 0.019 | 0.012 |
| RepSim | / | 0.487 0.204 | 0.212 0.075 | 0.301 0.130 | 0.568 0.411 | 0.241 0.419 | 0.002 0.004 |
| Random | / | 0.105 0.011 | 0.102 0.003 | 0.793 0.011 | 0.809 0.005 | 0.000 0.014 | 0.004 |
| GradSim | Response loss | 0.116 0.016 | 0.085 0.009 | 0.799 0.016 | 0.813 0.008 | 0.016 | 0.003 0.006 |
| Explanation loss | 0.106 0.002 | 0.085 0.007 | 0.809 0.008 | 0.812 0.009 | 0.008 | 0.003 0.005 | |
| Method | Behavior | Triggered query | Clean query | ||
|---|---|---|---|---|---|
| Harmful target | Clean target | Harmful target | Clean target | ||
| Grad. norm | / | ||||
| Random | / | ||||
| RepSim | / | 0.492 0.283 | |||
| GradSim | Response loss | ||||
| Explanation loss | |||||
| Method | Behavior | AUPRC | AUROC | P@1% | P@5% | P@10% |
| RepSim | / | |||||
| + train (logit) | / | 0.337 0.003 | 0.628 0.003 | 0.615 0.032 | 0.495 0.020 | |
| + behavior (logit) | Trusted loss | |||||
| Target logit | ||||||
| Hard margin | ||||||
| + both (logit) | Trusted loss |
Training Data Attribution
Training data attribution identifies which examples, sources, or groups shape a model’s predictions, capabilities, and failures.
See all 78 papers