一般化
计算机科学
变压器
人工智能
作文(语言)
代表(政治)
机器学习
自然语言处理
数学
语言学
工程类
数学分析
哲学
电气工程
电压
政治
法学
政治学
作者
Jiajun Song,Zhuoyan Xu,Yiqiao Zhong
标识
DOI:10.1073/pnas.2417182122
摘要
Large language models (LLMs) such as GPT-4 sometimes appear to be creative, solving novel tasks often with a few demonstrations in the prompt. These tasks require the models to generalize on distributions different from those from training data—which is known as out-of-distribution (OOD) generalization. Despite the tremendous success of LLMs, how they approach OOD generalization remains an open and underexplored question. We examine OOD generalization in settings where instances are generated according to hidden rules, including in-context learning with symbolic reasoning. Models are required to infer the hidden rules behind input prompts without any fine-tuning. We empirically examined the training dynamics of Transformers on a synthetic example and conducted extensive experiments on a variety of pretrained LLMs, focusing on a type of component known as induction heads. We found that OOD generalization and composition are tied together—models can learn rules by composing two self-attention layers, thereby achieving OOD generalization. Furthermore, a shared latent subspace in the embedding (or feature) space acts as a bridge for composition by aligning early layers and later layers, which we refer to as the common bridge representation hypothesis.
科研通智能强力驱动
Strongly Powered by AbleSci AI