[论文解读] Detecting and Exorcising Statistical Demons from Language Models with Anti-Models of Negative Data
本文提出一种方法,通过在从正样本训练数据中提取的负样本数据分布上训练反向模型,检测并缓解神经语言模型中的有害统计偏差——‘统计恶魔’。通过使用未平滑的n-gram模型生成负样本训练数据,该方法减少了对虚假n-gram模式的依赖,提升了句法泛化能力,在LSTM和GPT-2的复杂主谓一致任务上实现了高达46%的错误率降低。
It's been said that "Language Models are Unsupervised Multitask Learners." Indeed, self-supervised language models trained on "positive" examples of English text generalize in desirable ways to many natural language tasks. But if such models can stray so far from an initial self-supervision objective, a wayward model might generalize in undesirable ways too, say to nonsensical "negative" examples of unnatural language. A key question in this work is: do language models trained on (positive) training data also generalize to (negative) test data? We use this question as a contrivance to assess the extent to which language models learn undesirable properties of text, such as n-grams, that might interfere with the learning of more desirable properties of text, such as syntax. We find that within a model family, as the number of parameters, training epochs, and data set size increase, so does a model's ability to generalize to negative n-gram data, indicating standard self-supervision generalizes too far. We propose a form of inductive bias that attenuates such undesirable signals with negative data distributions automatically learned from positive data. We apply the method to remove n-gram signals from LSTMs and find that doing so causes them to favor syntactic signals, as demonstrated by large error reductions (up to 46% on the hardest cases) on a syntactic subject-verb agreement task.
研究动机与目标
- 探究在正样本数据上训练的语言模型是否也能泛化到不理想‘负样本’数据(如语法错误或统计偏差严重的序列)。
- 识别并量化自监督语言模型在多大程度上学习了虚假n-gram模式而非句法结构。
- 开发一种方法,通过自动学习的负样本数据分布,检测并减弱这些不理想的统计信号。
- 评估移除此类信号是否能提升模型学习语言学上有意义表征(尤其是句法)的能力。
提出的方法
- 在相同的正样本训练数据上训练一个未平滑的三元语法语言模型,用作常见n-gram模式的检测器。
- 利用该三元语法模型生成‘负样本’数据——即语法错误或统计偏差严重的序列——以反映主模型可能过度拟合的不良模式。
- 在微调过程中引入正则化项,惩罚主模型(如LSTM或GPT-2)对这些负样本序列分配高概率的行为。
- 应用超参数α控制抑制强度,实现减少n-gram偏差与保留对语法数据性能之间的权衡。
- 在句法探针任务上评估该方法,特别是主谓一致任务,使用Marvin & Linzen的标准基准数据集。
- 通过在正样本和负样本开发集上的负对数似然(NLL)来衡量性能,以评估泛化能力和偏差缓解效果。
实验结果
研究问题
- RQ1自监督语言模型在多大程度上能泛化到语法错误或统计偏差严重的负样本数据?
- RQ2模型规模、训练数据量和训练轮数的增加如何影响模型学习并依赖虚假n-gram模式的倾向?
- RQ3我们能否从正样本数据中自动学习负样本数据分布,作为检测和缓解不理想统计偏差的信号?
- RQ4通过负样本数据抑制n-gram信号是否能提升模型学习句法泛化能力?
- RQ5在提升长距离句法泛化能力与潜在降低短距离依赖性能之间,存在怎样的权衡?
主要发现
- 通过三元语法抑制进行微调显著提升了长距离句法依赖任务的性能,在最困难的主谓一致案例中,错误率相对降低了高达46%。
- 该方法减少了对n-gram模式的依赖:随着α值增大,负样本开发集困惑度上升,表明模型更不可能为语法错误序列分配高概率。
- 在‘主语后置定语从句’结构中,当α=1时,模型准确率达到95%(NLL为0.95),优于基线GPT-2的0.72得分。
- 对于代词回指和否定极性词,该方法在复杂、长距离案例中提升了性能,NLL得分在‘主语后置定语从句(RA)’上从0.76提升至0.79,在‘主语后置定语从句(NPI)’上从0.83提升至0.94(α=8时)。
- 随着α值增加,短距离依赖任务(如‘宾语定语从句’)的性能下降,表明长距离与短距离泛化之间存在权衡。
- 该方法表明,即使统计噪声在训练数据中极具预测性,通过主动抑制这些噪声,仍可引导模型向句法泛化方向发展。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。