{"id":15554904,"url":"https://github.com/imoonlab/deephypergraph","last_synced_at":"2025-04-08T09:06:48.214Z","repository":{"id":46172583,"uuid":"212934775","full_name":"iMoonLab/DeepHypergraph","owner":"iMoonLab","description":"A pytorch library for graph and hypergraph computation.","archived":false,"fork":false,"pushed_at":"2024-03-30T06:57:30.000Z","size":4022,"stargazers_count":729,"open_issues_count":31,"forks_count":71,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-08T09:06:40.872Z","etag":null,"topics":["deep-learning","graph-neural-networks","hypergraph-neural-networks","pytorch"],"latest_commit_sha":null,"homepage":"https://deephypergraph.com/","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}},"created_at":"2019-10-05T02:47:56.000Z","updated_at":"2025-04-03T00:10:23.000Z","dependencies_parsed_at":"2024-01-31T03:39:28.250Z","dependency_job_id":"6cb72494-5989-4566-aa63-83d02a8abba6","html_url":"https://github.com/iMoonLab/DeepHypergraph","commit_stats":{"total_commits":204,"total_committers":8,"mean_commits":25.5,"dds":0.5,"last_synced_commit":"834634904fed8e0055a6f3e11c616d4a35e7a5f5"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FDeepHypergraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FDeepHypergraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FDeepHypergraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMoonLab%2FDeepHypergraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMoonLab","download_url":"https://codeload.github.com/iMoonLab/DeepHypergraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"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":["deep-learning","graph-neural-networks","hypergraph-neural-networks","pytorch"],"created_at":"2024-10-02T15:04:17.918Z","updated_at":"2025-04-08T09:06:48.190Z","avatar_url":"https://github.com/iMoonLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://deephypergraph.com/logo_DHG.png\" height=\"200\"\u003e\n\u003c/p\u003e\n\n![Release version](https://img.shields.io/github/v/release/iMoonLab/DeepHypergraph)\n[![PyPI version](https://img.shields.io/pypi/v/dhg?color=purple)](https://pypi.org/project/dhg/)\n[![Website Build Status](https://github.com/yifanfeng97/dhg-page-source/actions/workflows/website.yml/badge.svg)](https://deephypergraph.com/)\n[![Documentation Status](https://readthedocs.org/projects/deephypergraph/badge/?version=latest)](https://deephypergraph.readthedocs.io/)\n[![Downloads](https://pepy.tech/badge/dhg)](https://pepy.tech/project/dhg)\n[![Visits Badge](https://visitor-badge.glitch.me/badge?page_id=iMoonLab.DeepHypergraph)](https://visitor-badge.glitch.me/)\n[![license](https://img.shields.io/github/license/imoonlab/DeepHypergraph)](LICENSE)\n\u003c!-- [![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black) --\u003e\n\u003c!-- [![Supported Python versions](https://img.shields.io/pypi/pyversions/dhg)](https://pypi.org/project/dhg/) --\u003e\n\n\n**[Website](https://deephypergraph.com/)** | **[Documentation](https://deephypergraph.readthedocs.io/)** | **[Tutorials](https://deephypergraph.readthedocs.io/en/latest/tutorial/overview.html)** | **[中文文档](https://deephypergraph.readthedocs.io/en/latest/zh/overview.html)** | **[Official Examples](https://deephypergraph.readthedocs.io/en/latest/examples/vertex_cls/index.html)** | **[Discussions](https://github.com/iMoonLab/DeepHypergraph/discussions)**\n\n\n## News\n- 2024-01-31 -\u003e **v0.9.4** is now available! Fix some bugs and more datasets are included!\n- 2024-01-31 -\u003e **v0.9.4** 正式发布！ 修复了若干bug，包含更多数据集！\n- 2022-12-28 -\u003e **v0.9.3** is now available! More datasets and operations of hypergraph are included!\n- 2022-12-28 -\u003e **v0.9.3** 正式发布！ 包含更多数据集和超图操作！\n- 2022-09-25 -\u003e **v0.9.2** is now available! More datasets, SOTA models, and visualizations are included!\n- 2022-09-25 -\u003e **v0.9.2** 正式发布！ 包含更多数据集、最新模型和可视化功能！\n- 2022-08-25 -\u003e DHG's first version **v0.9.1** is now available! \n- 2022-08-25 -\u003e DHG的第一个版本 **v0.9.1** 正式发布！\n\n\n**DHG** *(DeepHypergraph)* is a deep learning library built upon [PyTorch](https://pytorch.org) for learning with both Graph Neural Networks and Hypergraph Neural Networks. It is a general framework that supports both low-order and high-order message passing like **from vertex to vertex**, **from vertex in one domain to vertex in another domain**, **from vertex to hyperedge**, **from hyperedge to vertex**, **from vertex set to vertex set**.\n\nIt supports a wide variety of structures like low-order structures (graph, directed graph, bipartite graph, etc.), high-order structures (hypergraph, etc.). Various spectral-based operations (like Laplacian-based smoothing) and spatial-based operations (like message psssing from domain to domain) are integrated inside different structures. It provides multiple common metrics for performance evaluation on different tasks. Many state-of-the-art models are implemented and can be easily used for research. We also provide various visualization tools for both low-order structures and high-order structures. \n\nIn addition, DHG's [dhg.experiments](https://deephypergraph.readthedocs.io/en/latest/api/experiments.html) module (that implements **Auto-ML** upon [Optuna](https://optuna.org)) can help you automatically tune the hyper-parameters of your models in training and easily outperforms the state-of-the-art models.\n\n![Framework of DHG Structures](https://deephypergraph.com/fw_dhg_structure.jpg)\n\n![Framework of DHG Function Library](https://deephypergraph.com/fw_dhg_other.jpg)\n\n* [Hightlights](#highlights)\n* [Installation](#installation)\n* [Quick Start](#quick-start)\n* [Examples](#examples)\n* [Datasets](#datasets)\n* [Metrics](#metrics)\n* [Implemented Models](#implemented-models)\n\n\n---------------------------------------------------------------\n\n## Highlights\n\n- **Support High-Order Message Passing on Structure**: \nDHG supports pair-wise message passing on the graph structure and beyond-pair-wise message passing on the hypergraph structure.\n\n- **Shared Ecosystem with Pytorch Framework**:\nDHG is built upon Pytorch, and any Pytorch-based models can be integrated into DHG. If you are familiar with Pytorch, you can easily use DHG.\n\n- **Powerful API for Designing GNNs and HGNNs**:\nDHG provides various Laplacian matrices and message passing functions to help build your spectral/spatial-based models, respectively.\n\n- **Visualization of Graphs and Hypergraphs**\nDHG provides a powerful visualization tool for graph and hypergraph. You can easily visualize the structure of your graph and hypergraph.\n\n- **Bridge the Gap between Graphs and Hypergraphs**:\nDHG provides functions to build hypergraph from graph and build graph from hypergraph. Maybe promoting the graph to hypergraph can exploit those potential high-order connections and improve the performance of your model.\n\n- **Attach Spectral/Spatial-Based Operations to Structure**:\nIn DHG, those Laplacian matrices and message passing functions are attached to the graph/hypergraph structure. As soon as you build a structure with DHG, those functions will be ready to be used in the process of building your model.\n\n- **Comprehensive, Flexible, and Convenience**:\nDHG provides random graph/hypergraph generators, various state-of-the-art graph/hypergraph convolutional layers and models, various public graph/hypergraph datasets, and various evaluation metrics.\n\n- **Support Tuning Structure and Model with Auto-ML**:\nThe Optuna library endows DHG with the Auto-ML ability. DHG supports automatically searching the optimal configurations for the construction of graph/hypergraph structure and the optimal hyper-parameters for your model and training.\n\n## Installation\n\n\nCurrent, the stable version of **DHG** is 0.9.4. You can install it with ``pip`` as follows:\n\n```python\npip install dhg\n```\n\nYou can also try the nightly version (0.9.5) of **DHG** library with ``pip`` as follows:\n\n```python\npip install git+https://github.com/iMoonLab/DeepHypergraph.git\n```\n\nNightly version is the development version of **DHG**. It may include the lastest SOTA methods and datasets, but it can also be unstable and not fully tested. \nIf you find any bugs, please report it to us in [GitHub Issues](https://github.com/iMoonLab/DeepHypergraph/issues).\n\n## Quick Start\n\n### Visualization\n\nYou can draw the graph, hypergraph, directed graph, and bipartite graph with DHG's visualization tool. More details see the [Tutorial](https://deephypergraph.readthedocs.io/en/latest/tutorial/vis_structure.html)\n\n\n![Visualization of graph and hypergraph](https://deephypergraph.com/readme_graph_hypergraph.png)\n\n```python\nimport matplotlib.pyplot as plt\nimport dhg\n# draw a graph\ng = dhg.random.graph_Gnm(10, 12)\ng.draw()\n# draw a hypergraph\nhg = dhg.random.hypergraph_Gnm(10, 8)\nhg.draw()\n# show figures\nplt.show()\n```\n\n![Visualization of directed graph and bipartite graph](https://deephypergraph.com/readme_digraph_bigraph.png)\n\n```python\nimport matplotlib.pyplot as plt\nimport dhg\n# draw a directed graph\ng = dhg.random.digraph_Gnm(12, 18)\ng.draw()\n# draw a bipartite graph\ng = dhg.random.bigraph_Gnm(30, 40, 20)\ng.draw()\n# show figures\nplt.show()\n```\n\n### Learning on Low-Order Structures\n\nOn graph structures, you can smooth a given vertex features with GCN's Laplacian matrix by:\n\n```python\nimport torch\nimport dhg\ng = dhg.random.graph_Gnm(5, 8)\nX = torch.rand(5, 2)\nX_ = g.smoothing_with_GCN(X)\n```\n\nOn graph structures, you can pass messages from vertex to vertex with `mean` aggregation by:\n\n```python\nimport torch\nimport dhg\ng = dhg.random.graph_Gnm(5, 8)\nX = torch.rand(5, 2)\nX_ = g.v2v(X, aggr=\"mean\")\n```\n\nOn directed graph structures, you can pass messages from vertex to vertex with `mean` aggregation by:\n\n```python\nimport torch\nimport dhg\ng = dhg.random.digraph_Gnm(5, 8)\nX = torch.rand(5, 2)\nX_ = g.v2v(X, aggr=\"mean\")\n```\n\nOn bipartite graph structures, you can smoothing vertex features with GCN's Laplacian matrix by:\n\n```python\nimport torch\nimport dhg\ng = dhg.random.bigraph_Gnm(3, 5, 8)\nX_u, X_v = torch.rand(3, 2), torch.rand(5, 2)\nX = torch.cat([X_u, X_v], dim=0)\nX_ = g.smoothing_with_GCN(X, aggr=\"mean\")\n```\n\nOn bipartite graph structures, you can pass messages from vertex in `U` set to vertex in `V` set by `mean` aggregation by:\n\n```python\nimport torch\nimport dhg\ng = dhg.random.bigraph_Gnm(3, 5, 8)\nX_u, X_v = torch.rand(3, 2), torch.rand(5, 2)\nX_u_ = g.v2u(X_v, aggr=\"mean\")\nX_v_ = g.u2v(X_u, aggr=\"mean\")\n```\n\n### Learning on High-Order Structures\n\nOn hypergraph structures, you can smooth a given vertex features with HGNN's Laplacian matrix by:\n\n```python\nimport torch\nimport dhg\nhg = dhg.random.hypergraph_Gnm(5, 4)\nX = torch.rand(5, 2)\nX_ = hg.smoothing_with_HGNN(X)\n```\n\nOn hypergraph structures, you can pass messages from vertex to hyperedge with `mean` aggregation by:\n\n```python\nimport torch\nimport dhg\nhg = dhg.random.hypergraph_Gnm(5, 4)\nX = torch.rand(5, 2)\nY_ = hg.v2e(X, aggr=\"mean\")\n```\nThen, you can pass messages from hyperedge to vertex with `mean` aggregation by:\n\n```python\nX_ = hg.e2v(Y_, aggr=\"mean\")\n```\nOr, you can pass messages from vertex set to vertex set with `mean` aggregation by:\n\n```python\nX_ = hg.v2v(X, aggr=\"mean\")\n```\n\n## Examples\n\n### Building the Convolution Layer of GCN\n\n```python\nclass GCNConv(nn.Module):\n    def __init__(self,):\n        super().__init__()\n        ...\n        self.reset_parameters()\n\n    def forward(self, X: torch.Tensor, g: dhg.Graph) -\u003e torch.Tensor:\n        # apply the trainable parameters ``theta`` to the input ``X``  \n        X = self.theta(X)\n        # smooth the input ``X`` with the GCN's Laplacian\n        X = g.smoothing_with_GCN(X)\n        X = F.relu(X)\n        return X\n```\n\n### Building the Convolution Layer of GAT\n\n```python\nclass GATConv(nn.Module):\n    def __init__(self,):\n        super().__init__()\n        ...\n        self.reset_parameters()\n\n    def forward(self, X: torch.Tensor, g: dhg.Graph) -\u003e torch.Tensor:\n        # apply the trainable parameters ``theta`` to the input ``X``\n        X = self.theta(X)\n        # compute attention weights for each edge\n        x_for_src = self.atten_src(X)\n        x_for_dst = self.atten_dst(X)\n        e_atten_score = x_for_src[g.e_src] + x_for_dst[g.e_dst]\n        e_atten_score = F.leaky_relu(e_atten_score).squeeze()\n        # apply ``e_atten_score`` to each edge in the graph ``g``, aggragete neighbor messages\n        #  with ``softmax_then_sum``, and perform vertex-\u003evertex message passing in graph \n        #  with message passing function ``v2v()``\n        X = g.v2v(X, aggr=\"softmax_then_sum\", e_weight=e_atten_score)\n        X = F.elu(X)\n        return X\n```\n\n### Building the Convolution Layer of HGNN\n\n```python\nclass HGNNConv(nn.Module):\n    def __init__(self,):\n        super().__init__()\n        ...\n        self.reset_parameters()\n\n    def forward(self, X: torch.Tensor, hg: dhg.Hypergraph) -\u003e torch.Tensor:\n        # apply the trainable parameters ``theta`` to the input ``X``\n        X = self.theta(X)\n        # smooth the input ``X`` with the HGNN's Laplacian\n        X = hg.smoothing_with_HGNN(X)\n        X = F.relu(X)\n        return X\n```\n\n\n### Building the Convolution Layer of HGNN $^+$\n\n```python\nclass HGNNPConv(nn.Module):\n    def __init__(self,):\n        super().__init__()\n        ...\n        self.reset_parameters()\n\n    def forward(self, X: torch.Tensor, hg: dhg.Hypergraph) -\u003e torch.Tensor:\n        # apply the trainable parameters ``theta`` to the input ``X``\n        X = self.theta(X)\n        # perform vertex-\u003ehyperedge-\u003evertex message passing in hypergraph\n        #  with message passing function ``v2v``, which is the combination\n        #  of message passing function ``v2e()`` and ``e2v()``\n        X = hg.v2v(X, aggr=\"mean\")\n        X = F.relu(X)\n        return X\n```\n\n\n## Datasets\n\nCurrently, we have added the following datasets:\n\n- **[Cora](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Cora.html#dhg.data.Cora)**: A citation network dataset for vertex classification task.\n\n- **[PubMed](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Pubmed.html#dhg.data.Pubmed)**: A citation network dataset for vertex classification task.\n\n- **[Citeseer](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Citeseer.html#dhg.data.Citeseer)**: A citation network dataset for vertex classification task.\n\n- **[BlogCatalog](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.BlogCatalog.html#dhg.data.BlogCatalog)**: A social network dataset for vertex classification task.\n\n- **[Flickr](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Flickr.html#dhg.data.Flickr)**: A social network dataset for vertex classification task.\n\n- **[Github](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Github.html#dhg.data.Github)**: A collaboration network dataset for vertex classification task.\n\n- **[Facebook](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Facebook.html#dhg.data.Facebook)**: A social network dataset for vertex classification task.\n\n- **[MovieLens1M](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.MovieLens1M.html#dhg.data.MovieLens1M)**: A movie dataset for user-item recommendation task.\n\n- **[AmazonBook](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.AmazonBook.html#dhg.data.AmazonBook)**: An Amazon dataset for user-item recommendation task.\n\n- **[Yelp2018](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Yelp2018.html#dhg.data.Yelp2018)**: A restaurant review dataset for user-item recommendation task.\n\n- **[Gowalla](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Gowalla.html#dhg.data.Gowalla)**: A location's feedback dataset for user-item recommendation task.\n\n- **[TecentBiGraph](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.TencentBiGraph.html#dhg.data.TencentBiGraph)**: A social network dataset for vertex classification task.\n\n- **[CoraBiGraph](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CoraBiGraph.html#dhg.data.CoraBiGraph)**: A citation network dataset for vertex classification task.\n\n- **[PubmedBiGraph](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.PubmedBiGraph.html#dhg.data.PubmedBiGraph)**: A citation network dataset for vertex classification task.\n\n- **[CiteseerBiGraph](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CiteseerBiGraph.html#dhg.data.CiteseerBiGraph)**: A citation network dataset for vertex classification task.\n\n- **[Cooking200](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Cooking200.html#dhg.data.Cooking200)**: A cooking recipe dataset for vertex classification task.\n\n- **[CoauthorshipCora](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CoauthorshipCora.html#dhg.data.CoauthorshipCora)**: A citation network dataset for vertex classification task.\n\n- **[CoauthorshipDBLP](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CoauthorshipDBLP.html#dhg.data.CoauthorshipDBLP)**: A citation network dataset for vertex classification task.\n\n- **[CocitationCora](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CocitationCora.html#dhg.data.CocitationCora)**: A citation network dataset for vertex classification task.\n\n- **[CocitationPubmed](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CocitationCiteseer.html#dhg.data.CocitationCiteseer)**: A citation network dataset for vertex classification task.\n\n- **[CocitationCiteseer](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.CocitationPubmed.html#dhg.data.CocitationPubmed)**: A citation network dataset for vertex classification task.\n\n- **[YelpRestaurant](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.YelpRestaurant.html#dhg.data.YelpRestaurant)**: A restaurant-review network dataset for vertex classification task.\n\n- **[WalmartTrips](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.WalmartTrips.html#dhg.data.WalmartTrips)**: A user-product network dataset for vertex classification task.\n\n- **[HouseCommittees](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.HouseCommittees.html#dhg.data.HouseCommittees)**: A committee network dataset for vertex classification task.\n\n- **[News20](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.News20.html#dhg.data.News20)**: A newspaper network dataset for vertex classification task.\n\n- **[DBLP8k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.DBLP8k.html#dhg.data.DBLP8k)**: The DBLP-8k dataset is a citation network dataset for link prediction task.\n\n- **[DBLP4k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.DBLP4k.html#dhg.data.DBLP4k)**: The DBLP-4k dataset is a citation network dataset for vertex classification task.\n\n- **[IMDB4k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.IMDB4k.html#dhg.data.IMDB4k)**: The IMDB-4k dataset is a movie dataset for vertex classification task.\n\n- **[Recipe100k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Recipe100k.html#dhg.data.Recipe100k)**: The Recipe100k dataset is a recipe-ingredient network dataset for vertex classification task.\n\n- **[Recipe200k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Recipe200k.html#dhg.data.Recipe200k)**: The Recipe200k dataset is a recipe-ingredient network dataset for vertex classification task.\n\n- **[Yelp3k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Yelp3k.html#dhg.data.Yelp3k)**: The Yelp3k dataset is a subset of Yelp-Restaurant dataset for vertex classification task.\n\n- **[Tencent2k](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.data.Tencent2k.html#dhg.data.Tencent2k)**: The Tencent2k dataset is a social network dataset for vertex classification task.\n\n## Metrics\n\n### Classification Metrics\n\n- **[Accuracy](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.classification.accuracy)**: Calculates the accuracy of the predictions.\n\n- **[F1-Score](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.classification.f1_score)**: Calculates the F1-score of the predictions.\n\n- **[Confusion Matrix](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.classification.confusion_matrix)**: Calculates the confusion matrix of the predictions.\n\n### Recommender Metrics\n\n- **[Precision@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.recommender.precision)**: Calculates the precision@k of the predictions.\n\n- **[Recall@k](https://deephypergraph.readthedocs.io/en/latest/_modules/dhg/metrics/recommender.html#recall)**: Calculates the recall@k of the predictions.\n\n- **[NDCG@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.recommender.ndcg)**: Calculates the normalized discounted cumulative gain@k of the predictions.\n\n### Retrieval Metrics\n\n- **[Precision@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.precision)**: Calculates the precision@k of the predictions.\n\n- **[Recall@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.recall)**: Calculates the recall@k of the predictions.\n\n- **[mAP@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.map)**: Calculates the mAP@k of the predictions.\n\n- **[NDCG@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.ndcg)**: Calculates the normalized Discounted Cumulative Gain@k of the predictions.\n\n- **[mRR@k](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.mrr)**: Calculates the mean Reciprocal Rank@k of the predictions.\n\n- **[PR-Curve](https://deephypergraph.readthedocs.io/en/latest/api/metrics.html#dhg.metrics.retrieval.pr_curve)**: Calculates the precision-recall curve of the predictions.\n\n## Implemented Models\n\n### On Low-Order Structures\n\n- **[GCN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.GCN.html#dhg.models.GCN)** model of [Semi-Supervised Classification with Graph Convolutional Networks](https://arxiv.org/pdf/1609.02907) paper (ICLR 2017).\n\n- **[GraphSAGE](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.GraphSAGE.html#dhg.models.GraphSAGE)** model of [Inductive Representation Learning on Large Graphs](https://cs.stanford.edu/people/jure/pubs/graphsage-nips17.pdf) paper (NeurIPS 2017).\n\n- **[GAT](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.GAT.html#dhg.models.GAT)** model of [Graph Attention Networks](https://arxiv.org/pdf/1710.10903) paper (ICLR 2018).\n\n- **[GIN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.GIN.html#dhg.models.GIN)** model of [How Powerful are Graph Neural Networks?](https://arxiv.org/pdf/1810.00826) paper (ICLR 2019).\n\n- **[NGCF](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.NGCF.html#dhg.models.NGCF)** model of [Neural Graph Collaborative Filtering](https://arxiv.org/pdf/1905.08108) paper (SIGIR 2019).\n\n- **[LightGCN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.LightGCN.html#dhg.models.LightGCN)** model of [LightGCN: Lightweight Graph Convolutional Networks](https://arxiv.org/pdf/2002.02126) paper (SIGIR 2020).\n\n- **[BGNN-Adv](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.BGNN_Adv.html#dhg.models.BGNN_Adv)** model of [Cascade-BGNN: Toward Efficient Self-supervised Representation Learning on Large-scale Bipartite Graphs](https://arxiv.org/pdf/1906.11994.pdf) paper (TNNLS 2020).\n\n- **[BGNN-MLP](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.BGNN_MLP.html#dhg.models.BGNN_MLP)** model of [Cascade-BGNN: Toward Efficient Self-supervised Representation Learning on Large-scale Bipartite Graphs](https://arxiv.org/pdf/1906.11994.pdf) paper (TNNLS 2020).\n\n\n### On High-Order Structures\n\n- **[HGNN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.HGNN.html#dhg.models.HGNN)** model of [Hypergraph Neural Networks](https://arxiv.org/pdf/1809.09401) paper (AAAI 2019).\n\n- **[HGNN+](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.HGNNP.html#dhg.models.HGNNP)** model of [HGNN+: General Hypergraph Neural Networks](https://ieeexplore.ieee.org/document/9795251) paper (IEEE T-PAMI 2022).\n\n- **[HyperGCN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.HyperGCN.html#dhg.models.HyperGCN)** model of [HyperGCN: A New Method of Training Graph Convolutional Networks on Hypergraphs](https://papers.nips.cc/paper/2019/file/1efa39bcaec6f3900149160693694536-Paper.pdf) paper (NeurIPS 2019).\n\n- **[DHCF](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.DHCF.html#dhg.models.DHCF)** model of [Dual Channel Hypergraph Collaborative Filtering](https://dl.acm.org/doi/10.1145/3394486.3403253) paper (KDD 2020).\n\n- **[HNHN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.HNHN.html#dhg.models.HNHN)** model of [HNHN: Hypergraph Networks with Hyperedge Neurons](https://arxiv.org/pdf/2006.12278.pdf) paper (ICML 2020).\n\n- **[UniGCN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.UniGCN.html#dhg.models.UniGCN)** model of [UniGNN: a Unified Framework for Graph and Hypergraph Neural Networks](https://arxiv.org/pdf/2105.00956.pdf) paper (IJCAI 2021).\n\n- **[UniGAT](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.UniGAT.html#dhg.models.UniGAT)** model of [UniGNN: a Unified Framework for Graph and Hypergraph Neural Networks](https://arxiv.org/pdf/2105.00956.pdf) paper (IJCAI 2021).\n\n- **[UniSAGE](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.UniSAGE.html#dhg.models.UniSAGE)** model of [UniGNN: a Unified Framework for Graph and Hypergraph Neural Networks](https://arxiv.org/pdf/2105.00956.pdf) paper (IJCAI 2021).\n\n- **[UniGIN](https://deephypergraph.readthedocs.io/en/latest/generated/dhg.models.UniGIN.html#dhg.models.UniGIN)** model of [UniGNN: a Unified Framework for Graph and Hypergraph Neural Networks](https://arxiv.org/pdf/2105.00956.pdf) paper (IJCAI 2021).\n\n\n\n## Citing\nIf you find **DHG** is useful in your research, please consider citing:\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  year={2022},\n  publisher={IEEE}\n}\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## The DHG Team\n\nDHG is developed by DHG's core team including [Yifan Feng](http://fengyifan.site/), [Xinwei Zhang](https://github.com/zhangxwww), [Jielong Yan](https://github.com/JasonYanjl), [Xiangmin Han](https://scholar.google.com/citations?user=Y96h0t0AAAAJ\u0026hl=zh-CN\u0026oi=ao), [Yue Gao](http://moon-lab.tech/), and [Qionghai Dai](https://ysg.ckcest.cn/html/details/8058/index.html). It is maintained by the [iMoon-Lab](http://moon-lab.tech/), Tsinghua University. You can contact us at [email](mailto:evanfeng97@gmail.com).\n\n\n## License\n\nDHG uses Apache License 2.0.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Fdeephypergraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimoonlab%2Fdeephypergraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimoonlab%2Fdeephypergraph/lists"}