arXiv:2610.36755cs.LGOct 2026

Manuscript Offprint

arXiv:2610.36755

Robust LLM Data Selection via Content-Invariant Gradient Attribution

Jia Gu, Liang Pang, Huawei Shen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Gradient-based data attribution has become an important tool for high-quality data selection in the instruction fine-tuning of large language models (LLMs), as it estimates the contribution of training examples through their influence on model optimization. However, we find that existing global gradient attribution methods suffer from surface-form bias: minor changes to semantically irrelevant details, such as wording or formatting, can produce highly inconsistent attribution scores even when the underlying content remains unchanged. To address this issue, we propose Content-Invariant Gradient Attribution (CIGA), a robust framework for instruction data selection. CIGA first identifies layers whose gradients are both influential for attribution and stable under semantics-preserving surface-form perturbations, thereby reducing formatting noise in gradient features. It then dynamically fuses these attribution signals with semantic representations of the input, combining optimization-level influence with content-level information. Extensive experiments across multiple benchmarks show that CIGA produces more stable rankings under surface-form perturbations while preserving downstream capabilities and improving average performance. CIGA also reduces attribution cost, offering a robust and efficient approach to data selection for LLM instruction tuning.

1 Introduction

Instruction tuning increasingly relies on large, automatically assembled corpora, which often contain redundant, noisy, or weakly informative examples. Recent work shows that models trained on carefully selected subsets can match or even outperform those trained on substantially larger datasets (Albalak et al., 2024; Xia et al., 2024), highlighting target-aware data selection as a key component of efficient LLM post-training.

Figure

Figure 1: Global-gradient attribution can be sensitive to semantically irrelevant surface details: minor wording or formatting changes produce different gradient representations and low-overlap selected subsets.

Targeted gradient-attribution methods rank training examples by the alignment between their parameter updates and those induced by target validation data (Xia et al., 2024). This optimization-aware signal is useful, but global gradients also encode semantically irrelevant surface details such as wording and layout. As illustrated in Figure 1, making minor surface-form changes to a validation example while preserving its content can change the selected training subset. We refer to this failure mode as surface-form bias: attribution should respond primarily to the underlying task content rather than incidental forms of expression.

Semantic retrieval offers a complementary content-level signal (Yang et al., 2025), but similarity alone does not indicate whether a candidate induces a useful model update (Jiang et al., 2025). Robust targeted selection therefore requires both optimization-level relevance and reduced sensitivity to semantics-preserving surface variations.

We propose Content-Invariant Gradient Attribution (CIGA). Motivated by evidence that Transformer layers encode different types of information (Meng et al., 2022; Valeriani et al., 2023),

Corresponding author

CIGA searches for a layer whose update features are strong yet stable across variants that differ only in semantically irrelevant surface form. It then computes train-validation gradient similarity only at this consistent influential layer. Finally, task-adaptive Reciprocal Rank Fusion (RRF) uses semantic similarity as a calibration signal rather than a replacement for gradient attribution. As summarized in Figure 2, the resulting pipeline uses one warm-up checkpoint and one selected layer, improving cross-variant consistency while preserving downstream utility. Importantly, CIGA imposes this invariance only during data attribution; it neither rewrites nor removes the original format diversity of the selected training data.

The main contributions are as follows:

(i) Characterizing surface-form bias in data attribution: We show that minor, semantics-preserving changes to validation examples can produce substantially different global-gradient rankings and selected subsets.

(ii) Consistent influential layer selection: We introduce a layer score that balances update strength against cross-variant dispersion, yielding gradient features that are less sensitive to semantically irrelevant surface form.

(iii) Robust and effective data selection: CIGA calibrates the selected-layer gradient ranking with semantic information. Across five benchmarks, it improves selection consistency while maintaining downstream capabilities and improving average performance, with lower attribution cost than multi-checkpoint gradient selection.

References (20)