GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
EMNLP 2023

Text Embeddings Reveal (Almost) As Much As Text

A vector store holds no text, so it is safe to host anywhere? Vec2Text rebuilt 92% of 32-token passages exactly from their embeddings, and 89% of names in clinical notes.

Breakdown by FDE Interviews · 13 min read · Updated

About the original · 2023
AUTHORS
Morris, Kuleshov, Shmatikov, Rush
FROM
Cornell University
PUBLISHED
Oct 2023 · EMNLP 2023
CITED BY
322Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 23% of this breakdown.

01

The paper in one minute

Retrieval systems store documents as dense embeddings: fixed-length vectors from a model such as GTR or OpenAI's text-embedding-ada-002. A common design sends only the vectors to a hosted vector database and keeps the text elsewhere, on the reasoning that a vector is not the text. This paper asks whether someone holding the vectors, and able to call the same embedding model, can recover the text.

A model trained to map an embedding straight back to text does poorly: on 32-token Wikipedia passages it gets the gist but never the exact passage. The authors' method, Vec2Text, adds a correction loop. It guesses text, embeds the guess with the target embedding model, and feeds the target vector, the guess's vector and their difference into a second model that edits the guess. Repeating this moves the guess's embedding from cosine similarity around 0.92 toward 1.0, at which point the text usually matches. The corrector is a T5-base encoder-decoder of about 235 million parameters, trained on 5 million passages.

On GTR-base embeddings of 32-token passages, 50 correction steps with a sequence-level beam search recovered 92% of passages exactly. On ada-002 embeddings of MSMARCO, it recovered 61% of 32-token passages and 8% of 128-token passages exactly, with most words right in the rest. On clinical notes in which fake names had replaced the redacted ones, it recovered 94% of first names, 95% of last names and 89% of full names. Longer text is harder: across 19 out-of-domain datasets, BLEU falls as passage length rises.

The authors test one defense: adding Gaussian noise to each embedding. At a noise level of 0.01, retrieval quality on BEIR barely moves while reconstruction collapses. They note that the inverter was not trained on noisy vectors, so an attacker who adapts could do better, and that a low BLEU does not stop coarser inferences such as the topic of a note. Their conclusion: treat embeddings with the same care as the raw text.

THE IDEA, VISUALLY
EXACT RECOVERY, 32 TOKENS, GTR-BASE (TABLE 1) bag of words 0.0% base inverter 0.0% 1 correction step 0.0% 20 steps 40.2% 50 steps 40.6% 50 steps + beam 92.0% Each step re-embeds the guess and edits it toward the target. CLINICAL NOTES WITH INSERTED FAKE NAMES (TABLE 3) first names 94.2% last names 95.3% full names 89.2% whole note exact 26.0% arXiv 2310.06816, Cornell, EMNLP 2023 NOISE ON EMBEDDINGS: RETRIEVAL VS RECOVERY (TABLE 7) no noise 100% 100% 0.001 100% 90% 0.01 98% 13% 0.1 1% 0% 1.0 0% 0% retrieval NDCG@10, share of clean reconstruction BLEU, share of clean Noise is added per dimension to GTR-base's 768 values. The inverter was not trained on noisy vectors; the authors flag adaptive attacks as untested.
Left: exact recovery of 32-token passages from GTR-base embeddings by number of correction steps (Table 1), and recovery of inserted fake names from clinical notes (Table 3). Right: Table 7, retrieval quality and reconstruction BLEU, each as a share of its noise-free value, as Gaussian noise is added to the stored embeddings.
Research notes: the problem, approach and results
92%

32-token passages recovered exactly from GTR-base embeddings after 50 steps with sequence beam search (Table 1)

89%

full names recovered from embeddings of clinical notes with fake names inserted (Table 3)

98% / 13%

retrieval quality and reconstruction BLEU kept at noise 0.01, each as a share of the clean value (Table 7)

THE PROBLEM

Teams store dense embeddings of private documents in hosted vector databases and treat the vectors as safe to share, on the assumption that a 768-number vector cannot be turned back into the text that produced it.

THE IDEA

Train a model that guesses text from an embedding, then repeatedly re-embeds its guess with the same embedding model and edits the guess to close the gap to the target vector. Only query access to the embedding model is needed.

THE RESULT

On 32-token Wikipedia passages embedded with GTR-base, 92% were recovered word for word. On clinical notes with inserted fake names, 89% of full names came back. Gaussian noise at 0.01 per dimension cut reconstruction to 13% of its BLEU while keeping 98% of retrieval quality, against an inverter not trained for noise.

02

Why it matters to an FDE

An embedding is the data, for compliance purposes. If a customer's contracts, tickets or patient notes are embedded, the vector store holds a recoverable copy of their sensitive content, especially for short chunks. Data residency, retention, deletion and access rules that apply to the text apply to the vectors. Say this early, before the architecture review asks.

Hosting vectors elsewhere is not a privacy boundary. A design that keeps text on premises and sends only embeddings to a hosted service moves the data off premises anyway. Popular embedding models are public or reachable by API, which is all this attack needs.

Chunk size changes the exposure. Recovery was near complete at 32 tokens and much weaker at 128. Many RAG systems index small chunks for retrieval precision, and those are the easiest to rebuild. Larger chunks lower exact recovery but do not remove names and topics.

Access control must reach the vector layer. If two tenants share an index, or a service account can read raw vectors, they can read each other's documents with some effort. Keep per-tenant indexes or enforce filters in the database, and do not expose raw vectors through APIs that only need search results.

Noise is a cheap, partial mitigation. The paper's data shows a noise level that keeps 98% of retrieval quality while cutting reconstruction to 13% of its BLEU. Our toy run shows why the right level depends on the corpus: noise that is harmless when the right document is far ahead of the next one starts swapping results when they are close. Test it on the customer's own queries, and do not present it as a guarantee.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The threat model, the correction loop, results by model and length, and the noise test

    Free account
  2. 04How it works

    The base inverter, the corrector's inputs, beam search over hypotheses, the data and the noise test

    Premium
  3. 05The numbers that matter

    Table 1 by step count, Table 2 by length, Table 3 on clinical notes, and Table 7 under noise

    Premium
  4. 06Try it yourself

    Recompute Tables 1, 2 and 7, then see why a noise level must be tuned to your own corpus

    Premium
  5. 07Where it breaks

    Short passages, a non-adaptive defense test, known embedding models, and slips in the text

    Premium
  6. 08Using it on a deployment

    Treat vectors as data, keep them in the customer's boundary, isolate tenants, test noise

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →