Fast Exact Retrieval for Nearest-neighbor Lookup (FERN)
- URL: http://arxiv.org/abs/2405.04435v1
- Date: Tue, 7 May 2024 15:57:39 GMT
- Title: Fast Exact Retrieval for Nearest-neighbor Lookup (FERN)
- Authors: Richard Zhu,
- Abstract summary: Exact nearest neighbor retrieval has been generally acknowledged to be a $O(Nd)$ problem with no sub-linear solutions.
We propose a novel algorithm for logarithmic Fast Exact Retrieval for Nearest-neighbor lookup (FERN)
The algorithm achieves $O(dlog N)$ look-up with 100% recall on 10 million $d=128$ uniformly randomly generated vectors.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Exact nearest neighbor search is a computationally intensive process, and even its simpler sibling -- vector retrieval -- can be computationally complex. This is exacerbated when retrieving vectors which have high-dimension $d$ relative to the number of vectors, $N$, in the database. Exact nearest neighbor retrieval has been generally acknowledged to be a $O(Nd)$ problem with no sub-linear solutions. Attention has instead shifted towards Approximate Nearest-Neighbor (ANN) retrieval techniques, many of which have sub-linear or even logarithmic time complexities. However, if our intuition from binary search problems (e.g. $d=1$ vector retrieval) carries, there ought to be a way to retrieve an organized representation of vectors without brute-forcing our way to a solution. For low dimension (e.g. $d=2$ or $d=3$ cases), \texttt{kd-trees} provide a $O(d\log N)$ algorithm for retrieval. Unfortunately the algorithm deteriorates rapidly to a $O(dN)$ solution at high dimensions (e.g. $k=128$), in practice. We propose a novel algorithm for logarithmic Fast Exact Retrieval for Nearest-neighbor lookup (FERN), inspired by \texttt{kd-trees}. The algorithm achieves $O(d\log N)$ look-up with 100\% recall on 10 million $d=128$ uniformly randomly generated vectors.\footnote{Code available at https://github.com/RichardZhu123/ferns}
Related papers
- Quantum Algorithm for the Fixed-Radius Neighbor Search [39.58317527488534]
We propose a quantum algorithm for the Fixed RAdius Neighbor Search problem (FRANS) based on the fixed-point version of Grover's algorithm.<n>We derive an efficient circuit for solving the FRANS with linear query complexity with the number of particles $N$.<n>We assess the resilience of the model to the readout error, suggesting an error correction-free strategy to check the accuracy of the results.
arXiv Detail & Related papers (2025-07-04T10:01:10Z) - Quantum Search on Computation Trees [0.0]
We show a generalization of the quantum walk algorithm for search in backtracking trees by Montanaro (ToC)<n>This framework provides an easy and convenient way to re-obtain a number of other quantum frameworks like variable time search, quantum divide & conquer and bomb query algorithms.
arXiv Detail & Related papers (2025-05-28T14:35:18Z) - Synthesis of Single Qutrit Circuits from Clifford+R [0.0]
Two deterministic algorithms are presented to approximate single-qutrit gates.
The first algorithm exhaustively searches over the Clifford + $mathbfR$ group.
The second algorithm searches for Householder reflections.
arXiv Detail & Related papers (2025-03-26T03:55:43Z) - A Scalable Algorithm for Individually Fair K-means Clustering [77.93955971520549]
We present a scalable algorithm for the individually fair ($p$, $k$)-clustering problem introduced by Jung et al. and Mahabadi et al.
A clustering is then called individually fair if it has centers within distance $delta(x)$ of $x$ for each $xin P$.
We show empirically that not only is our algorithm much faster than prior work, but it also produces lower-cost solutions.
arXiv Detail & Related papers (2024-02-09T19:01:48Z) - Efficiently Learning One-Hidden-Layer ReLU Networks via Schur
Polynomials [50.90125395570797]
We study the problem of PAC learning a linear combination of $k$ ReLU activations under the standard Gaussian distribution on $mathbbRd$ with respect to the square loss.
Our main result is an efficient algorithm for this learning task with sample and computational complexity $(dk/epsilon)O(k)$, whereepsilon>0$ is the target accuracy.
arXiv Detail & Related papers (2023-07-24T14:37:22Z) - Near-Optimal Bounds for Learning Gaussian Halfspaces with Random
Classification Noise [50.64137465792738]
We show that any efficient SQ algorithm for the problem requires sample complexity at least $Omega(d1/2/(maxp, epsilon)2)$.
Our lower bound suggests that this quadratic dependence on $1/epsilon$ is inherent for efficient algorithms.
arXiv Detail & Related papers (2023-07-13T18:59:28Z) - A Query-Optimal Algorithm for Finding Counterfactuals [14.934032347716995]
We design an algorithm for finding counterfactuals with strong theoretical guarantees on its performance.
[ S(f)O(Delta_f(xstar))cdot log d] queries to $f$ and returns an sl optimal counterfactual for $xstar$.
arXiv Detail & Related papers (2022-07-14T17:21:13Z) - Logarithmic Regret from Sublinear Hints [76.87432703516942]
We show that an algorithm can obtain $O(log T)$ regret with just $O(sqrtT)$ hints under a natural query model.
We also show that $o(sqrtT)$ hints cannot guarantee better than $Omega(sqrtT)$ regret.
arXiv Detail & Related papers (2021-11-09T16:50:18Z) - Well Separated Pair Decomposition and power weighted shortest path
metric algorithm fusion [0.0]
We consider an algorithm that computes all $s$-well separated pairs in certain point sets in $mathbbRn$, $n$ $>$ $1$.
We also consider an algorithm that is a permutation of Dijkstra's algorithm, that computes $K$-nearest neighbors using a certain power weighted shortest path metric in $mathbbRn$, $n$ $>$ $1$.
arXiv Detail & Related papers (2021-03-20T17:38:13Z) - Fast Classical and Quantum Algorithms for Online $k$-server Problem on
Trees [0.19573380763700712]
We consider online algorithms for the $k$-server problem on trees.
Chrobak and Larmore proposed a $k$-competitive algorithm for this problem that has the optimal competitive ratio.
We propose a new time-efficient implementation of this algorithm that has $O(nlog n)$ time complexity for preprocessing.
arXiv Detail & Related papers (2020-08-01T14:21:45Z) - Quantum algorithms for graph problems with cut queries [17.149741568581096]
We show that a quantum algorithm can learn a graph with maximum degree $d$ after $O(d log(n)2)$ many cut queries.
We also show that a quantum algorithm can learn a general graph with $O(sqrtm log(n)3/2)$ many cut queries.
arXiv Detail & Related papers (2020-07-16T12:21:01Z) - Streaming Complexity of SVMs [110.63976030971106]
We study the space complexity of solving the bias-regularized SVM problem in the streaming model.
We show that for both problems, for dimensions of $frac1lambdaepsilon$, one can obtain streaming algorithms with spacely smaller than $frac1lambdaepsilon$.
arXiv Detail & Related papers (2020-07-07T17:10:00Z) - Agnostic Q-learning with Function Approximation in Deterministic
Systems: Tight Bounds on Approximation Error and Sample Complexity [94.37110094442136]
We study the problem of agnostic $Q$-learning with function approximation in deterministic systems.
We show that if $delta = Oleft(rho/sqrtdim_Eright)$, then one can find the optimal policy using $Oleft(dim_Eright)$.
arXiv Detail & Related papers (2020-02-17T18:41:49Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.