A Polynomial-Time Metric for Attributed Trees

  • Andrea Torsello
  • Džena Hidović
  • Marcello Pelillo
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3024)


We address the problem of comparing attributed trees and propose a novel distance measure centered around the notion of a maximal similarity common subtree. The proposed measure is general and defined on trees endowed with either symbolic or continuous-valued attributes, and can be equally applied to ordered and unordered, rooted and unrooted trees. We prove that our measure satisfies the metric constraints and provide a polynomial-time algorithm to compute it. This is a remarkable and attractive property since the computation of traditional edit-distance-based metrics is NP-complete, except for ordered structures. We experimentally validate the usefulness of our metric on shape matching tasks, and compare it with edit-distance measures.


Editing Distance Rand Index Attribute Tree Unrooted Tree Pattern Recognition Letter 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows. Prentice-Hall, Upper Saddle River (1993)Google Scholar
  2. 2.
    Bunke, H., Shearer, K.: A graph distance metric based on the maximal common subgraph. Pattern Recognition Letters 19, 255–259 (1998)zbMATHCrossRefGoogle Scholar
  3. 3.
    Dickinson, S.J., Pentland, A.P., Rosenfeld, A.: 3-D shape recovery using distributed aspect matching. PAMI 14(2), 174–198 (1992)Google Scholar
  4. 4.
    Eshera, M.A., Fu, K.-S.: An image understanding system using attributed symbolic representation and in exact graph-matching. PAMI 8, 604–618 (1986)Google Scholar
  5. 5.
    Fernandez, M.L., Valiente, G.: A graph distacne metric combining maximum common subgraph and minimum common supergraph. Pattern Recognition Letters 22, 753–758 (2001)zbMATHCrossRefGoogle Scholar
  6. 6.
    Hidović, D., Pelillo, M.: Metrics for attributed graphs based on the maximal similarity common subgraph. Int. J. Pattern Recognition Artif. Intell. (2004) (in press)Google Scholar
  7. 7.
    Ioffe, S., Forsyth, D.A.: Human tracking with mixtures of trees. In: Proc. ICCV, vol. I, pp. 690–695 (2001)Google Scholar
  8. 8.
    Jain, A.K., Dubes, R.C.: Algorithms for Clustering Data. Prentice Hall, Englewood Cliffs (1988)zbMATHGoogle Scholar
  9. 9.
    Matula, D.W.: An algorithm for subtree identification. SIAM Review 10, 273–274 (1968)Google Scholar
  10. 10.
    Pavan, M., Pelillo, M.: A new graph-theoretic approach to clustering and segmentation. In: Proc. CVPR, vol. I, pp. 145–152 (2003)Google Scholar
  11. 11.
    Pelillo, M., Sidiqi, K., Zucker, S.W.: Matching hierarchical structures using association graphs. PAMI 21(11), 1105–1120 (1999)Google Scholar
  12. 12.
    Peura, M.: Attribute trees in image analysis: Heuristic matching and learning techniques. In: Proc. Int. Conf. Image Anal. Processing, pp. 1160-1165 (1999)Google Scholar
  13. 13.
    Sebastian, T.B., Klein, P.N., Kimia, B.B.: Recognition of shpes by editing their shock graphs. PAMI (2004) (to appear) Google Scholar
  14. 14.
    Shi, J., Malik, J.: Normalized cuts and image segmentation. PAMI 22(8), 888–905 (2000)Google Scholar
  15. 15.
    Siddiqi, K., Shokoufandeh, A., Dickinson, S.J., Zucker, S.W.: Shock graphs and shape matching. Int. J. Computer Vision 35(1), 13–32 (1999)CrossRefGoogle Scholar
  16. 16.
    Torsello, A., Hancock, E.R.: A skeletal measure of 2D shape similarity. In: Arcelli, C., Cordella, L.P., Sanniti di Baja, G. (eds.) IWVF 2001. LNCS, vol. 2059, pp. 260–271. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  17. 17.
    Torsello, A., Hancock, E.R.: Efficiently computing weighted tree edit-distance using relaxation labeling. In: Figueiredo, M., Zerubia, J., Jain, A.K. (eds.) EMMCVPR 2001. LNCS, vol. 2134, pp. 438–453. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  18. 18.
    Tsai, W.H., Fu, K.-S.: Error-correcting isomorphism of attributed relational graphs for pattern analysis. IEEE Trans Syst. Man Cybern. 9, 757–768 (1979)zbMATHCrossRefGoogle Scholar
  19. 19.
    Valiente, G.: An efficient bottom-up distance between trees. In: Proc. Int. Symp. String Processing Information Retrieval, pp. 212–219 (2001)Google Scholar
  20. 20.
    Wallis, W.D., Shoubridge, P., Kraetz, M., Ray, D.: Graph distances using graph union. Pattern Recognition Letters 22, 701–704 (2001)zbMATHCrossRefGoogle Scholar
  21. 21.
    Wang, J.T.-L., Zhang, K.: Finding similar consesnus between trees: An algorithm and a distance hierarchy. Pattern Recognition 34, 127–137 (2001)zbMATHCrossRefGoogle Scholar
  22. 22.
    Zhang, K.: A constrained edit-distance between unordered labeled trees. Algorithmica 15, 205–222 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Zhang, K., Shasha, D.: Simple fast algorithms for the editing distance between trees and related problems. SIAM J. Comput. 18, 1245–1262 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  24. 24.
    Zhang, K., Statman, R., Shasha, D.: On the editing distance between unordered labeled trees. Inform. Process. Letters 42, 133–139 (1992)zbMATHCrossRefMathSciNetGoogle Scholar
  25. 25.
    Zhang, K., Wang, J.T.L., Shasha, D.: On the editing distance between undirected acyclic graphs. Int. J. Found. Computer Sci. 7(1), 43–57 (1996)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Andrea Torsello
    • 1
  • Džena Hidović
    • 2
  • Marcello Pelillo
    • 1
  1. 1.Dipartimento di InformaticaUniversità Ca’ Foscari di VeneziaVenezia MestreItaly
  2. 2.School of Computer ScienceUniversity of BirminghamEdgbaston, BirminghamUnited Kingdom

Personalised recommendations