Neural Approximate Nearest Neighbor (NANN): Open‑Source Large‑Scale Retrieval with Arbitrary Complex Models
Alibaba’s open‑source Neural Approximate Nearest Neighbor (NANN) library decouples index learning from model training, enabling any TensorFlow‑based deep model to perform high‑throughput, high‑accuracy HNSW‑based retrieval with GPU multi‑streaming, XLA acceleration, graph optimizations, and adversarial training that mitigates L2‑distance mismatch, all supported by ready‑to‑use benchmarks and demos.
Background: Large‑scale information retrieval is a core problem in advertising. Alibaba’s NANN (Neural Approximate Nearest Neighbor) project provides an open‑source solution that decouples index learning from model training, enabling arbitrary‑complex models to be used for recall.
Core functions: NANN is built on native TensorFlow and offers high‑performance HNSW‑based search, GPU multi‑streaming, XLA acceleration, and graph‑level optimizations. It supports model‑training‑index decoupling, adversarial training to preserve retrieval quality, and provides ready‑to‑use benchmarks and demo pipelines.
User‑friendly aspects: The library works entirely within the TensorFlow ecosystem, separates model inference from retrieval, and includes a simple performance testing tool.
Algorithm updates: Recent work adds adversarial training to mitigate the mismatch between L2 distance used in index construction and neural similarity scores, significantly reducing recall loss for complex models, as demonstrated on internal and public datasets (CIKM 2022 paper).
Conclusion: NANN delivers high‑accuracy, high‑throughput KNN search for any deep model and is released under an open‑source license (https://github.com/alibaba/nann). The associated paper is available on arXiv.
Alimama Tech
Official Alimama tech channel, showcasing all of Alimama's technical innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.