Title: A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepedia

Abstract: Large language models (LLMs) have an impressive ability to draw on novel information supplied in their context. Yet the mechanisms underlying this contextual grounding remain unknown, especially in situations where contextual information contradicts factual knowledge stored in the parameters, which LLMs also excel at recalling. Favoring the contextual information is critical for retrieval-augmented generation methods, which enrich the context with up-to-date information, hoping that grounding can rectify outdated or noisy stored knowledge. We present a novel method to study grounding abilities using Fakepedia, a novel dataset of counterfactual texts constructed to clash with a model's internal parametric knowledge. In this study, we introduce Fakepedia, a counterfactual dataset designed to evaluate grounding abilities when the internal parametric knowledge clashes with the contextual information. We benchmark various LLMs with Fakepedia and conduct a causal mediation analysis of LLM components when answering Fakepedia queries, based on our Masked Grouped Causal Tracing (MGCT) method. Through this analysis, we identify distinct computational patterns between grounded and ungrounded responses. We finally demonstrate that distinguishing grounded from ungrounded responses is achievable through computational analysis alone. Our results, together with existing findings about factual recall mechanisms, provide a coherent narrative of how grounding and factual recall mechanisms interact within LLMs.

Comments: Accepted at ACL 2024 (main conference)
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2312.02073 [cs.CL]
(or arXiv:2312.02073v3 [cs.CL] for this version)
https://doi.org/10.48550/arXiv.2312.02073

Focus to learn more

arXiv-issued DOI via DataCite

Submission history

From: Giovanni Monea [view email]
[v1] Mon, 4 Dec 2023 17:35:42 UTC (7,449 KB)
[v2] Tue, 20 Feb 2024 17:27:17 UTC (7,816 KB)
[v3] Tue, 11 Jun 2024 02:37:23 UTC (510 KB)

Full-text links:

Access Paper:

View a PDF of the paper titled A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepedia, by Giovanni Monea and 8 other authors