Code Monkey home page Code Monkey logo

operator-learning's Introduction

Cost-Accuracy Trade-off in Operator Learning With Neural Networks

This work is motivated by successes in using neural networks to approximate nonlinear maps in computational science and engineering. In principle, the relative merits of these neural networks can be evaluated by understanding, for each one, the cost required to achieve a given level of accuracy. Understanding the trade-off between cost and accuracy, for different neural operators, and in different parameter/data regimes, is thus of central importance in guiding how this field develops; it forms the focus of this work.

We consider four neural operators PCA-Net, DeepONet, PARA-Net and FNO in different parameter/data regimes cross a range of problems arising from PDE models in continuum mechanics.

Data

The data sets are https://data.caltech.edu/records/20091, which contain 8 *.npy files:

  1. Navier stokes equation : NavierStokes_inputs.npy & NavierStokes_outputs.npy.
  2. Helmholtz equation : Helmholtz_inputs.npy & Helmholtz_outputs.npy.
  3. Structural mechanics equation : StructuralMechanics_inputs.npy & StructuralMechanics_outputs.npy.
  4. Advection equation : Advection_inputs.npy & Advection_outputs.npy.

The data are stored as nx by ny by ndata arrays (2d problems) or nx by ndata arrays (1d problems).

Navier-Stokes equation (Navier-Stokes)

We consider the map between the forcing to the vorticity field at a later time

Helmholtz equation (Helmholtz)

We consider the map between the wavespeed field to the excitation field at a later time

Structural equation (Solid)

We consider the map between the load to the von Mises stress field:

Advection equation (Advection)

We consider the map between the initial condition to the solution at a later time

Results

Test error vs. training data volume for each of our test problems across different network sizes and architectures, and the Monte Carlo rate O(N^{-\frac{1}{2}}) for reference are

The error behavior of our neural network predictions as a function of their online evaluation cost (FLOPs) is

More details are in the paper: Maarten V. de Hoop, Daniel Zhengyu Huang, Elizabeth Qian, Andrew M. Stuart. "The Cost-Accuracy Trade-Off In Operator Learning With Neural Networks."

Code structure

Each application has one folder, which includes the PDE solver and different NN training folders including PCA, DeepONet, PARA and FNO.

Data : Different PDE solvers used to generate data are  in `src` folder,  `NN-Data-Par.jl` will generate data; 

Neural network: Implementation of different neural network architectures are in `nn/mynn.py`,  
the training/test script are in different folders with `learnXXX.py` and `evalXXX.py`.

Results: `Map-Plot.jl` draws worst and median cases, and test errors are in `Data-NN-Plot.jl`

Submit an issue

You are welcome to submit an issue for any questions related to Operator-Learning.

operator-learning's People

Contributors

zhengyu-huang 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.