Skip to content

Repository files navigation

HGIN

How Powerful are Hypergraph Neural Networks?

Yifan Feng · Rizhuo Huang · Yifan Zhang · Shaoyi Du · Shihui Ying · Zongze Wu · Yue Gao*

IEEE TPAMI 2026 DOI License


WL-style kernels and GNNs capture neighborhood connectivity, but miss the higher-order structures that make hypergraphs powerful. This work closes the gap with one kernel and two networks:

  • HG IA Subtree Kernel — hypergraph WL subtree + closed-path counts of varying lengths; distinguishes uniform-regular hypergraphs that WL kernels cannot.
  • HGIN — vertex → hyperedge → vertex message passing with MLP aggregation, matching the HG WL subtree kernel's expressive power.
  • IA-HGIN — HGIN + a dedicated channel for closed-path distribution features. Strictly stronger.

Installation

git clone https://github.com/iMoonLab/HGIN && cd HGIN
uv venv --python 3.10 && source .venv/bin/activate   # Windows: .venv/Scripts/activate
uv pip install torch --index-url https://download.pytorch.org/whl/cu128   # CPU: uv pip install torch
uv pip install -r requirements.txt

Reproduce in one command

bash run_demo.sh      # 6 representative experiments, ~35 min on one GPU
Experiment Command Acc
HG IA Subtree / IMDB-Wri-Form (~15 s) python ml_main.py data.name=IMDB_wri_form model.name=hypergraph_subtree_id 51.33
HG IA Subtree / RHG-10 (~3 min) python ml_main.py data.name=RHG_10 model.name=hypergraph_subtree_id 97.85
HG IA Subtree / IMDB-Dir-Form (~4 min) python ml_main.py data.name=IMDB_dir_form model.name=hypergraph_subtree_id 67.42
HGIN / IMDB-Wri-Form (~2 min) python dl_main.py data.name=IMDB_wri_form model.name=hgin 51.98
HGIN / RHG-10 (~13 min) python dl_main.py data.name=RHG_10 model.name=hgin 97.78
IA-HGIN / RHG-3 (~11 min) python dl_main.py data.name=RHG_3 model.name=ia_hgin 99.92

Results are averaged over 5 seeds; the demo runs a single seed with 5-fold CV, so small deviations are expected.

Full reproduction — all 9 datasets × {kernel, HGIN, IA-HGIN} (Tables III–VI, several hours)
bash run_full_sweep.sh

Single experiments are configured via Hydra:

python ml_main.py data.name=<dataset> model.name=<kernel>   # kernel-based methods
python dl_main.py data.name=<dataset> model.name=hgin       # or ia_hgin

<dataset>: RHG_10, RHG_3, RHG_table, RHG_pyramid, IMDB_dir_form, IMDB_dir_genre, IMDB_wri_form, IMDB_wri_genre, steam_player · <kernel>: hypergraph_subtree_id, hypergraph_subtree(_v|_e), hypergraph_wl_e, hypergraph_rooted, hypergraph_directed_line, graph_subtree, graphlet_sampling

Protein datasets (Table VII) — manual download required

Download EnzymeClass.pkl, ProteinFamily.pkl, StructuralClass_TP.pkl, StructuralClass_CL.pkl into data/hypergraph/PROTEIN/:

python protein_main.py data.name=EnzymeClass model.name=ia_hgin
Citation
@article{feng2026how,
  title   = {How Powerful are Hypergraph Neural Networks?},
  author  = {Feng, Yifan and Huang, Rizhuo and Zhang, Yifan and Du, Shaoyi and Ying, Shihui and Wu, Zongze and Gao, Yue},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year    = {2026},
  doi     = {10.1109/TPAMI.2026.3724944}
}

MIT License · Made with ❤️ by Yifan Feng and Rizhuo Huang

About

Official implementation of "How Powerful are Hypergraph Neural Networks?", published in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages