{"id":16506434,"url":"https://github.com/clegaard/deep_learning_for_dynamical_systems","last_synced_at":"2025-08-11T02:06:38.568Z","repository":{"id":87643031,"uuid":"397277614","full_name":"clegaard/deep_learning_for_dynamical_systems","owner":"clegaard","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-19T09:53:25.000Z","size":111,"stargazers_count":86,"open_issues_count":0,"forks_count":20,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-17T22:54:50.924Z","etag":null,"topics":["deep-learning","dynamical-systems","numerical-simulation","ordinary-differential-equations","partial-differential-equations","physics-informed-neural-networks","pytorch","scientific-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clegaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-17T13:59:39.000Z","updated_at":"2025-03-17T08:04:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"959c8884-a99a-481a-a12e-4bdee3c907e6","html_url":"https://github.com/clegaard/deep_learning_for_dynamical_systems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clegaard%2Fdeep_learning_for_dynamical_systems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clegaard%2Fdeep_learning_for_dynamical_systems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clegaard%2Fdeep_learning_for_dynamical_systems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clegaard%2Fdeep_learning_for_dynamical_systems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clegaard","download_url":"https://codeload.github.com/clegaard/deep_learning_for_dynamical_systems/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244764911,"owners_count":20506729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","dynamical-systems","numerical-simulation","ordinary-differential-equations","partial-differential-equations","physics-informed-neural-networks","pytorch","scientific-machine-learning"],"created_at":"2024-10-11T15:19:43.126Z","updated_at":"2025-03-21T08:31:12.268Z","avatar_url":"https://github.com/clegaard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Constructing Neural Network-Based Models for Simulating Dynamical Systems\n\nThis 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.\nThe full paper can be accessed at: https://dl.acm.org/doi/10.1145/3567591\n\nThe code in the repo is implemented in Python using PyTorch for defining and training the models.\nThe 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:\n\n\u003cimg src=\"docs/stream_plot.svg\" width=49%\u003e\u003cimg src=\"docs/time_vs_state_plot.svg\" width=49%\u003e\n\n\n\u003cimg src=\"docs/survey_structure.svg\"\u003e\n\n\n# Installing dependencies\n\nThe dependencies necessary to run the scripts can be installed through pip using the `requirements.txt` file as follows:\n``` bash\npython3 -m pip install -r requirements.txt\n```\nIn case you are using Conda you can run the following command from a fresh environment:\n``` bash\nconda install --file requirements.txt\n```\n\n# Running the experiments\n\nEach experiment can be run using default parameters by executing the script in the python interpreter as follows:\n```\npython3 experiments/\u003cname of experiment\u003e.py ...\n```\nThe table below contains the commands necessary to train and evaluate the models described in the review paper.\n\n| Name                                         | Section | Command                                                         |\n| -------------------------------------------- | ------- | --------------------------------------------------------------- |\n| Vanilla Direct-Solution                      | 3.2     | python3 experiments/direct_solution.py --model vanilla          |\n| Automatic Differentiation in Direct-Solution | 3.3     | python3 experiments/direct_solution.py --model autodiff         |\n| Physics Informed Neural Networks             | 3.4     | python3 experiments/direct_solution.py --model pinn             |\n| Hidden Physics Networks                      | 3.5     | python3 experiments/hidden_physics.py                           |\n| Direct Time-Stepper                          | 4.2.1   | python3 experiments/time_stepper.py --solver direct             |\n| Residual Time-Stepper                        | 4.2.2   | python3 experiments/time_stepper.py --solver resnet             |\n| Euler Time-Stepper                           | 4.2.3   | python3 experiments/time_stepper.py --solver euler              |\n| Neural ODEs Time-Stepper                     | 4.2.4   | python3 experiments/time_stepper.py --solver {rk4,dopri5,tsit5} |\n| Neural State-Space Model                     | 4.3.1   | ...                                                             |\n| Neural ODEs with input                       | 4.3.2-3 | ...                                                             |\n| Lagrangian Time-Stepper                      | 4.4.1   | ...                                                             |\n| Hamiltonian Time-Stepper                     | 4.4.1   | ...                                                             |\n| Deep Potential Time-Stepper                  | 4.4.2   | ...                                                             |\n| Deep Markov-Model                            | 4.5.1   | ...                                                             |\n| Latent Neural ODEs                           | 4.5.2   | python3 experiments/latent_neural_odes.py                       |\n| Bayesian Neural ODEs                         | 4.5.3   | ...                                                             |\n| Neural SDEs                                  | 4.5.4   | ...                                                             |\n\n\n\n# Docker Image\nIn an effort to ensure that the code can be executed in the future, we provide a docker image.\nThe Docker image allows the code to be run in a Linux based virtual machine on any platform supported by Docker.\n\nTo use the docker image, invoke the build command in the root of this repository:\n``` bash\ndocker build . -t python_dynamical_systems\n```\n\nFollowing this \"containers\" containing the code and all dependencies can be instantiated via the \"run\" command:\n``` bash\ndocker run -ti python_dynamical_systems bash\n```\nThe command will establish an interactive connection to the container.\nFollowing this you can execute the code as if it was running on your host machine:\n``` bash\npython3 experiments/time_stepper.py ...\n```\n\n# Citing the paper\n\nIf you use the work please consider citing it:\n``` bibtex\n@article{10.1145/3567591,\nauthor = {Legaard, Christian 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},\ntitle = {Constructing Neural Network Based Models for Simulating Dynamical Systems},\nyear = {2023},\nissue_date = {November 2023},\npublisher = {Association for Computing Machinery},\naddress = {New York, NY, USA},\nvolume = {55},\nnumber = {11},\nissn = {0360-0300},\nurl = {https://doi.org/10.1145/3567591},\ndoi = {10.1145/3567591},\nabstract = {Dynamical systems see widespread use in natural sciences like physics, biology, and 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 article 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.},\njournal = {ACM Comput. Surv.},\nmonth = {feb},\narticleno = {236},\nnumpages = {34},\nkeywords = {physics-informed neural networks, physics-based regularization, Neural ODEs}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclegaard%2Fdeep_learning_for_dynamical_systems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclegaard%2Fdeep_learning_for_dynamical_systems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclegaard%2Fdeep_learning_for_dynamical_systems/lists"}