DoLa: Decoding by Contrasting Layers Improves Factuality in Large
  Language Models
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.
64fa833ec367f7b1caba956d
Yung-Sung Chuang
extracted_confirmed
2023-09-08T03:40:31.909Z
5df84571da6d0311fd3d5407
https://cdn-avatars.huggingface.co/v1/production/uploads/1650651305661-5df84571da6d0311fd3d5407.png
Yung-Sung Chuang
user
voidism
64fa833ec367f7b1caba956e
Yujia Xie
admin_assigned
2023-09-08T11:28:10.177Z
62cdb0bc3529c21a2283bc19
/avatars/414dccde596e4a401163814b1f3ca156.svg
Yujia Xie
user
xieyujia
64fa833ec367f7b1caba956f
Hongyin Luo
admin_assigned
2023-09-08T11:28:49.522Z
62bc495016897fa76cdcda18
https://cdn-avatars.huggingface.co/v1/production/uploads/1656506661693-noauth.jpeg
Hongyin Luo
user
luohy
64fa833ec367f7b1caba9570
Yoon Kim
64fa833ec367f7b1caba9571
James Glass
64fa833ec367f7b1caba9572
Pengcheng He
admin_assigned
2023-09-08T11:29:54.895Z
5efd09cf49ed724c8a135868
/avatars/af12bc94657979677a9f26183f0c9727.svg
Pengcheng He
user
DeBERTa
DoLa: Decoding by Contrasting Layers Improves Factuality in Large
  Language Models
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.
A decoding strategy that contrasts logits from different transformer layers reduces hallucinations in large language models without external knowledge or fine-tuning.
large language models LLMs hallucinations decoding strategy logits vocabulary space transformer layers factual knowledge Decoding by Contrasting Layers DoLa TruthfulQA