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
一句话总结

本文提出了一种新型方法——三值局部敏感哈希(TLSH),该方法利用三值内容可寻址存储器(TCAMs)在欧几里得空间中实现近似最近邻搜索,查询时间为 O(1),存储空间接近线性。通过使用 {0, 1, *} 三值编码向量,TLSH 使单次 TCAM 查找即可检索出高精度的近似最近邻,实现在通用硬件上每秒 150 万次查询,从而突破了标准模型中的理论下限。

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 硬件上的真实世界实验,证明该方法的实用性。

提出的方法

  • 提出三值局部敏感哈希(TLSH),一种 LSH 的变体,将欧几里得空间向量映射为使用 {0, 1, *} 符号的三值向量。
  • 使用 TCAM 对三值哈希码执行关联查找,其中 "*" 作为通配符,可同时匹配 0 和 1。
  • 将数据库条目映射为三值哈希码,使得相似向量更可能在 TCAM 中发生碰撞。
  • 通过预处理步骤生成多个三值哈希函数,以在欧几里得空间中保持局部性。
  • 设计查询过程,使用相同的 TLSH 函数对查询向量进行哈希,并通过单次 TCAM 查找检索候选邻居。
  • 利用 TCAM 的内在并行性,实现与数据库大小无关的常数时间查询响应。

实验结果

研究问题

  • RQ1能否利用基于 TCAM 的关联存储实现在高维欧几里得空间中近似最近邻搜索的 O(1) 查询时间?
  • RQ2三值哈希方案(TLSH)在空间效率和查询速度方面是否优于标准 LSH,同时保持高精度?
  • RQ3现有企业交换机中的 TCAM 硬件在多大程度上能够支持大规模实时相似性搜索?
  • RQ4三值哈希中通配符的使用是否能使该方法绕过单元探测模型中的已知下限?
  • RQ5TLSH 在真实世界数据集(如高维空间中的 Wikipedia 文本嵌入)上的表现如何?

主要发现

  • 使用 288 位 TCAM,该方法在 64 维欧几里得空间中的 100 万点数据库上实现了高精度的近似最近邻搜索。
  • 在思科 Catalyst 4500 交换机上,每条 1 Gbps 端口的系统可维持每秒 150 万次近似最近邻查询速率。
  • TLSH 实现了 O(1) 查询时间与近线性存储空间,显著优于传统 LSH 方法所需的多项式查询时间。
  • 通过利用 TCAM 的并行关联能力,该方法成功绕过了单元探测模型中的已知下限。
  • 在合成数据集和真实世界(Wikipedia)数据集上的仿真结果表明,该方法在不同数据分布下均表现出高检索精度和鲁棒性。
  • 该方法在需要超低延迟相似性搜索的流式处理和实时数据挖掘应用中展现出实际可行性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。