Skip to main content
QUICK REVIEW

[論文レビュー] In Defense of MinHash Over SimHash

Anshumali Shrivastava, Ping Li|arXiv (Cornell University)|Jul 16, 2014
Advanced Image and Video Retrieval Techniques参考文献 27被引用数 61
ひとこと要約

この論文は、二値データにおける近似近傍検索において、MinHashがSimHashを上回ることを理論的および実験的に確立している。MinHashは類縁度類似度を目的として設計されているが、SimHashはコサイン類似度を目的としているにもかかわらず、MinHashが優れている。著者たちは、不等式 $ olcal{S}^2 \leq \mathcal{R} \leq \frac{\mathcal{S}}{2 - \mathcal{S}}$ を用いて、MinHashがコサイン類似度の有効な局所性に依存するハッシュ(LSH)であることを証明した。これにより、MinHashははるかに少ないデータスキャン回数で顕著に高い再現率を達成する。例えば、MNISTデータ上で90%の再現率を達成する際、MinHashは0.6%のスキャンで達成可能であるのに対し、SimHashは5%を要する。これは、コサイン類似度を評価基準として用いた場合でも、MinHashが優れていることを示している。

ABSTRACT

MinHash and SimHash are the two widely adopted Locality Sensitive Hashing (LSH) algorithms for large-scale data processing applications. Deciding which LSH to use for a particular problem at hand is an important question, which has no clear answer in the existing literature. In this study, we provide a theoretical answer (validated by experiments) that MinHash virtually always outperforms SimHash when the data are binary, as common in practice such as search. The collision probability of MinHash is a function of resemblance similarity ($\mathcal{R}$), while the collision probability of SimHash is a function of cosine similarity ($\mathcal{S}$). To provide a common basis for comparison, we evaluate retrieval results in terms of $\mathcal{S}$ for both MinHash and SimHash. This evaluation is valid as we can prove that MinHash is a valid LSH with respect to $\mathcal{S}$, by using a general inequality $\mathcal{S}^2\leq \mathcal{R}\leq \frac{\mathcal{S}}{2-\mathcal{S}}$. Our worst case analysis can show that MinHash significantly outperforms SimHash in high similarity region. Interestingly, our intensive experiments reveal that MinHash is also substantially better than SimHash even in datasets where most of the data points are not too similar to each other. This is partly because, in practical data, often $\mathcal{R}\geq \frac{\mathcal{S}}{z-\mathcal{S}}$ holds where $z$ is only slightly larger than 2 (e.g., $z\leq 2.1$). Our restricted worst case analysis by assuming $\frac{\mathcal{S}}{z-\mathcal{S}}\leq \mathcal{R}\leq \frac{\mathcal{S}}{2-\mathcal{S}}$ shows that MinHash indeed significantly outperforms SimHash even in low similarity region. We believe the results in this paper will provide valuable guidelines for search in practice, especially when the data are sparse.

研究の動機と目的

  • 大規模な二値データにおいて、近似最近傍検索にMinHashとSimHashのどちらが望ましいかという長年の疑問を解決すること。
  • MinHash(類縁度類似度を目的として設計)とSimHash(コサイン類似度を目的として設計)を比較する理論的基盤を確立し、MinHashがコサイン類似度の有効なLSHであることを証明すること。
  • 二値化されたデータおよび元の実数値データの両方で、MinHashとSimHashの検索性能を同じ指標(コサイン類似度)で実験的に評価・比較すること。
  • 元の実数値データを用いた評価という、SimHashに有利な条件下でもMinHashの優位性が維持されるかどうかを示すこと。

提案手法

  • 類縁度類似度 $\mathcal{R}$ とコサイン類似度 $\mathcal{S}$ の関係を示す不等式 $\mathcal{S}^2 \leq \mathcal{R} \leq \frac{\mathcal{S}}{2 - \mathcal{S}}$ を導出し、証明することで、MinHashとSimHashを同じ指標で直接比較可能にする。
  • サイズ比の分散が小さい実用的データを想定し、$z \leq z^*$ の条件下で $\mathcal{R} \geq \frac{\mathcal{S}}{z^* - \mathcal{S}}$ を用いて性能を分析する。ここで $z = \sqrt{f_2/f_1} + \sqrt{f_1/f_2}$ である。
  • MinHashを二値化されたデータに、SimHashを元のデータまたは二値化されたデータに適用し、$K$(テーブルごとのハッシュ関数の数)と $L$(テーブルの数)を変化させ、最適なパrameter設定を見つけるために実装および比較する。
  • 二値化されたデータおよび元の実数値データの両方で、コサイン類似度を用いて検索性能を評価し、トップ-$k$ 結果の再現率とスキャンデータ量の割合を測定する。
  • 6つの二値化済みデータセット(MNIST、RCV1など)および2つの元の実数値データセットを用いた広範な実験により、理論的知見が多様なデータ環境で妥当であることを検証する。

実験結果

リサーチクエスチョン

  • RQ1MinHashが類縁度類似度を目的として設計されているにもかかわらず、コサイン類似度の有効な局所性に依存するハッシュ(LSH)として厳密に示せるか?
  • RQ2両者がコサイン類似度を評価基準として用いた場合、MinHashとSimHashの検索性能はどのように比較できるか?
  • RQ3理論的優位性が明確でない低類似度領域でも、MinHashはSimHashを上回るのか?
  • RQ4元の実数値データを用いた評価という、SimHashに有利な条件下でもMinHashの性能優位性は維持されるのか?

主な発見

  • 高類似度領域ではMinHashがSimHashを顕著に上回り、理論的境界により、$\mathcal{S} \approx 1$ の場合に優位性が最大に現れることを示している。
  • MNISTデータセットにおいて、MinHashはトップ1検索で0.6%のデータスキャンで90%の再現率を達成するが、SimHashは最適パラメータ設定下でも5%のスキャンを要する。
  • 低類似度領域でも、実用的データの性質 $\mathcal{R} \geq \frac{\mathcal{S}}{z - \mathcal{S}}$($z \leq 2.1$)により、MinHashはSimHashを上回る。
  • 元の実数値データを用いた評価においても、MinHashは二値化データに適用されているにもかかわらず、SimHashを上回る。これは、MinHashの強靭性と一般性の優位性を示している。
  • 理論的境界 $\mathcal{S}^2 \leq \mathcal{R} \leq \frac{\mathcal{S}}{2 - \mathcal{S}}$ はタイトであり、追加の仮定なしには改善できない。このため、比較に用いるのに適切であることが裏付けられている。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。