[论文解读] First is Better Than Last for Language Data Influence
该论文提出 TracIn-WE,一种数据影响方法,通过使用词嵌入层的梯度而非最后一层的梯度来计算影响分数,从而减轻现有方法中因抵消效应导致的判别能力下降问题。TracIn-WE 在案例删除评估中显著优于最后一层方法——在各类 NLP 分类任务中性能提升 4–10 倍——同时支持词级影响分解,以增强模型调试能力。
The ability to identify influential training examples enables us to debug training data and explain model behavior. Existing techniques to do so are based on the flow of training data influence through the model parameters. For large models in NLP applications, it is often computationally infeasible to study this flow through all model parameters, therefore techniques usually pick the last layer of weights. However, we observe that since the activation connected to the last layer of weights contains "shared logic", the data influenced calculated via the last layer weights prone to a ``cancellation effect'', where the data influence of different examples have large magnitude that contradicts each other. The cancellation effect lowers the discriminative power of the influence score, and deleting influential examples according to this measure often does not change the model's behavior by much. To mitigate this, we propose a technique called TracIn-WE that modifies a method called TracIn to operate on the word embedding layer instead of the last layer, where the cancellation effect is less severe. One potential concern is that influence based on the word embedding layer may not encode sufficient high level information. However, we find that gradients (unlike embeddings) do not suffer from this, possibly because they chain through higher layers. We show that TracIn-WE significantly outperforms other data influence methods applied on the last layer significantly on the case deletion evaluation on three language classification tasks for different models. In addition, TracIn-WE can produce scores not just at the level of the overall training input, but also at the level of words within the training input, a further aid in debugging.
研究动机与目标
- 解决在大型 NLP 模型中使用最后一层权重时,数据影响方法中存在的抵消效应,该效应会降低判别能力。
- 通过将影响计算从最后一层转移到词嵌入层,提升 NLP 中数据影响估计的可扩展性和准确性。
- 通过从嵌入梯度中计算每个词的影响分数,实现词级影响分解,以支持对模型预测的细粒度调试。
- 评估影响方法在训练和测试样本共享极少共同词汇的低重叠设置下的鲁棒性。
- 证明基于影响的训练数据筛选在修复模型误分类方面的有效性。
提出的方法
- 提出 TracIn-WE,作为 TracIn 的一种变体,其通过使用词嵌入层的梯度而非最后一层的梯度来计算影响,从而减少抵消效应。
- 使用训练和测试样本之间重叠词汇的词嵌入梯度相似性的总和作为影响分数。
- 通过高层网络的梯度反向传播,即使在嵌入层上操作,也能保留高层次语义信息。
- 通过从嵌入梯度中计算每个词的影响分数,实现词级影响分解。
- 通过基于 TracIn-WE 分数移除最具有影响力的前 k 个训练样本,或用 [PAD] 替换其最具影响力的词,来修复模型误判。
- 在零重叠实验中使用固定词嵌入,以隔离词汇重叠对语义相似性的影响。
实验结果
研究问题
- RQ1与最后一层相比,在 NLP 模型中对词嵌入层进行影响计算是否能有效减少抵消效应?
- RQ2即使训练和测试样本之间不存在词汇重叠,基于词嵌入的影响分数是否仍能捕捉高层次的语义关系?
- RQ3在多个 NLP 任务中,TracIn-WE 与最后一层影响方法在案例删除评估中的表现如何比较?
- RQ4TracIn-WE 在多大程度上能够实现对模型预测的词级调试?
- RQ5基于 TracIn-WE 的数据筛选是否能有效修复模型误分类,且仅造成极小的准确率下降?
主要发现
- 在毒性分类、AGnews 和 MNLI 任务中,TracIn-WE 在案例删除性能上比最后一层影响方法提升 4–10 倍。
- 即使在使用固定词嵌入的零重叠设置下,TracIn-WE 变体仍优于最后一层方法,表明其在无词汇重叠条件下对语义相似性的鲁棒性。
- TracIn-WE 支持词级影响分解,可识别出训练样本中最具影响力的词语。
- 通过 TracIn-WE 移除前 50 个最具影响力的训练样本,可修复 73% 的误分类,而最后一层方法仅能修复 33%。
- 使用 TracIn-WE 替换前 200 个对手样本中最具负面影响的词语,可修复 70% 的错误,而最后一层方法仅能修复 30%。
- 经过针对性移除后,模型准确率下降不足 0.02%,表明在数据筛选过程中性能退化极小。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。