-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug of HNSW #2771
Fix bug of HNSW #2771
Conversation
Could you explain what this is? |
When popping the first element of the heap, it could be invalid. So in this case |
I believe this can happen only if a -1 id gets pushed on the heap, which does never happen, correct? |
It'll be set to -1 when popping the min element. https://github.com/facebookresearch/faiss/blob/main/faiss/impl/HNSW.cpp#L877 |
@alexanderguzhva has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Confirmed for both the bug and the recall rate improvement. |
@alexanderguzhva merged this pull request in 159641a. |
Thanks a lot for this fix! it increases the accuracy of HNSW by a lot! |
No description provided.