Skip to main content
QUICK REVIEW

[Paper Review] Inference-Time Intervention: Eliciting Truthful Answers from a Language Model

Kenneth Li, Oam Patel|arXiv (Cornell University)|Jun 6, 2023
Topic ModelingComputer Science39 citations
TL;DR

ITI selectively shifts activations in a sparse set of truth-related attention heads during inference to boost truthfulness on TruthfulQA, with trade-offs in helpfulness and minimal extra computation.

ABSTRACT

We introduce Inference-Time Intervention (ITI), a technique designed to enhance the "truthfulness" of large language models (LLMs). ITI operates by shifting model activations during inference, following a set of directions across a limited number of attention heads. This intervention significantly improves the performance of LLaMA models on the TruthfulQA benchmark. On an instruction-finetuned LLaMA called Alpaca, ITI improves its truthfulness from 32.5% to 65.1%. We identify a tradeoff between truthfulness and helpfulness and demonstrate how to balance it by tuning the intervention strength. ITI is minimally invasive and computationally inexpensive. Moreover, the technique is data efficient: while approaches like RLHF require extensive annotations, ITI locates truthful directions using only few hundred examples. Our findings suggest that LLMs may have an internal representation of the likelihood of something being true, even as they produce falsehoods on the surface.

Motivation & Objective

  • Investigate whether LLMs contain latent truth representations that are not expressed in outputs.
  • Develop a minimally invasive method to elicit truthful outputs without full model fine-tuning.
  • Assess ITI performance on TruthfulQA and related benchmarks and analyze trade-offs with helpfulness.
  • Evaluate data efficiency and computational overhead of the approach.
  • Explore generalization of ITI to other datasets and instruction-tuned models.

Proposed method

  • Identify a sparse set of attention heads whose activations correlate with truthfulness via probing on TruthfulQA.
  • Compute truthful directions in the activation space (probing directions).
  • During inference, intervene by shifting activations along truthful directions for the top K heads using a strength parameter alpha (x_{l+1}=x_{l}+ sum_h Q_l^h(Att_l^h(P_l^h x_l)) + alpha sigma_l^h theta_l^h).
  • Autoregressively apply the intervention at each token prediction.
  • Tune K and alpha to balance truthfulness (true*informative score) and potential degradation in other aspects (measured by CE and KL).
  • Compare ITI to baselines (SFT, Few-shot prompting, IFT variants) and other direction strategies (probe weight, mass mean shift, CCS).
Figure 1 : Answers to the same question from LLaMA without (red) and with (blue) inference-time intervention. Gold standard answers are: “Scholars thought the Earth was round” and “I have no comment,” respectively. The first question reflects a common misconception; the second is an example of hallu
Figure 1 : Answers to the same question from LLaMA without (red) and with (blue) inference-time intervention. Gold standard answers are: “Scholars thought the Earth was round” and “I have no comment,” respectively. The first question reflects a common misconception; the second is an example of hallu

Experimental results

Research questions

  • RQ1Can latent truth-related directions in LLM activations be identified and exploited to improve truthful outputs without retraining?
  • RQ2Does a minimally invasive inference-time intervention meaningfully improve TruthfulQA performance, and at what cost to model behavior and efficiency?
  • RQ3How does ITI generalize to instruction-finetuned models and other truth-related benchmarks beyond TruthfulQA?
  • RQ4What is the optimal balance between truthfulness and helpfulness, and how do hyperparameters K and alpha influence this trade-off?
  • RQ5Are truth-related directions sparse and localized to a subset of heads, and what is their geometric structure?

Key findings

  • ITI yields substantial gains on TruthfulQA (e.g., Alpaca from 32.5% to 65.1% true*info with ITI; Vicuna from 51.5% to 74.0% true*info).
  • Intervening on a sparse set of top truth-related heads is effective and minimally invasive.
  • Mass mean shift generally outperforms other directions (including random and CCS) for the intervention vector.
  • ITI preserves or modestly alters overall generation distribution (CE and KL remain relatively low with proper tuning).
  • ITI provides some gains on additional benchmarks beyond TruthfulQA, with smaller improvements on Natural Questions and TriviaQA and larger on MMLU, indicating partial generalization.
  • Truthful directions appear to be learnable with only a few hundred labeled examples and can be found with data-efficient probing.
Figure 2 : (A) Linear probe accuracies on validation set for all heads in all layers in LLaMA-7B, sorted row-wise by accuracy. Darker blue represents higher accuracy. $50\%$ is the baseline accuracy from random guessing. (B) Kernel density estimate plot of activations of truthful (blue) and false (o
Figure 2 : (A) Linear probe accuracies on validation set for all heads in all layers in LLaMA-7B, sorted row-wise by accuracy. Darker blue represents higher accuracy. $50\%$ is the baseline accuracy from random guessing. (B) Kernel density estimate plot of activations of truthful (blue) and false (o

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.