How this was made, what the numbers mean, sources
What this is
An inverter in the shape of vec2text
(Morris et al., 2023): a t5-small decoder conditioned on the target vector writes a first
guess, then a second model reads the target, the guess, the guess's own embedding and the
difference between them, and writes a better guess. Each round the encoder re-embeds the
candidates and keeps whichever lands closest to the target. Five rounds. The
nearest training string row in each arm is the control: the closest of the 40,000
training strings by the same cosine, which is what memorisation alone would return.
The training budget was small on purpose: 40,000 pairs of questions and Wikipedia sentences,
three epochs plus one for the corrector, 7.4 hours on four CPU cores. vec2text reports 92%
exact recovery on 32-token inputs after five million pairs on a GPU. This run recovers the
exact string 2.4% of the time from the float vector and 0.9% from the sign code, never past
ten words, and lands on topic far more often than that. The outputs are not training
strings; the float arm's guesses sit 0.09 cosine closer to the target than any training
string does.
Two rulers
The float arm's cosine is between float vectors. The bin1 arm's is between two ±1 sign
vectors, which equals 1 − 2 × the fraction of disagreeing bits, so
0.385 means 69% of bits agree. To put both arms on one scale the final strings from both were
re-embedded in float space: bin1 0.529, float 0.635, against 0.546 and 0.515 for the two
nearest-training-string controls. And scored with the sign code, the float arm's strings
agree with the target on 71.8% of bits against 69.2% for the arm that was trained on the
code.
Sources
Run, code, pre-registration, error log and the per-item records this page reads:
oaustegard/experiments/embedding-inversion.
Encoder: hotchpotch/bekko-embedding-v1-a8m,
default int8 ONNX, mean-pooled. Strings: questions from
Natural Questions
and MS MARCO, and
sentences split from the Natural Questions Wikipedia passages; licences per those dataset cards.
Inverter base: t5-small, Apache 2.0.