Do Language Models Have Beliefs? Methods for Detecting, Updating, and Visualizing Model Beliefs

Peter Hase, Mona T. Diab, Asli Celikyilmaz, Xian Li, Zornitsa Kozareva, Veselin Stoyanov, Mohit Bansal, Srinivasan IyerarXiv 2021

Abstract

Do language models have beliefs about the world? Dennett (1995) famously argues that even thermostats have beliefs, on the view that a belief is simply an informational state decoupled from any motivational state. In this paper, we discuss approaches to detecting when models have beliefs about the world, and we improve on methods for updating model beliefs to be more truthful, with a focus on methods based on learned optimizers or hypernetworks. Our main contributions include: (1) new metrics for evaluating belief-updating methods that focus on the logical consistency of beliefs, (2) a training objective for Sequential, Local, and Generalizing model updates (SLAG) that improves the performance of learned optimizers, and (3) the introduction of the belief graph, which is a new form of interface with language models that shows the interdependencies between model beliefs. Our experiments suggest that models possess belief-like qualities to only a limited extent, but update methods can both fix incorrect model beliefs and greatly improve their consistency. Although off-the-shelf optimizers are surprisingly strong belief-updating baselines, our learned optimizers can outperform them in more difficult settings than have been considered in past work.

Introduction

As Large Language Models (LLMs) are increasingly deployed as primary knowledge bases, the ability to "edit" their internal states becomes critical. Whether fixing a hallucination, updating outdated facts, or removing toxic associations, developers need methods that go beyond changing a single output in isolation.

This paper investigates whether LLMs possess "beliefs"—informational states that are recombinable and logically consistent. Current model editing research often resets the model after a single change, failing to account for the real-world need for sequential updates and logical consistency. We argue that if a model learns "A is B," it should inherently understand that "B is A." However, our findings reveal that current models are surprisingly fragile and logically inconsistent when their internal knowledge is modified.

Methods and the SLAG Objective

We build upon the KnowledgeEditor (KE), a hypernetwork designed to predict weight shifts for specific output changes. To address the limitations of existing methods, we introduce three major innovations:

  1. The SLAG Objective: Standing for Sequential, Local, and Generalizing, this training method enables an optimizer to handle multiple updates in a row. It utilizes a training loop that simulates the model's state after several successive edits, forcing the system to learn how to maintain stability over time.
  2. Consistency Metrics: We move beyond simple success rates to measure Paraphrase Consistency (stability across different phrasings), Entailment/Contrapositive Accuracy (logical follow-through), and Local Neutrality (ensuring unrelated facts remain untouched).
  3. Belief Graphs: We introduce a visualization tool where nodes represent individual beliefs. An edge exists between Belief A and Belief B if updating A triggers a change in the model’s prediction for B, revealing the hidden interdependencies of model knowledge.
Conceptual framework for belief updating and the relationships between data types.

Datasets

To rigorously test these belief properties, we utilize four diverse datasets:

  • FEVER: Fact verification involving True/False claims.
  • zsRE (Zero-Shot Relation Extraction): Question-answering based on Wikipedia relations.
  • LeapOfThought: Designed to test logical entailment (e.g., "A is a B; all Bs have Cs; therefore A has C").
  • Wikidata5m: A new benchmark for "Local Neutrality," ensuring updates to one relation for an entity do not corrupt unrelated data for that same entity.
Examples of inputs and labels across the four evaluation datasets.

Key Insights and Results

Our experiments with models in the 100M-140M parameter range (RoBERTa and BART) yield several critical insights:

  • LMs are "Weak Believers": Models show limited natural consistency. Paraphrase consistency often falls below 70%, and they struggle significantly with contrapositives (understanding that if A implies B, then not-B implies not-A).
  • The Difficulty of Sequential Editing: Most existing methods fail when updating more than two facts consecutively. Errors compound rapidly, causing general accuracy to plummet. However, SLAG significantly outperforms standard optimizers in these settings, improving paraphrase success by 11.02 points on the zsRE dataset.
  • Consistency Boost: SLAG does more than change a target fact; it improves internal logic. On Wikidata5m, paraphrase consistency for updated points rose from approximately 25% to over 84%.
  • Belief Interconnectivity: Belief Graphs reveal that model knowledge is highly interconnected. Certain "influencer" beliefs, when modified, can flip the model's stance on hundreds of seemingly unrelated topics.

Limitations and Future Work

While SLAG and Belief Graphs provide a new lens for model editing, challenges remain. The computational cost of building full Belief Graphs is high ($N^2$ evaluations), and the underlying reasons for some belief connections remain opaque. Future research will focus on scaling these methods to larger LLMs and exploring how uncertainty and probability influence belief updates.

Summary updated

BibTeX
@misc{hase2021do,
  author = {Peter Hase and Mona T. Diab and Asli Celikyilmaz and Xian Li and Zornitsa Kozareva and Veselin Stoyanov and Mohit Bansal and Srinivasan Iyer},
  title = {{Do Language Models Have Beliefs? Methods for Detecting, Updating, and Visualizing Model Beliefs}},
  year = {2021},
  eprint = {2111.13654},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.13654},
}
Figure