Name | brec-iclr2024 JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | pypi distribution for BREC |
upload_time | 2023-10-02 08:24:15 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2023 Yanbo Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
machine learning
artificial intelligence
graph neural network
dataset
expressiveness
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Towards Better Evaluation of GNN Expressiveness with BREC Dataset
## About
This package is official implementation of the following paper: Towards Better Evaluation of GNN Expressiveness with BREC Dataset. Evalution process can be easily implemented by this package. For more detailed and advanced usage, please refer to [BREC](https://github.com/brec-iclr2024/brec-iclr2024)
**BREC** is a new dataset for GNN expressiveness comparison.
It addresses the limitations of previous datasets, including difficulty, granularity, and scale, by incorporating
400 pairs of various graphs in four categories (Basic, Regular, Extension, CFI).
The graphs are organized pair-wise, where each pair is tested individually to return whether a GNN can distinguish them. We propose a new evaluation method, **RPC** (Reliable Paired Comparisons), with a contrastive training framework.
## Usages
### Install
Install [pytorch](https://pytorch.org/) and [pytorch_geometric](https://github.com/pyg-team/pytorch_geometric) with corresponding versions aligning with your device. Then `pip install brec-iclr2024`.
### Example
Here is a simple example:
```python
import torch
import torch.nn.functional as F
from torch_geometric.nn import GCNConv
from brec.dataset import BRECDataset
from brec.evaluator import evaluate
class GCN(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = GCNConv(1, 16)
self.conv2 = GCNConv(16, 16)
def forward(self, data):
x, edge_index = data.x, data.edge_index
x = self.conv1(x, edge_index)
x = F.relu(x)
x = F.dropout(x, training=self.training)
x = self.conv2(x, edge_index)
return x
def reset_parameters(self):
self.conv1.reset_parameters()
self.conv2.reset_parameters()
model = GCN()
dataset = BRECDataset()
evaluate(
dataset, model, device=torch.device("cpu"), log_path="log.txt", training_config=None
)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "brec-iclr2024",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "brec_iclr2024 <brec_iclr2024@proton.me>",
"keywords": "machine learning,artificial intelligence,graph neural network,dataset,expressiveness",
"author": "",
"author_email": "brec_iclr2024 <brec_iclr2024@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/e4/f7/e76a028d553b3cb98d0ee87a8a61f562e3ac35f99bce32b6f38e3170b06f/brec_iclr2024-1.0.0.tar.gz",
"platform": null,
"description": "# Towards Better Evaluation of GNN Expressiveness with BREC Dataset\n\n## About\n\nThis package is official implementation of the following paper: Towards Better Evaluation of GNN Expressiveness with BREC Dataset. Evalution process can be easily implemented by this package. For more detailed and advanced usage, please refer to [BREC](https://github.com/brec-iclr2024/brec-iclr2024)\n\n**BREC** is a new dataset for GNN expressiveness comparison.\nIt addresses the limitations of previous datasets, including difficulty, granularity, and scale, by incorporating\n400 pairs of various graphs in four categories (Basic, Regular, Extension, CFI).\nThe graphs are organized pair-wise, where each pair is tested individually to return whether a GNN can distinguish them. We propose a new evaluation method, **RPC** (Reliable Paired Comparisons), with a contrastive training framework.\n\n## Usages\n\n### Install\n\nInstall [pytorch](https://pytorch.org/) and [pytorch_geometric](https://github.com/pyg-team/pytorch_geometric) with corresponding versions aligning with your device. Then `pip install brec-iclr2024`.\n\n### Example\n\nHere is a simple example:\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric.nn import GCNConv\n\nfrom brec.dataset import BRECDataset\nfrom brec.evaluator import evaluate\n\n\nclass GCN(torch.nn.Module):\n def __init__(self):\n super().__init__()\n self.conv1 = GCNConv(1, 16)\n self.conv2 = GCNConv(16, 16)\n\n def forward(self, data):\n x, edge_index = data.x, data.edge_index\n\n x = self.conv1(x, edge_index)\n x = F.relu(x)\n x = F.dropout(x, training=self.training)\n x = self.conv2(x, edge_index)\n\n return x\n\n def reset_parameters(self):\n self.conv1.reset_parameters()\n self.conv2.reset_parameters()\n\n\nmodel = GCN()\n\ndataset = BRECDataset()\nevaluate(\n dataset, model, device=torch.device(\"cpu\"), log_path=\"log.txt\", training_config=None\n)\n\n\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Yanbo Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "pypi distribution for BREC",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/brec-iclr2024/brec-iclr2024/issues",
"Homepage": "https://github.com/brec-iclr2024/brec-iclr2024",
"Source": "https://github.com/brec-iclr2024/brec-iclr2024"
},
"split_keywords": [
"machine learning",
"artificial intelligence",
"graph neural network",
"dataset",
"expressiveness"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa1f03fd7de6910b503e633fac19cd218f40d805b8e3117ca7d41cc315b29eba",
"md5": "f1aafeff1d56e98169abb8c3b5f07437",
"sha256": "0f9c47576656776e48fa0e62fc0e52521363a868d56c0780262669f7602b0927"
},
"downloads": -1,
"filename": "brec_iclr2024-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f1aafeff1d56e98169abb8c3b5f07437",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7173,
"upload_time": "2023-10-02T08:24:12",
"upload_time_iso_8601": "2023-10-02T08:24:12.281781Z",
"url": "https://files.pythonhosted.org/packages/aa/1f/03fd7de6910b503e633fac19cd218f40d805b8e3117ca7d41cc315b29eba/brec_iclr2024-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e4f7e76a028d553b3cb98d0ee87a8a61f562e3ac35f99bce32b6f38e3170b06f",
"md5": "919cfb4d78c8c5202fae419017823e14",
"sha256": "62dec07d78bcd405563fb0720c0cf2843f95f963c06d454518b71a8cffd46983"
},
"downloads": -1,
"filename": "brec_iclr2024-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "919cfb4d78c8c5202fae419017823e14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8004,
"upload_time": "2023-10-02T08:24:15",
"upload_time_iso_8601": "2023-10-02T08:24:15.556045Z",
"url": "https://files.pythonhosted.org/packages/e4/f7/e76a028d553b3cb98d0ee87a8a61f562e3ac35f99bce32b6f38e3170b06f/brec_iclr2024-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-02 08:24:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "brec-iclr2024",
"github_project": "brec-iclr2024",
"github_not_found": true,
"lcname": "brec-iclr2024"
}