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

数据分布特性驱动Transformers中的上下文学习

Data Distributional Properties Drive Emergent In-Context Learning in Transformers

DeepMind(深度思维);University College London(伦敦大学学院);Stanford University(斯坦福大学)

Stephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang, Aaditya Singh, Pierre H. Richemond, Jay McClelland, Felix Hill

摘要:

大型的基于transformer的模型能够执行上下文内的少样本学习,而无需进行明确的训练。这一观察提出了一个问题:训练机制的哪些方面导致了这种涌现行为?在这里,我们表明,这种行为是由训练数据本身的分布。当训练数据表现出特定的分布特性时,上下文学习就出现了,例如突发性(项目出现在集群中,而不是随时间均匀分布)和具有大量很少出现的类。上下文学习也出现更强烈的项目的含义或解释是动态的,而不是固定。这些属性由自然语言举例说明,但也是在广泛的其他领域的自然数据所固有的。它们也明显偏离了制服,i.i.d.通常用于标准监督学习的训练分布。在我们最初的实验中,我们发现,上下文学习与更传统的基于权重的学习相权衡,模型无法同时实现两者。然而,我们后来的实验发现,这两种学习模式可以共存于一个模型中,当它在遵循倾斜齐普菲分布的数据上进行训练时,这是自然主义数据的另一个共同属性,包括语言。在进一步的实验中,我们发现自然主义的数据分布只能在Transformers中引发上下文学习,而不是在循环模型中。总而言之,我们的研究结果表明,Transformer架构如何与训练数据的特定属性一起工作,以驱动大语言模型的有趣的新兴上下文学习行为,以及未来的工作如何鼓励上下文学习和加权学习语言以外的领域。

英文摘要:

Large transformer-based models are able to perform in-context few-shot learning, without being explicitly trained for it. This observation raises the question: what aspects of the training regime lead to this emergent behavior? Here, we show that this behavior is driven by the distributions of the training data itself. In-context learning emerges when the training data exhibits particular distributional properties such as burstiness (items appear in clusters rather than being uniformly distributed over time) and having large numbers of rarely occurring classes. In-context learning also emerges more strongly when item meanings or interpretations are dynamic rather than fixed. These properties are exemplified by natural language, but are also inherent to naturalistic data in a wide range of other domains. They also depart significantly from the uniform, i.i.d. training distributions typically used for standard supervised learning. In our initial experiments, we found that in-context learning traded off against more conventional weight-based learning, and models were unable to achieve both simultaneously. However, our later experiments uncovered that the two modes of learning could co-exist in a single model when it was trained on data following a skewed Zipfian distribution -- another common property of naturalistic data, including language. In further experiments, we found that naturalistic data distributions were only able to elicit in-context learning in transformers, and not in recurrent models. In sum, our findings indicate how the transformer architecture works together with particular properties of the training data to drive the intriguing emergent in-context learning behaviour of large language models, and how future work might encourage both in-context and in-weights learning in domains beyond language.

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

↑