Inadvertent Context Leakage in Language Models
Jaiden Fairoze, Neal Mangaokar, Kamalika Chaudhuri, Sanjam Garg, Saeed Mahloujifar
NeurIPS page · OpenReview · Open on the map
Category: AI Safety, Security & Alignment › Adversarial Attacks on Agents · Type: empirical study · Keywords: context leakage, language model security, in-context secret reconstruction, LLM privacy, adversarial prompt engineering, model capability leakage
Areas: AI Agents › Agent Robustness › Agent Security Vulnerabilities; Safety & Security › Language Model Security › LLM Agent Security; Evaluation & Benchmarks › Language Model and Agent Safety › LLM Safety Evaluation; Privacy & Federated Learning › Privacy Defenses and Attacks › Data Extraction Attacks
Summary
The paper shows that language models inadvertently leak sensitive in-context secrets via an adaptive attack, enabling reconstruction of digits and full Social Security Numbers from benign outputs.
Explained to a 5-year-old
Language computers sometimes remember things you tell them. If you give them a secret, they might accidentally hint at it when they answer other questions. This can happen even when they are supposed to keep the secret safe. The researchers found that bigger, smarter computers leak secrets more often. They also showed how bad people could use this to steal numbers like Social Security numbers.
Explained to a 5-year-old, longer
Imagine a big computer brain that talks to you like a friend. It can remember things you tell it, like your birthday or a secret password. Sometimes, when you ask it something else, it accidentally says a little bit of that secret. This happens even if you told it not to share it. The researchers looked at many different computer brains and found that the more clever they are, the more they leak. They also tried to trick the computers by asking special questions to make them leak more. They discovered that two-digit numbers could be guessed almost perfectly, and four-digit numbers about 82% of the time. They even built a bad program that could learn to ask questions and get full Social Security numbers. This shows that personal information can be stolen without the computer knowing it. The findings warn us that as language computers get smarter, we need to be careful about what we tell them. They also suggest we need new ways to stop this accidental leaking. The study helps us understand a hidden danger in using AI to hold personal data.
For a technical reader
The research demonstrates that language models can unintentionally expose secrets stored in their context window through correlations in normal outputs. By measuring reconstruction rates across eight proprietary models, they show near-perfect recovery of two-digit secrets and 82% exact match for four-digit secrets. They also present a classifier that infers semantic predicates from routine outputs and an RL-trained adversary that extracts full Social Security Numbers with 100% success, highlighting a capability-driven leakage phenomenon.
Problem
When language models hold personal secrets in their context window, does the mere presence of those secrets cause the model’s normal outputs to reveal hidden correlations that can be used to reconstruct the secrets, even if the model refuses direct extraction?
Method
The study evaluates whether secrets in a model’s context window create unintended correlations in its outputs by measuring reconstruction accuracy across multiple models, and it examines both passive leakage and the effect of engineered prompts.
Results
The study finds that 2-digit secrets are reconstructed with near-perfect accuracy, 4-digit secrets achieve 82% exact match, and full Social Security Numbers are extracted with 100% success by an RL-trained adversary.
Contributions
It reveals that higher-capability models amplify leakage, demonstrates practical attacks using a classifier and an RL-trained adversary, and provides a framework for assessing inadvertent context leakage in language models.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction