Three-bit vectors, three different retrieval outcomes
Aryan Putta · November 6, 2026

Rebuilding TurboQuant’s MSE stage: nearly identical reconstruction error, very different nearest-neighbor recall.


At three bits per coordinate, a small reconstruction of TurboQuant’s mean-squared-error stage produced almost the same vector error on three synthetic datasets: 3.40%, 3.40%, and 3.42%. Their nearest-neighbor results separated sharply. Recall@10 averaged 77.2%, 83.9%, and 42.6%.


The quantizer kept its reconstruction behavior stable while the retrieval task became much less forgiving. That makes a useful distinction to test before treating a low-bit representation as ready for a search system.



The component worth rebuilding


Google’s March 2026 TurboQuant research post (https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/) brought renewed attention to low-bit vector storage. The underlying paper, first posted in April 2025 (https://arxiv.org/html/2504.19874v1), separates two objectives: vector reconstruction and inner-product estimation. Its MSE stage rotates unit vectors and applies a scalar codebook based on the coordinate distribution of a uniform sphere. The inner-product version adds a residual correction. Those objectives should remain separate when interpreting an experiment.


The local implementation follows Algorithm 1’s MSE structure. A Gaussian matrix goes through QR decomposition, with the QR signs corrected, to produce a random orthogonal transform. The scalar codebook is computed once from the exact finite-dimensional sphere density using Lloyd updates. There is no calibration dataset. Every coordinate then becomes the index of its nearest centroid. Reconstruction looks up the centroids and reverses the transform.


The exported matrix and centroids use float32, with higher-precision NumPy intermediates for the analysis. An orthogonality check measures the small error introduced by storing the rotation matrix in float32.


Hold the codebook fixed, change the geometry


The CPU experiment reconstructs TurboQuant’s MSE stage using synthetic 128-dimensional unit vectors, with 2,048 stored vectors and 128 independent queries per dataset. QJL residual correction, entropy coding, and attention integration are outside this implementation. It tests two, three, and four code bits. The data seed is fixed; five separate rotation seeds expose sensitivity to the shared transform. These are fixed synthetic datasets; the five rotations measure transform sensitivity, not uncertainty across independently sampled datasets.


Isotropic: independent standard-normal coordinates, followed by unit normalization.

Uneven axes: the same construction with coordinate standard deviations declining geometrically from 1 to 0.02.

One strong axis: the first coordinate has a standard deviation of 20; the remaining coordinates have a standard deviation of 1.


Two controls help identify what the rotation contributes. An unrotated version uses the same sphere codebook directly. A per-vector min-max baseline uses an evenly spaced grid with all 2^b levels and its own minimum and scale. The unrotated sphere codebook is an ablation, not a claim about the best available competing quantizer.




Figure 1. Three code bits per coordinate. The rotated method is averaged across five rotations; whiskers show the observed minimum and maximum, not confidence intervals. Each dataset and its queries are fixed. The chart scrolls horizontally on small screens.


At three bits, the min-max baseline’s mean squared error rises from 4.56% on isotropic vectors to 11.59% on uneven axes and 17.82% with one strong axis. The rotated codebook stays around 3.4%. Removing the rotation exposes the mismatch between a fixed sphere codebook and the deliberately uneven coordinates: error reaches 33.49% on the strong-axis dataset.


The metric is the average squared reconstruction distance divided by original vector energy. Every original vector has unit energy, so the denominator is one. For these unit vectors, a 3.4% result corresponds to a mean squared reconstruction distance of 0.034.


A small vector error can reorder a crowded neighborhood


For retrieval, each full-precision query scores all stored vectors by inner product. The reference top ten comes from uncompressed vectors. The approximate top ten comes from reconstructed vectors. Recall@10 is the fraction of those ten reference neighbors that survive, averaged over queries. Reconstructed vectors are not renormalized, and there is no approximate index or reranking stage.


 |  | Synthetic geometry | Vector error | Mean recall@10 | Recall range, five rotations

 | Isotropic | 3.40% | 77.2% | 76.2–78.0%

 | Uneven axes | 3.40% | 83.9% | 83.5–85.2%

 | One strong axis | 3.42% | 42.6% | 40.0–44.2%




The strong-axis case produces a crowded set of very similar candidates. Its median exact-score gap between the tenth and eleventh neighbors is 0.000521, compared with 0.002206 for isotropic vectors and 0.003668 for uneven axes. A small score perturbation therefore has more opportunities to move a candidate across the cutoff. This gap comparison supports the interpretation; it does not isolate every cause of the recall difference.


The rotated method still improves mean recall over the min-max control in all three datasets. On the strong-axis dataset, the control reaches 32.6%, versus 42.6% for the rotated method. The important result is the disagreement between two success criteria: stable reconstruction error does not make retrieval quality stable.


A natural next experiment would add the paper’s inner-product residual correction and compare at the same total bit budget. Spending a bit on that correction leaves fewer bits for the first-stage codebook. The present results cannot establish how that tradeoff would behave.



Three bits is a payload description


The notebook also writes actual packed files. For 2,048 vectors, three-bit codes occupy 98,304 bytes. Norms add 8,192 bytes, the shared rotation adds 65,536 bytes, and the codebook adds 32 bytes. The total is 172,064 bytes, compared with 524,288 bytes for FP16 vectors: a 3.05× size ratio, rather than the code-only 16 ÷ 3 = 5.33×.


The unit-vector experiment could omit norms. They are deliberately included in this storage layout to support arbitrary input magnitudes. At one million vectors, the same layout approaches 4.92× because the shared matrix is spread over many more entries. The layout has no per-block scale arrays, but that does not make all shared state and vector metadata disappear.


The byte count covers the packed representation: codes, norms, the rotation matrix, and centroids. Process memory would additionally include Python objects, reconstruction buffers, allocator overhead, and any search index. Applying the dense rotation also adds computation; an end-to-end implementation would need to measure that cost alongside storage.


The engineering decision this changes


For a retrieval service, select a bit budget against the task’s actual neighbor-retention requirement, then account for the complete stored representation. A reconstruction metric is useful for understanding the quantizer; it cannot substitute for a retrieval evaluation on the application’s own vectors and query distribution.


This small study yields a concrete test plan: compare at matched total bytes, inspect top-k preservation, examine difficult score margins, and test whether reranking or residual correction earns its additional storage and compute. The notebook makes those next experiments editable without requiring a GPU.


Sources

Google Research: TurboQuant, March 24, 2026 (https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/)

Zandieh et al.: TurboQuant, arXiv v1, Algorithm 1 and Section 3.1 (https://arxiv.org/html/2504.19874v1)

