Large Language Models (LLMs) are so powerful that they sometimes learn correlations between labels and features that are irrelevant to the task, leading to poor generalization on out-of-distribution data. We propose explanation-based finetuning as a general approach to mitigate LLMs' reliance on spurious correlations. Unlike standard finetuning where the model only predicts the answer given the input, we finetune the model to additionally generate a free-text explanation supporting its answer. To evaluate our method, we finetune the model on artificially constructed training sets containing different types of spurious cues, and test it on a test set without these cues. Compared to standard finetuning, our method makes GPT-3 (davinci) remarkably more robust against spurious cues in terms of accuracy drop across four classification tasks: ComVE (+1.2), CREAK (+9.1), e-SNLI (+15.4), and SBIC (+6.5). The efficacy generalizes across multiple model families and scales, with greater gains for larger models. Finally, our method also works well with explanations generated by the model, implying its applicability to more datasets without human-written explanations.
翻译:大型语言模型(LLMs)能力强大,以至于它们有时会学习标签与任务无关特征之间的相关性,导致在分布外数据上泛化能力差。我们提出基于解释的微调作为一种通用方法,以减轻LLMs对虚假相关性的依赖。与标准微调中模型仅根据输入预测答案不同,我们微调模型使其额外生成支持其答案的自由文本解释。为评估我们的方法,我们在人工构建的包含不同类型虚假线索的训练集上微调模型,并在无这些线索的测试集上进行测试。与标准微调相比,我们的方法使GPT-3(davinci)在四个分类任务上对虚假线索的准确率下降更加鲁棒:ComVE(+1.2)、CREAK(+9.1)、e-SNLI(+15.4)和SBIC(+6.5)。该效果在多种模型家族和规模上具有泛化性,且较大模型收益更大。最后,我们的方法在使用模型生成的解释时同样有效,这表明其可适用于更多无需人工编写解释的数据集。