You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 9.3 kB

3 years ago
4 years ago
5 years ago
3 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
3 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Auto Graph Learning
  2. [Chinese Introduction](README_cn.md)
  3. An autoML framework & toolkit for machine learning on graphs.
  4. *Actively under development by @THUMNLab*
  5. Feel free to open <a href="https://github.com/THUMNLab/AutoGL/issues">issues</a> or contact us at <a href="mailto:autogl@tsinghua.edu.cn">autogl@tsinghua.edu.cn</a> if you have any comments or suggestions!
  6. <!--
  7. [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  8. % [![Documentation Status](http://mn.cs.tsinghua.edu.cn/autogl/documentation/?badge=latest)](http://mn.cs.tsinghua.edu.cn/autogl/documentation/?badge=latest)-->
  9. ## News!
  10. - 2022.12.30 New version! v0.4.0-pre is here!
  11. - We have proposed __NAS-Bench-Graph__ ([paper](https://openreview.net/pdf?id=bBff294gqLp), [code](https://github.com/THUMNLab/NAS-Bench-Graph), [tutorial](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_nas_bench_graph.html)), the first NAS-benchmark for graphs published in NeurIPS'22. By using AutoGL together with NAS-Bench-Graph, the performance estimation process of GraphNAS algorithms can be greatly speeded up.
  12. - We have supported the graph __robustness__ algorithms in AutoGL, including graph structure engineering, robust GNNs and robust GraphNAS. See [robustness tutorial](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_robust.html) for more details.
  13. - We have supported graph __self-supervised learning__! See [self-supervised learning tutorial](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_ssl_trainer.html) for more details.
  14. - 2021.12.31 Version v0.3.0-pre is released
  15. - Support [__Deep Graph Library (DGL)__](https://www.dgl.ai/) backend including homogeneous node classification, link prediction, and graph classification tasks. AutoGL is also compatible with PyG 2.0 now.
  16. - Support __heterogeneous__ node classification! See [hetero tutorial](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_hetero_node_clf.html) .
  17. - The module `model` now supports __decoupled__ to two additional sub-modules named `encoder` and `decoder`. Under the __decoupled__ design, one `encoder` can be used to solve all kinds of tasks.
  18. - Enrich [NAS algorithms](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_nas.html) such as [AutoAttend](https://proceedings.mlr.press/v139/guan21a.html), [GASSO](https://proceedings.neurips.cc/paper/2021/hash/8c9f32e03aeb2e3000825c8c875c4edd-Abstract.html), [hardware-aware algorithm](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/documentation/nas.html#autogl.module.nas.estimator.OneShotEstimator_HardwareAware), etc.
  19. - 2021.07.11 Version 0.2.0-pre is released, which supports [neural architecture search (NAS)](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_nas.html) to customize architectures, [sampling] (http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_trainer.html#node-classification-with-sampling) to perform tasks on large datasets, and link prediction.
  20. - 2021.04.16 Our survey paper about automated machine learning on graphs is accepted by IJCAI! See more [here](http://arxiv.org/abs/2103.00742).
  21. - 2021.04.10 Our paper [__AutoGL: A Library for Automated Graph Learning__](https://arxiv.org/abs/2104.04987) is accepted by _ICLR 2021 Workshop on Geometrical and Topological Representation Learning_! You can cite our paper following methods [here](#Cite).
  22. ## Introduction
  23. AutoGL is developed for researchers and developers to conduct autoML on graph datasets and tasks easily and quickly. See our documentation for detailed information!
  24. The workflow below shows the overall framework of AutoGL.
  25. <img src="./resources/workflow.svg">
  26. AutoGL uses `datasets` to maintain datasets for graph-based machine learning, which is based on Dataset in PyTorch Geometric or Deep Graph Library with some functions added to support the auto solver framework.
  27. Different graph-based machine learning tasks are handled by different `AutoGL solvers`, which make use of five main modules to automatically solve given tasks, namely `auto feature engineer`, `neural architecture search`, `auto model`, `hyperparameter optimization`, and `auto ensemble`.
  28. Currently, the following algorithms are supported in AutoGL:
  29. <table>
  30. <tbody>
  31. <tr valign="top">
  32. <td>Feature Engineer</td>
  33. <td>Model</td>
  34. <td>NAS</td>
  35. <td>HPO</td>
  36. <td>Ensemble</td>
  37. </tr>
  38. <tr valign="top">
  39. <!--<td><b>Generators</b><br>graphlet <br> eigen <br> pagerank <br> PYGLocalDegreeProfile <br> PYGNormalizeFeatures <br> PYGOneHotDegree <br> onehot <br> <br><b>Selectors</b><br> SeFilterConstant<br> gbdt <br> <br><b>Subgraph</b><br> NxLargeCliqueSize<br> NxAverageClusteringApproximate<br> NxDegreeAssortativityCoefficient<br> NxDegreePearsonCorrelationCoefficient<br> NxHasBridge <br>NxGraphCliqueNumber<br> NxGraphNumberOfCliques<br> NxTransitivity<br> NxAverageClustering<br> NxIsConnected<br> NxNumberConnectedComponents<br> NxIsDistanceRegular<br> NxLocalEfficiency<br> NxGlobalEfficiency<br> NxIsEulerian </td>-->
  40. <td><b>Generators</b><br>Graphlets <br> EigenGNN <br> <a href="http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_fe.html">more ...</a><br><br><b>Selectors</b><br> SeFilterConstant<br> gbdt <br> <br><b>Graph</b><br> netlsd<br> NxAverageClustering<br> <a href="http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_fe.html">more ...</a></td>
  41. <td><b>Homo Encoders</b><br> GCNEncoder <br> GATEncoder <br> SAGEEncoder <br> GINEncoder <br> <br><b>Decoders</b><br>LogSoftmaxDecoder <br> DotProductDecoder <br> SumPoolMLPDecoder <br> JKSumPoolDecoder </td>
  42. <td>
  43. <b>Algorithms</b><br>
  44. Random<br>
  45. RL<br>
  46. Evolution<br>
  47. GASSO<br>
  48. <a href='http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/documentation/nas.html'>more ...</a><br><br>
  49. <b>Spaces</b><br>
  50. SinglePath<br>
  51. GraphNas<br>
  52. AutoAttend<br>
  53. <a href='http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/documentation/nas.html'>more ...</a><br><br>
  54. <b>Estimators</b><br>
  55. Oneshot<br>
  56. Scratch<br>
  57. </td>
  58. <td> Grid <br> Random <br> Anneal <br> Bayes <br> CAMES <br> MOCAMES <br> Quasi random <br> TPE <br> AutoNE </td>
  59. <td> Voting <br> Stacking </td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. This toolkit also serves as a framework for users to implement and test their own autoML or graph-based machine learning models.
  64. ## Installation
  65. ### Requirements
  66. Please make sure you meet the following requirements before installing AutoGL.
  67. 1. Python >= 3.6.0
  68. 2. PyTorch (>=1.6.0)
  69. see <https://pytorch.org/> for installation.
  70. 3. Graph Library Backend
  71. You will need either PyTorch Geometric (PyG) or Deep Graph Library (DGL) as the backend. You can select a backend following [here](http://mn.cs.tsinghua.edu.cn/autogl/documentation/docfile/tutorial/t_backend.html) if you install both.
  72. 3.1 PyTorch Geometric (>=1.7.0)
  73. See <https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html/> for installation.
  74. 3.2 Deep Graph Library (>=0.7.0)
  75. See <https://dgl.ai/> for installation.
  76. ### Installation
  77. #### Install from pip
  78. Run the following command to install this package through `pip`.
  79. ```
  80. pip install autogl
  81. ```
  82. #### Install from source
  83. Run the following command to install this package from the source.
  84. ```
  85. git clone https://github.com/THUMNLab/AutoGL.git
  86. cd AutoGL
  87. python setup.py install
  88. ```
  89. #### Install for development
  90. If you are a developer of the AutoGL project, please use the following command to create a soft link, then you can modify the local package without install them again.
  91. ```
  92. pip install -e .
  93. ```
  94. ## Documentation
  95. Please refer to our <a href="http://mn.cs.tsinghua.edu.cn/autogl/documentation/">documentation</a> to see the detailed documentation.
  96. You can also make the documentation locally. First, please install sphinx and sphinx-rtd-theme:
  97. ```
  98. pip install -U Sphinx
  99. pip install sphinx-rtd-theme
  100. ```
  101. Then, make an html documentation by:
  102. ```
  103. cd docs
  104. make clean && make html
  105. ```
  106. The documentation will be automatically generated under `docs/_build/html`
  107. ## Cite
  108. Please cite [our paper](https://openreview.net/forum?id=0yHwpLeInDn) as follows if you find our code useful:
  109. ```
  110. @inproceedings{
  111. guan2021autogl,
  112. title={Auto{GL}: A Library for Automated Graph Learning},
  113. author={Chaoyu Guan and Ziwei Zhang and Haoyang Li and Heng Chang and Zeyang Zhang and Yijian Qin and Jiyan Jiang and Xin Wang and Wenwu Zhu},
  114. booktitle={ICLR 2021 Workshop on Geometrical and Topological Representation Learning},
  115. year={2021},
  116. url={https://openreview.net/forum?id=0yHwpLeInDn}
  117. }
  118. ```
  119. You may also find our [survey paper](http://arxiv.org/abs/2103.00742) helpful:
  120. ```
  121. @article{zhang2021automated,
  122. title={Automated Machine Learning on Graphs: A Survey},
  123. author={Zhang, Ziwei and Wang, Xin and Zhu, Wenwu},
  124. booktitle = {Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, {IJCAI-21}},
  125. year={2021},
  126. note={Survey track}
  127. }
  128. ```
  129. ## License
  130. We follow [Apache license](LICENSE) across the entire codebase from v0.2.