Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Embedding inversion recovers the original text or image from the numeric vector that was supposed to replace it, undermining the common assumption that embeddings are a form of anonymisation.

What Are Embedding Inversion Attacks?
An embedding is a list of numbers that represents the meaning of a piece of text, an image, or a face. It looks nothing like the original, which is why teams routinely treat embeddings as a safe, de-identified form of data and store them with less protection than the source documents. Embedding inversion is the research result that breaks that assumption: given the vector, an attacker can reconstruct a great deal of what went in.
The attack is an optimisation problem. Train a decoder model that maps vectors back to text, or iteratively generate candidate text, embed it with the same model, and adjust until the resulting vector matches the target. Because embedding models are deterministic and publicly available, an attacker who knows which model produced a vector can query it freely while refining the guess. Jack Morris and colleagues published the clearest demonstration in 2023 with a method called vec2text, recovering a large majority of short inputs word for word and most of the meaning of longer ones. Earlier work by Congzheng Song and Ananth Raghunathan in 2020 had already shown that embeddings leak substantial attribute information, including authorship and sensitive characteristics, even when exact text could not be recovered.
Retrieval-augmented systems create large stores of embeddings derived from exactly the documents an organisation considers confidential: contracts, HR records, patient notes, incident reports, source code. Those vectors are usually held in a vector database that was stood up by a development team, sits outside the backup and classification regime applied to the source repository, and sometimes faces the internet without authentication. If the vectors are recoverable, the vector store is a copy of the documents, and it should be protected accordingly. The same reasoning applies to biometric templates, where a reconstructed face or voice representation can be used to attack a matching system directly.
Notably, the attacker does not need the application, the retrieval logic, or any credential to your systems once they hold the vectors.
Start by reclassifying. Embeddings derived from personal or confidential data inherit that classification, and the control set should follow: encryption at rest and in transit, authentication and authorisation on every query, network isolation, retention aligned to the source documents, and deletion when the source is deleted. Do not return raw vectors through an API if a similarity score or a document identifier will do. Where the threat model justifies it, add noise or dimensionality reduction to degrade reconstruction quality, accepting some retrieval accuracy loss, or evaluate differentially private embedding techniques described in our note on privacy-preserving machine learning. Keep per-tenant and per-user separation in multi-tenant indexes, because an inversion attack is far more damaging when one index holds everybody’s documents. Finally, include the vector store in your vulnerability scanning scope; internet-exposed instances with default settings are a recurring finding.
If an embedding can be inverted to recover personal data, it is personal data. That makes it subject to UK GDPR in full: lawful basis, purpose limitation, security under Article 32, and the rights of access and erasure—which in practice means you must be able to find and delete the vectors corresponding to an individual, something many vector store designs make awkward. It also means a leak of embeddings is a personal data breach with a 72-hour notification clock, not a leak of harmless numbers. The ICO’s position on pseudonymisation is directly relevant: data that can be attributed to an individual with additional information available to an attacker remains in scope. OWASP addresses the broader category as LLM08, vector and embedding weaknesses. At Privia Security, we test AI data stores and retrieval pipelines through our AI Penetration Test Services.
Where they are derived from personal data and can be inverted or linked back to an individual, yes. Inversion research shows that short texts are often recoverable almost exactly and that attributes leak even when exact text is not. Treat embeddings of personal or confidential material as carrying the same classification as the source unless you have evidence to the contrary.
Encryption at rest and in transit protects against theft of storage or interception, and you should have both. It does not help where the attacker has legitimate query access, an application credential, or a path through a misconfigured API, because the service decrypts in order to search. Combine encryption with access control, tenant separation, and limits on returning raw vectors.
You can, but it needs designing in. Store a mapping from source document and data subject to vector identifiers, so an erasure request can be executed and evidenced. Remember to handle backups, replicas, and any cached index copies. Retrofitting this is painful, which is why erasure should appear in the requirements before the first index is built.
Only marginally. Inversion has been demonstrated across widely used models, and an attacker can usually identify which model produced a vector from its dimensionality and statistical signature. A private, undisclosed model raises the effort required but is not a security boundary. Access control and classification give far more protection than obscurity does.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.