NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hypergraph Transformer for Semi-Supervised Classification

Zexi Liu, Bohan Tang, Ziyuan Ye, Xiaowen Dong, Siheng Chen, Yanfeng Wang

TL;DR

HyperGT (HyperGraph Transformer) is a new deep learning framework that captures both local and global relationships in hypergraph-structured data. By treating both nodes and hyperedges as tokens in a Transformer architecture and using a novel structural regularization loss, it overcomes the "oversmoothing" issues common in traditional message-passing models, achieving state-of-the-art results on node classification benchmarks.

What Problem Does This Paper Address?

Hypergraphs are powerful tools for modeling complex, "higher-order" relationships (e.g., a group of products bought together or a committee of researchers). Traditional Hypergraph Neural Networks (HGNNs) typically use a two-step message-passing process: nodes send information to hyperedges, and hyperedges send it back to nodes.

However, this approach has two major flaws:

  1. Oversmoothing: As these models get deeper to try and capture long-range information, node embeddings become increasingly similar and indistinguishable, hurting performance.
  2. Local Bias: They rely heavily on immediate neighbors, making it difficult to capture global correlations or long-range dependencies across the entire hypergraph.

While some researchers have tried applying Transformers to hypergraphs, they usually restrict the "attention" mechanism to local neighborhoods, essentially recreating the same local-only limitation.

Methods

The authors introduce HyperGT, which integrates global attention with hypergraph-specific structural priors. Its architecture consists of three main innovations:

  • Unified Global Attention: Unlike previous models, HyperGT allows every node and every hyperedge to interact with every other node and hyperedge in a single step. This enables the model to capture global correlations that message-passing models miss.
  • Incidence-Matrix Positional Encoding: To ensure the model doesn't lose track of the local structure, the authors use the hypergraph's incidence matrix ($H$) to create learnable positional encodings. This "injects" information about which nodes belong to which hyperedges directly into the input embeddings.
  • Hypergraph Structure Regularization: The authors introduce a unique loss term derived from a "star-expansion" of the hypergraph (a graph where both nodes and hyperedges are treated as vertices). This loss encourages the Transformer's attention matrix to align with the actual physical connections in the hypergraph, acting as a structural guide during training.

To keep the model efficient, they implement the Transformer using a kernelized Gumbel-softmax operator (based on the Nodeformer architecture), which reduces the computational complexity from quadratic ($O(N^2)$) to linear ($O(N)$).

Datasets

The model was evaluated on four real-world hypergraph semi-supervised node classification benchmarks:

  • Congress & Senate: Nodes are US Congresspersons, and hyperedges are formed by bill sponsorships.
  • Walmart: Nodes are products, and hyperedges represent sets of products co-purchased together. This is the largest and most complex dataset in the study.
  • House: Nodes are US House of Representatives members, with hyperedges representing committee memberships.

Key Insights and Ideas

  • Hyperedges as First-Class Citizens: By treating hyperedges as tokens in the Transformer alongside nodes, the model learns "hyperedge embeddings" that can interact directly with one another. This provides a much richer representation of the data's global topology.
  • The Power of Regularization: The ablation studies reveal that a "vanilla" Transformer performs poorly on hypergraphs (45.67% accuracy on Walmart). However, adding the proposed positional encoding and structural regularization boosts that accuracy to nearly 70%. This proves that global attention needs local structural "anchors" to be effective.
  • Solving Oversmoothing: Because the Transformer can capture long-range dependencies in a few layers without the recursive local averaging of message-passing, it effectively sidesteps the oversmoothing problem.

Key Results

  • State-of-the-Art (SOTA) Performance: HyperGT outperformed all existing methods across all four datasets.
  • Significant Gains: On the challenging Walmart dataset, HyperGT improved classification accuracy by nearly 3% over the previous best-performing model (ED-HNN).
  • Efficiency: Despite its global reach, HyperGT maintains competitive inference speeds. On the Walmart dataset, it was faster than several local-only models like AllSetTransformer, thanks to its linear-complexity attention mechanism.

Limitations and Future Work

The authors note that while the empirical results are strong, the theoretical mechanisms behind why global information provides such a significant boost in these specific hypergraph contexts deserve deeper investigation. Additionally, for datasets like Congress and Senate that lack raw node attributes, the authors had to generate features using Gaussian distributions; future work could explore how the model performs with more diverse, naturally occurring node features.

Summary updated

BibTeX
@inproceedings{liu2024hypergraph,
  author = {Zexi Liu and Bohan Tang and Ziyuan Ye and Xiaowen Dong and Siheng Chen and Yanfeng Wang},
  title = {{Hypergraph Transformer for Semi-Supervised Classification}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446248},
}
Figure