Edge Representation Learning with Hypergraphs

Jaehyeong Jo, Jinheon Baek, Seul Lee, Dongki Kim, Minki Kang, Sung Ju Hwang

Overview

Most Graph Neural Networks (GNNs) treat edges as auxiliary information rather than primary features. This paper introduces Dual Hypergraph Transformation (DHT), a lossless method that swaps the roles of nodes and edges. This transformation allows researchers to apply powerful, off-the-shelf node-based message-passing techniques directly to edge representations. By pairing this with two new pooling strategies—HyperCluster and HyperDrop—the authors achieve state-of-the-art results in graph reconstruction, molecule generation, and classification.

Overview of the Dual Hypergraph Transformation framework, showing how edge importance in molecules motivates the DHT, HyperCluster, and HyperDrop methods.

The Problem: Why Edges Matter

In the world of GNNs, nodes (like atoms or social media users) usually get all the attention. Edges (bonds or friendships) are often relegated to being simple weights or categorical labels used to update node states.

However, for many tasks, the edges are the story. In chemistry, two molecules might have the exact same atoms but different bond structures, resulting in completely different properties (e.g., one is beneficial, the other is toxic). Existing methods to handle edges, like "Line Graphs," are often computationally expensive ($O(n^2)$) or lose vital information during the transformation. The authors aim to create a scalable, lossless way to learn explicit edge representations that can be used for complex tasks like generating new molecules or reconstructing graph structures.

Methods: Dual Hypergraph Transformation

The core innovation of this paper is the Dual Hypergraph Transformation (DHT).

  1. The Swap: In a standard graph, an incidence matrix $M$ tracks which nodes are connected to which edges. DHT simply transposes this matrix ($M^T$).
  2. The Result: The original edges become the "nodes" of a new hypergraph, and the original nodes become "hyperedges" (connections that can link multiple nodes at once).
  3. Message Passing: Because the edges are now nodes in this dual space, any standard GNN (like GCN, GAT, or GIN) can be used to update their representations without needing custom "edge-aware" architectures.
Detailed mechanism of the Dual Hypergraph Transformation, illustrating the transposition of the incidence matrix to swap nodes and edges.

To handle graph-level tasks, the authors introduce two pooling methods:

  • HyperCluster: Groups similar edges together. This is "lossless" in terms of connectivity, making it ideal for graph reconstruction and generation.
  • HyperDrop: Learns to identify and remove "noisy" or irrelevant edges. This simplifies the graph topology, which helps with classification and prevents the "over-smoothing" problem (where node features become indistinguishable in deep networks).

Key Insights

  • Duality is Lossless: Unlike Line Graphs, DHT is a bijective transformation. You can move from the graph to the dual hypergraph and back without losing a single bit of topological or feature information.
  • Efficiency: DHT can be implemented sparsely. The complexity of message passing on the dual hypergraph is $O(m)$ (where $m$ is the number of edges), making it as efficient as standard node-based GNNs.
  • Edges as a Regularizer: By using HyperDrop, the model essentially performs "learnable graph rewiring." By pruning edges that don't contribute to the task, the model avoids the trap of over-smoothing, allowing for deeper GNN architectures that actually maintain performance.
  • Substructure Capture: Qualitative results show that HyperCluster naturally learns to group edges into meaningful chemical substructures (like hexagonal rings in molecules) without being explicitly told to do so.

Key Results

The authors evaluated their framework (EHGNN) across a wide range of benchmarks, including synthetic graphs, molecular datasets (ZINC, OGB), and social networks (IMDB, COLLAB).

  • Reconstruction: On the ZINC dataset, EHGNN achieved significantly higher "Exact Match" scores than baselines (e.g., R-GCN or EGNN), proving it captures edge identity much more accurately.
  • Generation: When integrated into molecule generation models like MARS, EHGNN improved the success rate of generating molecules that satisfy specific biological properties by nearly 5%.
  • Classification: HyperDrop outperformed all hierarchical pooling baselines (like DiffPool and SAGPool) across 10 benchmark datasets. It was particularly effective on social graphs where edge connectivity patterns are highly discriminative.
  • Depth: In node classification tests, while standard GCNs saw performance tank after 8–10 layers due to over-smoothing, EHGNN with HyperDrop maintained stable accuracy even at 10 layers.

Limitations and Future Work

While DHT is highly efficient ($O(m)$), performing the transformation and running a second GNN on the dual space does add some constant-time overhead compared to a simple node-only GNN. Additionally, the choice between HyperCluster and HyperDrop depends heavily on the task (reconstruction vs. classification), suggesting a "one size fits all" pooling layer isn't yet a reality. Future work may extend this framework to higher-order relational learning or apply it to massive-scale graphs like protein-protein interaction (PPI) networks where edge accuracy is paramount.

Summary updated

BibTeX
@inproceedings{jo2021edge,
  author = {Jaehyeong Jo and Jinheon Baek and Seul Lee and Dongki Kim and Minki Kang and Sung Ju Hwang},
  title = {{Edge Representation Learning with Hypergraphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=vwgsqRorzz},
}
Figure