atlas

Research map / Large language models / Language, safety and interpretability

Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models

ICML 2024 · Large language models › Language, safety and interpretability · approach: Linguistic encoding in LLM representations · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Patchscopes, a framework that decodes hidden representations by patching them into a target inference pass of an LLM (same or larger model) with a prompt designed to elicit the desired information, unifying logit lens, tuned lens, future lens, and causal tracing as special cases.

Problem

Existing interpretability methods for LLM hidden representations (probing, vocabulary projection, causal interventions) are limited: probes need supervised training over predefined classes, vocabulary projections fail in early layers, and none give expressive natural-language explanations.

Approach

Decode a representation by patching it into a separate inference pass on a designed target prompt (possibly on a different or larger model), so the model itself verbalizes the information; this unifies prior inspection methods as configurations and enables training-free, expressive, layer-robust inspection.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Fruit outside coloraccuracy: 35.5 ± 3.1 -> 71.0 ± 13.3Helped
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Substance phaseaccuracy: 73.8 ± 3.7 -> 91.9 ± 1.7Helped
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Task done by toolaccuracy: 10.1 ± 3.2 -> 48.1 ± 13.2Helped
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Company CEOaccuracy: 5.0 ± 2.6 -> 47.8 ± 13.9Helped
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Country currencyaccuracy: 17.7 ± 2.2 -> 51.0 ± 8.9Helped
Use zero-shot feature extraction Patchscope instead of a logistic regression probeGPT-J 6B · Food from countryaccuracy: 5.1 ± 3.7 -> 63.8 ± 11.3Helped
Use logistic regression probe instead of zero-shot feature extraction PatchscopeGPT-J 6B · Object superclassaccuracy: 65.6 ± 10.5 -> 54.8 ± 11.3Hurt
Use Chain-of-Thought Patchscope instead of chain-of-thought promptingVicuna 13B · Multi-hop factual and commonsense reasoningaccuracy: 35.71% -> 50%Helped
Use Chain-of-Thought Patchscope instead of vanilla generationVicuna 13B · Multi-hop factual and commonsense reasoningaccuracy: 19.57% -> 50%Helped
Use token identity Patchscope rather than vocabulary projection methodsNext-token prediction estimation across LLaMA2, Vicuna, GPT-J, and Pythia · Pile evaluation setPrecision@1: gain of up to 98%Helped
Use token identity Patchscope rather than logit lens and tuned lens in the first 10 layersNext-token prediction estimation · Pile evaluation setPrecision@1Mixed
Replace the multi-token identity demonstrations with a position-matched single-token prompt (ablation)Token identity Patchscope on LLaMA2 13B · Next-token prediction estimationPrecision@1Hurt

Surprising findings

Limitations

Experimental setup

Datasets: The Pile PopQA WikiText-103 Commonsense and factual relation dataset (Hernandez et al. 2023)

Benchmarks: The Pile evaluation set Commonsense and factual relation tasks (5 commonsense, 7 factual) PopQA Multi-hop factual and commonsense queries (46 evaluated)

Metrics: Precision@1 Surprisal Accuracy RougeL Rouge1 Sentence-BERT similarity t-test with Bonferroni correction

Baselines: Logit Lens Tuned Lens Logistic regression probe Chain-of-thought prompting Vanilla generation

Builds on: logit lens tuned lens future lens causal tracing activation patching

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy