Physics-informed Neural Operator for Learning Partial Differential Equation

Related tags

Deep LearningPINO
Overview

PINO

PINO Diagram

Results on Navier Stokes equation

Physics-informed Neural Operator for Learning Partial Differential Equation

Abstract: Machine learning methods have recently shown promise in solving partial differential equations (PDEs). They can be classified into two broad categories: solution function approximation and operator learning. The Physics-Informed Neural Network (PINN) is an example of the former while the Fourier neural operator (FNO) is an example of the latter. Both these approaches have shortcomings. The optimization in PINN is challenging and prone to failure, especially on multi-scale dynamic systems. FNO does not suffer from this optimization issue since it carries out supervised learning on a given dataset, but obtaining such data may be too expensive or infeasible. In this work, we propose the physics-informed neural operator (PINO), where we combine the operating-learning and function-optimization frameworks, and this improves convergence rates and accuracy over both PINN and FNO models. In the operator-learning phase, PINO learns the solution operator over multiple instances of the parametric PDE family. In the test-time optimization phase, PINO optimizes the pre-trained operator ansatz for the querying instance of the PDE. Experiments show PINO outperforms previous ML methods on many popular PDE families while retaining the extraordinary speed-up of FNO compared to solvers. In particular, PINO accurately solves long temporal transient flows and Kolmogorov flows, while PINN and other methods fail to converge.

Requirements

  • Pytorch 1.8.0 or later
  • wandb
  • tqdm
  • scipy
  • h5py
  • numpy
  • DeepXDE:latest
  • tensorflow 2.4.0

Data description

Burgers equation

burgers_pino.mat

Darcy flow

  • spatial domain: $x\in (0,1)^2$
  • Data file: piececonst_r421_N1024_smooth1.mat, piececonst_r421_N1024_smooth2.mat
  • Raw data shape: 1024x421x421

Long roll out of Navier Stokes equation

  • spatial domain: $x\in (0, 1)^2$
  • temporal domain: $t\in [0, 49]$
  • forcing: $0.1(\sin(2\pi(x_1+x_2)) + \cos(2\pi(x_1+x_2)))$
  • viscosity = 0.001

Data file: nv_V1e-3_N5000_T50.mat, with shape 50 x 64 x 64 x 5000

  • train set: -1-4799
  • test set: 4799-4999

Navier Stokes with Reynolds number 500

  • spatial domain: $x\in (0, 2\pi)^2$
  • temporal domain: $t \in [0, 0.5]$
  • forcing: $-4\cos(4x_2)$
  • Reynolds number: 500

Train set: data of shape (N, T, X, Y) where N is the number of instances, T is temporal resolution, X, Y are spatial resolutions.

  1. NS_fft_Re500_T4000.npy : 4000x64x64x65
  2. NS_fine_Re500_T128_part0.npy: 100x129x128x128
  3. NS_fine_Re500_T128_part1.npy: 100x129x128x128

Test set: data of shape (N, T, X, Y) where N is the number of instances, T is temporal resolution, X, Y are spatial resolutions.

  1. NS_Re500_s256_T100_test.npy: 100x129x256x256
  2. NS_fine_Re500_T128_part2.npy: 100x129x128x128

Configuration file format: see .yaml files under folder configs for detail.

Code for Burgers equation

Train PINO

To run PINO for Burgers equation, use, e.g.,

python3 train_burgers.py --config_path configs/pretrain/burgers-pretrain.yaml --mode train

To test PINO for burgers equation, use, e.g.,

python3 train_burgers.py --config_path configs/test/burgers.yaml --mode test

Code for Darcy Flow

Operator learning

To run PINO for Darcy Flow, use, e.g.,

python3 train_operator.py --config_path configs/pretrain/Darcy-pretrain.yaml

To evaluate operator for Darcy Flow, use, e.g.,

python3 eval_operator.py --config_path configs/test/darcy.yaml

Test-time optimization

To do test-time optimization for Darcy Flow, use, e.g.,

python3 run_pino2d.py --config_path configs/finetune/Darcy-finetune.yaml --start [starting index] --stop [stopping index]

Baseline

To run DeepONet, use, e.g.,

python3 deeponet.py --config_path configs/pretrain/Darcy-pretrain-deeponet.yaml --mode train 

To test DeepONet, use, e.g.,

python3 deeponet.py --config_path configs/test/darcy.yaml --mode test

Code for Navier Stokes equation

Train PINO for short time period

To run operator learning, use, e.g.,

python3 train_operator.py --config_path configs/pretrain/Re500-pretrain-05s-4C0.yaml

To evaluate trained operator, use

python3 eval_operator.py --config_path configs/test/Re500-05s.yaml

To run test-time optimization, use

