Sparse Physics-based and Interpretable Neural Networks

Related tags

Deep LearningSPINN
Overview

Sparse Physics-based and Interpretable Neural Networks for PDEs

This repository contains the code and manuscript for research done on Sparse Physics-based and Interpretable Neural Networks for PDEs. More details are available in the following publication:

  • Amuthan A. Ramabathiran and Prabhu Ramachandran^, "SPINN: Sparse, Physics-based, and partially Interpretable Neural Networks for PDEs", Journal of Computational Physics, Volume 445, pages 110600, 2021 doi:10.1016/j.jcp.2021.110600. (^ Joint first author). arXiv:2102.13037.

Installation

Running the code in this repository requires a few pre-requisites to be set up. The Python packages required are in the requirements.txt. Here are some instructions to help you set these up:

  1. Setup a suitable Python distribution, using conda or a virtualenv.

  2. Clone this repository:

    $ git clone https://github.com/nn4pde/SPINN.git
    $ cd SPINN
  1. If you use conda, run the following from your Python environment:
    $ conda env create -f environment.yml
    $ conda activate spinn
  1. If you use a virtualenv or some other Python distribution and wish to use pip:
    $ pip install -r requirements.txt

Once you install the packages you should hopefully be able to run the examples. The examples all support live-plotting of the results. Matplotlib is required for the live plotting of any of the 1D problems and Mayavi is needed for any 2D/3D problems. These are already specified in the requirements.txt and environments.yml files.

Running the code

All the problems discussed in the paper are available in the code subdirectory. The supplementary text in the paper discusses the design of the code at a very high level. You can run any of the problems as follows:

  $ cd code
  $ python ode3.py -h

And this will provide a variety of help options that you can use. You can see the results live by doing:

  $ python ode3.py --plot

These require matlplotlib.

The 2D problems also feature live plotting with Mayavi if it is installed, for example:

  $ python advection1d.py --plot

You should see the solution as well as the computational nodes. Where applicable you can see an exact solution as a wireframe.

If you have a GPU and it is configured to work with PyTorch, you can use it like so:

  $ python poisson2d_irreg_dom.py --gpu

Generating the results

All the results shown in the paper are automated using the automan package which should already be installed as part of the above installation. This will perform all the required simulations (this can take a while) and also generate all the plots for the manuscript.

To learn how to use the automation, do this:

    $ python automate.py -h

By default the simulation outputs are in the outputs directory and the final plots for the paper are in manuscript/figures.

To generate all the figures in one go, run the following (this will take a while):

    $ python automate.py

If you wish to only run a particular set of problems and see those results you can do the following:

   $ python automate.py PROBLEM

where PROBLEM can be any of the demonstrated problems. For example:

  $ python automate.py ode1 heat cavity

Will only run those three problems. Please see the help output (-h) and look at the code for more details.

By default we do not need to use a GPU for the automation but if you have one, you can edit the automate.py and set USE_GPU = True to make use of your GPU where possible.

Building the paper

Once you have generated all the figures from the automation you can easily compile the manuscript. The manuscript is written with LaTeX and if you have that installed you may do the following:

$ cd manuscript
$ latexmk spinn_manuscript.tex -pdf
Implementation of E(n)-Transformer, which extends the ideas of Welling's E(n)-Equivariant Graph Neural Network to attention

E(n)-Equivariant Transformer (wip) Implementation of E(n)-Equivariant Transformer, which extends the ideas from Welling's E(n)-Equivariant G

Phil Wang 132 Jan 02, 2023
Let's create a tool to convert Thailand budget from PDF to CSV.

thailand-budget-pdf2csv Let's create a tool to convert Thailand Government Budgeting from PDF to CSV! รวมพลัง Dev แปลงงบ จาก PDF สู่ Machine-readable

Kao.Geek 88 Dec 19, 2022
SpeechBrain is an open-source and all-in-one speech toolkit based on PyTorch.

The SpeechBrain Toolkit SpeechBrain is an open-source and all-in-one speech toolkit based on PyTorch. The goal is to create a single, flexible, and us

SpeechBrain 5.1k Jan 02, 2023
공공장소에서 눈만 돌리면 CCTV가 보인다는 말이 과언이 아닐 정도로 CCTV가 우리 생활에 깊숙이 자리 잡았습니다.

ObsCare_Main 소개 공공장소에서 눈만 돌리면 CCTV가 보인다는 말이 과언이 아닐 정도로 CCTV가 우리 생활에 깊숙이 자리 잡았습니다. CCTV의 대수가 급격히 늘어나면서 관리와 효율성 문제와 더불어, 곳곳에 설치된 CCTV를 개별 관제하는 것으로는 응급 상

