SearcharxivSearch

arXiv subjects

Ben Claydon

Publications and source records attributed to Ben Claydon.

2 recordsLinked to original sources

Dynamic Query Modification for Binary Locality Sensitive Hashing

Our context of interest is how binary locality sensitive hash (LSH) functions can be used to solve the approximate near neighbour (ANN) problem in hyperspherical spaces, which seeks to find the $k$ closest elements of some dataset $X \subset \mathbb{R}^d$ to some further point $\mathbf{q} \in \mathbb{R}^d$ presented as a query. Binary locality sensitive function families $\mathcal{H}$ are sets of functions each with signature $h: \mathbf{x} \in \mathbb{R}^d \rightarrow \{ 0, 1 \}$. A function is locality sensitive if the output of the function is more likely to be equal (a `hash collision') if two close vectors are used as input than if two far vectors are used. In this paper we introduce dynamic query modification. This procedure changes $\mathbf{q}$ at query time using information acquired during search to approximate the point $\langle \mathbf{c} \rangle$, which is the $\ell_2$-normalised centroid of the $k$-nearest neighbour set of $\mathbf{q}$. By theoretical and experimental analysis we demonstrate $\langle \mathbf{c} \rangle$ has two significant advantages when compared to $\mathbf{q}$. Firstly, we show that the hash function output of $\langle \mathbf{c} \rangle$ is likely to have a higher average collision probability with the $k$-nearest neighbours than the hash output of $\mathbf{q}$. Secondly, in our experiments, we observe no instances of $\langle \mathbf{c} \rangle$ failing to collide with any member of the near-neighbour set; a property which we demonstrate is not true for $\mathbf{q}$. To demonstrate the efficacy of the technique, we define a novel structure MQ-Forest, a modified version of RP-Forest. Both are binary LSH-based ANN mechanisms, but MQ-Forest dynamically estimates $\langle\mathbf{c}\rangle$ during the query process. We show that MQ-Forest reduces both build and query times by up to $40\%$ when measured over several large, high-dimensional benchmark datasets.

cs.CG

Ultra-Quantisation: Efficient Embedding Search via 1.58-bit Encodings

Many modern search domains comprise high-dimensional vectors of floating point numbers derived from neural networks, in the form of embeddings. Typical embeddings range in size from hundreds to thousands of dimensions, making the size of the embeddings, and the speed of comparison, a significant issue. Quantisation is a class of mechanism which replaces the floating point values with a smaller representation, for example a short integer. This gives an approximation of the embedding space in return for a smaller data representation and a faster comparison function. Here we take this idea almost to its extreme: we show how vectors of arbitrary-precision floating point values can be replaced by vectors whose elements are drawn from the set {-1,0,1}. This yields very significant savings in space and metric evaluation cost, while maintaining a strong correlation for similarity measurements. This is achieved by way of a class of convex polytopes which exist in the high-dimensional space. In this article we give an outline description of these objects, and show how they can be used for the basis of such radical quantisation while maintaining a surprising degree of accuracy.

cs.LG