[Paper Review] One Permutation Hashing for Efficient Search and Learning
This paper proposes One Permutation Hashing (OPH), a novel method that replaces the standard k-permutation minwise hashing with a single random permutation, dividing the permuted data into k bins and storing only the minimum nonzero index in each bin. The approach achieves comparable or better accuracy than k-permutation hashing at just 1/k of the preprocessing cost, with theoretical and empirical validation across datasets like webspam and news20.
Recently, the method of b-bit minwise hashing has been applied to large-scale linear learning and sublinear time near-neighbor search. The major drawback of minwise hashing is the expensive preprocessing cost, as the method requires applying (e.g.,) k=200 to 500 permutations on the data. The testing time can also be expensive if a new data point (e.g., a new document or image) has not been processed, which might be a significant issue in user-facing applications. We develop a very simple solution based on one permutation hashing. Conceptually, given a massive binary data matrix, we permute the columns only once and divide the permuted columns evenly into k bins; and we simply store, for each data vector, the smallest nonzero location in each bin. The interesting probability analysis (which is validated by experiments) reveals that our one permutation scheme should perform very similarly to the original (k-permutation) minwise hashing. In fact, the one permutation scheme can be even slightly more accurate, due to the "sample-without-replacement" effect. Our experiments with training linear SVM and logistic regression on the webspam dataset demonstrate that this one permutation hashing scheme can achieve the same (or even slightly better) accuracies compared to the original k-permutation scheme. To test the robustness of our method, we also experiment with the small news20 dataset which is very sparse and has merely on average 500 nonzeros in each data vector. Interestingly, our one permutation scheme noticeably outperforms the k-permutation scheme when k is not too small on the news20 dataset. In summary, our method can achieve at least the same accuracy as the original k-permutation scheme, at merely 1/k of the original preprocessing cost.
Motivation & Objective
- Address the high computational cost of k-permutation minwise hashing in large-scale search and learning applications.
- Reduce the expensive preprocessing step required by traditional minwise hashing, especially when k is large (e.g., 200–500 permutations).
- Develop a simpler, more energy-efficient alternative that maintains estimation accuracy for set similarity and linear models.
- Validate the method’s robustness across diverse datasets, including sparse and high-dimensional data.
- Demonstrate that a single permutation can outperform multiple permutations due to a 'sample-without-replacement' effect in certain conditions.
Proposed method
- Apply a single random permutation π to the entire column space Ω = {0, 1, ..., D−1} of the binary data matrix.
- Divide the permuted columns evenly into k bins and store, for each data vector, the smallest nonzero index (i.e., the first 1) in each bin.
- Use the number of matching minimum indices across bins between two vectors as an unbiased estimator of resemblance R.
- The estimator R̂ = N_mat / (k − N_emp) is derived, where N_mat is the number of bins with matching minima and N_emp is the number of jointly empty bins.
- The method avoids storing full permutations or high-dimensional projections, relying instead on compact, bin-based minima representations.
- Theoretical analysis shows that the variance of the estimator is comparable to k-permutation minwise hashing, with potential improvements due to sampling without replacement.
Experimental results
Research questions
- RQ1Can a single permutation achieve similar or better accuracy than k-permutation minwise hashing for estimating set similarity?
- RQ2Does the one-permutation scheme reduce preprocessing cost by a factor of k without sacrificing estimation accuracy?
- RQ3How does the method perform on sparse datasets like news20, where nonzeros are limited to ~500 per vector?
- RQ4What is the impact of the 'sample-without-replacement' effect in OPH compared to the i.i.d. sampling in k-permutation hashing?
- RQ5Can the OPH method be effectively applied to large-scale learning tasks such as linear SVM and logistic regression?
Key findings
- One Permutation Hashing achieves the same or slightly better accuracy than k-permutation minwise hashing on the webspam dataset when using b=8 and k=200–500.
- On the sparse news20 dataset, OPH noticeably outperforms k-permutation hashing when k is not too small, due to reduced variance from sampling without replacement.
- The preprocessing cost is reduced to 1/k of the original k-permutation method, with no need for multiple independent permutations.
- Theoretical analysis confirms that the estimator R̂ = N_mat / (k − N_emp) is unbiased and has variance comparable to k-permutation minwise hashing.
- The fixed-length OPH scheme is shown to be sufficient and potentially superior to the variable-length variant, as it yields fewer empty bins and thus better performance.
- Empirical results validate that OPH maintains accuracy across diverse data sparsity levels and is robust to real-world data characteristics in industrial applications.
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.