通过双表示空间编码弥合上下文学习与权重学习
Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding
AI总结:
本文提出CoQE架构,通过分离上下文与样本到不同空间,解决上下文学习与权重学习的冲突,提升单值回答性能。
摘要:
在上下文学习(ICL)中,Transformer在多样化序列任务上展现出有价值的能力。然而,先前研究发现ICL常与模型固有的权重学习(IWL)能力产生冲突。通过分析玩具模型在合成实验中学习的表示空间,我们识别出Transformer中上下文和样本共享的编码空间可能是冲突的根源。为此,我们修改模型架构,将上下文和样本分别编码到两个不同的空间:任务表示空间和样本表示空间。我们在这两个空间下采用简单而原则性的框架,假设线性表示结构,并将它们视为一对双空间。理论分析和实证结果证明了我们提出的架构CoQE在单值回答设置中的有效性。它不仅通过改进的表示学习提升了ICL性能,还成功在合成少样本分类和新设计的伪算术任务中弥合了ICL和IWL能力。代码:https://github.com/McGuinnessChen/dual-representation-space-encoding
英文摘要:
In-context learning (ICL) is a valuable capability exhibited by Transformers pretrained on diverse sequence tasks. However, previous studies have observed that ICL often conflicts with the model's inherent in-weight learning (IWL) ability. By examining the representation space learned by a toy model in synthetic experiments, we identify the shared encoding space for context and samples in Transformers as a potential source of this conflict. To address this, we modify the model architecture to separately encode the context and samples into two distinct spaces: a task representation space and a sample representation space. We model these two spaces under a simple yet principled framework, assuming a linear representational structure and treating them as a pair of dual spaces. Both theoretical analysis and empirical results demonstrate the effectiveness of our proposed architecture, CoQE, in the single-value answer setting. It not only enhances ICL performance through improved representation learning, but also successfully reconciles ICL and IWL capabilities across synthetic few-shot classification and a newly designed pseudo-arithmetic task. Code: https://github.com/McGuinnessChen/dual-representation-space-encoding
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。