Source-linked AI summary

The Curious Case of Hallucinatory (Un)answerability: Finding Truths in the Hidden States of Over-Confident Large Language Models

Aviv Slobodkin, Omer Goldman, Avi Caciularu, Ido Dagan, Shauli Ravfogel

arXiv:2310.11877v2cs.CL

TL;DR

LLMs often hallucinate on (un)answerable questions, raising whether they nevertheless represent answerability internally. The paper tests this with prompt manipulation, beam analysis, probing, and representation erasure, finding strong evidence that answerability is encoded in hidden states. These results suggest latent answerability information could support improved decoding, while the evidence is limited by linear methods and context-based experiments.

  • Problem

    The paper asks whether LLMs represent question answerability when generating hallucinatory answers, despite overconfidence on (un)answerable queries.

    Source: §1 · p. 1
  • Method

    The study combines prompt manipulation, beam scrutiny, linear probing of first-token hidden representations, and answerability-subspace erasure.

    Source: §1 · p. 2, §3.4 · p. 4
  • Results

    The models encode answerability in their representations, with answerability often decodable from the first generated token and alternative beams sometimes acknowledging it.

    Source: §1 · p. 2, §6 · p. 9
  • Takeaways & Limitations

    Latent answerability information may enable decoding methods that improve factual generation on (un)answerable questions.

    Source: §1 · p. 2, §6 · p. 9

    The results are lower bounds because the experiments rely on linear probing and erasure, and they focus on (un)answerability in a given context rather than open-domain settings.

    Source: §7 · p. 9

Abstract

from arXiv · show

Large language models (LLMs) have been shown to possess impressive capabilities, while also raising crucial concerns about the faithfulness of their responses. A primary issue arising in this context is the management of (un)answerable queries by LLMs, which often results in hallucinatory behavior due to overconfidence. In this paper, we explore the behavior of LLMs when presented with (un)answerable queries. We ask: do models represent the fact that the question is (un)answerable when generating a hallucinatory answer? Our results show strong indications that such models encode the answerability of an input query, with the representation of the first decoded token often being a strong indicator. These findings shed new light on the spatial organization within the latent representations of LLMs, unveiling previously unexplored facets of these models. Moreover, they pave the way for the development of improved decoding techniques with better adherence to factual generation, particularly in scenarios where query (un)answerability is a concern.

1 Introduction

The paper asks whether LLMs internally represent question answerability despite producing hallucinatory answers. Across three QA datasets, it finds that prompting for answerability improves detection and that answerability remains decodable from hidden representations.

  • LLMs may encode whether a query is answerable even when they generate a hallucinatory answer.Source: §1 · pp. 1–2
  • Up to 80% performance gains occur on (un)answerable questions when prompts explicitly mention the possibility of (un)answerability.Source: §1 · p. 2
  • Answerability is decodable without prompt guidance through alternative beam responses and linear separation in hidden representations.Source: §1 · p. 2
  • The answerability representation generalizes across QA datasets, as classifiers trained on one dataset can classify questions from others.Source: §1 · p. 2
  • The findings motivate decoding methods that use latent answerability information to improve factual generation.Source: §1 · p. 2

2 Related Work

Related work studies (un)answerability through benchmark construction, prompting, data augmentation, interpretability, probing, decoding, early exiting, and calibration. This paper situates its approach within efforts to reveal or manipulate answerability behavior in language models.

  • SQuAD v2, Natural Questions, and MuSiQue provide benchmarks containing answerable and (un)answerable questions for evaluating this capability.Source: §2 · p. 2
  • Prior studies use few-shot prompting, prompt tuning, and larger instruction-tuning exposure to improve models’ handling of (un)answerable questions.Source: §2 · p. 2
  • Other approaches manipulate predictions through data augmentation or analyze how the supplied data affects answerability detection.Source: §2 · p. 2
  • Interpretability and probing methods analyze or manipulate latent information, while beam search methods use multiple candidate outputs to influence decoding.Source: §2 · p. 2
  • Early exiting and prediction calibration are related efforts to analyze and improve model predictions and output distributions.Source: §2 · p. 2
  • The paper’s prompt variants combine basic instructions with an answerability hint and two exemplars.Source: Figure 2 · p. 3

3 Method

The method tests whether LLMs encode answerability through prompt manipulation, beam relaxation, probing, and representation erasure. These experiments examine both whether the information is present and whether it influences model behavior.

