K-nearest neighbor graph (KNN) is a widely used tool in several pattern recognition applications but it has drawbacks. Firstly, the choice of k can have significant impact on the result because it has to be fixed beforehand, and it does not adapt to the local density of the neighborhood. Secondly, KNN does not guarantee connectivity of the graph. We introduce an alternative data structure called XNN, which has variable number of neighbors and guarantees connectivity. We demonstrate that the graph provides improvement over KNN in several applications including clustering, classification and data analysis.


KNN Neighborhood graph Data modeling 


  1. 1.
    Cover, T., Hart, P.: Nearest neighbor pattern classification. IEEE Trans. Inf. Theory 13(1), 21–27 (1967)CrossRefzbMATHGoogle Scholar
  2. 2.
    Maier, M., Hein, M., von Luxburg, U.: Optimal construction of kk-nearest-neighbor graphs for identifying noisy clusters. Theoret. Comput. Sci. 410(19), 1749–1764 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Aoyama, K., Saito, K., Sawada, H., Ueda, N.: Fast approximate similarity search based on degree-reduced neighborhood graphs. In: ACM SIGKDD, San Diego, USA, pp. 1055–1063 (2011)Google Scholar
  4. 4.
    Yang, L.: Building k edge-disjoint spanning trees of minimum total length for isometric data embedding. IEEE Trans. Pattern Anal. Mach. Intell. 27(10), 1680–1683 (2005)CrossRefGoogle Scholar
  5. 5.
    Gabriel, K.R., Sokal, R.R.: New statistical approach to geographic variation analysis. Syst. Zool. 18, 259–278 (1969)CrossRefGoogle Scholar
  6. 6.
    Matula, D.W., Sokal, R.R.: Properties of Gabriel graphs relevant to geographic variation research and the clustering of points in the plane. Geogr. Anal. 12(3), 205–222 (1980)CrossRefGoogle Scholar
  7. 7.
    Park, J.C., Shin, H., Choi, B.K.: Elliptic gabriel graph for finding neighbors in a point set and its application to normal vector estimation. Comput. Aided Des. 38, 619–626 (2006)CrossRefGoogle Scholar
  8. 8.
    Inkaya, T., Kayaligil, S., Özdemirel, N.E.: An adaptive neighborhood construction algorithm based on density and connectivity. Pattern Recogn. Lett. 52, 17–24 (2015)CrossRefGoogle Scholar
  9. 9.
    Cignoni, P., Montani, C., Scopigno, R.: DeWall: a fast divide and conquer Delaunay triangulation algorithm in E^d. Comput. Aided Des. 30(5), 333–341 (1998)CrossRefzbMATHGoogle Scholar
  10. 10.
    Rezafinddramana, O., Rayat, F., Venturin, G.: Incremental Delaunay triangulation construction for clustering. In: International Conference on Pattern Recognition, ICPR, Stockholm, Sweden, pp. 1354–1359 (2014)Google Scholar
  11. 11.
    Fränti, P., Kaukoranta, T., Nevalainen, O.: On the splitting method for VQ codebook generation. Opt. Eng. 36(11), 3043–3051 (1997)CrossRefGoogle Scholar
  12. 12.
    Fischer, B., Buhmann, J.M.: Path-based clustering for grouping of smooth curves and texture segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 25, 513–518 (2003)Google Scholar
  13. 13.
    Chang, H., Yeung, D.Y.: Robust path-based spectral clustering. Pattern Recogn. 41(1), 191–203 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Rezaei, M., Fränti, P.: Set-matching methods for external cluster validity. IEEE Trans. Knowl. Data Eng. 28(8), 2173–2186 (2016)CrossRefGoogle Scholar
  15. 15.
    Gou, J., Du, L., Zhang, Y., Xiong, T.: A new distance-weighted k-nearest neighbor classifier. J. Inf. Comput. Sci. 9(6), 1429–1436 (2012)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Pasi Fränti
    • 1
    Email author
  • Radu Mariescu-Istodor
    • 1
  • Caiming Zhong
    • 2
  1. 1.University of Eastern FinlandJoensuuFinland
  2. 2.Ningbo UniversityNingboChina

Personalised recommendations