python3 train_PINO3d.py --config_path configs/***.yaml 

To train Navier Stokes equations sequentially without running train_PINO3d.py multiple times, use

python3 run_pino3d.py --config_path configs/[configuration file name].yaml --start [index of the first data] --stop [which data to stop]

Baseline for short time period

To train DeepONet, use

python3 deeponet.py --config_path configs/[configuration file].yaml --mode train

To test DeepONet, use

python3 deeponet.py --config_path configs/[configuration file].yaml --mode test

To train and test PINNs, use, e.g.,

python3 nsfnet.py --config_path configs/Re500-pinns-05s.yaml --start [starting index] --stop [stopping index]

Baseline for long roll out

To train and test PINNs, use

python3 nsfnet.py --config_path configs/scratch/NS-50s.yaml --long --start [starting index] --stop [stopping index]

Pseudospectral solver for Navier Stokes equation

To run solver, use

python3 run_solver.py --config_path configs/Re500-0.5s.yaml
[NeurIPS 2021] Introspective Distillation for Robust Question Answering

Introspective Distillation (IntroD) This repository is the Pytorch implementation of our paper "Introspective Distillation for Robust Question Answeri

Yulei Niu 13 Jul 26, 2022
Multilingual Image Captioning

Multilingual Image Captioning Authors: Bhavitvya Malik, Gunjan Chhablani Demo Link: https://huggingface.co/spaces/flax-community/multilingual-image-ca

Gunjan Chhablani 32 Nov 25, 2022
Official implementation of Meta-StyleSpeech and StyleSpeech

Meta-StyleSpeech : Multi-Speaker Adaptive Text-to-Speech Generation Dongchan Min, Dong Bok Lee, Eunho Yang, and Sung Ju Hwang This is an official code

min95 168 Dec 28, 2022
a simple, efficient, and intuitive text editor

Oxygen beta a simple, efficient, and intuitive text editor Overview oxygen is a simple, efficient, and intuitive text editor designed as more featured

Aarush Gupta 1 Feb 23, 2022
A fast implementation of bss_eval metrics for blind source separation

fast_bss_eval Do you have a zillion BSS audio files to process and it is taking days ? Is your simulation never ending ? Fear no more! fast_bss_eval i

Robin Scheibler 99 Dec 13, 2022
PyTorch implementation of MoCo v3 for self-supervised ResNet and ViT.

MoCo v3 for Self-supervised ResNet and ViT Introduction This is a PyTorch implementation of MoCo v3 for self-supervised ResNet and ViT. The original M

Facebook Research 887 Jan 08, 2023
Anatomy of Matplotlib -- tutorial developed for the SciPy conference

Introduction This tutorial is a complete re-imagining of how one should teach users the matplotlib library. Hopefully, this tutorial may serve as insp

Matplotlib Developers 1.1k Dec 29, 2022
Transparent Transformer Segmentation

Transparent Transformer Segmentation Introduction This repository contains the data and code for IJCAI 2021 paper Segmenting transparent object in the

谢恩泽 140 Jan 02, 2023
[CIKM 2021] Enhancing Aspect-Based Sentiment Analysis with Supervised Contrastive Learning

Enhancing Aspect-Based Sentiment Analysis with Supervised Contrastive Learning. This repo contains the PyTorch code and implementation for the paper E

Akuchi 18 Dec 22, 2022
A python-image-classification web application project, written in Python and served through the Flask Microframework

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and

Gerald Maduabuchi 19 Dec 12, 2022
Joint project of the duo Hacker Ninjas

Project Smoothie Společný projekt dua Hacker Ninjas. První pokus o hříčku po třech týdnech učení se programování. Jakub Kolář e:\

Jakub Kolář 2 Jan 07, 2022
An executor that performs image segmentation on fashion items

ClothingSegmenter U2NET fashion image/clothing segmenter based on https://github.com/levindabhi/cloth-segmentation Overview The ClothingSegmenter exec

Jina AI 5 Mar 30, 2022
Implementation of "Semi-supervised Domain Adaptive Structure Learning"

Semi-supervised Domain Adaptive Structure Learning - ASDA This repo contains the source code and dataset for our ASDA paper. Illustration of the propo

3 Dec 13, 2021
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!

Serpent.AI - Game Agent Framework (Python) Update: Revival (May 2020) Development work has resumed on the framework with the aim of bringing it into 2

Serpent.AI 6.4k Jan 05, 2023
Unsupervised Domain Adaptation for Nighttime Aerial Tracking (CVPR2022)

Unsupervised Domain Adaptation for Nighttime Aerial Tracking (CVPR2022) Junjie Ye, Changhong Fu, Guangze Zheng, Danda Pani Paudel, and Guang Chen. Uns

Intelligent Vision for Robotics in Complex Environment 91 Dec 30, 2022
Python Actor concurrency library

Thespian Actor Library This library provides the framework of an Actor model for use by applications implementing Actors. Thespian Site with Documenta

Kevin Quick 177 Dec 11, 2022
ACV is a python library that provides explanations for any machine learning model or data.

ACV is a python library that provides explanations for any machine learning model or data. It gives local rule-based explanations for any model or data and different Shapley Values for tree-based mod

Salim Amoukou 85 Dec 27, 2022
Checking fibonacci - Generating the Fibonacci sequence is a classic recursive problem

Fibonaaci Series Generating the Fibonacci sequence is a classic recursive proble

Moureen Caroline O 1 Feb 15, 2022
E2e music remastering system - End-to-end Music Remastering System Using Self-supervised and Adversarial Training

End-to-end Music Remastering System This repository includes source code and pre

Junghyun (Tony) Koo 37 Dec 15, 2022
Autoregressive Models in PyTorch.

Autoregressive This repository contains all the necessary PyTorch code, tailored to my presentation, to train and generate data from WaveNet-like auto

Christoph Heindl 41 Oct 09, 2022