Compression of weighted graphs

Hannu Toivonen, Fang Zhou, Aleksi Hartikainen, Atte HinkkaKDD 2011

Abstract

Large-scale weighted networks are essential for modeling complex systems but are often computationally prohibitive to analyze. This paper presents a framework for compressing these graphs into smaller "summaries" by grouping nodes into supernodes and edges into superedges. By focusing on preserving both individual edge weights and long-range connectivity (path quality), the proposed algorithms achieve significant size reduction with minimal information loss. Experimental results on real-world datasets like DBLP and Biomine demonstrate that graphs can be compressed by over 50% while maintaining high fidelity and stability for downstream tasks.

Introduction

Modern data science frequently encounters massive networks—social, biological, or technological—where edges carry weights representing interaction strength or frequency. While graph summarization for unweighted graphs is well-studied, weighted graphs present unique challenges. The goal is to shrink these networks into manageable summaries that facilitate visualization and faster processing without destroying the underlying signal. This work addresses two primary objectives: simple compression (preserving edge weights) and generalized compression (preserving path quality between distant nodes).

Methodology: From Nodes to Supernodes

The core approach is an agglomerative, bottom-up process. Nodes that exhibit similar connectivity patterns are merged into supernodes, and their corresponding edges are aggregated into superedges.

Visual comparison of a co-authorship graph before and after compression.

To balance quality and computational efficiency, the authors introduced several algorithmic variants:

  1. Thresholded Algorithm: Merges pairs of nodes whose similarity falls within a specific error tolerance.
  2. Randomized Semi-greedy: A faster heuristic that pairs a random node with its most compatible neighbor.
  3. 2-hop Optimization: A critical refinement that restricts the search for merge candidates to nodes sharing a common neighbor. This reduces the search space from $O(V^2)$ to a more localized neighborhood, providing significant speedups with negligible impact on accuracy.

Experimental Results

The framework was evaluated using the Biomine biological database and the DBLP co-authorship network. The researchers measured fidelity using Root Mean Square Error (RMSE) and assessed scalability on graphs with up to 400,000 edges.

RMSE of node pair distances as a function of the compression ratio.

Key findings include:

  • High Fidelity: As shown in the performance plots, compressing a graph to 50% of its original size results in an RMSE of approximately 0.03.
  • Efficiency: The semi-greedy algorithm with 2-hop optimization processed 16,000 edges in 2 seconds and scaled to 400,000 edges in under 10 minutes.
  • Downstream Stability: Tasks like k-medoids clustering performed on compressed summaries yielded results nearly identical to those on the full graph.

Discussion and Conclusion

A vital insight from this work is the distinction between clustering and compression. While clustering groups nodes based on direct connectivity, compression groups nodes based on structural equivalence—how they relate to the rest of the network. This allows for the removal of 50-80% of edges in redundant real-world networks with minimal error.

Future work includes refining weight heuristics for path preservation, identifying "noise" edges for deletion, and extending the framework to handle categorical edge labels.

Summary updated

BibTeX
@inproceedings{toivonen2011compression,
  author = {Hannu Toivonen and Fang Zhou and Aleksi Hartikainen and Atte Hinkka},
  title = {{Compression of weighted graphs}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2011},
  doi = {10.1145/2020408.2020566},
}
Figure