DoLa: 계층 간 대비를 통한 디코딩이 대규모 언어 모델의 사실성 향상에 미치는 영향
DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models
September 7, 2023
저자: Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James Glass, Pengcheng He
cs.AI
초록
인상적인 성능에도 불구하고, 대규모 언어 모델(LLMs)은 환각 현상, 즉 사전 학습 중 접한 사실과 벗어난 내용을 생성하는 경향이 있습니다. 본 연구에서는 사전 학습된 LLMs의 환각 현상을 줄이기 위한 간단한 디코딩 전략을 제안합니다. 이 전략은 외부 지식을 검색하여 조건을 설정하거나 추가적인 미세 조정을 필요로 하지 않습니다. 우리의 접근법은 LLMs에서 사실적 지식이 일반적으로 특정 트랜스포머 계층에 국한되어 있다는 점을 활용하여, 후반 계층과 초반 계층을 어휘 공간에 투영하여 얻은 로짓(logits)의 차이를 대조함으로써 다음 토큰 분포를 얻습니다. 이 계층 대조 디코딩(Decoding by Contrasting Layers, DoLa) 접근법은 사실적 지식을 더 잘 표면화하고 잘못된 사실의 생성을 줄일 수 있음을 발견했습니다. DoLa는 다중 선택 과제와 자유 형성 과제에서 진실성을 일관되게 향상시켰으며, 예를 들어 TruthfulQA에서 LLaMA 계열 모델의 성능을 12-17% 절대 점수로 향상시켜, LLMs가 신뢰할 수 있는 진실한 사실을 생성하는 데 있어 그 잠재력을 입증했습니다.
English
Despite their impressive capabilities, large language models (LLMs) are prone
to hallucinations, i.e., generating content that deviates from facts seen
during pretraining. We propose a simple decoding strategy for reducing
hallucinations with pretrained LLMs that does not require conditioning on
retrieved external knowledge nor additional fine-tuning. Our approach obtains
the next-token distribution by contrasting the differences in logits obtained
from projecting the later layers versus earlier layers to the vocabulary space,
exploiting the fact that factual knowledge in an LLMs has generally been shown
to be localized to particular transformer layers. We find that this Decoding by
Contrasting Layers (DoLa) approach is able to better surface factual knowledge
and reduce the generation of incorrect facts. DoLa consistently improves the
truthfulness across multiple choices tasks and open-ended generation tasks, for
example improving the performance of LLaMA family models on TruthfulQA by
12-17% absolute points, demonstrating its potential in making LLMs reliably
generate truthful facts.