3 Method

  • The paper tests answerability encoding through prompt manipulation, beam scrutiny, and probing with subspace identification and erasure.Source: §3 · p. 3

3.1 Prompt Manipulation

  • Prompt manipulation compares guiding prompts with more instructive prompts that explicitly hint at answerability and recommend how to respond.Source: §3.1 · p. 3
  • The setup includes zero-shot and few-shot prompts, with two exemplars and an (un)answerable exemplar in the hinting condition.Source: §3.1 · p. 3

3.2 Beam Relaxation

  • Beam relaxation increases beam size and replaces the highest-probability response with “unanswerable” when another beam signals answerability.Source: §3.2 · p. 3

3.3 Identifying an Answerability Subspace

  • A logistic-regression probe uses first-generated-token embeddings from the last hidden layer to classify answerable versus (un)answerable queries.Source: §3.3 · p. 3
  • The probing setup compares contextual last-layer representations with initial embeddings that should not encode answerability.Source: §3.3 · p. 3

3.4 Erasing the Answerability Subspace

  • The study focuses on first-token representations because averaging embeddings across generated tokens performed worse on a development set.Source: §3.4 · p. 3
  • Concept erasure projects representations to minimally change them while preventing linear prediction of answerability, then applies the projection at first generation.Source: §3.4 · p. 4

4 Experimental Setup

The experiments evaluate three instruction-finetuned language models on three reading-comprehension benchmarks containing answerable and unanswerable questions. They measure unanswerability classification with F1 and assess whether prompting and hidden representations support this task without harming QA performance.

  • For probing, 1000 training instances per benchmark are balanced between answerable and unanswerable cases, with 800 used to train linear classifiers and the remainder reserved for development.Source: §4 · p. 4
  • The benchmarks are SQuAD 2.0, NATURAL QUESTIONS, and MuSiQue, each containing answerable and unanswerable reading-comprehension instances.NATURAL QUESTIONS uses the annotated long answer as context for answerable cases and a semantically closest non-answer paragraph for unanswerable cases; MuSiQue constructs contexts from aligned or closely linked paragraphs across sub-questions.Source: §4 · pp. 4–5
  • The study evaluates zero-shot and few-shot prompting with regular prompts versus prompts hinting at answerability; few-shot results average three in-context-example variants with standard deviations.Source: Table 2 · p. 5
  • The primary evaluation classifies whether models answer or abstain, using F1 with “unanswerable” as the positive label rather than judging answer correctness.Source: §4 · p. 5
  • Exact match and token-wise F1 on the QA task are also reported to check that the methods do not impair the models’ primary task.Source: §4 · p. 5
  • Three instruction-finetuned models—Flan-T5xxl, Flan-UL2, and OPT-IML—are evaluated across three benchmarks.Source: §4 · pp. 4–5

5 Results

Across zero-shot and few-shot QA, prompting models about (un)answerability improves detection and answer quality, while beam inspection and representation probes reveal latent answerability information. Probing, transfer, and erasure results further support a behaviorally relevant answerability subspace.

5.1.1 Zero-Shot Scenario

  • Up to 80 points of detection improvement follows from hinting at (un)answerability in zero-shot prompts, with hints also reducing model-size effects.Flan-T5xxl surpasses larger counterparts on two of three benchmarks after hinting.Source: §5.1.1 · p. 5
  • Over 50-point gains in exact match and token-wise F1 occur on the combined QA task when prompts include an (un)answerability hint.The overall improvement largely comes from correctly responding to (un)answerable questions, despite average answerable-question drops of 8.3% in F1 and 7.1% in exact match.Source: §5.1.1 · pp. 5–6, Table 3 · p. 6

5.1.2 Few-Shot Scenario

  • Few-shot hints significantly improve (un)answerability identification and QA scores across averaged prompt-example variants.Results average three in-context-example variants and report standard deviations.Source: §5.1.2 · p. 6

5.2 Beam Relaxation

  • Larger beams increasingly contain responses acknowledging (un)answerability, while the most probable response changes negligibly and answerable-question scores degrade only slightly.Figure 3 distinguishes recognition anywhere in the beam from the usual top-beam metric.Source: §5.2 · pp. 6–7, Figure 3 · p. 6
  • Performance decreases on NQ and MuSiQue relative to SQuAD are attributed to distribution shift and greater task difficulty, including MuSiQue’s multi-hop reasoning demand.The authors note that NQ queries are not always conventional questions and that limited multi-hop datasets with (un)answerable questions constrain training.Source: §5.2 · p. 7

