Name | brec-icml2024 JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | pypi distribution for BREC |
upload_time | 2024-02-02 10:33:02 |
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.
|
# An Empirical Study of Realized GNN Expressiveness
## About
This package is official implementation of the following paper: An Empirical Study of Realized GNN Expressiveness. Evalution process can be easily implemented by this package. For more detailed and advanced usage, please refer to [BREC](https://github.com/brec-icml2024/brec-icml2024)
**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-icml2024`.
### 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-icml2024",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "brec_icml2024 <icml2024_brec@protonmail.com>",
"keywords": "machine learning,artificial intelligence,graph neural network,dataset,expressiveness",
"author": "",
"author_email": "brec_icml2024 <icml2024_brec@protonmail.com>",
"download_url": "https://files.pythonhosted.org/packages/2d/72/2fd9771bc96399e7e026116fb1febc1e57299ee6581a22b033bfd36ec17d/brec_icml2024-1.0.0.tar.gz",
"platform": null,
"description": "# An Empirical Study of Realized GNN Expressiveness\n\n## About\n\nThis package is official implementation of the following paper: An Empirical Study of Realized GNN Expressiveness. Evalution process can be easily implemented by this package. For more detailed and advanced usage, please refer to [BREC](https://github.com/brec-icml2024/brec-icml2024)\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-icml2024`.\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-icml2024/brec-icml2024/issues",
"Homepage": "https://github.com/brec-icml2024/brec-icml2024",
"Source": "https://github.com/brec-icml2024/brec-icml2024"
},
"split_keywords": [
"machine learning",
"artificial intelligence",
"graph neural network",
"dataset",
"expressiveness"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9f925fb5f29a8f89575df5c81e34f6ae5b0060af5a03e39d313bdb72efabf4f6",
"md5": "876729e61ff6256b5254a5c9bd056124",
"sha256": "3b18afefb6bba0138a955bbc243d0f377460f07b04a2970b08f082f4e4ff97b9"
},
"downloads": -1,
"filename": "brec_icml2024-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "876729e61ff6256b5254a5c9bd056124",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7174,
"upload_time": "2024-02-02T10:33:00",
"upload_time_iso_8601": "2024-02-02T10:33:00.699568Z",
"url": "https://files.pythonhosted.org/packages/9f/92/5fb5f29a8f89575df5c81e34f6ae5b0060af5a03e39d313bdb72efabf4f6/brec_icml2024-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d722fd9771bc96399e7e026116fb1febc1e57299ee6581a22b033bfd36ec17d",
"md5": "de1e5fec65866300ed4a4d939a34f55f",
"sha256": "2cbdb03c2ad42ada6624cbaa689e7f6855677976e4a8a4921494f8d0522c030a"
},
"downloads": -1,
"filename": "brec_icml2024-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "de1e5fec65866300ed4a4d939a34f55f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8014,
"upload_time": "2024-02-02T10:33:02",
"upload_time_iso_8601": "2024-02-02T10:33:02.677506Z",
"url": "https://files.pythonhosted.org/packages/2d/72/2fd9771bc96399e7e026116fb1febc1e57299ee6581a22b033bfd36ec17d/brec_icml2024-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-02 10:33:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "brec-icml2024",
"github_project": "brec-icml2024",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "brec-icml2024"
}