ACHIEVEMENTS.AI

FAISS: Facebook AI Research Library for Efficient Similarity Search

In 2017, Jeff Johnson, Matthijs Douze, and Hervé Jégou at Facebook AI Research published FAISS (Facebook AI Similarity Search), a library enabling efficient nearest-neighbour search across datasets of billions of vectors, with GPU acceleration substantially reducing search time compared to prior methods.

Diagram or chart illustrating vector similarity search across a large dataset
Compute and infrastructureMachine learningAI hardwareFoundational methodIndependently validated

Background

By the mid-2010s, machine learning systems were producing vectors at enormous scale. A vector, in this context, is a list of numbers that encodes something: an image, a piece of text, a user’s listening history. To find similar items, you find vectors that are close together in this numerical space. The problem is that doing this naively, by comparing your query against every single entry in a database, gets very slow very fast.

Researchers had known for years how to speed this up using approximate methods. Product quantisation, a technique that compresses vectors by breaking them into smaller chunks and approximating each one, had been well-studied since at least 2011. Inverted file indexes, borrowed from text search, could narrow a search to a relevant subset of the database before doing fine-grained comparisons. These ideas worked well in the millions. Billions were a different matter.

At that scale, even reading the index from memory becomes a bottleneck. Running these searches fast enough to be useful in production required careful engineering: the right data structures, tight control over memory, and code written to run well on modern hardware. Most of the implementations that existed were research prototypes or proprietary systems inside large technology companies. There was no widely available, well-optimised library that a team outside those companies could simply use.

What happened

In 2017, Jeff Johnson, Matthijs Douze, and Hervé Jégou at Facebook AI Research published a paper, “Billion-scale similarity search with GPUs”, setting out both the problem and their approach to it. The core contribution was not any single new algorithm but a careful combination of existing indexing methods, re-engineered to run efficiently on graphics processors. GPUs are built to do many simple calculations at once, which suits similarity search well, and the team wrote code that could spread the work across multiple GPUs at the same time.

The library they built to go with the paper, FAISS (Facebook AI Similarity Search), was released publicly on GitHub the same year. It brought together several indexing strategies, including product quantisation and inverted file indexes, in a single package with a clean interface. Users could choose how much to compress their index depending on how much memory they had and how much accuracy they were willing to trade.

The results described in the paper showed searches across one billion vectors completing in times that would be practical for real applications, substantially faster than CPU-based approaches at that scale. Making the library open source meant that teams without Facebook’s infrastructure could run the same methods on their own hardware, building retrieval systems and recommendation engines that would previously have required far more specialised resources.

Why it mattered

Nearest-neighbour search at billion-scale was a practical bottleneck for retrieval-based machine learning systems, recommendation engines, and large-scale image search. FAISS provided open, optimised implementations of indexing structures such as inverted files and product quantisation, making billion-scale similarity search tractable without specialised infrastructure. Its public release allowed researchers and engineers outside large technology companies to build systems that previously required proprietary, heavily resourced pipelines.

People

Jeff Johnson, Matthijs Douze, Herve Jegou

Organisations

Facebook AI Research

Sources

Cite this page

AI Achievements. (2017). FAISS: Facebook AI Research Library for Efficient Similarity Search. Retrieved 2026-08-22, from https://achievements.ai/milestone/faiss-by-facebook-ai-research

@misc{achievements_faiss_by_facebook_ai_research,
  title  = {FAISS: Facebook AI Research Library for Efficient Similarity Search},
  author = {{AI Achievements}},
  year   = {2017},
  url    = {https://achievements.ai/milestone/faiss-by-facebook-ai-research}
}

Verification: disputed · Last verified 2026-08-22 ·3 sources · Authored by agent
Date note: The FAISS library was introduced in the paper 'Billion-scale similarity search with GPUs' by Johnson, Douze, and Jégou, submitted to arXiv in February 2017 (arXiv:1702.08734). The library was open-sourced on GitHub in 2017. The legacy entry date of 2019-04-17 likely refers to a later blog post or update on the Facebook AI tools page, not the original publication or release. Day-level precision from the legacy entry is unsupported and has been discarded. SOURCES DISAGREE, human decision required.