You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
The faiss::IDSelectorBitmap is given the incorrect size. It is created as new faiss::IDSelectorBitmap(filterIdsLength, bitmap.data()). It should be created as new faiss::IDSelectorBitmap(bitsetArraySize, bitmap.data()).
In particular, this can cause faiss to incorrectly filter valid candidates when filterIdsLength < bitsetArraySize, as faiss rejects all candidates with ids larger than the IDSelectorBitmap size.
How can one reproduce the bug?
Steps to reproduce the behavior:
Create a filter where the number of elements and maxIdValue satisfies maxIdValue / (8 * sizeof(faiss::idx_t)) < filterIdsLength < maxIdValue / 8. Also make the element with the largest id the element with the highest score
This should trigger the bitmap filter and also make the bitmap size smaller than the number of entries. We don't return the highest scoring element even if faiss considers it because faiss filters it out.
What is the expected behavior?
Faiss should return the highest scoring element if it is considered.
What is your host/environment?
OS 2.11.0 with k-NN plugin 2.11.0.0.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
No.
The text was updated successfully, but these errors were encountered:
It is also possible to over-read the buffer when filterIdsLength is larger than bitsetArraySize. This can allow returning datapoints that do not satisfy the filter.
What is the bug?
The faiss::IDSelectorBitmap is given the incorrect size. It is created as
new faiss::IDSelectorBitmap(filterIdsLength, bitmap.data())
. It should be created asnew faiss::IDSelectorBitmap(bitsetArraySize, bitmap.data())
.In particular, this can cause faiss to incorrectly filter valid candidates when
filterIdsLength < bitsetArraySize
, as faiss rejects all candidates with ids larger than theIDSelectorBitmap
size.How can one reproduce the bug?
Steps to reproduce the behavior:
Create a filter where the number of elements and
maxIdValue
satisfiesmaxIdValue / (8 * sizeof(faiss::idx_t)) < filterIdsLength < maxIdValue / 8
. Also make the element with the largest id the element with the highest scoreThis should trigger the bitmap filter and also make the bitmap size smaller than the number of entries. We don't return the highest scoring element even if faiss considers it because faiss filters it out.
What is the expected behavior?
Faiss should return the highest scoring element if it is considered.
What is your host/environment?
OS 2.11.0 with k-NN plugin 2.11.0.0.
Do you have any screenshots?

If applicable, add screenshots to help explain your problem.
Do you have any additional context?
No.
The text was updated successfully, but these errors were encountered: