Skip to main content
QUICK REVIEW

[论文解读] The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning

Bill Yuchen Lin, Abhilasha Ravichander|arXiv (Cornell University)|Dec 4, 2023
Topic ModelingComputer Science被引用 9
一句话总结

论文认为对齐调优可能在很大程度上是表面的,显示基础 LLMs 编码了大部分知识,并引入 Urial,一种无调优的在-context 对齐方法,能够在最小提示下匹配或超过使用最小提示的 SFT/RLHF 对齐模型。

ABSTRACT

The alignment tuning process of large language models (LLMs) typically involves instruction learning through supervised fine-tuning (SFT) and preference tuning via reinforcement learning from human feedback (RLHF). A recent study, LIMA (Zhou et al. 2023), shows that using merely 1K examples for SFT can achieve significant alignment performance as well, suggesting that the effect of alignment tuning might be "superficial." This raises questions about how exactly the alignment tuning transforms a base LLM. We analyze the effect of alignment tuning by examining the token distribution shift between base LLMs and their aligned counterpart. Our findings reveal that base LLMs and their alignment-tuned versions perform nearly identically in decoding on the majority of token positions. Most distribution shifts occur with stylistic tokens. These direct evidence strongly supports the Superficial Alignment Hypothesis suggested by LIMA. Based on these findings, we rethink the alignment of LLMs by posing the research question: how effectively can we align base LLMs without SFT or RLHF? To address this, we introduce a simple, tuning-free alignment method, URIAL. URIAL achieves effective alignment purely through in-context learning (ICL) with base LLMs, requiring as few as three constant stylistic examples and a system prompt. We conduct a fine-grained and interpretable evaluation on a diverse set of examples, named JUST-EVAL-INSTRUCT. Results demonstrate that base LLMs with URIAL can match or even surpass the performance of LLMs aligned with SFT or SFT+RLHF. We show that the gap between tuning-free and tuning-based alignment methods can be significantly reduced through strategic prompting and ICL. Our findings on the superficial nature of alignment tuning and results with URIAL suggest that deeper analysis and theoretical understanding of alignment is crucial to future LLM research.

研究动机与目标

  • Investigate how alignment tuning (SFT and RLHF) changes base LLM behavior by analyzing token distribution shifts between base and aligned models.
  • Assess whether base LLMs can be effectively aligned without tuning using in-context learning.
  • Propose and evaluate Urial, a tuning-free alignment method that relies on restyled in-context demonstrations and a system prompt.
  • Provide an interpretable, multi-aspect evaluation protocol to compare alignment methods on diverse tasks.

提出的方法

  • Analyze token distribution shifts between base LLMs and aligned counterparts to understand what alignment tuning changes.
  • Develop Urial, a tuning-free alignment method using in-context learning with three constant stylistic examples plus a system prompt.
  • Create and use the just-eval-instruct dataset (1,000 instructions from 9 sources) to evaluate six aspects of output quality.
  • Implement six-aspect evaluation templates evaluated via GPT-4 and ChatGPT with human verification.
  • Compare Urial against SFT, RLHF, vanilla ICL, and retrieval-augmented ICL across multiple base-models.
  • Report both quantitative scores and qualitative observations about knowledge retention and safety behaviors.
Figure 1: Comparisons of alignment performance on different aspects.
Figure 1: Comparisons of alignment performance on different aspects.

实验结果

研究问题

  • RQ1对齐调优是否主要改变风格化的标记,而非知识内容?
  • RQ2是否可以通过上下文学习和提示在不进行任何调优的情况下有效对齐基础 LLM?
  • RQ3Urial 在不同模型与任务上与传统的基于调优的对齐方法相比如何?

主要发现

  • 对齐调优只影响很小一部分标记;大部分与知识相关的内容与基础 LLM 共享。
  • 风格化和安全相关的标记在对齐过程中呈现最大的分布偏移。
  • Urial 仅需三个固定的上下文示例和一个系统提示,就能在强大的基础 LLM 上达到或超过 SFT/RLHF 的效果。
  • Urial 在若干设置下可超越 Mistral-7b-Instruct 和 Llama-2-70b-chat-q,缩小与基于调优的方法之间的差距。
  • 更细粒度的多维评估支持超越总体分数的细致比较。
  • 较少或更多的上下文示例可以调节安全性等方面,K=3 提供了一个较强的平衡。
Figure 2: Analyzing alignment with token distribution shift. An aligned LLM ( llama-2-chat ) receives a query $\mathbf{q}$ and outputs a response $\mathbf{o}$ . To analyze the effect of alignment tuning, we decode the untuned version ( llama-2-base ) at each position $t$ . Next, we categorize all to
Figure 2: Analyzing alignment with token distribution shift. An aligned LLM ( llama-2-chat ) receives a query $\mathbf{q}$ and outputs a response $\mathbf{o}$ . To analyze the effect of alignment tuning, we decode the untuned version ( llama-2-base ) at each position $t$ . Next, we categorize all to

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。