Skip to content

support ACORN-1 #673

Open
cpegeric wants to merge 10 commits intounum-cloud:mainfrom
cpegeric:acorn-1
Open

support ACORN-1 #673
cpegeric wants to merge 10 commits intounum-cloud:mainfrom
cpegeric:acorn-1

Conversation

@cpegeric
Copy link
Contributor

@cpegeric cpegeric commented Oct 29, 2025

Support ACORN-1 by visiting 2-hop-neighbors.

This is the first time to modify the C++ usearch code. This is just the proposal of ACORN-1. Please consider this change and amend whatever you feel appropriate.

  • So, to implement ACORN-1, when visiting a node in the HNSW search, we take the neighbors and 2-hop neighbors of the node, and for those that pass the filter, computes their distance to the query vector to see if they are relevant.
  • stick to original HNSW model and ACORN-1-inspired heuristic only on the lowest layer of the graph.

@cpegeric cpegeric marked this pull request as draft October 29, 2025 16:21
@cpegeric cpegeric closed this Oct 29, 2025
@cpegeric cpegeric reopened this Oct 29, 2025
@cpegeric cpegeric marked this pull request as ready for review October 29, 2025 16:48
@ashvardanian ashvardanian added the v3 Breaking changes planned for v3 label Nov 1, 2025
@ashvardanian
Copy link
Contributor

Thanks, @cpegeric! Will be looking into this in a couple of weeks 🤗

@cpegeric
Copy link
Contributor Author

@ashvardanian I found the current fix is buggy and run very slow even in non-filtered search... strange, I already have a check only filtered search with run the new code but not expected. Anyway, just for your reference. Let's see I will have time to revisit the code. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 Breaking changes planned for v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants