I work in field of PDEs on graphs. PDEs on graphs are known to have many applications. This summer I started exploring "deep learning on graphs" and I came upon torch_geometric. The learning process on graphs, i.e. the forward convolution is defined by something known as Message Passing equation. While going through the documentation of torch_geometric and analyzing the Message Passing equation I realized that one can also implement PDEs on graph using the Message Passing class of torch_geometric and hence also benefits from GPU acceleration.

What it does

Following the news of hackathon announcement, and based on the recent epiphany of the connection between Message Passing and PDEs, I decided to create a tool torch_pdegraph which can facilitate solving pdes on graphs and demonstrate some out of their many potential applications in jupyter-notebooks.

How I built it

At the backend all the magic is done by the torch_geometric's Message Passing interface.

  • I have created two subpackages pdes which contains some predefined PDEs on graphs and operators which contains some operators on graphs and can be used to run a custom PDE as shown in the notebooks
  • Although one can run PDEs on any graph/network (as long as it has edges and scalar weights), but in the notebooks I am only showing their application on simple knn-graphs of images and pointclouds.

Challenges I ran into

To show some applications of PDEs on images and pointclouds in the jupyter-notebooks I had to create some simple knn-graphs. Although torch_cluster comes with a knn graph creation method, I found it to be slow when the node features have high dimension. This was overcome using the facebook's faiss library which allows very fast knn similarity search on the GPU.

Accomplishments that I'm proud of

I think the biggest accomplished for which I am happy is the skill I have developed, which is to implement PDEs via Message Passing. Certainly this skill will accelerate and expand my PhD research.

What I learned

I learned quite a few valuable things:

  • By implementing those notebooks I learned the extent of connection between PDEs on graphs and Message Passing on graphs.
  • The inner working of torch_geometric.
  • Using faiss for similarity search.

What's next for torch_pdegraph

I hope that this submission will raise interest in PDEs on graphs and their application.

  • Right now I have shown only few out of many applications of PDEs on graph, in the future I plan to add more pde/notebooks showing their applications like inpainting, colorization, active-contours.
  • I also plan to create a subpackage graphs which would allow various graph creation methods on images and pointclouds.
  • Also I will maximize doing everything in torch's ecosystem.

Few applications:-









How it looks in the code?





Built With

  • faiss
  • open3d
  • python-scientific-stack
  • torch
  • torch-geometric
  • tqdm
Share this project: