Skip to content

research(nightly): soar-ivf — SOAR orthogonality-amplified IVF spilling (NeurIPS 2023)#440

Draft
ruvnet wants to merge 2 commits intomainfrom
research/nightly/2026-05-08-soar-ivf
Draft

research(nightly): soar-ivf — SOAR orthogonality-amplified IVF spilling (NeurIPS 2023)#440
ruvnet wants to merge 2 commits intomainfrom
research/nightly/2026-05-08-soar-ivf

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented May 8, 2026

Summary

  • Adds crates/ruvector-soar: first IVF-based index in ruvector and first open-source Rust implementation of SOAR (NeurIPS 2023, arXiv:2404.00774)
  • Adds docs/research/nightly/2026-05-08-soar-ivf/README.md: SOTA survey, algorithm walkthrough, benchmark results, failure modes, roadmap
  • Adds docs/adr/ADR-193-soar-ivf.md: decision record with full alternatives analysis

Gist: https://gist.github.com/ruvnet/5e14de7710aed52b8d28c9ba739849d1

What is SOAR?

SOAR (Spilling with Orthogonality-Amplified Residuals, Sun et al. Google Research, NeurIPS 2023) solves the IVF boundary problem: vectors near Voronoi cell boundaries miss queries that land in the adjacent cell. SOAR assigns each vector a secondary cluster chosen by minimising:

L(c') = ‖v − c'‖² + λ · [(v−c)·(v−c')]² / ‖v−c‖²

This penalises secondary residuals parallel to the primary residual, ensuring the secondary cluster is strong in exactly the query directions where the primary is weak. Deployed at Google Cloud Vertex AI Vector Search.

Benchmark results (Intel Xeon @ 2.10GHz, cargo run --release)

Variant n D nprobe Recall@10 QPS mem/KB
Flat-Exact 2K 64 100.0% 9,203 0
IVF-PQ 2K 64 1 49.5% 70,301 28.4
SOAR-IVF-PQ 2K 64 1 59.9% 53,100 36.2
IVF-PQ 10K 128 2 41.1% 22,886 227
SOAR-IVF-PQ 10K 128 2 42.9% 20,938 266

cargo build --release -p ruvector-soar
cargo test -p ruvector-soar — 5/5 tests pass ✅

Test plan

  • cargo build --release -p ruvector-soar passes
  • cargo test -p ruvector-soar — 5 tests green
  • cargo run --release -p ruvector-soar -- --fast produces reasonable recall numbers
  • Review ADR-193 decision rationale
  • Review research doc benchmark table (real numbers, no aspirational values)

https://claude.ai/code/session_018ZoaZ5LadzrnnQYeKNUe2c

claude added 2 commits May 8, 2026 16:05
…lified residual spilling

Implements SOAR-IVF (Sun et al., NeurIPS 2023, arXiv:2404.00774) as a new
standalone Rust crate. First IVF-based index in the ruvector workspace and
first open-source Rust implementation of SOAR.

Three index variants under SoarIndex / IndexKind:
- Flat: exact brute-force baseline
- IvfPq: IVF + Product Quantization (ADC)
- SoarIvfPq: IVF + PQ + orthogonality-amplified secondary spilling

Benchmark results (Intel Xeon @ 2.10GHz, --release):
- SOAR nprobe=1: +10.4pp recall@10 vs IVF-PQ (59.9% vs 49.5%), n=2K D=64
- SOAR nprobe=2: +1.8pp recall@10 vs IVF-PQ (42.9% vs 41.1%), n=10K D=128
- Memory overhead: +17% for secondary lists (266 KB vs 227 KB)
- Build time overhead: <2% vs plain IVF-PQ

Files:
  crates/ruvector-soar/Cargo.toml
  crates/ruvector-soar/src/{lib,error,kmeans,pq,index,main}.rs
  crates/ruvector-soar/benches/soar_bench.rs

cargo build --release -p ruvector-soar ✓
cargo test -p ruvector-soar — 5/5 tests pass ✓

https://claude.ai/code/session_018ZoaZ5LadzrnnQYeKNUe2c
Research document: docs/research/nightly/2026-05-08-soar-ivf/README.md
- SOTA survey (NeurIPS 2023, competitor analysis, related 2024 work)
- Full algorithm walkthrough and blog-readable explanation
- Measured benchmark results from cargo run --release
- Practical failure modes and production improvement roadmap

ADR-193: docs/adr/ADR-193-soar-ivf.md
- Context: no IVF-based index existed in ruvector workspace
- Decision: SoarIndex with Flat / IvfPq / SoarIvfPq variants
- Consequences: +17% memory, +10pp recall at nprobe=1, 5 alternatives considered

https://claude.ai/code/session_018ZoaZ5LadzrnnQYeKNUe2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants