-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Failure to reproduce paper's recall on IVF Product quantization #1045
Comments
Here is code that reproduces the result: |
Thanks so much for your reply. I will investigate further. |
@mdouze I am not clear about the way you calculate recall: For every query, we have a ground truth -- 100 expected documents to find. So, we need to compare these 100 expected docs with 100 documents found during the search, calculate how many documents are in common (intersection), and this will be the recall for this query. We do the same for all queries to get the average recall among 10K queries. But in your calculation, you only check if 1st expected document is present in 100 documents found during the search. That's not a traditional evaluation of recall. Do you have references when this definition of the recall is used? So, using your code in repro_IVF_paper.ipynb, and calculating the recall in the traditional way: total_matches = 0
for q in range(xq.shape[0]):
matches = [id for id in I[q] if id in gt[q]]
total_matches += len(matches)
recall_at_100 = (total_matches / float(xq.shape[0]))/ 100
print("recall@100: %.3f" % recall_at_100); I am getting the result of: |
Check the definition of recall@100 in the paper:
|
@mdouze Thank you so much for your clarification, I have missed this. |
no activity, closing. |
I am trying to reproduce results the paper: “Product quantization for nearest neighbor search”, Jégou & al., PAMI 2011.
The paper reports that IVFADC for sift 1 million docs dataset with 128 dims with
k'=1024
,m=8
,w=8
produces recall of around0.9
(Fig 7).Running ann-benchmarks on the sift dataset with
nprobe=8
produces recall of 0.372.
FaissIVFPQ(n_list=1024, n_probe=8) 0.372 4493.587
What would be the way to achieve recall as reported by the paper?
The text was updated successfully, but these errors were encountered: