Skip to content

research(nightly): PDX columnar vector layout with dimension-pruning scan#441

Draft
ruvnet wants to merge 4 commits intomainfrom
research/nightly/2026-05-08-pdx-columnar-scan
Draft

research(nightly): PDX columnar vector layout with dimension-pruning scan#441
ruvnet wants to merge 4 commits intomainfrom
research/nightly/2026-05-08-pdx-columnar-scan

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented May 8, 2026

Summary

  • Topic: PDX: Columnar Vector Layout with Dimension-Pruning Search (SIGMOD 2025, arXiv:2503.04422)
  • ADR: ADR-193 — docs/adr/ADR-193-pdx-columnar-scan.md
  • Research doc: docs/research/nightly/2026-05-08-pdx-columnar-scan/README.md
  • Crate: crates/ruvector-pdx/ — first Rust implementation of PDX
  • Gist: https://gist.github.com/ruvnet/6cab9351160fa5a75193a25ae0442753

What PDX is

Traditional vector stores use row-major layout: each vector occupies a contiguous
row of D floats. Accessing dimension d across N vectors requires stride-D loads —
not SIMD-friendly. PDX transposes within each partition block so dimension d is
stored as a contiguous column of N floats, making the inner loop stride-1 and
enabling LLVM to auto-vectorise with AVX2/AVX-512.

Real benchmark results (x86_64 --release, 100% recall all variants)

Variant n D QPS vs Row-Major
RowMajorIndex 10K 96 2,023 1.0× baseline
PdxFlatIndex 10K 96 4,726 +2.34×
PdxPruneIndex 10K 96 4,057 +2.01×
RowMajorIndex 10K 384 400 1.0×
PdxFlatIndex 10K 384 1,148 +2.87×
PdxPruneIndex 10K 384 1,002 +2.50×
RowMajorIndex 50K 384 59 1.0×
PdxFlatIndex 50K 384 202 +3.42×
PdxPruneIndex 50K 384 162 +2.75×

Speedup grows with D — highest impact on 384D and 1536D text embeddings.

Deliverables

  • crates/ruvector-pdx/ — new crate with 3 backends + 12 integration tests + benchmark binary
  • cargo build --release -p ruvector-pdx
  • cargo test -p ruvector-pdx ✅ (12/12 passed, no mocks)
  • cargo run --release -p ruvector-pdx ✅ (real benchmark numbers above)
  • docs/adr/ADR-193-pdx-columnar-scan.md
  • docs/research/nightly/2026-05-08-pdx-columnar-scan/README.md

Test plan

  • Review crates/ruvector-pdx/src/index.rs — three backends behind AnnIndex trait
  • Verify cargo test -p ruvector-pdx passes (all 12 tests)
  • Review ADR-193 for architectural soundness
  • Consider P0 roadmap items: block_size=256, ruvector-cluster integration

https://claude.ai/code/session_018oQ9jHA4QPFk5h15nEw61T

claude added 4 commits May 8, 2026 16:06
…sion-pruning scan

Implements PDX (Kuffo, Krippner, Boncz — SIGMOD 2025, arXiv:2503.04422):
transpose vector storage from row-major to columnar within each partition block
so LLVM auto-vectorises the distance kernel without hand-written intrinsics.

Three backends behind the AnnIndex trait:
- RowMajorIndex: row-major brute-force baseline (100% recall)
- PdxFlatIndex:  PDX columnar layout, no pruning (2.16–3.42× faster)
- PdxPruneIndex: PDX + exponential lower-bound pruning (2.01–2.75× faster)

Measured results (x86_64 --release, 200 queries, 100% recall all variants):
  n=10K D=96:  RowMajor 2,023 QPS → PdxFlat 4,726 QPS (+2.34×)
  n=10K D=384: RowMajor 400 QPS   → PdxFlat 1,148 QPS (+2.87×)
  n=50K D=128: RowMajor 283 QPS   → PdxFlat 610 QPS   (+2.16×)
  n=50K D=384: RowMajor 59 QPS    → PdxFlat 202 QPS   (+3.42×)

12 integration tests, zero mocks, zero unsafe. First Rust implementation of PDX.

https://claude.ai/code/session_018oQ9jHA4QPFk5h15nEw61T
…g scan

Records the decision to add ruvector-pdx as a new crate implementing the
SIGMOD 2025 PDX data layout. Documents speedup measurements, integration
path into ruvector-cluster, and alternatives considered (AVX2 intrinsics,
simsimd, MRL, Product Quantization).

https://claude.ai/code/session_018oQ9jHA4QPFk5h15nEw61T
Comprehensive research document covering:
- SOTA survey: PDX vs FAISS/Qdrant/Milvus/LanceDB layout strategies
- How-it-works walkthrough (blog-readable)
- Real benchmark numbers from cargo run --release -p ruvector-pdx
- Practical failure modes (small blocks, uniform data, NUMA)
- Roadmap: block_size=256, ruvector-cluster integration, ADSampling χ² bound
- Production crate layout proposal

https://claude.ai/code/session_018oQ9jHA4QPFk5h15nEw61T
Registers crates/ruvector-pdx in the workspace so cargo build --workspace
and cargo test --workspace include the new PDX crate automatically.

https://claude.ai/code/session_018oQ9jHA4QPFk5h15nEw61T
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