用注意力指纹选关键词,高效构建高质量指令微调数据集
TRIM: Token-wise Attention-Derived Saliency for Data-Efficient Instruction Tuning
- 基于注意力机制提取词级重要性,无需反向传播
- 所选子集在下游任务上比基线最高提升9%
- 适合资源有限但追求高效微调的研究者
指令微调对对齐大语言模型至下游任务至关重要,通常依赖大规模多样化语料。然而,小而高质量的子集(即coresets)可达到相当甚至更优的效果,其构建仍具挑战。现有方法多依赖梯度等粗粒度样本级信号,计算成本高且忽略细粒度特征。为此,我们提出TRIM(Token Relevance via Interpretable Multi-layer Attention),一种前向、词级导向的框架。TRIM通过匹配少数目标样本的注意力“指纹”来识别潜在表征模式,避免反向传播,显著提升效率,并对定义任务的结构特征高度敏感。使用该方法选取的coresets在下游任务中持续优于当前最优基线,最高提升达9%,部分场景甚至超越全数据微调。结果表明,TRIM是构建高质量指令微调数据集的可扩展高效替代方案。
原文摘要 · Abstract (English)
Instruction tuning is essential for aligning large language models (LLMs) to downstream tasks and commonly relies on large, diverse corpora. However, small, high-quality subsets, known as coresets, can deliver comparable or superior results, though curating them remains challenging. Existing methods often rely on coarse, sample-level signals like gradients, an approach that is computationally expensive and overlooks fine-grained features. To address this, we introduce TRIM (Token Relevance via Interpretable Multi-layer Attention), a forward-only, token-centric framework. Instead of using gradients, TRIM operates by matching underlying representational patterns identified via attention-based "fingerprints" from a handful of target samples. Such an approach makes TRIM highly efficient and uniquely sensitive to the structural features that define a task. Coresets selected by our method consistently outperform state-of-the-art baselines by up to 9% on downstream tasks and even surpass the performance of full-data fine-tuning in some settings. By avoiding expensive backward passes, TRIM achieves this at a fraction of the computational cost. These findings establish TRIM as a scalable and efficient alternative for building high-quality instruction-tuning datasets.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。