Lesson 4.2

Recall vs compression: the curve

Put the two rulers on one plot and you get the curve every quantizer competes on. This is the artifact the whole project builds toward.

concepts 8 min read

The plot that decides everything

Compression ratio on one axis, recall on the other. Sweep a method's settings, from gentle to aggressive, and it traces a curve: cheap and accurate on the left, tiny and lossy on the right. This single picture is the deliverable of v1. It answers the only question that matters in practice: at the memory budget I can afford, how good is search still?

Drag the operating point (one chosen setting, a single dot on the curve) along the product quantization curve below. Push right for more compression and watch recall give way. The int8 point sits on its own, fixed at 4 times compression with very high recall. The shapes here are illustrative, drawn to show how the curve behaves, not measured; the real numbers come from running the benchmark on a real dataset.

Drag along the curve: more compression, less recall

recall compression → int8

ratio 16×  ·  recall@10 0.93

The recall-versus-compression curve is how methods are compared. A better quantizer is one whose curve sits higher and to the right: more recall at the same compression.

How to read a winner

You rarely care about a single point; you care about the whole curve. Method A beats method B if its curve is above B's across the range you care about. Sometimes curves cross: one method wins at gentle compression, another at aggressive. That is exactly the kind of honest, specific claim this plot lets you make, and the kind the research lessons in the next unit will put to the test.

Key takeaways

1

The recall-versus-compression curve is v1's deliverable and the basis for every comparison.

2

A method wins where its curve sits higher; curves can cross, so the winner can depend on the budget.

3

Real numbers come from running the benchmark on a real dataset; demo shapes are only illustrative.