← AI GitHub

AI GitHub

vec2text for studying embedding inversion

Explore methods that reconstruct text from embeddings and test privacy assumptions.

Data and RetrievalPublished 2 min read

Key Takeaways

  • The research code uses learned models to predict and refine text given an embedding.
  • Use the project's supported inversion and embedding models with synthetic data.
  • Work with synthetic sentences and a supported embedding model.
  • Results are specific to the embedding model and attack setup.

How it works

The research code uses learned models to predict and refine text given an embedding. Its experiments show why transformed representations can still reveal source information.

What you need

Use the project's supported inversion and embedding models with synthetic data. Matching the embedding pipeline is part of reproducing the reconstruction experiment.

What to try first

Work with synthetic sentences and a supported embedding model. Compare reconstruction quality for common phrases and unique strings.

Try a synthetic record with a unique token or identifier. Inspect whether it is recovered, approximated or replaced with a more common string.

Where to look for failures

Results are specific to the embedding model and attack setup. Keep private data out of the experiment and avoid treating low reconstruction quality as proof of privacy.

Related Franklin pages

Separate encoder capability, retrieval quality and privacy assumptions. Each needs a different test, even when all three experiments start from the same set of embeddings.

For the role of the encoder in a search stack, read Franklin’s model guide. Embedding models

Project documentation

Try it for your workflow

Explore the project’s documentation for setup and usage, or save this page to a collection for later.

Read the project documentation ↗