Random Binary Search Trees for Approximate Nearest Neighbour Search in Binary Space

  • Michał KomorowskiEmail author
  • Tomasz Trzciński
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10597)


Approximate nearest neighbour (ANN) search is one of the most important problems in computer science fields such as data mining or computer vision. In this paper, we focus on ANN for high-dimensional binary vectors and we propose a simple yet powerful search method that uses Random Binary Search Trees (RBST). We apply our method to a dataset of 1.25M binary local feature descriptors obtained from a real-life image-based localisation system provided by Google as a part of Project Tango [7]. An extensive evaluation of our method against the state-of-the-art variations of Locality Sensitive Hashing (LSH), namely Uniform LSH and Multi-probe LSH, shows the superiority of our method in terms of retrieval precision with performance boost of over 20%.


Approximate nearest neighbour search Binary vectors Random Binary Search Trees Locality sensitive hashing 



This research was supported by Google’s Sponsor Research Agreement under the project “Efficient visual localisation on mobile devices”. We thank Oskar Dylewski for the implementation of LSH, Uniform LSH and Multi-probe LSH.


  1. 1.
    Alahi, A., Ortiz, R., Vandergheynst, P.: FREAK: fast retina keypoint. In: CVPR (2012)Google Scholar
  2. 2.
    Bentley, J.L.: Multidimensional binary search trees used for associative searching. Commun. ACM 18(9), 509–517 (1975)CrossRefzbMATHGoogle Scholar
  3. 3.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  4. 4.
    Feng, Y., Fan, L., Wu, Y.: Fast localization in large-scale environments using supervised indexing of binary features. IEEE Trans. Image Process. 25(1), 343–358 (2016)CrossRefMathSciNetGoogle Scholar
  5. 5.
    Fukunaga, K., Narendra, P.M.: A branch and bound algorithm for computing k-nearest neighbors. IEEE Trans. Comput. 100(7), 750–753 (1975)CrossRefzbMATHGoogle Scholar
  6. 6.
    Gionis, A., Indyk, P., Motwani, R.: Similarity search in high dimensions via hashing. VLDB 99(6), 518–529 (1999)Google Scholar
  7. 7.
  8. 8.
    Kumar, N., Zhang, L., Nayar, S.: What is a good nearest neighbors algorithm for finding similar patches in images? In: Forsyth, D., Torr, P., Zisserman, A. (eds.) ECCV 2008. LNCS, vol. 5303, pp. 364–378. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-88688-4_27 CrossRefGoogle Scholar
  9. 9.
    Lepetit, V., Fua, P.: Keypoint recognition using randomized trees. IEEE Trans. Pattern Anal. Mach. Intell. 28(9), 1465–1479 (2006)CrossRefGoogle Scholar
  10. 10.
    Liu, T., Moore, A., Gray, A., Yang, K.: An investigation of practical approximate nearest neighbor algorithm. In: NIPS (2004)Google Scholar
  11. 11.
    Lv, Q., Josephson, W., Wang, Z., Charikar, M., Li, K.: Multi-probe LSH: efficient indexing for high-dimensional similarity search. In: VLDB (2007)Google Scholar
  12. 12.
    Nister, D., Stewenius, H.: Scalable recognition with a vocabulary tree. In: CVPR (2006)Google Scholar
  13. 13.
    Sattler, T., Leibe, B., Kobbelt, L.: Fast image-based localization using direct 2d-to-3d matching. In: ICCV (2011)Google Scholar
  14. 14.
    Seidel, R., Cecilia, R.A.: Randomized search trees. Algorithmica 16(4), 464–497 (1996)CrossRefzbMATHMathSciNetGoogle Scholar
  15. 15.
    Shakhnarovich, G., Viola, P.A., Darrell, T.: Fast pose estimation with parameter-sensitive hashing. In: ICCV (2003)Google Scholar
  16. 16.
    Silpa-Anan, C., Hartley, R.: Optimised kd-trees for fast image descriptor matching. In: CVPR (2008)Google Scholar
  17. 17.
    Torralba, A., Fergus, R., Weiss, Y.: Small codes and large image databases for recognition. In: CVPR (2008)Google Scholar
  18. 18.
    Trzcinski, T., Lepetit, V., Fua, P.: Thick boundaries in binary space and their influence on nearest-neighbor search. Pattern Recogn. Lett. 33(16), 2173–2180 (2012)CrossRefGoogle Scholar
  19. 19.
    Wang, J., Kumar, S., Chang, S.F.: Semi-supervised hashing for large-scale search. IEEE Trans. Pattern Anal. Mach. Intell. 34(12), 2393–2406 (2012)CrossRefGoogle Scholar
  20. 20.
    Weiss, Y., Torralba, A., Fergus, R.: Spectral hashing. In: NIPS, vol. 21, pp. 1753–1760 (2009)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.Institute of Computer ScienceWarsaw University of TechnologyWarsawPoland

Personalised recommendations