NAS-Bench-Graph
This repository provides the official codes and all evaluated architectures for NAS-Bench-Graph, a tailored benchmark for graph neural architecture search.
Usage
First, read the benchmark of a certain dataset by specifying the name. The nine supported datasets are: cora, citeseer, pubmed, cs, physics, photo, computers, arxiv, and proteins. For example, for the Cora dataset:
from readbench import lightread
bench = lightread('cora')
The data is stored as a dict in Python.
Then, an architecture needs to be specified by its macro space and operations.
We consider the macro space as a directed acyclic graph (DAG) and constrain the DAG to have only one input node for each intermediate node. Therefore, the macro space can be specificed by a list of integers, indicating the input node index for each computing node (0 for the raw input, 1 for the first computing node, etc.). Then, the operations can be specified by a list of strings with the same length. For example, we provide the code to specify the architecture in the following figure:
from architecture import Arch
arch = Arch([0, 1, 2, 1], ['gcn', 'gin', 'fc', 'cheb'])
# 0 means the inital computing node is connected to the input node
# 1 means the next computing node is connected to the first computing node
# 2 means the next computing node is connected to the second computing node
# 1 means there is another computing node connected to the first computing node
Notice that we assume all leaf nodes (i.e., nodes without descendants) are connected to the output, so there is no need to specific the output node.
Besides, the list can be specified in any order, e.g., the following code can specific the same architecture:
arch = Arch([0, 1, 1, 2], ['gcn', 'cheb', 'gin', 'fc'])
The benchmark data can be obtained by a look-up table. In this repository, we only provide the validation and test performance, the latency, and the number of parameters as follows:
info = bench[arch.valid_hash()]
info['valid_perf'] # validation performance
info['perf'] # test performance
info['latency'] # latency
info['para'] # number of parameters
For the complete benchmark, please downloadfrom https://figshare.com/articles/dataset/NAS-bench-Graph/20070371, which contains the training/validation/testing performance at each epoch. Since we run each dataset with three random seeds, each dataset has 3 files, e.g.,
from readbench import read
bench = read('cora0.bench') # cora1.bench and cora2.bench
The full metric for any epoch can be obtained as follows.
info = bench[arch.valid_hash()]
epoch = 50
info['dur'][epoch][0] # training performance
info['dur'][epoch][1] # validation performance
info['dur'][epoch][2] # testing performance
info['dur'][epoch][3] # training loss
info['dur'][epoch][4] # validation loss
info['dur'][epoch][5] # testing loss
info['dur'][epoch][6] # best performance
Example usage of NNI and AutoGL
NAS-Bench-Graph can be used together with other libraries such AutoGL and NNI.
For the usage of AutoGL, please refer to the agnn branch.
You can also refer to runnni.py to use the benchmark together with NNI.
Metadata
Release files for nas-bench-graph 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nas_bench_graph-1.4.0.tar.gz | 5.7 MB | Without provenance | Details for nas_bench_graph-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nas_bench_graph-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for nas_bench_graph-1.4.0-py3-none-any.whl |
Total release size: 11.6 MB
Release files / nas_bench_graph-1.4.0.tar.gz
| Download URL | nas_bench_graph-1.4.0.tar.gz |
|---|---|
| Size | 5.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b034db88f52335a8a80f66c83faf42ff686cbea00b0bf62e7c0574e1edd8e75
|
|
BLAKE2b-256 checksum How to use checksums |
94b0d857b5fe3e28990bcad5657bffce0c0e9f68f73ed225b67fa35af5c0d815
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.0
|
Release files / nas_bench_graph-1.4.0-py3-none-any.whl
| Download URL | nas_bench_graph-1.4.0-py3-none-any.whl |
|---|---|
| Size | 5.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6ea43836262f1ee8d60c35bbbd20aa2536ee1f8492025e3b0b90096f5afc6ad
|
|
BLAKE2b-256 checksum How to use checksums |
c00d3f638d82eb82c5f51164cbd4e255a7f9397fae633a0b4f8e111d97e98539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.0
|
Security for nas-bench-graph 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.