LightHGNN: Distilling Hypergraph Neural Networks into MLPs for 100x Faster Inference

Yifan Feng, Yihe Luo, Shihui Ying, Yue Gao

TL;DR

LightHGNN bridges the gap between high-performing but slow Hypergraph Neural Networks (HGNNs) and lightning-fast Multi-Layer Perceptrons (MLPs). By distilling complex high-order structural knowledge into simple MLPs, it achieves up to 100x faster inference while maintaining accuracy competitive with state-of-the-art graph models.

The Inference Bottleneck in Hypergraph Neural Networks

Hypergraph Neural Networks (HGNNs) excel at modeling "high-order" correlations—relationships that involve groups of items rather than just pairs. This makes them superior for tasks like vertex classification in citation networks or recommendation systems.

However, HGNNs suffer from a major drawback: inference efficiency. Because they depend on the hypergraph structure to pass messages between nodes, they are computationally expensive and memory-intensive. In large-scale industrial applications where low latency and small memory footprints are critical, simple MLPs remain the preferred choice despite their lower accuracy. The authors seek to eliminate this barrier by creating a model that boasts the speed of an MLP but retains the structural "intelligence" of an HGNN.

Methodology: Distilling Topology into MLPs

The authors introduce two frameworks: LightHGNN and LightHGNN+. Both utilize a "teacher-student" knowledge distillation (KD) approach where a well-trained HGNN (the teacher) guides the training of an MLP (the student).

  • LightHGNN: This baseline distillation model trains the student MLP to mimic the "soft labels" (probability distributions) produced by the teacher HGNN.
  • LightHGNN+: This advanced version introduces topology-aware distillation. Instead of just copying labels, it explicitly injects structural knowledge into the MLP through two mechanisms:
  • Reliable Hyperedge Qualification: A novel method to identify which hyperedges are most useful by measuring their resistance to feature noise.
  • High-Order Soft Targets: The student MLP is trained to predict aggregated distributions from these reliable hyperedges, effectively "learning" the graph structure implicitly.
The framework of LightHGNN+, showing the offline distillation process from a teacher HGNN to a student MLP.

Key Insights and Innovations

  • Structural Independence at Inference: The most significant insight is that the structural dependencies of HGNNs can be eliminated during inference. By baking the structural lessons into the MLP's weights during training, the model no longer needs to "fetch neighbors" at runtime.
  • Quantifying Reliability: Not all graph connections are equally important. By adding Gaussian noise to vertex features and measuring the variance of entropy on hyperedges, the authors successfully identified "reliable" structures that are most beneficial for distillation.
  • Resisting Over-smoothing: HGNNs often suffer from "over-smoothing," where node features become indistinguishable as the network gets deeper. Topology-aware distillation actually helps the student MLP resist this phenomenon better than the original HGNN.

Results: 100x Speedup with Competitive Accuracy

The models were evaluated across 8 hypergraph datasets, 3 standard graph datasets, and large-scale synthetic benchmarks (up to 240k vertices).

  • Massive Speedup: LightHGNNs run 100x faster than standard HGNNs on large synthetic datasets. As the graph scale increases, the inference time for HGNNs grows exponentially, while LightHGNN remains nearly constant.
  • Superior Accuracy: LightHGNN+ outperformed vanilla MLPs by an average of 16.3% across hypergraph datasets. In many cases, it achieved results nearly identical to—or even slightly better than—its much slower HGNN teacher.
  • Memory Efficiency: The distilled MLPs require significantly less memory than HGNNs, making them ideal for deployment on mobile devices or in latency-sensitive cloud environments.
Performance comparison showing LightHGNNs achieving high accuracy with significantly lower runtime and memory usage compared to HGNNs.

Limitations and Future Work

The authors note a performance decline in purely inductive settings, where the model encounters completely new, unseen graph structures at inference. While LightHGNN+ still outperforms standard MLPs in these scenarios, it loses some of the edge it demonstrates in transductive settings. Future work could explore distilling more generalized "topology-aware" abilities to handle entirely novel graph topologies without retraining, or investigate end-to-end self-supervised structural distillation.

Summary updated

BibTeX
@inproceedings{feng2024lighthgnn,
  author = {Yifan Feng and Yihe Luo and Shihui Ying and Yue Gao},
  title = {{LightHGNN: Distilling Hypergraph Neural Networks into MLPs for 100x Faster Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=lHasEfGsXL},
}
Figure