Conversation
Implements ACORN (SIGMOD 2024, arXiv:2402.02970) predicate-agnostic filtered approximate nearest-neighbour search as a new standalone crate. Three swappable search strategies via SearchVariant: - PostFilter: unfiltered NSW search, discard non-passing results - Acorn1: strict filter during graph traversal - AcornGamma: full ACORN-γ with neighbour compression (γ=2) Measured results (n=10K, dim=128, release, x86-64): - 1% selectivity: ACORN-γ → 93.0% recall vs PostFilter 76.8% (+16.2pp) - 10% selectivity: ACORN-γ 739µs/q vs PostFilter 811µs/q (ef=64 vs 256) - Criterion benchmarks in benches/acorn_bench.rs cargo build --release -p ruvector-acorn: PASS cargo test -p ruvector-acorn: 8/8 unit + 1 doctest PASS https://claude.ai/code/session_01Yaiuqanu8hvTKKGdSx6Rtf
ADR-155 documents the architectural decision to introduce predicate-agnostic filtered ANN search via NswGraph neighbour compression (ACORN-γ, γ=2). Research document covers: - SOTA survey (ACORN, SIEVE, FCVI, Qdrant, Weaviate, FAISS) - Benchmark methodology and real numbers from cargo --release - How-it-works walkthrough (blog-readable) - Practical failure modes and production layout proposal - Roadmap: FCVI (ADR-156 candidate, arXiv:2506.15987) https://claude.ai/code/session_01Yaiuqanu8hvTKKGdSx6Rtf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Nightly research 2026-04-24: ACORN — Predicate-Agnostic Filtered Approximate Nearest-Neighbour Search (SIGMOD 2024, arXiv:2402.02970).
docs/research/nightly/2026-04-24-acorn-filtered-anns/README.mddocs/adr/ADR-155-acorn-filtered-anns.mdcrates/ruvector-acorn/—cargo build --release✅ ·cargo test9/9 ✅Problem addressed
ruvector-filter provides payload expression evaluation, but ruvector-core's PostFilter/PreFilter strategies collapse in recall at <10% selectivity. At 1% filter selectivity (a realistic e-commerce scenario), PostFilter achieves only 76.8% recall@10. ACORN fixes this by decoupling graph navigation from result collection.
Key results (x86-64, release, n=10K, dim=128, M=16, γ=2)
+16.2 pp recall improvement at 1% selectivity vs PostFilter baseline.
Criterion micro-benchmarks (n=5K, 10% selectivity):
What was implemented
Three swappable strategies:
SearchVariant::PostFilter— baselineSearchVariant::Acorn1— strict filter during traversalSearchVariant::AcornGamma— full ACORN-γ with neighbour compressionRoadmap (ADR-156 candidate)
FCVI (Filter-Centric Vector Indexing, arXiv:2506.15987, aiDM'25 June 2025) encodes filter predicates into the vector space via a linear transformation before indexing — no graph surgery, 2.6–3.0× higher QPS than pre-filtering. Identified by the nightly goal-planner as the next step.
Test plan
cargo build --release -p ruvector-acorn— compiles cleancargo test -p ruvector-acorn— 8 unit tests + 1 doctest passcargo bench -p ruvector-acorn— criterion benchmarks produce real latency numberscargo run --release -p ruvector-acorn --bin acorn-demo— end-to-end recall table printedSEO-optimised overview (gist content)
ruvector 2026: ACORN Filtered ANNS — High-Performance Rust Vector Search with Predicate-Agnostic Graph Traversal
ruvector now ships ACORN (SIGMOD 2024) filtered approximate nearest-neighbour search in pure Rust — achieving 93% recall@10 at 1% filter selectivity, a 16-point improvement over post-filter baselines. No unsafe code, no external BLAS.
Problem
Filtered vector search ("find top-10 similar images in category='electronics' with price < $50") is broken in every vector database that uses naive post-filter or pre-filter strategies:
ACORN-γ: The Fix
ACORN decouples graph navigation from result collection:
Features
PostFilter,Acorn1,AcornGammaBenchmarks (x86-64 Linux, rustc release, n=10K, dim=128)
Hardware: x86-64 Linux, rustc 1.77, no external SIMD or BLAS.
Comparisons
Get Started
Branch:
research/nightly/2026-04-24-acorn-filtered-annsRepo: https://github.com/ruvnet/ruvector
ADR: docs/adr/ADR-155-acorn-filtered-anns.md
Research: docs/research/nightly/2026-04-24-acorn-filtered-anns/README.md
https://claude.ai/code/session_01Yaiuqanu8hvTKKGdSx6Rtf
Generated by Claude Code