Giter Site home page Giter Site logo

pe-gnn's Introduction

PyTorch implementation of PE-GNN

Architecture of a naive GCN versus that of PE-GNN, enhanced with a positional encoder.

(Architecture of a naive GCN versus that of PE-GNN, enhanced with a positional encoder.)

This is the official repository for the AISTATS 2023 paper Positional Encoder Graph Neural Networks for Geographic Data (Konstantin Klemmer, Nathan Safir, Daniel B. Neill).

Structure

The source code for PE-GNN (using PyTorch) can be found in the src folder. Its built on PyTorch Geometric (ICLR-W, 2019) and Space2Vec (ICLR, 2020).

We also provide an interactive example notebook to test PE-GNN via Google Colab Open In Colab

Citation

If you want to cite our work, you can use the following reference:

@InProceedings{pmlr-v206-klemmer23a,
  title = 	 {Positional Encoder Graph Neural Networks for Geographic Data},
  author =       {Klemmer, Konstantin and Safir, Nathan S. and Neill, Daniel B.},
  booktitle = 	 {Proceedings of The 26th International Conference on Artificial Intelligence and Statistics},
  pages = 	 {1379--1389},
  year = 	 {2023},
  editor = 	 {Ruiz, Francisco and Dy, Jennifer and van de Meent, Jan-Willem},
  volume = 	 {206},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {25--27 Apr},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v206/klemmer23a/klemmer23a.pdf},
  url = 	 {https://proceedings.mlr.press/v206/klemmer23a.html},
}

pe-gnn's People

Contributors

davidshumway avatar konstantinklemmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pe-gnn's Issues

How to do spatial interpolation ?

Hi thanks for sharing great works!

PE-GCN paper shows performance on 1) Spatial interpolation, 2) Spatial regression and spatial interpolation predicts outcomes from spatial coordinate alone (without any node feature)

  • I wonder how I can do spatial interpolation on this repo.
  • It seems that x (node feature) assumed to be always exist.

Thanks!

AttributeError

Thank you for your interesting paper!

I attempted to run your code, but unfortunately, an error occurred with the message "AttributeError: 'NoneType' object has no attribute 'knn_graph'". I have already checked the loading of the datasets, it completes correctly.

Maybe you have an idea how to fix this error?

Problems with function lw_tensor_local_moran

When trying to train with the auxiliary task, the following error appears for the execution of lw_tensor_local_moran() function:
RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.

Changing the function from:
zl = torch.tensor(w_sparse * z).to(device)

To:
zl = torch.tensor(w_sparse * z.detach()).to(device)

Solved for me.

How to run GraphSAGE?

The Colab code mentions that "layers like GAT or GraphSAGE can be used interchangeably with the GCN layers". However, when I replace GCNConv with the SAGEConv function, it throws an index error—debugging shows that the error is in the LossWrapper class of model.py. Please let me know how one can run models like GraphSAGE and GAT.

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.