{"id":22229750,"url":"https://github.com/graph-com/ed-hnn","last_synced_at":"2025-07-27T19:31:43.400Z","repository":{"id":98539252,"uuid":"509531589","full_name":"Graph-COM/ED-HNN","owner":"Graph-COM","description":"[ICLR 2023] \"Equivariant Hypergraph Diffusion Neural Operators\" by Peihao Wang, Shenghao Yang, Yunyu Liu, Zhangyang Wang, Pan Li","archived":false,"fork":false,"pushed_at":"2024-08-16T23:56:32.000Z","size":399,"stargazers_count":45,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T06:51:12.783Z","etag":null,"topics":["equivariant-network","graph-diffusion","graph-neural-networks","hypergraph-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Graph-COM.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":"2022-07-01T17:06:33.000Z","updated_at":"2025-03-31T19:20:23.000Z","dependencies_parsed_at":"2024-01-06T02:26:49.177Z","dependency_job_id":"8e52ef36-00f1-4edb-9586-343ad31cfe73","html_url":"https://github.com/Graph-COM/ED-HNN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Graph-COM/ED-HNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FED-HNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FED-HNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FED-HNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FED-HNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Graph-COM","download_url":"https://codeload.github.com/Graph-COM/ED-HNN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FED-HNN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267413677,"owners_count":24083475,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["equivariant-network","graph-diffusion","graph-neural-networks","hypergraph-learning"],"created_at":"2024-12-03T01:12:13.210Z","updated_at":"2025-07-27T19:31:43.118Z","avatar_url":"https://github.com/Graph-COM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Equivariant Hypergraph Diffusion Neural Operators\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nThe official implementation of ICLR 2023 paper [Equivariant Hypergraph Diffusion Neural Operators](https://arxiv.org/abs/2207.06680).\n\nPeihao Wang, Shenghao Yang, Yunyu Liu, Zhangyang (Atlas) Wang, Pan Li\n\n## Introduction\n\nIn this work, we are inspired by hypergraph diffusion algorithms and design a novel HNN architecture that holds provable expressiveness while keeping efficiency. \nAbstract: Hypergraph neural networks (HNNs) using neural networks to encode hypergraphs provide a promising way to model higher-order relations in data and further solve relevant prediction tasks. However, higher-order relations often contain complex patterns and are hard to process due to their irregularity. Hence, designing an HNN that suffices to express these relations while keeping computational efficiency is challenging. This work proposes a novel HNN architecture named ED-HNN. Inspired by recent hypergraph diffusion algorithms, ED-HNN provably represents any continuous equivariant hypergraph diffusion operators which are known capable of modeling complex higher-order relations. Besides being expressive, ED-HNN can be implemented efficiently by combining the star expansions of hypergraphs with standard message passing neural networks. ED-HNN also shows great superiority in processing heterophilic hypergraphs and constructing deep models. We evaluate ED-HNN over nine real-world hypergraph datasets. ED-HNN achieves uniformly state-of-the-art performance over these nine datasets and outperforms the previous best baselines by more than 2% over four datasets therein.\n\n![](figures/teaser.png)\n\n## Getting Started\n\n### Dependency\n\nTo run our code, the following Python libraries which are required to run our code:\n\n```\npytorch 1.8.0+\ntorch-geometric\ntorch-scatter\ntorch-sparse\ntorch-cluster\n```\n\n### Data Preparation\n\nDownload our preprocessed dataset from the [HuggingFace Hub](https://huggingface.co/datasets/peihaowang/edgnn-hypergraph-dataset).\nThen put the downloaded directory under the root folder of this repository. The directory structure should look like:\n```\nED-HNN/\n  \u003csource code files\u003e\n  ...\n  raw_data\n    20newsW100\n    coauthorship\n    cocitation\n    ...\n```\n\n## Training\n\nTo train ED-HNN, please use the command below.\n```\npython train.py --method EDGNN --dname \u003cdataset name\u003e --All_num_layers \u003ctotal number of layers\u003e --MLP_num_layers \u003cMLP depth\u003e --MLP_hidden \u003cMLP dimension\u003e\n--Classifier_num_layers \u003cclassifier depth\u003e --Classifier_hidden \u003cclassifier dimension\u003e\n--lr \u003clearning rate\u003e --wd \u003cweight_decay\u003e\n--epochs \u003cnum epochs\u003e --cuda \u003ccuda id\u003e\n--data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\nwhere `--MLP_num_layers` and `--MLP_hidden` specify the hyper-parameters for internal MLPs. One can also specify `--MLP2_num_layers` and `--MLP3_num_layers` for different internal MLPs separately. `--Classifier_num_layers` and `--Classifier_hidden` defines the hyper-parameters for the classifier.\n\nNote that `--raw_data_dir` is the full path to load raw data. It is often `./raw_data/\u003cdataset_name\u003e` For `cocitation` or `coauthorship` datasets, the corresponding data folders are under `./raw_data/cocitation` and `./raw_data/coauthorship` respectively. The processed data will be saved into the path specified by `--data_dir`. It is recommended to use path name like `./data/\u003cdataset_name\u003e`.\n\nPlease use the following commands to reproduce our results:\n\n\u003cdetails\u003e\n\n\u003csummary\u003eCora\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname cora --All_num_layers 1 --MLP_num_layers 0 --MLP2_num_layers 0 \n--MLP3_num_layers 1 --Classifier_num_layers 1 --MLP_hidden 256 --Classifier_hidden 256 --aggregate mean\n--restart_alpha 0.0 --lr 0.001 --wd 0 --epochs 500 --runs 10\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e \n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eCiteseer\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname citeseer --All_num_layers 1 --MLP_num_layers 0 --MLP2_num_layers 0\n--MLP3_num_layers 1 --Classifier_num_layers 1 --MLP_hidden 256 --Classifier_hidden 256 --aggregate mean \n--restart_alpha 0.0 --lr 0.001 --wd 0 --epochs 500 --runs 10\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003ePubmed\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname pubmed --All_num_layers 8 --MLP_num_layers 2 --MLP2_num_layers 2\n--MLP3_num_layers 2 --Classifier_num_layers 2 --MLP_hidden 512 --Classifier_hidden 256 --normalization None --aggregate mean\n--restart_alpha 0.5 --lr 0.001 --wd 0 --epochs 500 --runs 10\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003eCora-CA\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname coauthor_cora --All_num_layers 1 --MLP_num_layers 0 --MLP2_num_layers 0\n--MLP3_num_layers 1 --Classifier_num_layers 2 --MLP_hidden 128 --Classifier_hidden 96 --aggregate mean \n--restart_alpha 0.0 --lr 0.001 --wd 0 --epochs 500 --runs 10\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eDBLP-CA\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname coauthor_dblp --All_num_layers 1 --MLP_num_layers 0 --MLP2_num_layers 0\n--MLP3_num_layers 1 --Classifier_num_layers 2 --MLP_hidden 128 --Classifier_hidden 96 --aggregate mean\n--restart_alpha 0.0 --lr 0.001 --wd 0 --epochs 500 --runs 10\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003eSenate Committees\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname senate-committees-100 --All_num_layers 8 --MLP_num_layers 2 --MLP2_num_layers 2\n--MLP3_num_layers 2 --Classifier_num_layers 2 --MLP_hidden 512 --Classifier_hidden 256 --aggregate mean \n--restart_alpha 0.5 --lr 0.001 --wd 0 --epochs 500 --runs 10 --feature_noise 1.0\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eHouse Committees\u003c/summary\u003e\n\n```\npython train.py --method EDGNN --dname house-committees-100 --All_num_layers 8 --MLP_num_layers 2 --MLP2_num_layers 2\n--MLP3_num_layers 2 --Classifier_num_layers 1 --MLP_hidden 256 --Classifier_hidden 128 --aggregate mean \n--restart_alpha 0.5 --lr 0.001 --wd 0 --epochs 500 --runs 10 --feature_noise 1.0\n--cuda \u003ccuda_id\u003e --data_dir \u003cdata_path\u003e --raw_data_dir \u003craw_data_path\u003e\n```\n\n\u003c/details\u003e\n\n## Citation\n\nThis repository is build based on AllSet [official repository](https://github.com/jianhao2016/AllSet).\nIf you find this work or our code implementation helpful for your own resarch or work, please cite our paper.\n```\n@inproceedings{wang2022equivariant,\n  title={Equivariant Hypergraph Diffusion Neural Operators},\n  author={Wang, Peihao and Yang, Shenghao and Liu, Yunyu and Wang, Zhangyang and Li, Pan},\n  booktitle={International Conference on Learning Representations (ICLR)},\n  year={2023}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraph-com%2Fed-hnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraph-com%2Fed-hnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraph-com%2Fed-hnn/lists"}