Skip to main content
QUICK REVIEW

[Paper Review] Shifting Attention to Relevance: Towards the Predictive Uncertainty Quantification of Free-Form Large Language Models

Jinhao Duan, Hao Cheng|arXiv (Cornell University)|Jul 3, 2023
Topic ModelingComputer Science10 citations
TL;DR

The paper introduces Shifting Attention to Relevance (SAR) to improve uncertainty estimation in free-form LLMs by weighting tokens and sentences by their semantic relevance, outperforming prior methods across multiple models and domains.

ABSTRACT

Large Language Models (LLMs) show promising results in language generation and instruction following but frequently "hallucinate", making their outputs less reliable. Despite Uncertainty Quantification's (UQ) potential solutions, implementing it accurately within LLMs is challenging. Our research introduces a simple heuristic: not all tokens in auto-regressive LLM text equally represent the underlying meaning, as "linguistic redundancy" often allows a few keywords to convey the essence of long sentences. However, current methods underestimate this inequality when assessing uncertainty, causing tokens with limited semantics to be equally or excessively weighted in UQ. To correct this, we propose Shifting Attention to more Relevant (SAR) components at both token- and sentence-levels for better UQ. We conduct extensive experiments involving a range of popular "off-the-shelf" LLMs, such as Vicuna, WizardLM, and LLaMA-2-chat, with model sizes extending up to 33B parameters. We evaluate various free-form question-answering tasks, encompassing domains such as reading comprehension, science Q&A, and medical Q&A. Our experimental results, coupled with a comprehensive demographic analysis, demonstrate the superior performance of SAR. The code is available at https://github.com/jinhaoduan/SAR.

Motivation & Objective

  • Identify how token- and sentence-level generative inequalities affect uncertainty estimation in free-form LLMs.
  • Propose a method to mitigate these inequalities by shifting attention to more relevant components (tokens and sentences).
  • Evaluate SAR on off-the-shelf instruction-tuned LLMs and pretrained LLMs across diverse QA tasks and domains.

Proposed method

  • Define token- and sentence-level relevance and uncertainty proportions (R_T, UP_T, R_S, UP_S).
  • Measure token-level relevance by semantic change upon token removal using a RoBERTa-large cross-encoder as the semantic similarity function g(·).
  • Compute token-level shifted entropy E_T by weighting token entropy with normalized relevance (Eq. 7).
  • Compute sentence-level relevance R_S using semantic similarity among generated sentences and their generative probabilities (Eq. 4).
  • Compute sentence-level shifted entropy E_S by weighting against sentence relevance (Eq. 9).
  • Combine token- and sentence-level shifts into SAR by replacing probabilities with token-SAR derived p′(s|x) in the entropy calculations (Eq. 11).

Experimental results

Research questions

  • RQ1How do token- and sentence-level generative inequalities affect uncertainty estimation in free-form LLM generations?
  • RQ2Can reweighting attention toward linguistically relevant components improve the accuracy of uncertainty estimations for LLM outputs?
  • RQ3Do token-SAR, sent-SAR, and SAR outperform existing uncertainty measures across diverse LLMs and domains?

Key findings

  • Uncertainty estimation is significantly biased by irrelevant tokens and sentences that carry little semantic meaning.
  • Token-SAR and sent-SAR consistently improve AUROC scores over baselines across multiple models and datasets.
  • Joint SAR (token and sentence shifts) outperforms individual components, with notable gains over SE and other baselines.
  • SAR shows robustness across instruction-tuned LLMs (Vicuna, WizardLM, LLaMA-2-chat) and pretrained LLMs (OPT, LLaMA) up to 33B parameters.
  • In medical QA domains (MedQA, MedMCQA), SAR achieves better performance in most settings.
  • SAR is generation-efficient, achieving strong results with as few as 5 generations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.