about
Inference-Time Intervention: Eliciting Truthful Answers from a Language Model (arxiv.org)
4 points by convexstrictly on Jun 8, 2023 | hide | past | pdf | 1 comment on HN

In plain words: While a model writes an answer, this technique nudges its internal signals along a few directions found in a handful of attention heads, steering it toward truth. On a question set about honesty, it more than doubled one model's truthful answers, reaching 65.1%.

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.

Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, Martin Wattenberg
arXiv:2306.03341 · cs.LG, cs.AI, cs.CL · submitted Jun 6, 2023 · updated Jun 26, 2024
abstract · pdf · html · NeurIPS 2023 spotlight; code: https://github.com/likenneth/honest_llama

add comment on HN
Also discussed: Jun 2023 (1 point, 0 comments)

"We start from the surprising finding that certain attention heads have a clear activation distribution difference for true and false statements. Probing at these points yields upwards of 83% accuracy on TruthfulQA while zero-shot generation is only at 30% accuracy."

Twitter thread: https://twitter.com/ke_li_2021/status/1666810655469621251?s=...