Giter Site home page Giter Site logo

deep_learning_for_dynamical_systems's Introduction

Constructing Neural Network-Based Models for Simulating Dynamical Systems

This is a companion repo for the review paper Constructing Neural Network-Based Models for Simulating Dynamical Systems which provides a practical description on how models like Neural Ordinary Differential Equations and Physics-informed Neural Networks can be implemented. The full paper can be accessed at: https://dl.acm.org/doi/10.1145/3567591

The code in the repo is implemented in Python using PyTorch for defining and training the models. The scripts can be run using default parameters to reproduce the plots seen in the paper, as well as things like loss curves which were cut due to space requirements:

Installing dependencies

The dependencies necessary to run the scripts can be installed through pip using the requirements.txt file as follows:

python3 -m pip install -r requirements.txt

In case you are using Conda you can run the following command from a fresh environment:

conda install --file requirements.txt

Running the experiments

Each experiment can be run using default parameters by executing the script in the python interpreter as follows:

python3 experiments/<name of experiment>.py ...

The table below contains the commands necessary to train and evaluate the models described in the review paper.

Name Section Command
Vanilla Direct-Solution 3.2 python3 experiments/direct_solution.py --model vanilla
Automatic Differentiation in Direct-Solution 3.3 python3 experiments/direct_solution.py --model autodiff
Physics Informed Neural Networks 3.4 python3 experiments/direct_solution.py --model pinn
Hidden Physics Networks 3.5 python3 experiments/hidden_physics.py
Direct Time-Stepper 4.2.1 python3 experiments/time_stepper.py --solver direct
Residual Time-Stepper 4.2.2 python3 experiments/time_stepper.py --solver resnet
Euler Time-Stepper 4.2.3 python3 experiments/time_stepper.py --solver euler
Neural ODEs Time-Stepper 4.2.4 python3 experiments/time_stepper.py --solver {rk4,dopri5,tsit5}
Neural State-Space Model 4.3.1 ...
Neural ODEs with input 4.3.2-3 ...
Lagrangian Time-Stepper 4.4.1 ...
Hamiltonian Time-Stepper 4.4.1 ...
Deep Potential Time-Stepper 4.4.2 ...
Deep Markov-Model 4.5.1 ...
Latent Neural ODEs 4.5.2 python3 experiments/latent_neural_odes.py
Bayesian Neural ODEs 4.5.3 ...
Neural SDEs 4.5.4 ...

Docker Image

In an effort to ensure that the code can be executed in the future, we provide a docker image. The Docker image allows the code to be run in a Linux based virtual machine on any platform supported by Docker.

To use the docker image, invoke the build command in the root of this repository:

docker build . -t python_dynamical_systems

Following this "containers" containing the code and all dependencies can be instantiated via the "run" command:

docker run -ti python_dynamical_systems bash

The command will establish an interactive connection to the container. Following this you can execute the code as if it was running on your host machine:

python3 experiments/time_stepper.py ...

Citing the paper

If you use the work please consider citing it:

@article{10.1145/3567591,
author = {Legaard, Christian M\o{}ldrup and Schranz, Thomas and Schweiger, Gerald and Drgo\v{n}a, J\'{a}n and Falay, Basak and Gomes, Cl\'{a}udio and Iosifidis, Alexandros and Abkar, Mahdi and Larsen, Peter Gorm},
title = {Constructing Neural Network-Based Models for Simulating Dynamical Systems},
year = {2022},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
issn = {0360-0300},
url = {https://doi.org/10.1145/3567591},
doi = {10.1145/3567591},
abstract = {Dynamical systems see widespread use in natural sciences like physics, biology, chemistry, as well as engineering disciplines such as circuit analysis, computational fluid dynamics, and control. For simple systems, the differential equations governing the dynamics can be derived by applying fundamental physical laws. However, for more complex systems, this approach becomes exceedingly difficult. Data-driven modeling is an alternative paradigm that seeks to learn an approximation of the dynamics of a system using observations of the true system. In recent years, there has been an increased interest in applying data-driven modeling techniques to solve a wide range of problems in physics and engineering. This paper provides a survey of the different ways to construct models of dynamical systems using neural networks. In addition to the basic overview, we review the related literature and outline the most significant challenges from numerical simulations that this modeling paradigm must overcome. Based on the reviewed literature and identified challenges, we provide a discussion on promising research areas.},
note = {Just Accepted},
journal = {ACM Comput. Surv.},
month = {nov},
keywords = {Neural ODEs, Physics-Informed Neural Networks, Physics-based Regularization}
}

deep_learning_for_dynamical_systems's People

Contributors

clegaard avatar thmq 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.