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

在存在虚假相关性时的上下文学习

In-context Learning in Presence of Spurious Correlations

Google DeepMind(谷歌DeepMind);ServiceTitan;YerevaNN;Yerevan State University(埃里温国立大学)

Hrayr Harutyunyan, Rafayel Darbinyan, Samvel Karapetyan, Hrant Khachatrian

AI总结:

本文研究了在存在虚假特征时训练上下文学习器的可行性,提出了一种新方法,该方法在分类任务中表现优异,但泛化能力有限。

摘要:

大型语言模型表现出显著的上下文学习能力,即在给定少量示例的情况下学习解决任务。最近的研究表明,转换器可以被训练以在上下文中执行简单的回归任务。本文探讨了训练分类任务的上下文学习器的可能性,涉及虚假特征。我们发现,传统的上下文学习器训练方法容易受到虚假特征的影响。此外,当元训练数据集仅包含一种任务的实例时,传统方法会导致任务记忆化,并无法产生利用上下文进行预测的模型。基于这些观察,我们提出了一种新的技术来训练此类学习器以完成给定的分类任务。值得注意的是,这种上下文学习器在匹配和有时超越强方法如ERM和GroupDRO方面表现优异。然而,与这些算法不同,它在其他任务上泛化能力较差。我们展示了通过在合成上下文学习实例的多样化数据集上训练,可以获得能够泛化到未见过的任务的上下文学习器。

英文摘要:

Large language models exhibit a remarkable capacity for in-context learning, where they learn to solve tasks given a few examples. Recent work has shown that transformers can be trained to perform simple regression tasks in-context. This work explores the possibility of training an in-context learner for classification tasks involving spurious features. We find that the conventional approach of training in-context learners is susceptible to spurious features. Moreover, when the meta-training dataset includes instances of only one task, the conventional approach leads to task memorization and fails to produce a model that leverages context for predictions. Based on these observations, we propose a novel technique to train such a learner for a given classification task. Remarkably, this in-context learner matches and sometimes outperforms strong methods like ERM and GroupDRO. However, unlike these algorithms, it does not generalize well to other tasks. We show that it is possible to obtain an in-context learner that generalizes to unseen tasks by training on a diverse dataset of synthetic in-context learning instances.

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

↑