Random Spanning Trees and the Prediction of Weighted Graphs

Nicolò Cesa-Bianchi, Claudio Gentile, Fabio Vitale, Giovanni Zappella

Abstract

This paper introduces the Weighted Tree Algorithm (WTA), a randomized approach for predicting node labels in weighted graphs that is both theoretically near-optimal and practically efficient. By reducing a complex graph to a linearized random spanning tree, the authors achieve a mistake bound that scales with the graph's "cutsize" while maintaining linear time and space complexity, making it suitable for massive real-world datasets.

Introduction

The authors tackle the problem of online node prediction on weighted graphs. In scenarios like social networks or biological protein-interaction maps, nodes are revealed sequentially. For each node, an algorithm must predict its binary label (e.g., "spam" vs. "not spam") before the true label is revealed.

The core challenge is twofold:

  1. Theoretical: How can we bound the number of mistakes an algorithm makes when an "adversary" chooses the labels and the order in which nodes are presented?
  2. Computational: Real-world graphs are enormous. Many existing methods scale quadratically or cubically with the number of nodes, making them impractical for graphs with millions of edges.

Methodology

The Weighted Tree Algorithm (WTA) operates in three main stages to address these challenges:

  1. Random Spanning Tree (RST) Extraction: The algorithm first draws a spanning tree from the original graph at random. In the weighted case, the probability of a tree being picked is proportional to the product of its edge weights. This acts as a form of "maximal regularization" and prevents an adversary from concentrating all label disagreements on a single fixed tree.
  2. Tree Linearization: The tree is converted into a line graph (a "spine"). This isn't a simple path; the authors use a specific "node elimination" rule. When a duplicate node from a depth-first traversal is removed, its neighbors are reconnected using the "lighter" of the two incident edges. This process preserves the "resistance distance" properties of the tree.
  3. Nearest Neighbor Prediction: Once linearized, the algorithm predicts the label of a new node based on its closest already-labeled neighbor on the line.
The RST extraction process uses edge weights to determine the probability of including specific edges in the spanning tree T.

While using spanning trees for unweighted graphs was known, this paper extends the theory to weighted graphs and provides a data structure that allows the nearest-neighbor search to happen in constant amortized time per prediction.

Key Insights and Theoretical Foundations

  • The Power of Randomness: Picking a tree at random ensures that the "expected cutsize" (the number of edges connecting nodes with different labels) remains small, regardless of how an adversary tries to label the graph.
  • Effective Resistance as a Metric: The paper shows that the "hardness" of predicting a graph is captured by the sum of effective resistances across the edges where labels disagree.
A graph G with two clusters C1 and C2, illustrating how label disagreements across a bridge edge (3-4) affect prediction complexity.
  • Linearization for Robustness: Turning the tree into a line makes the algorithm remarkably resilient to "label noise." If a few labels are flipped, the mistake bound on the line graph doesn't explode, which isn't necessarily true on the original tree.
  • Scalability: Because the algorithm only needs to store a tree and perform local lookups, it uses linear space and runs much faster than "global" methods like the Graph Perceptron.

Experimental Results

The algorithm was evaluated on several diverse real-world datasets, including RCV1 (news stories), USPS (handwritten digits), KROGAN (protein networks), and WEBSPAM (a massive graph of 110,900 nodes and 1.8 million edges).

  • Performance: WTA consistently outperformed the Graph Perceptron (GPA) across all tested datasets.
  • Competitiveness: It performed comparably to Label Propagation (LABPROP), a popular batch method, but was significantly faster. On the large WEBSPAM dataset, WTA was highly practical while other methods struggled to scale.
  • Committees: Using a "committee" of multiple random spanning trees (e.g., 7, 11, or 17 trees) and taking a majority vote significantly reduced the error rate, often surpassing the performance of more complex batch algorithms.

Conclusion and Future Work

The authors proved that for "polynomially connected" graphs, WTA's mistake bound is optimal up to a logarithmic factor. Future work may address the small theoretical gap (a factor of $\ln |V|$) between the algorithm's upper bound and the general lower bound. Additionally, the authors suggest that combining this machinery with "active learning"—where the algorithm chooses which nodes to see labels for—is a promising future direction.

Summary updated

BibTeX
@inproceedings{cesabianchi2010random,
  author = {Nicolò Cesa-Bianchi and Claudio Gentile and Fabio Vitale and Giovanni Zappella},
  title = {{Random Spanning Trees and the Prediction of Weighted Graphs}},
  booktitle = {International Conference on Machine Learning},
  year = {2010},
  url = {https://openreview.net/forum?id=rJ4vbhWdZB},
}
Figure