Google AI Introduces SOAR: An Algorithmic Improvement to Vector Search that Introduces Effective and Low-Overhead Redundancy to ScaNN

Google AI researchers introduced ScaNN vector search library to address the need of efficient vector similarity search, which is a critical component of many machine learning algorithms. Existing methods for vector similarity calculation work well with small datasets, but as datasets continue to grow and new applications come up, the demand for further improvements in scalability and performance grows. SOAR (Spilling with Orthogonality-Amplified Residuals) is an algorithmic improvement to ScaNN that is meant to make vector search faster while reducing the amount of work that needs to be done.

Currently used methods for ScaNN utilize a clustering-based approach where each vector in the dataset is assigned to a single k-means cluster. However, these approaches encountered difficulties when the query vector was highly parallel to the residual, which is the difference between a vector and its assigned cluster center. This often resulted in missed nearest neighbors, particularly in scenarios where the query’s similarity to the cluster center did not accurately represent its similarity to individual vectors within the cluster. SOAR addresses this limitation by introducing redundancy through secondary assignments, allowing vectors to be assigned to multiple clusters. Additionally, it modifies the loss function to optimize for independent and effective redundancy, ensuring that secondary clusters contribute meaningfully to the search process.

✅ [Featured Article] LLMWare.ai Selected for 2024 GitHub Accelerator: Enabling the Next Wave of Innovation in Enterprise RAG with Small Specialized Language Models

SOAR is implemented by assigning vectors to multiple clusters and using a modified loss function to encourage orthogonal residuals. This approach significantly enhances search accuracy at a fixed computational cost or reduces the search cost needed to achieve the same level of accuracy. Experimental results demonstrate that SOAR enables ScaNN to maintain its advantages in low memory consumption, fast indexing speed, and hardware-friendly memory access patterns while gaining an additional algorithmic edge. ScaNN with SOAR has querying throughputs that are several times higher than similar libraries with similar indexing times. This makes it the best choice for vector search performance in several benchmarks, such as the ann-benchmarks glove-100 dataset and the Big-ANN 2023 benchmarks.

In conclusion, the paper presents a promising solution to the challenge of efficient vector similarity search through the introduction of SOAR to the ScaNN library. By incorporating redundancy and optimizing the assignment process, SOAR significantly improves search accuracy and performance without sacrificing key metrics such as memory consumption and indexing speed. The advancement showcases the importance of algorithmic innovation in meeting the ever-growing demands of machine learning applications with respect to vector search.


Check out the Paper and Blog. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter. Join our Telegram Channel, Discord Channel, and LinkedIn Group.

If you like our work, you will love our newsletter..

Don’t Forget to join our 40k+ ML SubReddit


For Content Partnership, Please Fill Out This Form Here..

Pragati Jhunjhunwala is a consulting intern at MarktechPost. She is currently pursuing her B.Tech from the Indian Institute of Technology(IIT), Kharagpur. She is a tech enthusiast and has a keen interest in the scope of software and data science applications. She is always reading about the developments in different field of AI and ML.

[Free AI Webinar] 'How to Build Personalized Marketing Chatbots (Gemini vs LoRA)'.