atlas

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

Language Model Inversion

ICLR 2024 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 4 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.

Shows that next-token probability vectors of language models leak enough information to invert and recover hidden prompts, using a T5 encoder-decoder conditioned on unrolled log-probabilities plus a binary-search logit extraction method for API access.

Problem

Recovering a hidden prompt from a language model's next-token probability distribution (language model inversion), in settings where providers expose only partial probabilities, top-K, or text output.

Approach

Unroll the log-probability vector over the vocabulary into a fixed-length sequence of pseudo-embeddings that a pretrained T5 encoder consumes via cross-attention, training a decoder to reconstruct the prompt; additionally extract full logits through an API using logit-bias binary search.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Invert next-token probabilities rather than sampled text outputsLlama-2 7B Chat prompt reconstruction · Instructions-2MBLEU: 25.55 -> 58.26Helped
Invert next-token probabilities rather than sampled text outputsLlama-2 7B Chat prompt reconstruction · Instructions-2MToken F1: 65.1 -> 75.8Helped
Use probability inversion instead of the strongest oracle jailbreakLlama-2 7B prompt reconstruction · Instructions-2MBLEU: 54.37 -> 59.21Helped
Use probability inversion instead of the strongest oracle jailbreakLlama-2 7B prompt reconstruction · Instructions-2MToken F1: 68.4 -> 77.8Helped
Use probability inversion instead of the strongest oracle jailbreakLlama-2 7B prompt reconstruction · Alpaca Code GenerationBLEU: 72.98 -> 46.22Hurt
Use probability inversion instead of the strongest oracle jailbreakLlama-2 7B prompt reconstruction · Anthropic HHBLEU: 77.70 -> 25.06Hurt
Transfer the inverter trained on 7B to a larger modelLlama-2 7B inverter · Instructions-2MToken F1: 77.7 -> 54.9; 77.7 -> 53.0Hurt
Transfer the inverter trained on 7B Chat to a larger Chat modelLlama-2 7B Chat inverter · Instructions-2MToken F1: 75.8 -> 43.6; 75.8 -> 43.1Hurt
Apply RLHF by using the Chat model instead of the non-Chat modelLlama-2 prompt inversion · Instructions-2MBLEU: 59.21 (LM); 58.26 (Chat)Mixed
Sample rather than expose the deterministic full probability distributionLlama-2 7B prompt inversion · Sampling defensesinversion performanceHurt
Remove most components of the probability vector (ablation)Probability inverter · Instructions-2Mreconstruction performanceHurt

Surprising findings

Limitations

Experimental setup

Datasets: Instructions-2M Alpaca Anthropic HH Supernatural Instructions Self-Instruct Dolly ShareGPT Unnatural Instructions ChatBot Arena WizardLM GPTeacher T0

Benchmarks: Instructions-2M Alpaca Code Generation Anthropic HH

Metrics: BLEU token F1 exact match cosine similarity of text embeddings

Baselines: Jailbreak strings GPT-4 few-shot GPT-3.5 few-shot Sample inverter

Builds on: T5 Llama-2

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