Factual Self-Awareness in Language Models: Representation, Robustness, and Scaling

Hovhannes Tamoyan, Subhabrata Dutta, Iryna Gurevych
5/27/2025
cs.CLcs.AIcs.LG

No official code found. Best implementation: UKPLab/arxiv2025-self-awareness (3 stars, Apache-2.0, last commit 2025-05-28).

Abstract

Factual incorrectness in generated content is one of the primary concerns in ubiquitous deployment of large language models (LLMs). Prior findings suggest LLMs can (sometimes) detect factual incorrectness in their generated content (i.e., fact-checking post-generation). In this work, we provide evidence supporting the presence of LLMs' internal compass that dictate the correctness of factual recall at the time of generation. We demonstrate that for a given subject entity and a relation, LLMs internally encode linear features in the Transformer's residual stream that dictate whether it will be able to recall the correct attribute (that forms a valid entity-relation-attribute triplet). This self-awareness signal is robust to minor formatting variations. We investigate the effects of context perturbation via different example selection strategies. Scaling experiments across model sizes and training dynamics highlight that self-awareness emerges rapidly during training and peaks in intermediate layers. These findings uncover intrinsic self-monitoring capabilities within LLMs, contributing to their interpretability and reliability.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Factual Self-Awareness in Language Models: Representation, Robustness, and Scaling

30PythonMay 20, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{tamoyan2025factual,
  title  = {Factual Self-Awareness in Language Models: Representation, Robustness, and Scaling},
  author = {Hovhannes Tamoyan and Subhabrata Dutta and Iryna Gurevych},
  year   = {2025},
  eprint = {2505.21399},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.21399v1}
}

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/2505.21399.svg)](https://codeofpaper.com/paper/2505.21399)

Discussion