Leveraging Graph Structures to Detect Hallucinations in Large Language Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nonkes, Noa, Agaronian, Sergei, Kanoulas, Evangelos, Petcu, Roxana
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914859587731456
author Nonkes, Noa
Agaronian, Sergei
Kanoulas, Evangelos
Petcu, Roxana
author_facet Nonkes, Noa
Agaronian, Sergei
Kanoulas, Evangelos
Petcu, Roxana
contents Large language models are extensively applied across a wide range of tasks, such as customer support, content creation, educational tutoring, and providing financial guidance. However, a well-known drawback is their predisposition to generate hallucinations. This damages the trustworthiness of the information these models provide, impacting decision-making and user confidence. We propose a method to detect hallucinations by looking at the structure of the latent space and finding associations within hallucinated and non-hallucinated generations. We create a graph structure that connects generations that lie closely in the embedding space. Moreover, we employ a Graph Attention Network which utilizes message passing to aggregate information from neighboring nodes and assigns varying degrees of importance to each neighbor based on their relevance. Our findings show that 1) there exists a structure in the latent space that differentiates between hallucinated and non-hallucinated generations, 2) Graph Attention Networks can learn this structure and generalize it to unseen generations, and 3) the robustness of our method is enhanced when incorporating contrastive learning. When evaluated against evidence-based benchmarks, our model performs similarly without access to search-based methods.
format Preprint
id arxiv_https___arxiv_org_abs_2407_04485
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Leveraging Graph Structures to Detect Hallucinations in Large Language Models
Nonkes, Noa
Agaronian, Sergei
Kanoulas, Evangelos
Petcu, Roxana
Computation and Language
Machine Learning
Large language models are extensively applied across a wide range of tasks, such as customer support, content creation, educational tutoring, and providing financial guidance. However, a well-known drawback is their predisposition to generate hallucinations. This damages the trustworthiness of the information these models provide, impacting decision-making and user confidence. We propose a method to detect hallucinations by looking at the structure of the latent space and finding associations within hallucinated and non-hallucinated generations. We create a graph structure that connects generations that lie closely in the embedding space. Moreover, we employ a Graph Attention Network which utilizes message passing to aggregate information from neighboring nodes and assigns varying degrees of importance to each neighbor based on their relevance. Our findings show that 1) there exists a structure in the latent space that differentiates between hallucinated and non-hallucinated generations, 2) Graph Attention Networks can learn this structure and generalize it to unseen generations, and 3) the robustness of our method is enhanced when incorporating contrastive learning. When evaluated against evidence-based benchmarks, our model performs similarly without access to search-based methods.
title Leveraging Graph Structures to Detect Hallucinations in Large Language Models
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2407.04485