Embeddings can expose source text or sensitive attributes, so access to a vector store should follow the sensitivity of its source data.
Information preserved by embeddings
Retrieval-augmented generation (RAG) represents document meaning as vectors to find related documents. A vector being an array of numbers does not provide a privacy guarantee. It also does not mean every embedding allows exact recovery of its input.
Recovery depends on the encoder, input length, training pairs, and query access available to the attacker. Vector dimensionality alone does not prove that all information survives or that an inverse function exists.
Established inversion methods
GEIA (arXiv:2305.03010) appeared in Findings of ACL 2023. It generates text with a decoder conditioned on a sentence embedding and uses input-embedding training pairs. Recovering words or entities differs from exactly matching the whole source sentence.
Vec2Text (arXiv:2310.06816) appeared in the EMNLP 2023 main conference. It re-embeds candidate text and repeatedly corrects it using the difference from the target vector. The paper reports strong recovery for short inputs with two evaluated embedding models.
flowchart LR
V["Leaked embedding"] --> G["Generate candidate text"]
G --> E["Re-embed with the same encoder"]
E --> C["Compare with the target"]
C --> G
C --> O["Evaluate recovered candidates"]
| Method | Required access | Distinctions in evaluation |
|---|---|---|
| GEIA | Input-embedding pairs and attack-model training | Word or entity recovery versus whole-sentence matching |
| Vec2Text | Attack-model training and candidate re-embedding | Encoder, input length, and refinement budget |
A representative Vec2Text result is 92% exact recovery for 32-token inputs. This result belongs to that experimental setting. It cannot be assigned to longer documents, other encoders, or different domains. High BLEU or cosine similarity is not the same as exact matching.
The two studies use different methods to show that embeddings can reveal information from their inputs. This post uses that shared finding to motivate access controls. It does not turn a recent attack's peak score or one defense configuration into a universal storage default.
Attack conditions and impact
After a vector leak, determine whether the attacker also obtained text-vector pairs, an encoder API, or source mappings. These conditions change the cost of preparing an attack and the evaluations that are possible.
| Exposed asset | Additional condition to inspect | Potential impact to investigate |
|---|---|---|
| Vector files | Encoder type and input length | Recovery of text or sensitive attributes |
| Vectors and source mappings | Access to the source store | Direct retrieval of original documents |
| Vectors and API keys | Encoder and retrieval permissions | Repeated queries and access to more data |
| Vector backups | Encryption keys and restore permissions | Exposure of retained historical data |
An attack may recover names or sensitive phrases without reconstructing the whole sentence. Conversely, matching some words does not demonstrate recovery of all personal information. Record exact matching, entity recovery, and semantic similarity separately.
Evaluating defenses
Access controls and store isolation reduce paths through which an attacker can obtain vectors. Encryption at rest addresses exposed backups or disks. It does not block a user who can query the store with valid permissions.
Quantization and noise can change both retrieval quality and reconstruction performance. Do not designate a bit width or noise level as a safe default without testing it. A differential privacy claim requires a defined protected unit, adjacency relation, budget, and mechanism.
| Evaluation axis | Example measurements | Interpretation limit |
|---|---|---|
| Source reconstruction | Exact match and token overlap | Failure of one attack does not prove failure of all attacks |
| Sensitive information | Name or identifier recovery | Absent data fields cannot be evaluated |
| Retrieval quality | Recall@k and nDCG@k | Retrieval scores do not measure privacy by themselves |
| Operating cost | Storage, latency, and query count | Numbers from different hardware are not directly comparable |
This table proposes service-level checks. It does not guarantee protection for configurations the papers did not evaluate. Repeat the evaluation after changing the encoder or chunking strategy.
Operational boundaries
Include the vector store in the source data's sensitivity and retention policies. Separate source-read permissions from vector-export permissions, and enforce user and tenant filters on the server. Apply equivalent access policies to mapping tables and backups.
Calling an external embedding API sends the source text to that service. Check permitted destinations, training use, and retention before choosing vector storage. Self-hosting does not automatically resolve configuration errors or misuse of internal privileges.
Summary
GEIA and Vec2Text demonstrate text reconstruction from embeddings through different methods. Their recovery rates depend on access permissions, encoders, input lengths, and other evaluation conditions. Manage vectors as sensitive assets linked to their sources instead of assuming anonymity. Measure quantization and noise on your own data alongside retrieval quality.