Skip to main content
QUICK REVIEW

[論文レビュー] Similarity Search and Locality Sensitive Hashing using TCAMs

Rajendra Shinde, Ashish Goel|arXiv (Cornell University)|Jun 17, 2010
Advanced Image and Video Retrieval Techniques参考文献 31被引用数 4
ひとこと要約

本論文は、Ternary Content Addressable Memories (TCAM) を活用して、O(1) のクエリ時間と近似線形のストレージで、ユークリッド空間における近似最近傍探索を実行する、新しい手法である Ternary Locality Sensitive Hashing (TLSH) を提案する。三値 {0, 1, *} を用いてベクトルを符号化することで、1回の TCAM ラックアップで高精度な近似最近傍を取得可能となり、コンsumer ハードウェア上でも1.5 million クエリ/秒を達成する。これにより、標準モデルにおける理論的下界を回避する。

ABSTRACT

Similarity search methods are widely used as kernels in various machine learning applications. Nearest neighbor search (NNS) algorithms are often used to retrieve similar entries, given a query. While there exist efficient techniques for exact query lookup using hashing, similarity search using exact nearest neighbors is known to be a hard problem and in high dimensions, best known solutions offer little improvement over a linear scan. Fast solutions to the approximate NNS problem include Locality Sensitive Hashing (LSH) based techniques, which need storage polynomial in $n$ with exponent greater than $1$, and query time sublinear, but still polynomial in $n$, where $n$ is the size of the database. In this work we present a new technique of solving the approximate NNS problem in Euclidean space using a Ternary Content Addressable Memory (TCAM), which needs near linear space and has O(1) query time. In fact, this method also works around the best known lower bounds in the cell probe model for the query time using a data structure near linear in the size of the data base. TCAMs are high performance associative memories widely used in networking applications such as access control lists. A TCAM can query for a bit vector within a database of ternary vectors, where every bit position represents $0$, $1$ or $*$. The $*$ is a wild card representing either a $0$ or a $1$. We leverage TCAMs to design a variant of LSH, called Ternary Locality Sensitive Hashing (TLSH) wherein we hash database entries represented by vectors in the Euclidean space into $\{0,1,*\}$. By using the added functionality of a TLSH scheme with respect to the $*$ character, we solve an instance of the approximate nearest neighbor problem with 1 TCAM access and storage nearly linear in the size of the database. We believe that this work can open new avenues in very high speed data mining.

研究の動機と目的

  • 高次元ユークリッド空間における正確および近似最近傍探索のスケーラビリティの限界を解決すること。
  • 従来のハッシングおよびインデキシング技術の性能を低下させる「次元の呪い」を克服すること。
  • ネットワーキング分野で一般的に使用される TCAM ハードウェアを活用し、データマイニングおよび機械学習における高速な類似度検索を実現すること。
  • TCAM の並列的関連検索機能を活用することで、セルプローブモデルにおける既知の下界を回避するハッシング方式の設計。
  • 企業用 TCAM ハードウェアを用いたシミュレーションおよび実世界の実験を通じて、実用的実現可能性の検証。

提案手法

  • ユークリッド空間のベクトルを {0, 1, *} の記号を用いて三値ベクトルにマッピングする LSH の変種として、Ternary Locality Sensitive Hashing (TLSH) を提案する。
  • TCAM を用いて三値ハッシュコードに対する関連検索を実行し、"*" が 0 と 1 の両方とマッチングするワイルドカードとして機能する。
  • 類似したベクトルが TCAM 内でより高い確率で衝突するように、データベースエントリを三値ハッシュコードにマッピングする。
  • ユークリッド空間における局所性を保持する複数の三値ハッシュ関数を生成する前処理ステップを採用する。
  • クエリベクトルを同じ TLSH 関数でハッシュ化し、1回の TCAM ラックアップで候補となる近傍を取得するクエリ手順を設計する。
  • TCAM の内在的な並列性を活用することで、データベースサイズに依存しない定数時間のクエリ解決を実現する。

実験結果

リサーチクエスチョン

  • RQ1TCAM を用いた関連記憶が、高次元ユークリッド空間における近似最近傍探索で O(1) のクエリ時間を達成できるか。
  • RQ2三値ハッシング方式(TLSH)が、標準 LSH よりも空間効率とクエリ速度に優れながらも、高い精度を維持できるか。
  • RQ3企業用スイッチに搭載された既存の TCAM ハードウェアが、大規模なリアルタイム類似度検索をどの程度サポートできるか。
  • RQ4三値ハッシングにおけるワイルドカードの使用が、セルプローブモデルにおける既知の下界を回避可能か。
  • RQ5Wikipedia テキスト埋め込みの高次元空間における実世界データセットにおいて、TLSH はどの程度の性能を示すか。

主な発見

  • 288ビットの TCAM を用いることで、64次元のユークリッド空間における100万点のデータベースで、高精度な近似最近傍探索が実現された。
  • Cisco Catalyst 4500 スイッチの1 Gbps ポートあたり、1.5 million の近似最近傍クエリ/秒のクエリレートを維持した。
  • TLSH は近似線形のストレージでクエリ時間を O(1) に短縮し、多項式時間のクエリを要する従来の LSH 手法を著しく上回った。
  • TCAM の並列的関連検索機能を活用することで、セルプローブモデルにおける既知の下界を効果的に回避した。
  • 合成データおよび実世界(Wikipedia)データセットの両方におけるシミュレーションにより、さまざまなデータ分布にわたって高い検索精度と頑健性が確認された。
  • ストリーミングおよびリアルタイムのデータマイニング応用において、超低レイテンシの類似度検索を実現する実用的妥当性が示された。

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

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

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

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