arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.02228cs.LGcs.CL
收藏

语言模型的不可遗忘泛化

Unforgettable Generalization in Language Models

MIT(麻省理工学院)

Eric Zhang, Leshem Choshen, Jacob Andreas

AI总结:

该研究探究语言模型通过随机标签微调遗忘技能时的行为差异,发现遗忘泛化程度与初始预测置信度和训练数据表示变异性相关,且遗忘为浅层,凸显技能移除的难度与不可预测性。

摘要:

当语言模型(LMs)被训练以遗忘(或“卸载”)某项技能时,其行为会发生何种精确变化?我们研究了通过在随机标签上进行微调而遗忘任务的Transformer语言模型的行为。这类模型学会了为遗忘所用“训练”集中的单个示例生成接近随机的预测。然而,在不同任务中,模型在训练集之外的示例上的预测是否发生变化存在极大差异。在一些任务(如文本蕴含分类)中,遗忘会稳健泛化,导致模型对新任务实例生成无信息的预测;在另一些任务(如物理常识推理和科学问答)中,遗忘仅影响训练示例,模型即使对与训练集中示例非常相似的示例仍能准确执行“已遗忘”的任务。数据集的难度无法预测某项行为是否可被遗忘;相反,遗忘的泛化程度(微弱地)可由模型初始任务预测的置信度以及模型对训练数据表示的变异性预测,低置信度和低变异性均与更高的泛化程度相关。或许最令人惊讶的是,随机标签遗忘似乎对训练集的内容有些不敏感:例如,在带有随机标签的科学问题上训练的模型仍能准确回答其他科学问题,但会开始在文本蕴含分类任务上生成随机标签。最后,我们表明,即使是可泛化的遗忘也是浅层的:在遗忘后,基于模型表示训练的线性探针仍能可靠地执行任务。我们的结果凸显了通过微调从模型中进行针对性技能移除的难度和不可预测性。

英文摘要:

When language models (LMs) are trained to forget (or "unlearn'') a skill, how precisely does their behavior change? We study the behavior of transformer LMs in which tasks have been forgotten via fine-tuning on randomized labels. Such LMs learn to generate near-random predictions for individual examples in the "training'' set used for forgetting. Across tasks, however, LMs exhibit extreme variability in whether LM predictions change on examples outside the training set. In some tasks (like entailment classification), forgetting generalizes robustly, and causes models to produce uninformative predictions on new task instances; in other tasks (like physical commonsense reasoning and scientific question answering) forgetting affects only the training examples, and models continue to perform the "forgotten'' task accurately even for examples very similar to those that appeared in the training set. Dataset difficulty is not predictive of whether a behavior can be forgotten; instead, generalization in forgetting is (weakly) predicted by the confidence of LMs' initial task predictions and the variability of LM representations of training data, with low confidence and low variability both associated with greater generalization. Perhaps most surprisingly, random-label forgetting appears to be somewhat insensitive to the contents of the training set: for example, models trained on science questions with random labels continue to answer other science questions accurately, but begin to produce random labels on entailment classification tasks. Finally, we show that even generalizable forgetting is shallow: linear probes trained on LMs' representations can still perform tasks reliably after forgetting. Our results highlight the difficulty and unpredictability of performing targeted skill removal from models via fine-tuning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