5 Jul 07, 2022
GraphLily: A Graph Linear Algebra Overlay on HBM-Equipped FPGAs

GraphLily: A Graph Linear Algebra Overlay on HBM-Equipped FPGAs GraphLily is the first FPGA overlay for graph processing. GraphLily supports a rich se

Cornell Zhang Research Group 39 Dec 13, 2022
RLMeta is a light-weight flexible framework for Distributed Reinforcement Learning Research.

RLMeta rlmeta - a flexible lightweight research framework for Distributed Reinforcement Learning based on PyTorch and moolib Installation To build fro

Meta Research 281 Dec 22, 2022
Diffusion Probabilistic Models for 3D Point Cloud Generation (CVPR 2021)

Diffusion Probabilistic Models for 3D Point Cloud Generation [Paper] [Code] The official code repository for our CVPR 2021 paper "Diffusion Probabilis

Shitong Luo 323 Jan 05, 2023
Deep Markov Factor Analysis (NeurIPS2021)

Deep Markov Factor Analysis (DMFA) Codes and experiments for deep Markov factor analysis (DMFA) model accepted for publication at NeurIPS2021: A. Farn

Sarah Ostadabbas 2 Dec 16, 2022
A Fast and Stable GAN for Small and High Resolution Imagesets - pytorch

A Fast and Stable GAN for Small and High Resolution Imagesets - pytorch The official pytorch implementation of the paper "Towards Faster and Stabilize

Bingchen Liu 455 Jan 08, 2023
The Official Implementation of the ICCV-2021 Paper: Semantically Coherent Out-of-Distribution Detection.

SCOOD-UDG (ICCV 2021) This repository is the official implementation of the paper: Semantically Coherent Out-of-Distribution Detection Jingkang Yang,

Jake YANG 62 Nov 21, 2022
Blind Video Temporal Consistency via Deep Video Prior

deep-video-prior (DVP) Code for NeurIPS 2020 paper: Blind Video Temporal Consistency via Deep Video Prior PyTorch implementation | paper | project web

Chenyang LEI 272 Dec 21, 2022
Implementation for Shape from Polarization for Complex Scenes in the Wild

sfp-wild Implementation for Shape from Polarization for Complex Scenes in the Wild project website | paper Code and dataset will be released soon. Int

Chenyang LEI 41 Dec 23, 2022
[Machine Learning Engineer Basic Guide] 부스트캠프 AI Tech - Product Serving 자료

Boostcamp-AI-Tech-Product-Serving 부스트캠프 AI Tech - Product Serving 자료 Repository 구조 part1(MLOps 개론, Model Serving, 머신러닝 프로젝트 라이프 사이클은 별도의 코드가 없으며, part

Sung Yun Byeon 269 Dec 21, 2022
Code for "Neural Body: Implicit Neural Representations with Structured Latent Codes for Novel View Synthesis of Dynamic Humans" CVPR 2021 best paper candidate

News 05/17/2021 To make the comparison on ZJU-MoCap easier, we save quantitative and qualitative results of other methods at here, including Neural Vo

ZJU3DV 748 Jan 07, 2023
A curated list of awesome Active Learning

Awesome Active Learning 🤩 A curated list of awesome Active Learning ! 🤩 Background (image source: Settles, Burr) What is Active Learning? Active lea

BAI Fan 431 Jan 03, 2023
NeurIPS-2021: Neural Auto-Curricula in Two-Player Zero-Sum Games.

NAC Official PyTorch implementation of NAC from the paper: Neural Auto-Curricula in Two-Player Zero-Sum Games. We release code for: Gradient based ora

Xidong Feng 19 Nov 11, 2022
Efficient training of deep recommenders on cloud.

HybridBackend Introduction HybridBackend is a training framework for deep recommenders which bridges the gap between evolving cloud infrastructure and

Alibaba 111 Dec 23, 2022
Code for "Finding Regions of Heterogeneity in Decision-Making via Expected Conditional Covariance" at NeurIPS 2021

Finding Regions of Heterogeneity in Decision-Making via Expected Conditional Covariance Justin Lim, Christina X Ji, Michael Oberst, Saul Blecker, Leor

Sontag Lab 3 Feb 03, 2022
Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving

SalsaNext: Fast, Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving Abstract In this paper, we introduce SalsaNext f

308 Jan 04, 2023
Official PyTorch implementation for paper "Efficient Two-Stage Detection of Human–Object Interactions with a Novel Unary–Pairwise Transformer"

UPT: Unary–Pairwise Transformers This repository contains the official PyTorch implementation for the paper Frederic Z. Zhang, Dylan Campbell and Step

Frederic Zhang 109 Dec 20, 2022