Giter VIP home page Giter VIP logo

understanding-oversquashing's Introduction

Understanding over-squashing and bottlenecks on graphs via curvature

Code accompanying our paper (arXiv) at ICLR 2022, recipient of an Outstanding Paper Honorable Mention.

Manifolds and graphs can both exhibit curvature

Setup

The script setup_env.sh assumes that you have conda installed in ~/miniconda3 (as would result from an installation like this one). If you have it installed elsewhere please change the conda activation step in the first line of setup_env.sh as needed before running

source setup_env.sh

after which you'll have a conda environment env_curvature (name can be changed in .sh file) that you can activate in future. gdl is a helper library that we used for our experiments. You also may need to change the cudatoolkit/torch versions depending on your cuda version (we used 11.1).

Usage

To calculate Balanced Forman curvature, look at

from gdl.curvature.numba import balanced_forman_curvature     # if you're on CPU
from gdl.curvature.cuda import balanced_forman_curvature      # if you're on GPU with CUDA

To get a torch_geometric dataset preprocessed with SDRF, look at

from gdl.data import SDRFDataset

and if you're using CUDA set

import os
os.environ["DEVICE"] = "cuda"

or otherwise set the environment variable.

understanding-oversquashing's People

Contributors

jctops 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.