submited by

Style Pass

Scalable Nearest Neighbors (ScaNN) is a vector similarity search algorithm and it is used in Vertex Matching Engine (GCP), which is a managed similarity search service. The vector similarity search field has been studied for many years, so usually the latest state-of-the-art algorithm is slightly better than the previous one.

However, in this case, the ScaNN achieved significantly different results. The QPS is almost double compared to the following algorithm.

The similarity search is to find the most similar vector to a given query vector. There are some ways to calculate similarities, like inner product, cosine similarity and Euclidean distance.

Intuitively, vector a or b is the closest or similar to the query vector q in the figure above, but vector c is the similar vector based on inner product maximization. ScaNN was developed for MIPS

Score Aware Loss: Not all pairs of q and x are equally important. For x, it is more important to accurately quantize the inner product of <q1, x> than <q2, x> or <q3, x>.

Read more medium.com/@...