Giter Site home page Giter Site logo

amazon-science / operator-probconserv Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 38 KB

Official implementation of Operator-ProbConserv: OOD UQ for Neural Operators

License: Apache License 2.0

Python 100.00%
conservation-laws neural-operators out-of-domain partial-differential-equations shock-capturing uncertainty-quantification

operator-probconserv's Introduction

Operator-ProbConserv: OOD Uncertainty Quantification (UQ) for Neural Operators

This repository contains the code for the paper "Using Uncertainty Quantification to Characterize and Improve Out-of-Domain Learning for PDEs" by S. Chandra Mouli, Danielle C. Maddix, Shima Alizadeh, Gaurav Gupta, Yuyang Wang, Andrew Stuart, Michael W. Mahoney

Setup

Install dependencies by running

conda create -n env python=3.9
conda activate env
pip install -r requirements.txt

Run python -u experiment_ood_params.py --help for possible options.

Example to train DiverseNO model on 1-d heat equation task:

python -u experiment_ood_params.py --model=DiverseFNO2d --dataset=HeatEquation_1D --seed=0 --dataset_params=1,5,0,0 --train_ood_dataset_params=1,5,0,0 --n_samples=200 --tplot=0.5 --m.n_models=10 --m.reg_type=weights_l2 --m.reg_strength=1 --epochs=1000

To evaluate the trained model on different OOD parameters, use --ood_dataset_params and --no_train options.

python -u experiment_ood_params.py --model=DiverseFNO2d --dataset=HeatEquation_1D --seed=0 --dataset_params=1,5,0,0 --train_ood_dataset_params=1,5,0,0 --n_samples=200 --tplot=0.5 --m.n_models=10 --m.reg_type=weights_l2 --m.reg_strength=1 --epochs=1000 --ood_dataset_params=5,6,0,0 --no_train

Models: EnsembleFNO2d, BayesianFNO2d, MCDropoutFNO2d, OutputVarFNO2d, DiverseFNO2d Datasets: HeatEquation_1D, PME_1D, StefanPME_1D, LinearAdvection_1D.

Sources

This repo contains modified versions of the code found in the following repos:

https://github.com/zongyi-li/fourier_neural_operator: For implementation of the Fourier Neural Operator (FNO) (MIT license)

https://github.com/amazon-science/probconserv: For implementation of ProbConserv (Apache 2.0 license)

Citation

If you use this code, or our work, please cite:

@article{mouli2024_ood_uq_no,
    title={Using Uncertainty Quantification to Characterize and Improve Out-of-Domain Learning for PDEs},
    author={Mouli, S.C., Maddix, D.C., Alizadeh, S., Gupta, G., Stuart, A., Mahoney, M.W., Wang, Y.},
    journal={arXiv preprint arXiv:2403.10642},
    year={2024}
}

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

operator-probconserv's People

Contributors

dcmaddix avatar amazon-auto avatar

Stargazers

Pengfei avatar Kala avatar  avatar

Watchers

Gaurav avatar Qiusheng Wu avatar  avatar  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.