Vector Quantification: Small reconstruction errors may also change the name of the nearest neighbour
Vector Quantification maps successive values to limited code words, reducing storage and distance costing.
Learning objectives and first steps2 objectives 2 first fixes
Try to do it after reading
- Departure from calculation of metric quantitative error
- Distinguishing compression error from search approximate error
Suggested first
- Inner vectors & Parameters
- Classified loss and gradient
Storage accuracy changed distance
Vector Quantification maps successive values to limited code words, reducing storage and distance costing. It may be quantified by coordinates or by block code, with different sources of error. Quantified search comparisons are proximate indications that return distance cannot be considered as the exact distance of the original vector.
Query q = 0.49, candidate a = 0.40, b = 0.55, with range 0.09 and 0.06 respectively, b closer. If the candidate is close to quantification by 0.2 steps, a becomes 0.4, b becomes 0.6, distance is 0.09 and 0.11, with a nominal reverse. Each candidate was not a big error, but the original scores were even smaller.
Therefore, the assessment of the compression cannot be seen solely as an average reconstruction error. Checks will also be made of the stability of the ranking of the immediate neighbourhood recall, mission indicators, end-groups and similar candidates. (b) Some significant errors occur in unrelated directions with minor impact; Some minor errors have just crossed decision-making boundaries and have had a significant impact.
There's a data boundary in the code book training
The learning-based quantitative code should have covered the expected candidate distribution. Only one small vector is used for training, and application to new sources may lead to significant errors. The old code book does not necessarily continue to apply after the model update has resulted in a spatial change in the embedded space, and the encoder, code book and index require an accompanying version.
There was another layer of error in the near search, such as access to only some of the partitions. Quantified errors can be separated by first using full and accurate searches, compared with those of the original vector; Add a similar search structure to observe additional losses. It is difficult to know where the bottleneck comes from, when the two layers go together.
Re-ordering is a common compromise: the larger pool of candidates is obtained by compressed indexes and then by raw or higher precision vectors. It can repair the recall sequence and cannot retrieve records from the first phase that have never been recalled. The size of the pool and the additional memory, the delay, need to be assessed jointly.
This section uses the concept of an official index and distance for Faiss, which is marked as a quantitative step for synthetic teaching and does not represent its specific PQ achievement. The value is a manual calculation.
Value recovery
q=0.49;a=0.4;b=0.55assert abs(q-b)<abs(q-a)b_quant=round(b/0.2)*0.2assert abs(q-b_quant)>abs(q-a)The average reconstruction error is very small. Can you guarantee that top1 remains unchanged?
It is not possible to reverse the number of scores with a slight error if the original score is smaller.
Can the second stage of the rehearsal restore the unscreened candidate?
It cannot, however, re-hungry the record of entry into the pool of candidates, and the initial screening recall still needs independent validation.
If the index uses a square distance, the errors before and after quantification are also compared under the same unit. The difference between real distance on one side and square distance on the other side cannot be considered a compression error.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.