One Bit Beats Two, Except on Jina
One Bit Beats Two reported that on SPECTER2 embeddings, 1-bit retrieval codes beat 2-bit and 3-bit at preserving the float ranking. Run the same quantizer on Jina v5-nano and the result inverts: 2-bit beats 1-bit, and recall climbs with every added bit. The only thing that changed is the embedder.
Both rows below are the same harness — remex Lloyd-Max codes at d=768, recall@10 measured against each corpus's own exact float32 ranking. The SPECTER2 row reproduces the original post; the Jina row is the opposite shape.
| bits / coord | SPECTER2 R@10 | Jina v5-nano R@10 |
|---|---|---|
| 1 | 0.64 | 0.77 |
| 2 | 0.50 | 0.87 |
| 3 | 0.58 | 0.93 |
| 4 | 0.74 | 0.96 |
| 8 | 0.97 | 1.00 |
Measuring against the float ranking
Recall against human relevance labels can't see this. On the muninn blog corpus the float embedder already scores 0.90 recall@5, so every codec ties at the ceiling; on NFCorpus it scores 0.24, so every codec floors at the embedder's own limit. Score each code against the float vectors' own top-k instead, and the gap appears: at 192 bytes per vector on Jina, remex 2-bit holds rank correlation 0.98 to the float ranking; a 1-bit SimHash code of the same size holds 0.74.
That holds across byte budgets, not just bit depth. On synthetic isotropic vectors, remex beats stacked 1-bit SimHash at 64, 128, and 256 bytes per row alike — rank correlation 0.91 against 0.75 at 64 bytes, 0.98 against 0.85 at 128.
Isotropic versus clustered embeddings
A 1-bit SimHash code is the sign of each rotated coordinate — Charikar's angle estimator, monotone in cosine. Lloyd-Max adds interior boundaries between levels. A noisy assignment across an interior boundary flips the sign of that coordinate's contribution to the dot product, which reorders neighbors. The optimal bit depth depends on where the embedding puts its mass. SPECTER2 is a specialized paper encoder with tight clusters; Jina v5-nano is general-purpose and closer to isotropic. On isotropic geometry the finer levels reduce ranking error; on the tight clusters the boundary flips cost more than the finer levels save.
What shipped
remax_kb — the single-file portable .kb knowledgebase — now carries an optional remex codec beside the 1-bit default. For Jina the recommended setting is 4-bit at d=768: rank correlation 0.998 to the float ranking, 384 bytes a vector against the 3072 of raw float32. For SPECTER2, keep the sign bit. Packing takes --codec remex --bits 4.