Fast Nearest Neighbors Search in Graph Space Based on a Branch-and-Bound Strategy

  • Zeina Abu-AishehEmail author
  • Romain Raveaux
  • Jean-Yves Ramel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10310)


When using k-nearest neighbors, an unknown object is classified by comparing it to all the prototypes stored in the training database. When the size of the database is large, and especially if prototypes are represented by graphs, the search of k-nearest neighbors can be very time consuming. On this basis, some researchers have tried to propose optimization techniques to speed up or to approximate the search of the nearest neighbors of a query. However, these studies pay attention only to the case of vector space. In this paper, we propose an optimization technique dedicated to structural pattern recognition. We take advantage of a recent branch-and-bound graph edit distance approach in order to speed up the classification stage. Instead of considering each graph edit distance problem as an independent search tree, the search trees whose purpose is to classify an unknown graph are considered as a one search tree. Results showed that this approach drastically outperformed the classical one under limited time constraints. Moreover, this approach beat fast graph matching algorithms in terms of average execution time.


Graph classification Graph edit distance K-nearest neighbors Branch-and-bound Optimization 


  1. 1.
    Abu-Aisheh, Z., Raveaux, R., Ramel, J.-Y.: A graph database repository and performance evaluation metrics for graph edit distance. In: Liu, C.-L., Luo, B., Kropatsch, W.G., Cheng, J. (eds.) GbRPR 2015. LNCS, vol. 9069, pp. 138–147. Springer, Cham (2015). doi: 10.1007/978-3-319-18224-7_14 Google Scholar
  2. 2.
    Abu-Aisheh, Z., Raveaux, R., Ramel, J.-Y.: Anytime graph matching. Pattern Recogn. Lett. 84, 215–224 (2016)CrossRefGoogle Scholar
  3. 3.
    Abu-Aisheh, Z., Raveaux, R., Ramel, J.-Y., Martineau, P.: An exact graph edit distance algorithm for solving pattern recognition problems. In: ICPRAM, pp. 271–278 (2015)Google Scholar
  4. 4.
    Bougleux, S., Brun, L., Carletti, V., Foggia, P., Gaüzère, B., Vento, M.: Graph edit distance as a quadratic assignment problem. Pattern Recogn. Lett. 87, 38–46 (2017)CrossRefGoogle Scholar
  5. 5.
    Carletti, V., Gaüzère, B., Brun, L., Vento, M.: Approximate graph edit distance computation combining bipartite matching and exact neighborhood substructure distance. In: Liu, C.-L., Luo, B., Kropatsch, W.G., Cheng, J. (eds.) GbRPR 2015. LNCS, vol. 9069, pp. 188–197. Springer, Cham (2015). doi: 10.1007/978-3-319-18224-7_19 Google Scholar
  6. 6.
    Chang, C.L.: Finding prototypes for nearest neighbor classifiers. IEEE Trans. Comput. 23(11), 1179–1184 (1974)CrossRefzbMATHGoogle Scholar
  7. 7.
    Cover, T., Hart, P.: Nearest neighbor pattern classification. IEEE Trans. Inf. Theor. 13(1), 21–27 (2006)CrossRefzbMATHGoogle Scholar
  8. 8.
    Dreiseitl, S., Ohno-Machado, L.: Logistic regression and artificial neural network classification models: a methodology review. J. Biomed. Inform. 35, 352–359 (2002)CrossRefGoogle Scholar
  9. 9.
    Ferrer, M., Serratosa, F., Riesen, K.: A first step towards exact graph edit distance using bipartite graph matching. In: Liu, C.-L., Luo, B., Kropatsch, W.G., Cheng, J. (eds.) GbRPR 2015. LNCS, vol. 9069, pp. 77–86. Springer, Cham (2015). doi: 10.1007/978-3-319-18224-7_8 Google Scholar
  10. 10.
    Fukunaga, K., Narendra, P.M.: A branch and bound algorithm for computing k-nearest neighbors. IEEE Trans. Comput. 24(7), 750–753 (1975)CrossRefzbMATHGoogle Scholar
  11. 11.
    Gates, G.W.: The reduced nearest neighbor rule. IEEE Trans. Inform. Theory 18(5), 431–433 (1972)CrossRefGoogle Scholar
  12. 12.
    Riesen, K., Neuhaus, M., Bunke, H.: Fast suboptimal algorithms for the computation of graph edit distance. SSPR 28, 163–172 (2006)Google Scholar
  13. 13.
    Raphael, B., Hart, P., Nilsson, N.: A formal basis for the heuristic determination of minimum cost paths. IEEE TSSC 28, 100–107 (2004)Google Scholar
  14. 14.
    Raveaux, R., Adam, S., Héroux, P., Trupin, É.: Learning graph prototypes for shape recognition. CVIU 115(7), 905–918 (2011)Google Scholar
  15. 15.
    Riesen, K., Bunke, H.: IAM graph database repository for graph based pattern recognition and machine learning. In: da Vitoria, L.N., et al. (eds.) SSPR/SPR 2008. LNCS, vol. 5342, pp. 287–297. Springer, Heidelberg (2008)Google Scholar
  16. 16.
    Bunke, H., Riesen, K.: Approximate graph edit distance computation by means of bipartite graph matching. Image Vis. Comput. 28, 950–959 (2009)Google Scholar
  17. 17.
    Riesen, K.: Structural Pattern Recognition with Graph Edit Distance. ACVPR. Springer, Cham (2015)CrossRefzbMATHGoogle Scholar
  18. 18.
    Riesen, K., Fischer, A., Bunke, H.: Combining bipartite graph matching and beam search for graph edit distance approximation. In: Gayar, N., Schwenker, F., Suen, C. (eds.) ANNPR 2014. LNCS, vol. 8774, pp. 117–128. Springer, Cham (2014). doi: 10.1007/978-3-319-11656-3_11 Google Scholar
  19. 19.
    Serratosa, F.: Fast computation of bipartite graph matching. Pattern Recogn. Lett. 45, 244–250 (2014)CrossRefGoogle Scholar
  20. 20.
    Aso, H., Omachi, S.: A fast algorithm for a k-nn classifier based on the branch and bound method and computational quantity estimation. Syst. Comput. Jpn. 31(6), 1–9 (2000)CrossRefGoogle Scholar
  21. 21.
    Vento, M.: A long trip in the charming world of graphs for pattern recognition. Pattern Recogn. 48(2), 291–301 (2015)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Zeina Abu-Aisheh
    • 1
    Email author
  • Romain Raveaux
    • 1
  • Jean-Yves Ramel
    • 1
  1. 1.Laboratoire d’Informatique (LI)Université François RabelaisToursFrance

Personalised recommendations