卸下辅助轮:面向有效对齐的渐进式上下文学习
Take Off the Training Wheels Progressive In-Context Learning for Effective Alignment
AI总结:
本文揭示 ICL 示例通过分隔符 token 注入任务函数,并提出两阶段免训练 PICA,用提取的 ICL 向量实现零样本对齐,在降低时间成本的同时提升性能。
摘要:
近期研究探索了 In-Context Learning(ICL,上下文学习)的工作机制。然而,这些研究主要关注分类和简单生成任务,限制了其在实践中向更复杂生成任务的广泛应用。为弥补这一差距,我们研究了在实际对齐任务中示例对 token 表示的影响。我们发现,transformer 会将从示例中学到的任务函数嵌入到分隔符 token 表示中,而该表示在先前响应 token 的生成中发挥重要作用。一旦先前响应 token 被确定,示例就会变得冗余。受这一发现启发,我们提出了一种高效的 Progressive In-Context Alignment(PICA,渐进式上下文对齐)方法,该方法由两个阶段组成。在第一个少样本阶段,模型通过标准 ICL 生成若干先前响应 token,同时从分隔符 token 表示中提取存储任务函数的 ICL 向量。在随后的零样本阶段,该 ICL 向量引导模型生成响应,而无需进一步提供示例。大量实验表明,我们的 PICA 不仅优于原始 ICL,而且取得了与其他对齐微调方法相当的性能。所提出的免训练方法降低了时间成本(例如 5.45+),同时提升了对齐性能(例如 6.57+)。因此,我们的工作凸显了 ICL 在对齐中的应用,并呼吁更深入地理解 ICL 在复杂生成中的作用。代码将在 https://github.com/HITsz-TMG/PICA 提供。
英文摘要:
Recent studies have explored the working mechanisms of In-Context Learning (ICL). However, they mainly focus on classification and simple generation tasks, limiting their broader application to more complex generation tasks in practice. To address this gap, we investigate the impact of demonstrations on token representations within the practical alignment tasks. We find that the transformer embeds the task function learned from demonstrations into the separator token representation, which plays an important role in the generation of prior response tokens. Once the prior response tokens are determined, the demonstrations become redundant.Motivated by this finding, we propose an efficient Progressive In-Context Alignment (PICA) method consisting of two stages. In the first few-shot stage, the model generates several prior response tokens via standard ICL while concurrently extracting the ICL vector that stores the task function from the separator token representation. In the following zero-shot stage, this ICL vector guides the model to generate responses without further demonstrations.Extensive experiments demonstrate that our PICA not only surpasses vanilla ICL but also achieves comparable performance to other alignment tuning methods. The proposed training-free method reduces the time cost (e.g., 5.45+) with improved alignment performance (e.g., 6.57+). Consequently, our work highlights the application of ICL for alignment and calls for a deeper understanding of ICL for complex generations. The code will be available at https://github.com/HITsz-TMG/PICA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。