HNSW (Hierarchical Navigable Small Worlds) implementation as fdb-extension #3598
+6,915
−2
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.
This PR implements a HNSW (Hierarchical Navigable Small World) structure as an part of
fdb-extension
according to https://arxiv.org/pdf/1603.09320.Vector
that holds component data usingHalf
s which are FP16 encoded.M
the optimal number of connections between nodes within a layer of the HNSWMMax
the maximum number of connections between nodes within a layer of the HNSWMMax0
the maximum number of connections between nodes within layer0
of the HNSWefConstruction
the size of the search queue during thorough (non-greedy) searches during insertionextendCandidates
a boolean indicating if we should extend the candidates we can connect to to by also searching within the neighbors of already found candidateskeepPrunedConnections
a boolean indicating whether under certain circumstances discarded candidates to connect to are reevaluated