Tree Sampling Divergence: An Information-Theoretic Metric for Hierarchical Graph Clustering

Bertrand Charpentier, Thomas Bonald

Introduction

Hierarchical structures are ubiquitous in real-world networks, from social interactions to biological systems. While numerous algorithms exist to generate these hierarchies, typically represented as trees or dendrograms, evaluating their quality remains a significant challenge. Existing metrics often rely on heuristics or are restricted to specific tree structures, such as binary trees. This paper introduces Tree Sampling Divergence (TSD), a mathematically grounded, information-theoretic metric designed to quantify how well a hierarchical tree represents the underlying structure of a graph.

Problem Statement

The evaluation of hierarchical graph clustering faces three primary hurdles. First, there is a frequent absence of ground truth, making comparative evaluation difficult in real-world scenarios. Second, many popular metrics, such as Dasgupta’s cost, are mathematically limited to binary trees, failing to accommodate more general n-ary structures. Finally, existing metrics often lack interpretability, offering little insight into what structural information is being preserved or lost during the clustering process.

Methodology

The proposed metric, Tree Sampling Divergence (TSD), is based on comparing two probability distributions derived from the tree:

  • Edge Sampling ($p$): The distribution of the lowest common ancestors (LCAs) in the tree for pairs of nodes connected by an edge in the original graph.
  • Node Sampling ($q$): The distribution of LCAs for pairs of nodes selected independently and uniformly at random from the graph.

TSD is defined as the Kullback-Leibler (KL) divergence between these two distributions: $D(p||q)$. A high TSD indicates that the tree effectively separates the graph's actual connectivity (concentrated in deeper clusters) from random noise (concentrated at the root). A key theoretical contribution is the link between TSD and graph reconstruction; the authors demonstrate that TSD is directly related to the ability to reconstruct the original graph from the tree, with the difference representing information loss.

Experimental Evaluation

The authors validated TSD across various datasets, including noisy synthetic graphs to test discriminative power, and a Hierarchical Stochastic Block Model (HSBM) to correlate TSD with standard reconstruction metrics like Area Under the ROC Curve (AUC) and Average Precision Score (APS). Finally, the OpenFlights dataset, a real-world network of global flight routes, was used to demonstrate TSD's utility in tree compression and visualization.

Results and Discussion

TSD demonstrates superior discriminative power compared to existing metrics. In noisy synthetic graph experiments, TSD correctly identified the superior hierarchy 94% of the time at 10% noise, outperforming Dasgupta’s cost (86%).

Correlation between reconstruction scores (APS, AUC, Rank) and various metrics, showing TSD's strong linear relationship with reconstruction accuracy.

As shown in Figure 1, TSD exhibits a much tighter and more consistent correlation with standard machine learning metrics (AUC and APS) than competing metrics like Dasgupta's cost or Euclidean divergence. This confirms that TSD is a reliable proxy for the reconstructive quality of a hierarchy.

Furthermore, TSD proves highly effective for tree compression. By greedily pruning a massive binary tree while maximizing TSD, the authors reduced the OpenFlights tree from over 3,000 levels to just 92.

Visualization of the OpenFlights dataset after TSD-based compression, revealing clear geographical clusters that were previously obscured.

The resulting visualization (Figure 5) reveals meaningful geographical clusters—such as distinct groups for North American and European airports—that were obscured in the original, overly dense binary tree.

Conclusion

Tree Sampling Divergence provides a robust, information-theoretic framework for evaluating hierarchical graph clustering. By grounding the metric in graph reconstruction theory, the authors offer a principled way to assess, compare, and compress complex hierarchies. TSD moves the field beyond heuristic-based evaluation toward a more rigorous, measurable science of hierarchical representation.

Summary updated

BibTeX
@inproceedings{charpentier2019tree,
  author = {Bertrand Charpentier and Thomas Bonald},
  title = {{Tree Sampling Divergence: An Information-Theoretic Metric for Hierarchical Graph Clustering}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/286},
}
Figure