RESEARCH PROTOTYPE · LEARNED DATA STRUCTURES · VECTOR SEARCH

Learned ANN Index

Can a learned recursive partition model guide embedding search? This prototype explores centroid-based RMI routing with exact or HNSW leaf search and compares quality, throughput, build time, and memory with IVF-PQ and optional HNSW/ScaNN baselines.

This is a research experiment, not a claim that learned routing outperforms mature ANN systems. Its bundled dataset is synthetic; evaluate representative, authorized embeddings before drawing conclusions.

Learned routing, measured trade-offs

The benchmark reports recall@k against brute-force ground truth, sequential QPS, build time, and documented memory estimates. The Streamlit dashboard plots the recall/QPS frontier.

Run a reproducible synthetic benchmark

cd learned-ann
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,dashboard]"
learned-ann benchmark \
  --vectors 4000 --queries 160 --dimension 32 \
  --indexes learned-rmi ivf-pq \
  --output results/ann-benchmark.json
streamlit run dashboard.py

Native baselines are optional extras; hardware, dataset, query batching, and index parameters affect comparisons. The project README documents what memory and QPS do and do not measure.

Read the project README·Explore the RAG research project