5.3 Identifying an Answertability Subspace

  • Linear probes achieve above 75% F1 across models and datasets from first-token last-layer representations, supporting an (un)answerability linear subspace.PCA visualizations separate answerable, correctly recognized (un)answerable, and hallucinated (un)answerable queries; the latter appear between the first two groups.Source: Figure 4 · p. 7, Figure 5 · p. 7, §5.3 · p. 8
  • Cross-dataset transfer remains above uncontextualized first-layer performance, suggesting probes capture an abstract subspace beyond shallow dataset-specific features.Figure 6 reports training datasets by columns and test datasets by rows.Source: §5.3 · p. 8, Figure 6 · p. 8

5.4 Erasing the Answerability Subspace

  • Erasing the answerability subspace lowers Flan-UL2 classification F1 from 50.1 to 31.2 with regular beams and from 65.4 to 32.7 with beam relaxation.The authors interpret this degradation as evidence that the subspace influences answerability-task behavior; Table 5 evaluates QA effects before and after erasure.Source: §5.4 · p. 9, Table 5 · p. 9

6 Conclusion

The paper finds that LMs encode question (un)answerability despite generating over-confident hallucinations. Better prompting, decoding, or auxiliary classifiers may help address this mismatch.

  • Models encode question (un)answerability in hidden states despite often generating hallucinatory answers.Source: §6 · p. 9
  • A beam often contains an answerability-acknowledging response even when the highest-ranked answer is hallucinatory.Source: §6 · p. 9
  • Answerable and (un)answerable questions are linearly separable in the embedding space before answer decoding.Source: §6 · p. 9, Figure 7 · p. 9
  • Better prompting, decoding, or simple auxiliary classification models may mitigate answering (un)answerable questions.Source: §6 · p. 9

7 Limitations

The study covers only a few datasets and models, and its probing and erasure analyses provide lower-bound evidence. Its findings are also limited to contextual (un)answerability.

  • The experiments cover only a few datasets and models, leaving model-scale relationships for future work.Source: §7 · p. 9
  • Because the study uses linear probing and erasure, its results should be interpreted as a lower bound for identifying (un)answerability.Source: §7 · p. 9
  • The experiments focus on (un)answerability within a given context rather than the open-domain setting.Source: §7 · p. 9

8 Ethics Statement

The paper discusses hallucination risks, operationalizes abstention responses, reports answerable-instance effects, and tunes prompt variants using development data.

8 Ethics Statement

  • Model hallucination can have real-world implications in applications such as search engines, but this study is preliminary and not a general QA solution.Source: §8 · p. 9

A (Un)answerability-Recognizing Responses

B Performance on the Answerable Instances

  • Adding an answerability hint slightly reduces answerable-question exact match and F1 for the most part, but overall performance improves because unanswerable detection improves more.Source: B Performance on the Answerable… · p. 14

C Prompt Variant Tuning

  • Three prompt variants use “unanswerable,” “IDK,” or “N/A” as the instructed response, selected per dataset from a separate development set.Source: C Prompt Variant Tuning · p. 14

D Impact of Hint Placement

Few-shot ablations compare placing answerability hints in instructions, exemplars, or both. Instruction-level hints are more beneficial than exemplar-level hints.

D Impact of Hint Placement

E Impact of the Relaxed Beam Search Decoding on the Answerable Queries

Relaxed beam-search decoding had only a marginal impact on answerable questions, while improvements reported elsewhere appear to stem from better handling of (un)answerable questions.

  • Relaxed beam search reduced answerable-question exact match by at most 7.7 points and F1 by at most 8.7 points versus regular beam search.The comparison uses conventional beam search and a relaxed variant that substitutes an (un)answerability-recognizing response when one appears in the beam.Source: E Impact of the Relaxed Beam Search… · p. 15
  • The adapted beam-search variant therefore had only a marginal effect on answerable queries.Source: E Impact of the Relaxed Beam Search… · p. 15
  • The results indicate that the improvement in Section §5.2 comes from better treatment of (un)answerable questions rather than gains on answerable questions.Source: E Impact of the Relaxed Beam Search… · p. 15

F In-Context-Learning Variants

The few-shot experiments average scores across three in-context-example variants to reduce sensitivity to example selection, with task-specific variants shown for SQuAD, NQ, and MuSiQue.

Loading 2310.11877v2…