<div dir="ltr">Hi everyone,<div><br><div>I am Shaoxiang Chen, a CS student(junior) of Fudan University, China. I&#39;m currently working with a professor, studying in the areas of multimedia content analysis and machine(deep) learning. </div><div><br></div><div>I&#39;ve read a research paper about accelerating approximate nearest neighbour search when the distance metric of cosine similarity is used. It achieved decent speed up by quantizing vectors into binary form, making the computation of distance orders of magnitude faster.</div><div><br></div><div>I see that cosine similarity is not included in neither flann nor mlpack&#39;s distance metrics. For one thing, it is not directly applicable to the space partitioning tree structures(am I right?). And second, if all the vectors are l2-normed, cosine similarity directly corresponds to l2 distance.</div><div><br></div><div>I&#39;ve coded the proposed method myself and got decent speed up. The higher dimension, the larger speed up. While the method itself limits its use cases to high dimensional data(otherwise precision drops), I think it might serve as a supplement for tree structures when dealing with high dimensional data.</div><div><br></div><div>I haven&#39;t run a benchmark of this my code against other ann search algorithms, but the paper includes some benchmarks.</div><div><br></div><div>If after you&#39;ve read the paper you think it&#39;s ok to include this algorithm in mlpack&#39;s neighbour-search, I&#39;d like to contribute and discuss :)</div><div><br></div><div>link to the paper: <a href="http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/40572.pdf">http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/40572.pdf</a></div><div><br></div><div>Regards</div><div>Shaoxiang</div></div></div>