Documented Exercise · OBS.EX0091

Language Model Inversion from Next-Token Probability Distributions

Morris et al. (2023/ICLR 2024) studied language model inversion, testing whether next-token probability distributions allow reconstruction of hidden preceding prompt tokens even without full vocabulary probability access. Evaluated on Llama-2 7B, the inversion model reconstructed hidden prompts with 59 BLEU and 78 token-level F1, recovering 27% of prompts verbatim. Because logits encode rich contextual conditioning from system prompts and preceding user context, returning full logprobs leaks confidential prompt logic. Inference APIs should suppress or quantize next-token probability distributions on endpoints carrying proprietary prompts.

Exercise dossier metadata

Case ID
OBS.EX0091
Classification
Exercise
Date
Evaluation scope
Llama-2 7B · Hidden Prompt Reconstruction from Output Logits
Reference URI
https://arxiv.org/abs/2311.13647

Inspect OBS.EX0091 in Interactive Incidents & Cases Hub

Mapped AI security techniques

Mapped defensive controls

Source citation records