Code Monkey home page Code Monkey logo

egnas's Introduction

EGNAS: Efficient Graph Neural Architecture Search using Monte Carlo Tree Search and Prediction Network

Code for paper:

Efficient Graph Neural Architecture Search using Monte Carlo Tree Search and Prediction Network
TianJin Deng, Jia Wu
Expert Systems with Applications 2022

Abstract

Graph Neural Networks (GNNs) have emerged recently as a powerful way of dealing with non-Euclidean data on graphs, such as social networks and citation networks. Despite their success, obtaining optimal graph neural networks requires immense manual work and domain knowledge. Inspired by the strong searching capability of neural architecture search in CNN, a few attempts automatically search optimal GNNs that rival the best human-invented architectures. However, existing Graph Neural Architecture Search (GNAS) approaches face two challenges: 1) Sampling GNNs across the entire search space results in low search efficiency, particularly in large search spaces. 2) It is pretty costly to evaluate GNNs by training architectures from scratch. To overcome these challenges, this paper proposes an Efficient Graph Neural Architecture Search (EGNAS) method based on Monte Carlo Tree Search (MCTS) and a prediction network. Specifically, EGNAS first uses MCTS to recursively partition the entire search space into good or bad search regions. Then, the reinforcement learning-based search strategy (also called the agent) is applied to sample GNNs in those good search regions, which prevents overly exploring complex architectures and bad-performance regions, thus improving sampling efficiency. To reduce the evaluation cost, we use a prediction network to estimate the performance of GNNs. We alternately use ground-truth accuracy (by training GNNs from scratch) and prediction accuracy (by the prediction network) to update the search strategy to avoid inaccuracies caused by long-term use of the prediction network. Furthermore, to improve the training efficiency and stability, the agent is trained by a variant of Proximal Policy Optimization.

Requirements

Ensuring that Pytorch 1.1.0 and cuda 9.0 are installed. Then run:

pip install -r requirements.txt

Running the model

If you want to use the model EGNAS-NP, please run:

python egnas/main.py --dataset Cora --search_samples 2000 --is_predictor 0 --search_strategy PPO+MCTS --Cp 0.1 
python egnas/main.py --dataset Citeseer --search_samples 2000 --is_predictor 0 --search_strategy PPO+MCTS --Cp 0.1
python egnas/main.py --dataset Pubmed --search_samples 1000 --is_predictor 0 --search_strategy PPO+MCTS --Cp 1.0
python egnas/main.py --dataset Photo --search_samples 1000 --is_predictor 0 --search_strategy PPO+MCTS --Cp 0.1

If you want to use the model EGNAS, please run:

python egnas/main.py --dataset Cora --search_samples 2000 --is_predictor 1 --search_strategy PPO+MCTS --Cp 0.1 
python egnas/main.py --dataset Citeseer --search_samples 2000 --is_predictor 1 --search_strategy PPO+MCTS --Cp 0.1
python egnas/main.py --dataset Pubmed --search_samples 1000 --is_predictor 1 --search_strategy PPO+MCTS --Cp 1.0
python egnas/main.py --dataset Photo --search_samples 1000 --is_predictor 1 --search_strategy PPO+MCTS --Cp 0.1

Acknowledgements

To implement this repo, we refer to the following code: GraphNAS and LaNAS

Citation

If you find our work useful, please consider citing it:

@article{deng2023efficient,
  title={Efficient graph neural architecture search using Monte Carlo Tree search and prediction network},
  author={Deng, TianJin and Wu, Jia},
  journal={Expert Systems with Applications},
  volume={213},
  pages={118916},
  year={2023},
  publisher={Elsevier}
}

egnas's People

Contributors

tjdeng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.