Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Hallucination Detection in LLMs: Using Bayesian Neural Network Ensembling
Uppsala University, Disciplinary Domain of Science and Technology, Mathematics and Computer Science, Department of Information Technology, Division of Systems and Control.
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

Large language models often hallucinate, producing outputs that appear plausible but lack factual support or deviate from given instructions. This thesis investigates methods for detecting these hallucinations, focusing on uncertainty estimation and the innovative use of memory-efficient deep ensembles of large language models to enhance computational efficiency. Additionally, noise injection is employed to increase diversity among ensemble members, resulting in more reliable uncertainty estimates. Our deep ensemble leverages pre-trained weights to reduce the costs associated with pretraining, which can be prohibitive, especially for an ensemble of large models. Instead, our method involves finetuning from already pre-trained weights. Our findings suggest that our ensemble converges more effectively than a single model. In addition, our model showcases more sophisticated uncertainty estimates compared to the baseline, a sample-based method. Our results demonstrate a 96% accuracy in detecting faithfulness hallucinations on the SQuAD 2.0 dataset, compared to the baseline, which only achieves an 87% accuracy. Furthermore, our findings suggest that detecting out-of-distribution data points is a more challenging task than detecting hallucinations of in-distribution data points. This strengthens the argument that large language models have some inherent understanding of when they are generating hallucinated content.

Place, publisher, year, edition, pages
2024. , p. 74
Series
IT ; mDA 24 009
Keywords [en]
Large Language Models, Uncertainty Estimation, Hallucination Detection, Memory-Efficient Deep Ensembles
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:uu:diva-535921OAI: oai:DiVA.org:uu-535921DiVA, id: diva2:1887965
Educational program
Master's Programme in Data Science
Supervisors
Examiners
Available from: 2024-08-12 Created: 2024-08-10 Last updated: 2024-08-12Bibliographically approved

Open Access in DiVA

fulltext(4130 kB)1799 downloads
File information
File name FULLTEXT01.pdfFile size 4130 kBChecksum SHA-512
b8229e41c9bc5b46a18131bb42e54a537119692a505f65e089cb6eadb05d8fa83f5c156b301b7928de06e694795987c0dae4b7e6072810461f83fa3fa8e0db00
Type fulltextMimetype application/pdf

By organisation
Division of Systems and Control
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 1801 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 2093 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf