Skip to content

Releases: microsoft/DiskANN

DiskANN v0.54.0

15 Jun 19:20
56e1919

Choose a tag to compare

Breaking changes since 0.53.0

Graph search: DataProvider contract collapsed into SearchAccessor (#1067)

Accessor, BuildQueryComputer, ExpandBeam, SearchExt, and AsNeighbor/NeighborAccessor are merged into a single SearchAccessor trait. The indexing layer no longer has a notion of element types.

  • Upgrade: Implement SearchAccessor instead of the removed traits; use SearchAccessor::expand_beam for search. SearchStrategy/InsertStrategy/DefaultSearchStrategy/DefaultPostProcessor now carry a lifetime, and the query is passed into search_accessor (accessors may now borrow the query). SearchPostProcess no longer takes a QueryComputer (only requires HasId). The blanket workingset::Fill impl for workingset::Map was removed — implement Fill yourself, or use the new synchronous Map::fill helper.

Insert/prune: consolidated into PruneAccessor (#1138, follow-up to #1067)

Removed DelegateNeighbor, AsNeighbor, AsNeighborMut, HasElementRef, BuildDistanceComputer, workingset::Fill, and workingset::AsWorkingSet, folded into a single PruneAccessor trait.

  • Upgrade: Implement PruneAccessor (provides neighbors() for neighbor delegation and fill() returning both a View and the distance computer). Note neighbors() now borrows &mut self.

VectorId: removed scalar conversion traits/bounds (#1145, #1133)

Dropped VectorIdTryFrom, TryIntoVectorId, methods vector_id_try_from/try_into_vector_id, helpers vecid_from_u32/vecid_from_usize, and IdConversionError/ErrorToVectorId. Internal IDs no longer need to convert to/from usize.

  • Upgrade: Where usize conversion is still required (e.g. roaring-treemap keys in diskann-label-filter), add an explicit IntoUsize bound (now required on RoaringAttributeStore, InlineBetaStrategy, QueryBitmapEvaluator/BitmapFilter). DiskANNIndex::prune_range now takes impl IntoIterator<Item = DP::InternalId> + Send instead of Range<DP::InternalId> — construct the iterator for your ID type at the call site. SimpleNeighborProviderAsync and bftree::VectorProvider are no longer generic over the ID type (fixed to u32).

DiskIndexReader: dropped vestigial VectorType generic (#1161)

  • Upgrade: Replace DiskIndexReader::<T>::new(...) with DiskIndexReader::new(...).

Filtered search renames (#1149)

MultihopSearchMultihopFilterSearch; benchmark config phases MultiHopSearchPhase/InlineSearchPhaseMultihopFilterSearchPhase/InlineFilterSearchPhase.

  • Upgrade: Update references to the new names.

diskann-garnet FFI: BIN/Q8 quantizers, bumped to 2.0.0 (#1050)

Vectors are now stored as Poly<[u8], AlignOfEight>; a type-erased GarnetQuantizer trait replaces index/provider type parameterization. New FFI: insert() returns a success/training-ready flag, plus build_quant_table() and backfill_quant_vectors() for caller-driven async training/backfill. Accessor renamed to DynamicAccessor; the FSM is now lockable and gained visit_used().

  • Upgrade: Garnet consumers must adopt the new 2.0.0 FFI surface (handle the new insert() return flag and drive build_quant_table/backfill_quant_vectors).

Full list of changes.

Full Changelog: v0.53.0...v0.54.0

diskann-garnet v2.0.4

15 Jun 18:02
6783436

Choose a tag to compare

Fixed handling of start points on fresh indexes.

diskann-garnet v2.0.3

12 Jun 17:19
3012df0

Choose a tag to compare

Fixed race condition where IDs could be handed out multiple times.

diskann-garnet v2.0.2

09 Jun 14:09
543b350

Choose a tag to compare

Fixed issue where quantizer training could be retriggered.

diskann-garnet 2.0.1

05 Jun 20:49
3ef1ac2

Choose a tag to compare

Small bugfix release. Fixes handling of missing quant vectors during delete().

diskann-garnet v2.0.0

02 Jun 14:30
77f9e9d

Choose a tag to compare

This release adds support for I8 vectors as well as binary (BIN) and scalar 8-bit (Q8) quantizers. For f32 vectors, the available quantizers are now NOQUANT, BIN, and Q8. For u8 and i8 vectors, XNOQUANT_U8, XNOQUANT_I8, XBIN_U8, and XBIN_I8 are available.

The version is now 2.0.0 to account for the FFI changes.

Note, quantization support is not yet persisted to disk, so this release should be used for in-memory workloads only. Persistence will follow shortly.

DiskANN v0.53.0

28 May 16:01
f8bbf3e

Choose a tag to compare

DiskANN v0.53.0 Release Notes

Breaking Changes

An AI generated, human reviewed list of changes is summarized below.

Paged search overhauled — channel-based API (#1078)

PagedSearchState and its 'static-bound pause/resume model have been replaced with an async, channel-based interface. The recommended way to drive paged search is now via a tokio::sync::mpsc channel, with the searcher embedded in an otherwise-'static future. See the rendered RFC for the new shape. Callers wired against PagedSearchState must migrate to the channel API.

Users of paged search via wrapped_async::DiskANNIndex that know their inner futures will never suspend can use the new wrapped_async::DiskANNIndex::paged_search_no_await; this will efficiently run paged searches with minimal synchronization overhead.

DiskANNIndex::flat_search removed (#1076)

DiskANNIndex::flat_search and the IdIterator trait have been removed from the diskann crate. Equivalent functionality lives on the new inherent method DiskIndexSearcher::flat_search in diskann-disk. This unblocks the experimental directions in #1067 and #983.

// Before
diskann_index.flat_search(query, ...)?;

// After
disk_index_searcher.flat_search(query, ...).await?;

DiskIndexSearcher::flat_search now batched (#1097)

The new DiskIndexSearcher::flat_search uses the bulk pq_distances path instead of one-vector-at-a-time Accessor::build_query_computer + evaluate_similarity. Downstream behavior is equivalent but tighter resource bounds apply.

centroid removed from PQ interfaces (#1010)

The dataset-centroid argument has been removed from FixedChunkPQTable construction, populate, and most other PQ APIs. The shift only ever worked for L2 distance and was silently ignored for inner-product / cosine, so passing it was a footgun. When an L2 shift is required, fold it into the PQ pivots instead (the library now does this internally).

// Before
let table = FixedChunkPQTable::new(.., centroid, ..);

// After — drop the centroid argument
let table = FixedChunkPQTable::new(.., ..);

Flat search interface (#983)

A new flat module in diskann adds a provider-agnostic brute-force search surface, mirroring the shape of graph search. Backends implement a single trait, DistancesUnordered<C> (in flat/strategy.rs), which fuses iteration and distance computation, allowing any backend (in-memory, quantized, disk, remote) to plug into a shared algorithm. See the rendered RFC. This is additive but is the new canonical surface — direct ad-hoc flat-search call sites should migrate.

bf_tree extracted into diskann-bftree crate (#1020)

The bf_tree provider has been moved out of diskann-providers (previously at diskann-providers/src/model/graph/provider/async_/bf_tree/) into a new standalone diskann-bftree crate. Along with the move:

  • Switched from PQ to spherical quantization.
  • Dropped dependencies on DeletionCheck, AsDeletionCheck, and RemoveDeletedIdsAndCopy.
  • Simplified generics.

Consumers must update their Cargo.toml to depend on diskann-bftree and update import paths.

direct_distance_impl and inner_product_raw re-exposed (#1081)

direct_distance_impl (free function) and FixedChunkPQTable::inner_product_raw are pub again after being privatized in #1044. Restored to unblock a downstream user. Not breaking in the typical direction — this restores previously available API surface.

MinMax recompress takes a grid-scale parameter (#1109)

The MinMax recompress API now accepts a grid-scale parameter.

New Features

  • SIMD-optimized L2-squared norm (#1107)
  • Significantly faster bitmap computation (#1099)
  • Large speedup on the bitmap construction path used by filtered search.
  • LLVM IR bloat regression check in CI (#1083)
  • CI now flags regressions in generated LLVM IR size, helping catch unintended monomorphization blow-ups.
  • Recall computation fix for under-k groundtruth (#1069)

Full List of Changes

New Contributors

Full Changelog: v0.52.0...v0.53.0

diskann-garnet v1.0.27

19 May 23:29
d7bf689

Choose a tag to compare

This release adds stack protectors to the diskann-garnet library.

DiskANN v0.52.0

12 May 21:07
c7dfae6

Choose a tag to compare

DiskANN v0.52.0 Release Notes

Breaking Changes

An AI generated, human reviewed list of changes is summarized below.

get_degree_stats signature changed (#998)

DiskANNIndex::get_degree_stats now takes an explicit iterator of IDs instead of requiring the data provider to implement IntoIterator.

// Before — provider had to impl IntoIterator
index.get_degree_stats(&mut accessor)?;

// After — caller supplies the ID iterator
index.get_degree_stats(&mut accessor, id_iter)?;

PQ dimension contract tightened; entries now &[f32] only (#1044)

With AlignedBoxWithSlice removed from the PQ path, the dimension handling has been refactored into a three-layer contract:

Layer Where Contract
Boundary (inmem) QueryComputer::new, MultiQueryComputer::new, DistanceComputer::evaluate_similarity len == dim (returns Err on mismatch)
Boundary (disk) PQScratch::set len >= dim, slices to [..dim]
Internal TableL2/IP/Cosine::{new, populate} Trusted — no re-validation

Other changes:

  • PQ table populate/distance methods now accept &[f32] instead of <U: Into<f32>>. Callers must pre-decode quantized vectors via VectorRepr::as_f32.
  • Generic trampoline impls (&Vec<u8>, &&[u8]) on QueryComputer / DistanceComputer have been removed.

calculate_chunk_offsets relocated to ChunkOffsets constructors (#976)

The free functions calculate_chunk_offsets and calculate_chunk_offsets_auto have been moved into constructors on ChunkOffsets / ChunkOffsetsView in diskann-quantization::views.

// Before
let offsets = calculate_chunk_offsets(dim, num_chunks);

// After (allocating)
let offsets = ChunkOffsets::partition(dim, num_chunks)?;

// After (zero-alloc, borrows caller-owned scratch)
let view = ChunkOffsetsView::partition_into(dim, &mut scratch)?;

Additionally, get_chunk_from_training_data has been moved from public API.

CachingProvider removed (#1052)

The entire diskann_providers::model::graph::provider::async_::caching module has been deleted.

Why: The CachingProvider was an experiment in transparent caching over DataProvider. In practice it required double monomorphization of the indexing code, didn't save integration work for bulk methods like on_elements_unordered/distances_unordered, and was complex to maintain. An internal user who …migrated off it removed ~1,000 lines of code, improved compile times by ~20%, and substantially reduced complexity.

Upgrade: Manage caching directly in your DataProvider implementation.

New Features

AVX-512 4-bit distance kernels (#1045)

Native V4 (AVX-512) specializations for 4-bit packed vector distance computations:

  • SquaredL2 — 16 × u32 lanes per iteration via _mm512_madd_epi16.
  • InnerProduct — AVX-512 VNNI (_mm512_dpbusd_epi32) over u8x64 / i8x64 operands.

Previously, V4 hardware fell back to two AVX2 (V3) kernel invocations per 512-bit chunk. The native kernels double per-instruction throughput. No API changes — existing code benefits automatically on AVX-512 capable hardware.

Merged PRs

New Contributors

Full Changelog: v0.51.0...v0.52.0

DiskANN v0.51.0

05 May 20:21
d06369e

Choose a tag to compare

What's Changed

Full Changelog: v0.50.1...v0.51.0