[Paper Review] On the Evaluation Metric for Hashing
This paper identifies critical flaws in existing evaluation metrics for hashing, particularly for bucket search, where metrics like MAP and precision@R ignore retrieval time and lack sensitivity to Hamming radius. The authors propose RAMAP (Radius Aware Mean Average Precision), a novel metric that integrates retrieval efficiency and global performance across all Hamming radii, demonstrating through synthetic and real-world experiments that RAMAP provides more reliable and consistent evaluation than traditional metrics.
Due to its low storage cost and fast query speed, hashing has been widely used for large-scale approximate nearest neighbor (ANN) search. Bucket search, also called hash lookup, can achieve fast query speed with a sub-linear time cost based on the inverted index table constructed from hash codes. Many metrics have been adopted to evaluate hashing algorithms. However, all existing metrics are improper to evaluate the hash codes for bucket search. On one hand, all existing metrics ignore the retrieval time cost which is an important factor reflecting the performance of search. On the other hand, some of them, such as mean average precision (MAP), suffer from the uncertainty problem as the ranked list is based on integer-valued Hamming distance, and are insensitive to Hamming radius as these metrics only depend on relative Hamming distance. Other metrics, such as precision at Hamming radius R, fail to evaluate global performance as these metrics only depend on one specific Hamming radius. In this paper, we first point out the problems of existing metrics which have been ignored by the hashing community, and then propose a novel evaluation metric called radius aware mean average precision (RAMAP) to evaluate hash codes for bucket search. Furthermore, two coding strategies are also proposed to qualitatively show the problems of existing metrics. Experiments demonstrate that our proposed RAMAP can provide more proper evaluation than existing metrics.
Motivation & Objective
- To identify and systematically analyze the shortcomings of existing evaluation metrics for hashing, especially in the context of bucket search.
- To address the critical omission of retrieval time cost in current metrics, which is essential for real-world performance evaluation.
- To resolve the insensitivity of metrics like MAP to Hamming radius and the global performance evaluation gap of precision@R.
- To propose a new, comprehensive evaluation metric that reflects both accuracy and efficiency in bucket search.
- To validate the superiority of the proposed metric through qualitative coding strategies and empirical experiments.
Proposed method
- Introduce RAMAP, a novel evaluation metric that extends MAP by incorporating the Hamming radius as a weighting factor across all radii.
- Define RAMAP as a weighted average of mean average precision (MAP) over all Hamming radii, where weights are derived from the distribution of Hamming distances in the dataset.
- Use a radius-aware weighting scheme that emphasizes performance across the entire Hamming distance spectrum, not just a single radius.
- Design two coding strategies—LSH vs. LSH SE and heuristic vs. learning-based coding—to qualitatively demonstrate the limitations of existing metrics.
- Construct inverted index tables from learned hash codes to measure retrieval time and empty bin rates, integrating these into the evaluation framework.
- Compare RAMAP with MAP, precision@R, and recall across multiple datasets and code lengths to validate robustness and consistency.
Experimental results
Research questions
- RQ1Why do existing metrics like MAP and precision@R fail to provide a reliable comparison between hashing algorithms in bucket search?
- RQ2How does the omission of retrieval time cost in current metrics mislead the evaluation of hashing performance?
- RQ3Why is MAP insensitive to Hamming radius, and how does this affect algorithm comparison?
- RQ4How can a single metric effectively evaluate both retrieval accuracy and efficiency across all Hamming radii?
- RQ5Can a new metric that integrates both global performance and retrieval time provide more consistent and reliable evaluation than existing approaches?
Key findings
- RAMAP outperforms MAP and precision@R in consistently ranking hashing algorithms, with DSH showing the best performance and 12-DSH the worst, which aligns with theoretical expectations.
- Precision@R fails to provide a clear ranking due to conflicting results at different radii—e.g., 4-DSH outperforms DSH at high radii but underperforms at low radii.
- The retrieval time cost increases exponentially with Hamming radius, making high-radius precision impractical despite high values, which RAMAP accounts for through time-aware weighting.
- The number of empty bins increases significantly with higher-radius searches, especially for 12-DSH, indicating poor bucket utilization, a factor captured by RAMAP.
- In experiments on CIFAR-10, RAMAP correctly identifies DSH as the best method, while MAP fails to distinguish between methods due to near-identical values.
- RAMAP provides a deterministic and consistent evaluation across different code lengths (48-bit and 64-bit), unlike MAP, which shows minimal variation and thus lacks discriminative power.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.