提出无需训练的渐进式提示对齐方法,提升复杂生成任务效果
Take Off the Training Wheels Progressive In-Context Learning for Effective Alignment
- 分两阶段:先用少量示例生成响应前缀,再用提取的任务向量零样本生成
- 在多个对齐任务上优于原始提示学习,性能接近微调方法
- 无需额外训练,显著降低推理时间,适合快速部署于复杂生成场景
近期研究多聚焦于分类和简单生成任务中的上下文学习(ICL)机制,难以推广至更复杂的实际对齐任务。本文通过分析演示对令牌表示的影响发现,Transformer 将从演示中学到的任务函数嵌入到分隔符令牌表示中,该表示在生成前置响应令牌时起关键作用;一旦前置令牌确定,演示即变得冗余。基于此,我们提出无需训练的渐进式上下文对齐方法(PICA),包含两个阶段:在少样本阶段,模型通过标准 ICL 生成若干前置响应令牌,并同时从分隔符表示中提取存储任务函数的 ICL 向量;在零样本阶段,仅使用该 ICL 向量生成后续响应,无需进一步演示。大量实验表明,PICA 不仅超越原始 ICL,且性能可媲美其他对齐微调方法。该训练无关方法将推理时间减少 5.45 倍以上,同时对齐性能提升 6.57 以上。本工作强调了 ICL 在复杂生成任务中的应用潜力,并呼吁深入理解其工作机制。代码将于 https://github.com/HITsz-TMG/PICA 公开。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。