O Feitiço de Desbloqueio em LLMs Base: Repensando o Alinhamento por meio da Aprendizagem em Contexto
The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning
December 4, 2023
Autores: Bill Yuchen Lin, Abhilasha Ravichander, Ximing Lu, Nouha Dziri, Melanie Sclar, Khyathi Chandu, Chandra Bhagavatula, Yejin Choi
cs.AI
Resumo
O processo de ajuste de alinhamento de grandes modelos de linguagem (LLMs, na sigla em inglês) geralmente envolve o aprendizado de instruções por meio de ajuste fino supervisionado (SFT, na sigla em inglês) e o ajuste de preferências via aprendizado por reforço com feedback humano (RLHF, na sigla em inglês). Um estudo recente, LIMA (Zhou et al. 2023), mostra que o uso de apenas 1.000 exemplos para SFT também pode alcançar um desempenho significativo de alinhamento, sugerindo que o efeito do ajuste de alinhamento pode ser "superficial". Isso levanta questões sobre como exatamente o ajuste de alinhamento transforma um LLM base.
Analisamos o efeito do ajuste de alinhamento examinando a mudança na distribuição de tokens entre LLMs base e suas versões alinhadas. Nossas descobertas revelam que LLMs base e suas versões ajustadas para alinhamento têm desempenho quase idêntico na decodificação na maioria das posições de tokens. A maioria das mudanças na distribuição ocorre com tokens estilísticos. Essas evidências diretas apoiam fortemente a Hipótese de Alinhamento Superficial sugerida pelo LIMA.
Com base nessas descobertas, repensamos o alinhamento de LLMs ao propor a questão de pesquisa: quão efetivamente podemos alinhar LLMs base sem SFT ou RLHF? Para abordar isso, introduzimos um método simples e sem ajuste de alinhamento, chamado URIAL. O URIAL alcança um alinhamento eficaz puramente por meio de aprendizado em contexto (ICL, na sigla em inglês) com LLMs base, exigindo apenas três exemplos estilísticos constantes e um prompt de sistema. Realizamos uma avaliação detalhada e interpretável em um conjunto diversificado de exemplos, chamado JUST-EVAL-INSTRUCT. Os resultados demonstram que LLMs base com URIAL podem igualar ou até superar o desempenho de LLMs alinhados com SFT ou SFT+RLHF. Mostramos que a diferença entre métodos de alinhamento sem ajuste e com ajuste pode ser significativamente reduzida por meio de prompts estratégicos e ICL. Nossas descobertas sobre a natureza superficial do ajuste de alinhamento e os resultados com URIAL sugerem que uma análise mais profunda e um entendimento teórico do alinhamento são cruciais para pesquisas futuras com LLMs.
English
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.