GithubHelp home page GithubHelp logo

geaet's Introduction

Graph External Attention Enhanced Transformer

arXiv

GEAET architecture:

GraphGPS-viz

Transformer vs GEANet:

GraphGPS-viz

The code implementation is based on GraphGPS (Rampasek et al., 2022).

Python environment setup

conda create -n GEAET python=3.10
conda activate GEAET

conda install pytorch=1.13 torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda install pyg=2.2 -c pyg -c conda-forge
pip install pyg-lib -f https://data.pyg.org/whl/torch-1.13.0+cu117.html

# RDKit is required for OGB-LSC PCQM4Mv2 and datasets derived from it.  
conda install openbabel fsspec rdkit -c conda-forge

pip install pytorch-lightning yacs torchmetrics
pip install performer-pytorch
pip install tensorboardX
pip install ogb
pip install wandb

conda clean --all

Running GEAET on Different Datasets

conda activate GEAET

# Running GEAET on CIFAR10
python main.py --cfg configs/GEAET/CIFAR10.yaml  wandb.use False accelerator "cuda:0"

# Running GEAET on MNIST
python main.py --cfg configs/GEAET/mnist.yaml  wandb.use False accelerator "cuda:0"

# Running GEAET on PATTERN
python main.py --cfg configs/GEAET/pattern.yaml  wandb.use False accelerator "cuda:0"

# Running GEAET on peptides-struct
python main.py --cfg configs/GEAET/peptides-struct.yaml  wandb.use False accelerator "cuda:0"

# Running GEAET on PyG-VOCSuperpixels
python main.py --cfg configs/GEAET/vocsp.yaml  wandb.use False accelerator "cuda:0"

# Running GEAET on PyG-COCOSuperpixels
python main.py --cfg configs/GEAET/coco.yaml  wandb.use False accelerator "cuda:0" 

# replace 'cuda:0' with the device to use
# The above datasets will be downloaded automatically when running the code.

Citation

If you find this work useful, please cite our ICML 2024 paper:

@inproceedings{liang2024graph,
  title={Graph External Attention Enhanced Transformer},
  author={Jianqing Liang and Min Chen and Jiye Liang},
  booktitle={International Conference on Machine Learning},
  year={2024},
}

geaet's People

Contributors

icm1018 avatar

Stargazers

 avatar zzz avatar  avatar Xiaoqi_ avatar lucky avatar  avatar ssui.liu avatar  avatar  avatar  avatar  avatar  avatar Xinkai Wei avatar  avatar Jeongwhan Choi 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.