cna_modules

Cluster-Normalize-Activate Modules

https://github.com/ml-research/cna_modules

Science Score: 62.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
    Organization ml-research has institutional domain (www.aiml.informatik.tu-darmstadt.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

graph-neural-networks machine-learning neurips-2024 paper
Last synced: 6 months ago · JSON representation ·

Repository

Cluster-Normalize-Activate Modules

Basic Info
  • Host: GitHub
  • Owner: ml-research
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 2.19 MB
Statistics
  • Stars: 10
  • Watchers: 4
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Topics
graph-neural-networks machine-learning neurips-2024 paper
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

CNA-Modules

Official code for the paper Graph Neural Networks Need Cluster-Normalize-Activate Modules accepted at NeurIPS 2024.

NeurIPS 2024 Poster arXiv

alt text

Installation

Dockerfile

We provide a Dockerfile for ease of reproducibility. See the Docker Docs on How to get started.

Via installation script

Navigate into the directory cna_modules. Then execute the following command to make the script executable: bash chmod +x install_script.sh

After that, execute the script via: bash bash -i install_script.sh

When the script is executed successfully, activate the conda environment via: bash conda activate cluster-normalize-activate

Via conda environment

To install the necessary libraries, you can create a conda environment using the following command:

conda env create -f environment.yml

The required libraries are saved in the environment.yml file. After the installation is complete, activate the environment with the following command:

conda activate cna-modules

Alternatively, you can run the following command to install:

make install

Project Structure

The Python scripts can be found in the src directory, and the figures are located in the images directory.

Usage

To use the project, navigate to the ~/cna_modules/src directory and run the appropriate script.

python scripts/execute_experiments.py

To adapt the parameters, open the file model_params.py in the utils directory, and you can here see the possible options to choose or adapt:

``` experimentnumber = ... # number of experiment epochs = [...] # number of epochs (list) modeltype = ... # to define the model type numhiddenfeatures = [...] # number of hidden features (list) lrmodel = [...] # learning rate for the model (list) lractivation = [...] # learning rate for the activations (list) weightdecay = [...] # weight decay for both (list) clusters = [...] # number of clusters (list) numlayers = [...] # number of layers (list) numactivation = [...] # number of activations inside RPM (list) n = ... # numerator m = ... # denominator reclusteroption = ... activationtype = [...] # activation type (list) mode = [...] # distance metric type (list) withclusters = [...] # flag for clustering (list) usecoefficients = ... # flag for use of coefficients in our Rationals device = torch.device("cuda" if torch.cuda.isavailable() else "cpu")

Types: Planetoid, CitationFull, Amazon, WikipediaNetwork, WebKB

name of the dataset (Cora, CiteSeer, PubMed, Cora_ML, chameleon, Photo etc.)

setdataset = ... # here to set the dataset tasktype = ... # here to set the task type ```

But you can also use the predefined configurations as listed in the directory utlis/configs. To execute an experiment this way you can run: python scripts/execute_experiments.py --config [name of configuration] --num_seeds [num of seeds] An excerpt from all accessible configurations:

CiteSeer (Node Classification): text citeseer_4_gatconv citeseer_2_gcnconv citeseer_4_gcnconv citeseer_8_gcnconv citeseer_16_gcnconv citeseer_32_gcnconv citeseer_64_gcnconv Cora (Node Classification): text cora_4_sageconv cora_2_gcnconv cora_4_gcnconv cora_8_gcnconv cora_16_gcnconv cora_32_gcnconv cora_64_gcnconv cora_96_gcnconv corafull_2_transformerconv Others (Node Classification): text squirrel_2_dirgcnconv computers_2_transformerconv chameleon_2_dirgcnconv texas_2_sageconv wisconsin_2_transformerconv dblp_4_transformerconv photo_4_transformerconv pubmed_2_transformerconv Ogbn-arxiv (Node Property Prediction): text ogbn-arxiv_4_nodeproppred_sageconv ogbn-arxiv_4_nodeproppred_gcnconv Others (Node Regression): text chameleon_2_node_regression_transformerconv squirrel_2_node_regression_transformerconv We ask you kindly to have a look at src/utils/configs/ to explore other options.

Contributors

How to cite

latex @inproceedings{Skryagin_Graph_Neural_Networks_2024, author = {Skryagin, Arseny and Divo, Felix and Ali, Mohammad Amin and Dhami, Devendra Singh and Kersting, Kristian}, month = dec, series = {The Thirty-eighth Annual Conference on Neural Information Processing Systems}, title = {{Graph Neural Networks Need Cluster-Normalize-Activate Modules}}, url = {https://openreview.net/forum?id=faj2EBhdHC}, year = {2024} }

License

This project is licensed under the MIT License - see the LICENSE file for details.

Owner

  • Name: ml-research@TUDarmstadt
  • Login: ml-research
  • Kind: organization

Machine Learning Group at TU Darmstadt

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it as below.
authors:
  - given-names: Arseny
    family-names: Skryagin
  - given-names: Felix
    family-names: Divo
  - given-names: Mohammad Amin
    family-names: Ali
  - given-names: Devendra Singh
    family-names: Dhami
  - given-names: Kristian
    family-names: Kersting
title: "Graph Neural Networks Need Cluster-Normalize-Activate Modules"
version: 1.0.0
date-released: 2024-10-29
url: https://github.com/ml-research/cna_modules
preferred-citation:
  type: article
  authors:
    - given-names: Arseny
      family-names: Skryagin
    - given-names: Felix
      family-names: Divo
    - given-names: Mohammad Amin
      family-names: Ali
    - given-names: Devendra Singh
      family-names: Dhami
    - given-names: Kristian
      family-names: Kersting
  # doi: TBA
  title: "Graph Neural Networks Need Cluster-Normalize-Activate Modules"
  year: 2024
  month: 12
  url: https://openreview.net/forum?id=faj2EBhdHC
  type: conference-paper
  conference: The Thirty-eighth Annual Conference on Neural Information Processing Systems

GitHub Events

Total
  • Issues event: 1
  • Watch event: 11
  • Delete event: 1
  • Issue comment event: 3
  • Member event: 2
  • Push event: 13
  • Fork event: 4
  • Create event: 3
Last Year
  • Issues event: 1
  • Watch event: 11
  • Delete event: 1
  • Issue comment event: 3
  • Member event: 2
  • Push event: 13
  • Fork event: 4
  • Create event: 3

Dependencies

Dockerfile docker
  • nvcr.io/nvidia/pytorch 23.04-py3 build
requirements.txt pypi
  • SciencePlots ==2.1.0
  • activation_functions.egg ==info
  • faiss_gpu ==1.7.2
  • fast-pytorch-kmeans ==0.1.9
  • fast_pytorch_kmeans ==0.1.9
  • matplotlib ==3.7.1
  • networkx ==3.1
  • numpy ==1.24.2
  • pytorch-lightning ==2.0.2
  • pytorch-quantization ==2.1.2
  • scikit_learn ==1.1.2
  • scipy ==1.9.1
  • seaborn ==0.12.2
  • setuptools ==65.6.3
  • torch ==2.2.0
  • torch-tensorrt ==1.4.0.dev0
  • torch_cluster ==1.6.3
  • torch_geometric ==2.3.0
  • torch_scatter ==2.1.2
  • torch_sparse ==0.6.18
  • torch_spline_conv ==1.2.2
  • torchaudio ==2.2.0
  • torchdata ==0.7.1
  • torchmetrics ==1.4.0
  • torchtext ==0.17.0
  • torchvision ==0.17.0
  • torchviz ==0.0.2
setup.py pypi
environment.yml conda
  • pip
  • python 3.8.*