English

Text Embeddings Reveal (Almost) As Much As Text

Computation and Language 2023-10-11 v1 Machine Learning

Abstract

How much private information do text embeddings reveal about the original text? We investigate the problem of embedding \textit{inversion}, reconstructing the full text represented in dense text embeddings. We frame the problem as controlled generation: generating text that, when reembedded, is close to a fixed point in latent space. We find that although a na\"ive model conditioned on the embedding performs poorly, a multi-step method that iteratively corrects and re-embeds text is able to recover 92%92\% of 32-token32\text{-token} text inputs exactly. We train our model to decode text embeddings from two state-of-the-art embedding models, and also show that our model can recover important personal information (full names) from a dataset of clinical notes. Our code is available on Github: \href{https://github.com/jxmorris12/vec2text}{github.com/jxmorris12/vec2text}.

Keywords

Cite

@article{arxiv.2310.06816,
  title  = {Text Embeddings Reveal (Almost) As Much As Text},
  author = {John X. Morris and Volodymyr Kuleshov and Vitaly Shmatikov and Alexander M. Rush},
  journal= {arXiv preprint arXiv:2310.06816},
  year   = {2023}
}

Comments

Accepted at EMNLP 2023

R2 v1 2026-06-28T12:46:11.414Z