Look Within, Why LLMs Hallucinate: A Causal Perspective

He Li, Haoang Chi, Mingyu Liu, Wenjing Yang
7/14/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

The emergence of large language models (LLMs) is a milestone in generative artificial intelligence, achieving significant success in text comprehension and generation tasks. Despite the tremendous success of LLMs in many downstream tasks, they suffer from severe hallucination problems, posing significant challenges to the practical applications of LLMs. Most of the works about LLMs' hallucinations focus on data quality. Self-attention is a core module in transformer-based LLMs, while its potential relationship with LLMs' hallucination has been hardly investigated. To fill this gap, we study this problem from a causal perspective. We propose a method to intervene in LLMs' self-attention layers and maintain their structures and sizes intact. Specifically, we disable different self-attention layers in several popular open-source LLMs and then compare their degrees of hallucination with the original ones. We evaluate the intervened LLMs on hallucination assessment benchmarks and conclude that disabling some specific self-attention layers in the front or tail of the LLMs can alleviate hallucination issues. The study paves a new way for understanding and mitigating LLMs' hallucinations.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024look,
  title  = {Look Within, Why LLMs Hallucinate: A Causal Perspective},
  author = {He Li and Haoang Chi and Mingyu Liu and Wenjing Yang},
  year   = {2024},
  eprint = {2407.10153},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.10153v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.10153.svg)](https://codeofpaper.com/paper/2407.10153)

Discussion