OriginChain docs
docs · vector · IVF-PQ

IVF-PQ (residualised).

IVF-PQ is the residualised version of IVF from Jegou, Douze, & Schmid (2011). The key correctness point: PQ is not applied to the raw vector — it is applied to the residual of the vector against its assigned centroid. That keeps codebook entries close together in distance space, which keeps recall recoverable even at aggressive memory factors.

Why residualised matters.

A naive PQ over the raw vector loses geometry that the IVF centroid already encodes. Residualised PQ stores only the offset from the assigned centroid; the LUT (look-up-table) at query time is computed per query against the cell centroid, then distances are read off the table in O(M) per candidate. That is the move that makes the memory math work without collapsing recall.

Memory math.

M=16 sub-vectors, ksub=256, residualised per cell. Add a few extra bytes per vector for cell id + tombstone bit.

dimraw f32IVF-PQfactor
128 512 B / vec 16 B / vec + cell id 64×
384 1.5 KB / vec 24 B / vec + cell id ~200×
768 3.0 KB / vec 32 B / vec + cell id ~400×
1536 6.0 KB / vec 48 B / vec + cell id 768×

Recall floor.

The synthetic acceptance floor for IVF-PQ is recall@10 = 0.948 at nprobe=4. Above that, every CI run for the index path has to clear the same gate or the build fails. Your production numbers will sit above the floor on most real corpuses — Zipfian / clustered distributions are friendlier to IVF than a uniform synthetic.

The 10M+ scale story.

Cyclone-class tenants running IVF-PQ have verified 10M+ vectors in steady state. The IVF bulk-load path lands 1M vectors in 80 s (was > 18 min pre-Gate-#4). On Tier 1 / Tier 2 compute, the practical ceiling is the compute budget rather than the index — IVF-PQ helps but does not make a smaller box infinite. See the pricing footnote on resources for the honest framing.