https://github.com/imoonlab/hic
Source code of IEEE TPAMI 2024 "Hypergraph Isomorphism Computation"
https://github.com/imoonlab/hic
Last synced: 8 months ago
JSON representation
Source code of IEEE TPAMI 2024 "Hypergraph Isomorphism Computation"
- Host: GitHub
- URL: https://github.com/imoonlab/hic
- Owner: iMoonLab
- License: apache-2.0
- Created: 2024-01-24T06:07:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T13:16:05.000Z (about 2 years ago)
- Last Synced: 2025-07-13T14:41:17.910Z (8 months ago)
- Language: Python
- Size: 3.25 MB
- Stars: 25
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hypergraph Isomorphism Computation
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](https://fengyifan.site/), Jiashu Han, Shihui Ying, and Yue Gao*. The paper is available at [here](https://ieeexplore.ieee.org/abstract/document/10398457/).

## Introduction
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](https://www.python.org/): basic programming language.
* [dhg 0.9.3](https://github.com/iMoonLab/DeepHypergraph): for hypergraph representation and learning.
* [torch 1.12.1](https://pytorch.org/): for computation.
* [hydra-core 1.3.2](https://hydra.cc/docs/intro/): for configuration and multi-run management.
* [scikit-multilearn 0.2.0](http://scikit.ml/): for multi-label learning.
## Installation
1. Clone this repository.
2. Install the required libraries.
``` bash
pip install -r requirements.txt
```
## Usage
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:
``` bash
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](https://proceedings.mlr.press/v5/shervashidze09a/shervashidze09a.pdf).
- `graph_subtree`: [Fast subtree kernels on graphs. NIPS 2009](https://is.mpg.de/fileadmin/user_upload/files/publications/NIPS2009-Shervashidze_6080[0].pdf).
- `hypergraph_rooted`: [Learning from interpretations: a rooted
kernel for ordered hypergraphs. ICML 2007](https://icml.cc/imls/conferences/2007/proceedings/papers/467.pdf).
- `hypergraph_directed_line`: [A Hypergraph Kernel from Isomorphism Tests. ICPR 2014](https://ieeexplore.ieee.org/document/6977378).
- `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`
## Citation
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}
}
```