This repository contains the code for the paper "Hypergraph Isomorphism Computation" published in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2024 by Yifan Feng, Jiashu Han, Shihui Ying, and Yue Gao*. The paper is available at here.
In this repository, we provide our implementation of Hypergraph WL Subtree Kernel, Hypergraph WL Hyperedge Kernel and some compared methods including Graph Subtree Kernel, Graphlet Kernel, Hypergraph Directed Line Kernel, and Hypergraph Rooted Kernel. The implementation is based on the following libraries:
- python 3.9: basic programming language.
- dhg 0.9.3: for hypergraph representation and learning.
- torch 1.12.1: for computation.
- hydra-core 1.3.2: for configuration and multi-run management.
- scikit-multilearn 0.2.0: for multi-label learning.
- Clone this repository.
- Install the required libraries.
pip install -r requirements.txt
Modify the root
path in ml_config.yaml
to the absolute path of the data
folder in this repository. Then, run the following command to reproduce the results in the paper:
python ml_main.py
You can change the name of model
and dataset
in ml_config.yaml
to reproduce the results of other models and datasets. All available models and datasets are listed in the following:
Models
graphlet_sampling
: Efficient graphlet kernels for large graph comparison. PMLR 2009.graph_subtree
: Fast subtree kernels on graphs. NIPS 2009.hypergraph_rooted
: Learning from interpretations: a rooted kernel for ordered hypergraphs. ICML 2007.hypergraph_directed_line
: A Hypergraph Kernel from Isomorphism Tests. ICPR 2014.hypergraph_subtree
: The proposed method.hypergraph_hyedge
: The proposed method.
Datasets
- Graph Classification Datasets:
RG_macro
,RG_sub
,IMDBBINARY
,IMDBMULTI
,MUTAG
,NCI1
,PROTEINS
- Hypergraph Classification Datasets:
RHG_3
,RHG_10
,RHG_table
,RHG_pyramid
,IMDB_dir_form
,IMDB_dir_genre
,IMDB_wri_form
,IMDB_wri_genre
,IMDB_dir_genre_m
,IMDB_wri_genre_m
,stream_player
,twitter_friend
If you find this repository useful in your research, please cite our following papers:
@article{feng2024hypergraph,
title={Hypergraph Isomorphism Computation},
author={Feng, Yifan and Han, Jiashu and Ying, Shihui and Gao, Yue},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2024},
publisher={IEEE}
}
@article{gao2022hgnn+,
title={HGNN+: General hypergraph neural networks},
author={Gao, Yue and Feng, Yifan and Ji, Shuyi and Ji, Rongrong},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
volume={45},
number={3},
pages={3181--3199},
year={2022},
publisher={IEEE}
}