{"id":21384658,"url":"https://github.com/imoonlab/lighthgnn","last_synced_at":"2025-07-13T14:31:39.243Z","repository":{"id":219913776,"uuid":"747548565","full_name":"iMoonLab/LightHGNN","owner":"iMoonLab","description":"Source code for ICLR 2024 \"LightHGNN: Distilling Hypergraph Neural Networks into MLPs for 100x Faster Inference\"","archived":false,"fork":false,"pushed_at":"2024-01-31T05:45:56.000Z","size":869,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T12:52:01.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMoonLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-24T06:38:42.000Z","updated_at":"2025-03-31T19:37:42.000Z","dependencies_parsed_at":"2024-11-22T11:42:31.501Z","dependency_job_id":"7edcfd8e-c284-4b83-8b45-4384775ce730","html_url":"https://github.com/iMoonLab/LightHGNN","commit_stats":null,"previous_names":["imoonlab/lighthgnn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iMoonLab/LightHGNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FLightHGNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FLightHGNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FLightHGNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FLightHGNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMoonLab","download_url":"https://codeload.github.com/iMoonLab/LightHGNN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FLightHGNN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155718,"owners_count":23719567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T11:42:27.385Z","updated_at":"2025-07-13T14:31:37.922Z","avatar_url":"https://github.com/iMoonLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightHGNN\nThis repository contains the source code for the paper \"LightHGNN: Distilling Hypergraph Neural Networks into MLPs for 100x Faster Inference\" published in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2024 by [Yifan Feng](https://fengyifan.site/), Yihe Luo, Shihui Ying, Yue Gao*. This paper is available at [here](https://openreview.net/forum?id=lHasEfGsXL).\n\n![framework](doc/fw.jpg)\n\n## Introduction\nIn this repository, we provide the implementation of our LightHGNNs, including LightHGNN and LightHGNN+, which is based on the following environments:\n* [python 3.9](https://www.python.org/): basic programming language.\n* [dhg 0.9.4](https://github.com/iMoonLab/DeepHypergraph): for hypergraph representation and learning. \n* [torch 1.12.1](https://pytorch.org/): for computation.\n* [hydra-core 1.3.2](https://hydra.cc/docs/intro/): for configuration and multi-run management.\n\n\n## Installation \n1. Clone this repository.\n2. Install the required libraries.\n``` bash\npip install -r requirements.txt\n```\n\n## Usage\nFor transtive setting, you can run the following command:\n```bash\npython trans_train.py\n```\nFor multi-run and obtain the average results, you can run the following command:\n```bash\npython trans_multi_exp.py\n```\nFor production setting, you can run the following command:\n```bash\npython prod_train.py\n```\nFor multi-run and obtain the average results, you can run the following command:\n```bash\npython prod_multi_exp.py\n```\n\n**Change Models**\nYou can change the teacher by modifying the `teacher` in `trans_config.yaml` and `prod_config.yaml` as following:\n```yaml\nmodel:\n    teacher: hgnn # hgnn, hgnnp, hnhn, unigcn\n```\nAlso, you can change the student by modifying the `student` in `trans_config.yaml` and `prod_config.yaml` as following:\n```yaml\nmodel:\n    student: light_hgnn # light_hgnn, light_hgnnp\n```\n\n**Change Datasets**\nIn our paper, 13 grpah/hypergraph datasets are adopted for evaluation.\n- Graph datasets: `cora`, `pubmed`, `citeseer`\n- Hypergraph datasets: `news20`, `ca_cora`, `cc_cora`, `cc_citeseer`, `dblp4k_conf`, `dblp4k_paper`, `dblp4k_term`, `imdb_aw`, `recipe_100k`, `recipe_200k`\n\nYou can change the dataset by modifying the `dataset` in `trans_config.yaml` and `prod_config.yaml` as following:\n```yaml\ndata:\n    name: dblp4k_paper # cora, pubmed, news20, ca_cora, dblp4k_term, imdb_aw, ...\n```\n\n**Important Note**\nSince the `recipe_100k` and `recipe_200k` datasets are too large and contains more than 10k vertices, the two dataset can only be used under the production setting. **Please do not use the two datasets for the transitive setting.**\n\n## Citation\nIf you find this repository useful in your research, please cite the following papers:\n```\n@inproceedings{feng2024lighthgnn,\ntitle={Light{HGNN}: Distilling Hypergraph Neural Networks into {MLP}s for 100x Faster Inference},\nauthor={Feng, Yifan and Luo, Yihe and Ying, Shihui and Gao, Yue},\nbooktitle={The Twelfth International Conference on Learning Representations},\nyear={2024},\n}\n\n@article{gao2022hgnn+,\n  title={HGNN+: General hypergraph neural networks},\n  author={Gao, Yue and Feng, Yifan and Ji, Shuyi and Ji, Rongrong},\n  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},\n  volume={45},\n  number={3},\n  pages={3181--3199},\n  year={2022},\n  publisher={IEEE}\n}\n\n@inproceedings{feng2019hypergraph,\n  title={Hypergraph neural networks},\n  author={Feng, Yifan and You, Haoxuan and Zhang, Zizhao and Ji, Rongrong and Gao, Yue},\n  booktitle={Proceedings of the AAAI conference on artificial intelligence},\n  volume={33},\n  number={01},\n  pages={3558--3565},\n  year={2019}\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Flighthgnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimoonlab%2Flighthgnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Flighthgnn/lists"}