← AVIATION GLOSSARY
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Aviation glossary

What is FAISS?

Vector Search · Machine Learning 8 languages
Definition
FAISS is an open-source library that searches a set of dense vectors for the vectors closest to a query vector.

FAISS is an open-source library that searches a set of dense vectors for the vectors closest to a query vector. The name stands for Facebook AI Similarity Search. The project spells it “Faiss”.

What it does

A dense vector is a fixed-length list of numbers. A neural network can turn an image or a text into such a vector, which is called an embedding. FAISS stores many vectors in an index. Given a query vector, it returns the nearest vectors and their distances. It compares vectors with L2 (Euclidean) distance or dot product. It also supports cosine similarity, which is the dot product of normalized vectors.

Meta’s Fundamental AI Research group develops FAISS. The library is written in C++ and has Python wrappers. Some algorithms also run on a GPU.

Index types

The index type sets the balance between speed and exactness.

  • IndexFlatL2 and IndexFlatIP compare the query with every vector, so the result is exact. IndexFlatIP uses the inner product. With normalized vectors it gives cosine similarity.
  • IndexIVFFlat splits the vectors into nlist cells. A query searches only nprobe of them. This is faster, but the nearest neighbor can be missed if its cell is not searched.
  • IndexHNSWFlat searches a graph of the vectors (a hierarchical navigable small world graph).
  • IndexIVFPQ adds product quantization, which stores each vector in compressed form.

Most indexes must be trained on example vectors before use. IndexFlatL2 does not need training.

Scale

FAISS can search sets of vectors that do not fit in RAM. In the 2017 paper, the authors built a nearest neighbor graph of 1 billion vectors in under 12 hours on 4 GPUs.

Frequently Asked Questions

Who develops FAISS and what language is it written in?
FAISS is developed primarily at Meta's Fundamental AI Research group. It is written in C++ and has wrappers for Python and numpy. The code is MIT-licensed. Meta announced it in March 2017.
Is FAISS a vector database?
No. FAISS is a library that you call from your own program. Its project page describes it as a library for similarity search and clustering of dense vectors, not as a database.
How does FAISS find cosine similarity?
FAISS compares vectors with L2 distance or dot product. For cosine similarity, first normalize the vectors to unit length. Then use an inner product index such as IndexFlatIP. Cosine similarity is the dot product of normalized vectors.
Does FAISS always return the exact nearest neighbor?
No. The flat indexes (IndexFlatL2 and IndexFlatIP) search every vector and so return exact results. Partitioned indexes such as IndexIVFFlat search only some of the data. They are faster, but they lose the guarantee to find the nearest neighbor.

References

faiss-github
facebookresearch/faiss, README Meta Fundamental AI Research (GitHub)
faiss-wiki-indexes
Faiss indexes (Faiss wiki) Meta Fundamental AI Research (GitHub)
faiss-wiki-getting-started
Getting started (Faiss wiki) Meta Fundamental AI Research (GitHub)
faiss-meta-2017
Faiss: A library for efficient similarity search Engineering at Meta

This is a reference entry. TarmacView provides drone inspection services and doesn't sell the equipment or materials described in this glossary.

Get Started Need your airfield lighting verified? TarmacView inspects PAPI, runway and approach lighting by drone, between aircraft movements, and delivers a compliance report built for your regulator. Pavement and obstacle inspection are in development.
Keep reading

Learn more

03 PAGES
k-Nearest Neighbors (kNN)
glossary

k-Nearest Neighbors (kNN)

The k-nearest neighbors (kNN) algorithm assigns a class by majority vote among the k closest stored points. How it works, how to choose k, and where it fails.

Embedding Space
glossary

Embedding Space

An embedding space is a high-dimensional mathematical space in which objects such as images, text, or sensor data are represented as vectors, enabling similarity search and pattern recognition in AI-powered infrastructure inspection systems.

DINOv3 Vision Transformer
glossary

DINOv3 Vision Transformer

DINOv3 (self-DIstillation with NO labels v3) is a self-supervised vision transformer (ViT-B/16) pretrained on 1.7 billion images, producing high-quality 768-dimensional embeddings that capture fine-grained texture and structure. TarmacView models in development use DINOv2 and DINOv3 backbones, for different purposes. Covers DINO training, ViT architecture, fine-tuning for domain tasks, and…