SlideShare a Scribd company logo
1 of 70
Download to read offline
Generalizing Scientific
Machine Learning and
Differentiable Simulation
Beyond Continuous
Models
Chris Rackauckas
VP of Modeling and Simulation,
JuliaHub
Research Affiliate, Co-PI of Julia Lab,
Massachusetts Institute of Technology,
CSAIL
Director of Scientific Research,
Pumas-AI
How do we simultaneously use both sources of knowledge?
Scientific Machine Learning is model-based data-efficient machine learning
Good
Predictions
Core Point: Differentiable Simulation is hard, but it’s worth
investing more development time in.
Universal (Approximator) Differential Equations
Rackauckas, Christopher, Yingbo Ma, Julius
Martensen, Collin Warner, Kirill Zubov, Rohit Supekar,
Dominic Skinner, Ali Ramadhan, and Alan Edelman.
"Universal differential equations for scientific machine
learning." arXiv preprint arXiv:2001.04385 (2020).
Universal (Approximator) Differential Equations
Let’s dive in a bit!
Standard Machine Learning: Learn the whole model
u’=NN(u) trained on 21 days of data
Can fit, but not enough information to
accurately extrapolate
Does not have the correct asymptotic
behavior
More examples of this issue:
Ridderbusch et al. "Learning ODE Models with Qualitative
Structure Using Gaussian Processes."
Universal ODE
Replace
Unknown
Portion
Replace
Unknown
Portion
Infection rates: known
From disease quantities
Percentage of cases
known to be severe,
can be estimated
Exposure:
Unknown
Universal ODE -> Internal Sparse Regression
Sparse Identification on only the missing term:
I * 0.10234428543435758 + S/N * I * 0.11371750552005416 + (S/N) ^ 2 * I * 0.12635459799855597
Replace
Unknown
Portion
Replace
Unknown
Portion
Sparsity improves
generalizability!
Scientific Machine Learning: Improving Predictions with Less Data
Dandekar, R., Rackauckas, C., & Barbastathis, G. (2020). A machine
learning-aided global diagnostic and comparative tool to assess effect of
quarantine control in COVID-19 spread. Patterns, 1(9), 100145.
Acquesta, E., Portone, T., Dandekar, R., Rackauckas, C., Bandy, R., &
Huerta, J. (2022). Model-Form Epistemic Uncertainty Quantification for
Modeling with Differential Equations: Application to Epidemiology (No.
SAND2022-12823). Sandia National Lab.(SNL-NM), Albuquerque, NM
(United States).
Accurate Model Extrapolation Mixing in Physical Knowledge
Automated discovery of geodesic
equations from LIGO black hole data:
run the code yourself!
https://github.com/Astroinformatics/Sc
ientificMachineLearning/blob/main/ne
uralode_gw.ipynb
Keith, B., Khadse, A., & Field, S. E. (2021). Learning orbital
dynamics of binary black hole systems from gravitational wave
measurements. Physical Review Research, 3(4), 043101.
SciML Shows how to build
Earthquake-Safe Buildings
Structural identification with physics-informed neural ordinary
differential equations
Lai, Zhilu, Mylonas, Charilaos, Nagarajaiah, Satish, Chatzi,
Eleni
For a detailed walkthrough of UDEs
and applications watch on Youtube:
Chris Rackauckas: Accurate and
Efficient Physics-Informed Learning
Through Differentiable Simulation
The UDE formulation fairly generally
allows for imposing prior known structure
UDEs Effectively Recover Nonlinearities of Epidemic Models
Use SciML knowledge to constrain the
interaction graph, but learn the
nonlinearities!
Universal Differential Equations Predict Chemical Processes
Santana, V. V., Costa, E., Rebello, C. M., Ribeiro, A.
M., Rackauckas, C., & Nogueira, I. B. (2023). Efficient
hybrid modeling and sorption model discovery for non-
linear advection-diffusion-sorption systems: A
systematic scientific machine learning approach.
Chemical Engineering Science
Universal Differential Equations Predict Chemical Processes
Santana, V. V., Costa, E., Rebello, C. M., Ribeiro, A.
M., Rackauckas, C., & Nogueira, I. B. (2023). Efficient
hybrid modeling and sorption model discovery for non-
linear advection-diffusion-sorption systems: A
systematic scientific machine learning approach.
Chemical Engineering Science
Recovers equations with the same 2nd
order Taylor expansion
Julia Computing Confidential
Scientific Machine Learning Digital Twins: More Realistic Results than Pure ML
Physically-Informed Machine Learning
Using knowledge of the physical forms as part of the
design of the neural networks.
Formulation: Koopman + SIREN + Physics
Smoother, more accurate results
ln(x) ex
Neuroblox: UDEs in Psychopharmacology
Many other SciML Methods can be
rephrased as UDEs
Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by
Learning Structured Stochastic Differential Equations
β€’ Semilinear Parabolic Form (Diffusion-Advection Equations,
Hamilton-Jacobi-Bellman, Black-Scholes)
β€’ Make (πœŽπœŽπ‘‡π‘‡
𝛻𝛻𝛻) 𝑑𝑑, 𝑋𝑋 a neural network.
β€’ Solve the resulting SDEs and learn πœŽπœŽπ‘‡π‘‡π›»π›»π›» via:
Simplified:
β€’ Transform the PDE into a Backwards SDE: a
stochastic boundary value problem. The
unknown is a function!
β€’ Learn the unknown function via neural
network.
β€’ Once learned, the PDE solution is known.
Solving high-dimensional partial differential equations
using deep learning, 2018, PNAS, Han, Jentzen, E
Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by
Learning Structured Stochastic Differential Equations
Solving high-dimensional partial differential equations
using deep learning, 2018, PNAS, Han, Jentzen, E
Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by
Learning Structured Stochastic Differential Equations
β€’ This is equivalent to training the universal SDE:
β€’ Solves a 100 dimensional PDE in minutes on a laptop!
β€’ As a universal SDE, we can solve this with high order (less neural network evaluations),
adaptivity, etc. methods using DiffEqFlux.jl. Thus we automatically extend the deep BSDE
method to better discretizations by using this interpretation!
Extending the Method: Learning Nonlinearities While Solving?
Does doing such methods require
differentiation of the simulator?
3D simulations are
high resolution but
too expensive.
Can we learn faster
models?
High fidelity surrogates of ocean columns for climate models
Ramadhan, Ali, John Marshall, Andre Souza,
Gregory LeClaire Wagner, Manvitha Ponnapati,
and Christopher Rackauckas. "Capturing missing
physics in climate model parameterizations using
neural differential equations." arXiv preprint
arXiv:2010.12559 (2020).
(Update going online in the next month)
Derive a 1D approximation to
the 3D model
Incorporate the β€œconvective
adjustment”
Only okay, but why?
Neural Networks Infused into Known Partial Differential Equations
Good Engineering Principles: Integral Control!
The adjoint methods (start skipping from here)
Method Stability Stiff Performance Scaling Memory Usage
BacksolveAdjoint Poor Low. O(1)
InterpolatingAdjoint Good High. Requires full continuous solution of forward
QuadratureAdjoint Good
Higher. Requires full continuous solution of forward and
Lagrange multiplier
BacksolveAdjoint
(Checkpointed)
Okay Medium. O(c) where c is the number of checkpoints
InterpolatingAdjoint
(Checkpointed)
Good Medium. O(c) where c is the number of checkpoints
ReverseDiffAdjoint Best Highest. Requires full forward and reverse AD of solve
TrackerAdjoint Best Highest. Requires full forward and reverse AD of solve
ForwardLSS/AdjointLSS/N
ILSS
Chaos Not even comparable: expensive. Super duper high OMG.
The adjoint equation is an ODE!
How do you get z(t)? One suggestion:
Reverse the ODE
Timeseries is not
stored, therefore
O(1) in memory!
Machine Learning Neural Ordinary Differential Equations
Chen, Ricky TQ, et al. "Neural ordinary differential equations." Advances in neural information
processing systems. 2018.
Rackauckas, Christopher, and Qing Nie. "Differentialequations. jl–a performant and
feature-rich ecosystem for solving differential equations in julia." Journal of Open
Research Software 5.1 (2017).
Rackauckas, Christopher, and Qing Nie. "Confederated modular differential equation APIs
for accelerated algorithm development and benchmarking." Advances in Engineering
Software 132 (2019): 1-6.
β€œAdjoints by reversing” also is
unconditionally unstable on some
problems!
Advection Equation:
Approximating the derivative in x has two choices: forwards or
backwards
If you discretize in the wrong direction you get unconditional
instability
You need to understand the engineering principles and the numerical
simulation properties of domain to make ML stable on it.
Problems With NaΓ―ve Adjoint Approaches On Stiff Equations
Error grows exponentially…
𝑒𝑒′ 𝑑𝑑 = πœ†πœ†πœ†πœ†(𝑑𝑑), plot the error in the reverse
solve:
Kim, Suyong, Weiqi Ji, Sili Deng, and Christopher Rackauckas. "Stiff neural
ordinary differential equations." Chaos (2021).
How do you get u(t) while solving backwards?
3 options!
1.
2. Store u(t) while solving forwards (dense output)
3. Checkpointing
Unstable
High memory
More Compute
Each choices has an engineering trade-off!
Problems With NaΓ―ve Adjoint Approaches On Stiff Equations
Error grows exponentially…
𝑒𝑒′ 𝑑𝑑 = πœ†πœ†πœ†πœ†(𝑑𝑑), plot the error in the reverse
solve:
Compute cost is cubic with parameter size when stiff
Size of reverse ODE system is:
2𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
Linear solves inside of stiff ODE solvers, ~cubic
Thus, adjoint cost:
𝑂𝑂 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 3
Kim, Suyong, Weiqi Ji, Sili Deng, and Christopher Rackauckas. "Stiff neural
ordinary differential equations." Chaos (2021).
Gives about a 10x performance improvement for adjoint calculations on PDEs
β€œAdjoint” can mean many
many different things…
Ma, Yingbo, Vaibhav Dixit, Michael J. Innes, Xingjian
Guo, and Chris Rackauckas. "A comparison of
automatic differentiation and continuous sensitivity
analysis for derivatives of differential equation
solutions." In 2021 IEEE High Performance Extreme
Computing Conference (HPEC), pp. 1-9. IEEE, 2021.
Therefore, any solver you can
differentiate can do UDE things
Improving Coverage of Automatic Differentiation over Solvers
https://scimlbase.sciml.ai/dev/
The SciML Common Interface for Julia Equation Solvers
LinearSolve.jl: Unified Linear Solver Interface
𝐴𝐴(𝑝𝑝)π‘₯π‘₯ = 𝑏𝑏
NonlinearSolve.jl: Unified Nonlinear Solver Interface
𝑓𝑓 𝑒𝑒, 𝑝𝑝 = 0
DifferentialEquations.jl: Unified Interface for all
Differential Equations
𝑒𝑒′
= 𝑓𝑓(𝑒𝑒, 𝑝𝑝, 𝑑𝑑)
𝑑𝑑𝑑𝑑 = 𝑓𝑓 𝑒𝑒, 𝑝𝑝, 𝑑𝑑 𝑑𝑑𝑑𝑑 + 𝑔𝑔 𝑒𝑒, 𝑝𝑝, 𝑑𝑑 π‘‘π‘‘π‘Šπ‘Šπ‘‘π‘‘
Optimization.jl: Unified Optimization Interface
minimize 𝑓𝑓 𝑒𝑒, 𝑝𝑝
subject to 𝑔𝑔 𝑒𝑒, 𝑝𝑝 ≀ 0, β„Ž 𝑒𝑒, 𝑝𝑝
= 0
Integrals.jl: Unified Quadrature Interface
οΏ½
𝑙𝑙𝑙𝑙
𝑒𝑒𝑒𝑒
𝑓𝑓 𝑑𝑑, 𝑝𝑝 𝑑𝑑𝑑𝑑
Unified Partial Differential Equation Interface
𝑒𝑒𝑑𝑑 = 𝑒𝑒π‘₯π‘₯π‘₯π‘₯ + 𝑓𝑓 𝑒𝑒
𝑒𝑒𝑑𝑑𝑑𝑑 = 𝑒𝑒π‘₯π‘₯π‘₯π‘₯ + 𝑓𝑓(𝑒𝑒)
Differential Equations Go Beyond ODEs
β€’Discrete equations (function maps, discrete stochastic
(Gillespie/Markov) simulations)
β€’Ordinary differential equations (ODEs)
β€’Split and Partitioned ODEs (Symplectic integrators, IMEX
Methods)
β€’Stochastic ordinary differential equations (SODEs or SDEs)
β€’Stochastic differential-algebraic equations (SDAEs)
β€’Random differential equations (RODEs or RDEs)
β€’Differential algebraic equations (DAEs)
β€’Delay differential equations (DDEs)
β€’Neutral, retarded, and algebraic delay differential equations
(NDDEs, RDDEs, and DDAEs)
β€’Stochastic delay differential equations (SDDEs)
β€’Experimental support for stochastic neutral, retarded, and
algebraic delay differential equations (SNDDEs, SRDDEs, and
SDDAEs)
β€’Mixed discrete and continuous equations (Hybrid Equations,
Jump Diffusions)
β€’(Stochastic) partial differential equations ((S)PDEs) (with both
finite difference and finite element methods)
…
But if you keep adding
solver choices,
then you’re okay?
Unified Interfaces to Partial Differential Tooling
Lots of Auto-Discretizers:
β€’ Physics-Informed NNs: NeuralPDE.jl
β€’ Finite Difference / WENO: MethodOfLines.jl
β€’ Neural Operators: NeuralOperators.jl
β€’ Finite Volume: Trixi.jl
β€’ Finite Element: Gridap.jl
β€’ Pseudospectral: ApproxFun.jl
β€’ High Dimension: HighDimPDE.jl
New SciML Docs: Comprehensive Documentation of Differentiable Simulation
SciML Interface Coverage is Growing: Bringing AD to All Solvers by Default
LinearSolve.jl
1. SuiteSparse.jl (KLU, UMFPACK)
2. RecursiveFactorization.jl
3. Base.LinearAlgebra
4. FastLapackInterface.jl
5. Pardiso.jl
6. CUDA.jl (automated GPU offloading)
7. IterativeSolvers.jl
8. Krylov.jl
9. KrylovKit.jl
…
More keep being added (PETSc, Magma,
HSL, Hypre, Elemental, CuSolverRF, …)
NonlinearSolve.jl
1. NLsolve.jl (KLU, UMFPACK)
2. SteadyStateDiffEq.jl
3. MINPACK
4. SUNDIALS (KINSOL)
5. New methods
…
More keep being added (PETSc,
SpeedMapping.jl, etc.)
SciML Interface Coverage is Growing: Bringing AD to All Solvers by Default
Integrals.jl
1. QuadGK.jl
2. Cuba.jl
3. Cubature.jl
4. Hcubature.jl
5. MonteCarloIntegration.jl
Optimization.jl
What’s something that’s not quite β€œjust an
ODE” where the UDE technique can give
an equation discovery method?
DeepNLME: Integrate neural networks into traditional NLME modeling
DeepNLME is SciML-enhanced modeling for clinical trials
β€’ Automate the discovery of predictive
covariates and their relationship to
dynamics
β€’ Automatically discover dynamical
models and assess the fit
β€’ Incorporate big data sources, such as
genomics and images, as predictive
covariates
DeepNLME is SciML-enhanced modeling for clinical trials
From Dynamics to Nonlinear Mixed Effects (NLME) Modeling
Goal: Learn to predict patient behavior (dynamics) from simple data (covariates)
Covariates
Structural Model (pre)
Dynamics
Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0
Intution: πœ‚πœ‚ (the random effects) are a fudge factor
Find πœƒπœƒ (the fixed effect, or average effect) such that you
can predict new patient dynamics as good as possible
Requires special fitting procedures (Pumas)
We have been using Pumas software for our
pharmacometric needs to support our development
decisions and regulatory submissions.
Pumas software has surpassed our expectations on its accuracy and ease of use. We are
encouraged by its capability of supporting different types of pharmacometric analyses within
one software. Pumas has emerged as our "go-to" tool for most of our analyses in recent
months. We also work with Pumas-AI on drug development consulting. We are impressed by
the quality and breadth of the experience of Pumas-AI scientists in collaborating with us on
modeling and simulation projects across our pipeline spanning investigational therapeutics
and vaccines at various stages of clinical development
Husain A. PhD (2020)
Director, Head of Clinical Pharmacology and Pharmacometrics,
Moderna Therapeutics, Inc
The Impact of Pumas (PharmacUtical Modeling And Simulation)
β€œ Built on SciML
From Dynamics to Nonlinear Mixed Effects (NLME) Modeling
Goal: Learn to predict patient behavior (dynamics) from simple data (covariates)
Covariates
Structural Model (pre)
Dynamics
Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0
Intution: πœ‚πœ‚ (the random effects) are a fudge factor
Find πœƒπœƒ (the fixed effect, or average effect) such that you
can predict new patient dynamics as good as possible
How can we find
these models?
From Dynamics to Nonlinear Mixed Effects (NLME) Modeling
Goal: Learn to predict patient behavior (dynamics) from simple data (covariates)
Covariates
Structural Model (pre)
Dynamics
Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0
How can we find
these models?
Idea: Parameterize the model such that the models can
be neural networks, where the weights of the neural
networks are fixed effects!
Indirect learning of unknown functions!
From Dynamics to Nonlinear Mixed Effects (NLME) Modeling
DeepNLME in Practice: Data Mining for Predictive Covariates
Automate the discovery of covariate models
β€’ Train convolutional neural networks to
incorporate images as covariates
β€’ Train transformer models to utilize natural
language processing on electronic health
records
β€’ Utilize automated model discovery to prune
genomics data to find the predictive subset
Utilize GPU acceleration for neural networks Currently being tested on clinical trial data
Can we generalize Differentiable
Simulation beyond continuous models?
Differentiation of Chaotic Systems: Shadow Adjoints
chaotic systems: trajectories diverge to o(1) error … but
shadowing lemma guarantees that the solution lies on
the attractor
β€’ Shadowing methods in DiffEqSensitivity.jl
β€’ AD and finite differencing fails!
https://frankschae.github.io/post/shadowing/
Differentiation of Chaotic Systems: Shadow Adjoints
Poisson Jump Equations: Stochastic Chemical Reactions
Loman, Torkel, Yingbo Ma, Vasily Ilin, Shashi Gowda, Niklas Korsbo, Nikhil Yewale, Christopher Vincent
Rackauckas, and Samuel A. Isaacson. "Catalyst: fast biochemical modeling with Julia." bioRxiv (2022).
~100x performance improvements in Gillespie SSAs with Catalyst.jl
New Automatic Differentiation of Discrete Stochastic Spaces?
Traditional AD Discrete Stochastic AD
Automatic Differentiation of Programs with Discrete Randomness
Accepted to NeurIPS 2022!
Infinitesimal Changes -> O(1) Changes
O(1) changes with infinitesimal probability
StochasticAD.jl: Unbiased Stochastic Derivatives with Linear Cost
Perform AD
on Agent-
Based
models,
particle
filters,
chemical
reactions,
and more!
StochasticAD.jl on Agent-Based Models
But wait, why not PINNs?
How does differentiable simulation compare
to PINNs?
Keeping Neural Networks Small Keeps Speed For Inverse Problems
DiffEqFlux.jl (Julia UDEs)
DeepXDE (TensorFlow Physics-Informed NN)
Problem: parameter estimation
of Lorenz equation from data
On t in (0,3)
Note on Neural Networks β€œOutperforming” Classical Solvers
Note on Neural Networks β€œOutperforming” Classical Solvers
Oh no, we’re doomed!
Stay tuned…
Julia’s numerical
solver is faster by
7,000x
Julia: Laptop CPU
DeepONet: Tesla V100 GPU
Code Optimization in Machine Learning vs Scientific Computing
Big O(n^3) operations?
Just use a GPU
Don’t worry about overhead
You’re fine!
Simplest code is ~3x from optimized
Scientific codes
O(n) and O(n^2)
operations
Mutation and
Memory management: 10x
Manual SIMD: 5x
…
SimpleChains + StaticArray Neural ODEs
About a 5x improvement
~1000x in a nonlinear mixed
effects context
Caveat: Requires
sufficiently small ODEs
(<20)
And simulation processes are still
improving rapidly.
New Parallelized GPU ODE Parallelism: 30x Faster than Before
Matches State of the Art on CUDA, but also
works with AMD, Intel, and Apple GPUs
Utkarsh, U., Churavy, V., Ma, Y., Besard, T., Gymnich, T., Gerlach, A. R., ... &
Rackauckas, C. (2023). Automated Translation and Accelerated Solving of
Differential Equations on Multiple GPU Platforms. arXiv preprint arXiv:2304.06835.
DifferentialEquations.jl is generally:
β€’ 50x faster than SciPy
β€’ 50x faster than MATLAB
β€’ 100x faster than R’s deSolve
, Christopher, and Qing Nie. "Confederated modular differential equation APIs for accelerated algorithm
development and benchmarking." Advances in Engineering Software 132 (2019): 1-6.
Foundation: Fast Differential
Equation Solvers
https://github.com/SciML/SciMLBenchmarks.jl
Rackauckas, Christopher, and Qing Nie. "Differentialequations.jl–a performant and
feature-rich ecosystem for solving differential equations in julia." Journal of Open
Research Software 5.1 (2017).
Rackauckas, Christopher, and Qing Nie. "Confederated modular differential equation
APIs for accelerated algorithm development and benchmarking." Advances in
Engineering Software 132 (2019): 1-6.
1. Speed
2. Stability
3. Stochasticity
4. Adjoints and Inference
5. Parallelism
Non-Stiff ODE: Rigid Body System
8 Stiff ODEs: HIRES Chemical Reaction Network
New Parallelized Extrapolation Methods for Stiff ODEs: 2x-4x improvements
Caveat: only good for 5-200
ODEs with no implicit
parallelism in f
Elrod, Chris, Yingbo Ma, and Christopher Rackauckas.
"Parallelizing Explicit and Implicit Extrapolation
Methods for Ordinary Differential Equations." arXiv
preprint arXiv:2207.08135 (2022).
Accepted to HPEC 2022!
SciML Open Source Software
Organization
sciml.ai
● DifferentialEquations.jl: 2x-10x Sundials, Hairer, …
● DiffEqFlux.jl: adjoints outperforming Sundials and PETSc-TS
● ModelingToolkit.jl: 15,000x Simulink
● Catalyst.jl: >100x SimBiology, gillespy, Copasi
● DataDrivenDiffEq.jl: >10x pySindy
● NeuralPDE.jl: ~2x DeepXDE* (more optimizations to be done)
● NeuralOperators.jl: ~3x original papers (more optimizations required)
● ReservoirComputing.jl: 2x-10x pytorch-esn, ReservoirPy, PyRCN
● SimpleChains.jl: 5x PyTorch GPU with CPU, 10x Jax (small only!)
● DiffEqGPU.jl: Some wild GPU ODE solve speedups coming soon
And 100 more libraries to mention…
If you work in SciML and think optimized and maintained implementations
of your method would be valuable, please let us know and we can add it to
the queue.
Democratizing SciML via pedantic code optimization
Because we believe full-scale open benchmarks matter

More Related Content

Similar to Generalizing Scientific Machine Learning and Differentiable Simulation Beyond Continuous Models

20141003.journal club
20141003.journal club20141003.journal club
20141003.journal clubHayaru SHOUNO
Β 
Reservoir computing fast deep learning for sequences
Reservoir computing   fast deep learning for sequencesReservoir computing   fast deep learning for sequences
Reservoir computing fast deep learning for sequencesClaudio Gallicchio
Β 
Lecture: Interatomic Potentials Enabled by Machine Learning
Lecture: Interatomic Potentials Enabled by Machine LearningLecture: Interatomic Potentials Enabled by Machine Learning
Lecture: Interatomic Potentials Enabled by Machine LearningDanielSchwalbeKoda
Β 
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14Sri Ambati
Β 
Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...changedaeoh
Β 
NIPS2007: deep belief nets
NIPS2007: deep belief netsNIPS2007: deep belief nets
NIPS2007: deep belief netszukun
Β 
. An introduction to machine learning and probabilistic ...
. An introduction to machine learning and probabilistic .... An introduction to machine learning and probabilistic ...
. An introduction to machine learning and probabilistic ...butest
Β 
Deep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistryDeep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistryKenta Oono
Β 
T. Lucas Makinen x Imperial SBI Workshop
T. Lucas Makinen x Imperial SBI WorkshopT. Lucas Makinen x Imperial SBI Workshop
T. Lucas Makinen x Imperial SBI WorkshopLucasMakinen1
Β 
Symbolic Background Knowledge for Machine Learning
Symbolic Background Knowledge for Machine LearningSymbolic Background Knowledge for Machine Learning
Symbolic Background Knowledge for Machine LearningSteffen Staab
Β 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrellzukun
Β 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrellzukun
Β 
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptxssuser2023c6
Β 
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...IAEME Publication
Β 
Deep Learning: concepts and use cases (October 2018)
Deep Learning: concepts and use cases (October 2018)Deep Learning: concepts and use cases (October 2018)
Deep Learning: concepts and use cases (October 2018)Julien SIMON
Β 
A simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsA simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsDevansh16
Β 
Data driven model optimization [autosaved]
Data driven model optimization [autosaved]Data driven model optimization [autosaved]
Data driven model optimization [autosaved]Russell Jarvis
Β 
3 article azojete vol 7 24 33
3 article azojete vol 7 24 333 article azojete vol 7 24 33
3 article azojete vol 7 24 33Oyeniyi Samuel
Β 

Similar to Generalizing Scientific Machine Learning and Differentiable Simulation Beyond Continuous Models (20)

20141003.journal club
20141003.journal club20141003.journal club
20141003.journal club
Β 
Reservoir computing fast deep learning for sequences
Reservoir computing   fast deep learning for sequencesReservoir computing   fast deep learning for sequences
Reservoir computing fast deep learning for sequences
Β 
Lecture: Interatomic Potentials Enabled by Machine Learning
Lecture: Interatomic Potentials Enabled by Machine LearningLecture: Interatomic Potentials Enabled by Machine Learning
Lecture: Interatomic Potentials Enabled by Machine Learning
Β 
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14
H2O.ai's Distributed Deep Learning by Arno Candel 04/03/14
Β 
Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Representation Learning & Generative Modeling with Variational Autoencoder(VA...
Β 
NIPS2007: deep belief nets
NIPS2007: deep belief netsNIPS2007: deep belief nets
NIPS2007: deep belief nets
Β 
prototypes-AMALEA.pdf
prototypes-AMALEA.pdfprototypes-AMALEA.pdf
prototypes-AMALEA.pdf
Β 
. An introduction to machine learning and probabilistic ...
. An introduction to machine learning and probabilistic .... An introduction to machine learning and probabilistic ...
. An introduction to machine learning and probabilistic ...
Β 
Deep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistryDeep learning for molecules, introduction to chainer chemistry
Deep learning for molecules, introduction to chainer chemistry
Β 
Making Robots Learn
Making Robots LearnMaking Robots Learn
Making Robots Learn
Β 
T. Lucas Makinen x Imperial SBI Workshop
T. Lucas Makinen x Imperial SBI WorkshopT. Lucas Makinen x Imperial SBI Workshop
T. Lucas Makinen x Imperial SBI Workshop
Β 
Symbolic Background Knowledge for Machine Learning
Symbolic Background Knowledge for Machine LearningSymbolic Background Knowledge for Machine Learning
Symbolic Background Knowledge for Machine Learning
Β 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrell
Β 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrell
Β 
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
Β 
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...
NEURAL NETWORK FOR THE RELIABILITY ANALYSIS OF A SERIES - PARALLEL SYSTEM SUB...
Β 
Deep Learning: concepts and use cases (October 2018)
Deep Learning: concepts and use cases (October 2018)Deep Learning: concepts and use cases (October 2018)
Deep Learning: concepts and use cases (October 2018)
Β 
A simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsA simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representations
Β 
Data driven model optimization [autosaved]
Data driven model optimization [autosaved]Data driven model optimization [autosaved]
Data driven model optimization [autosaved]
Β 
3 article azojete vol 7 24 33
3 article azojete vol 7 24 333 article azojete vol 7 24 33
3 article azojete vol 7 24 33
Β 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
Β 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
Β 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
Β 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
Β 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
Β 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
Β 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
Β 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
Β 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
Β 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
Β 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
Β 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
Β 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
Β 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
Β 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
Β 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
Β 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
Β 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
Β 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Β 
Hot Sexy call girls in Panjabi Bagh πŸ” 9953056974 πŸ” Delhi escort Service
Hot Sexy call girls in Panjabi Bagh πŸ” 9953056974 πŸ” Delhi escort ServiceHot Sexy call girls in Panjabi Bagh πŸ” 9953056974 πŸ” Delhi escort Service
Hot Sexy call girls in Panjabi Bagh πŸ” 9953056974 πŸ” Delhi escort Service
Β 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Β 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Β 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Β 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Β 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Β 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Β 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Β 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Β 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Β 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Β 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Β 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Β 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Β 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Β 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Β 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Β 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
Β 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Β 

Generalizing Scientific Machine Learning and Differentiable Simulation Beyond Continuous Models

  • 1. Generalizing Scientific Machine Learning and Differentiable Simulation Beyond Continuous Models Chris Rackauckas VP of Modeling and Simulation, JuliaHub Research Affiliate, Co-PI of Julia Lab, Massachusetts Institute of Technology, CSAIL Director of Scientific Research, Pumas-AI
  • 2. How do we simultaneously use both sources of knowledge? Scientific Machine Learning is model-based data-efficient machine learning Good Predictions
  • 3. Core Point: Differentiable Simulation is hard, but it’s worth investing more development time in.
  • 4. Universal (Approximator) Differential Equations Rackauckas, Christopher, Yingbo Ma, Julius Martensen, Collin Warner, Kirill Zubov, Rohit Supekar, Dominic Skinner, Ali Ramadhan, and Alan Edelman. "Universal differential equations for scientific machine learning." arXiv preprint arXiv:2001.04385 (2020).
  • 6. Let’s dive in a bit! Standard Machine Learning: Learn the whole model u’=NN(u) trained on 21 days of data Can fit, but not enough information to accurately extrapolate Does not have the correct asymptotic behavior More examples of this issue: Ridderbusch et al. "Learning ODE Models with Qualitative Structure Using Gaussian Processes."
  • 7. Universal ODE Replace Unknown Portion Replace Unknown Portion Infection rates: known From disease quantities Percentage of cases known to be severe, can be estimated Exposure: Unknown
  • 8. Universal ODE -> Internal Sparse Regression Sparse Identification on only the missing term: I * 0.10234428543435758 + S/N * I * 0.11371750552005416 + (S/N) ^ 2 * I * 0.12635459799855597 Replace Unknown Portion Replace Unknown Portion Sparsity improves generalizability!
  • 9. Scientific Machine Learning: Improving Predictions with Less Data Dandekar, R., Rackauckas, C., & Barbastathis, G. (2020). A machine learning-aided global diagnostic and comparative tool to assess effect of quarantine control in COVID-19 spread. Patterns, 1(9), 100145. Acquesta, E., Portone, T., Dandekar, R., Rackauckas, C., Bandy, R., & Huerta, J. (2022). Model-Form Epistemic Uncertainty Quantification for Modeling with Differential Equations: Application to Epidemiology (No. SAND2022-12823). Sandia National Lab.(SNL-NM), Albuquerque, NM (United States).
  • 10. Accurate Model Extrapolation Mixing in Physical Knowledge Automated discovery of geodesic equations from LIGO black hole data: run the code yourself! https://github.com/Astroinformatics/Sc ientificMachineLearning/blob/main/ne uralode_gw.ipynb Keith, B., Khadse, A., & Field, S. E. (2021). Learning orbital dynamics of binary black hole systems from gravitational wave measurements. Physical Review Research, 3(4), 043101.
  • 11. SciML Shows how to build Earthquake-Safe Buildings Structural identification with physics-informed neural ordinary differential equations Lai, Zhilu, Mylonas, Charilaos, Nagarajaiah, Satish, Chatzi, Eleni For a detailed walkthrough of UDEs and applications watch on Youtube: Chris Rackauckas: Accurate and Efficient Physics-Informed Learning Through Differentiable Simulation
  • 12. The UDE formulation fairly generally allows for imposing prior known structure
  • 13. UDEs Effectively Recover Nonlinearities of Epidemic Models Use SciML knowledge to constrain the interaction graph, but learn the nonlinearities!
  • 14. Universal Differential Equations Predict Chemical Processes Santana, V. V., Costa, E., Rebello, C. M., Ribeiro, A. M., Rackauckas, C., & Nogueira, I. B. (2023). Efficient hybrid modeling and sorption model discovery for non- linear advection-diffusion-sorption systems: A systematic scientific machine learning approach. Chemical Engineering Science
  • 15. Universal Differential Equations Predict Chemical Processes Santana, V. V., Costa, E., Rebello, C. M., Ribeiro, A. M., Rackauckas, C., & Nogueira, I. B. (2023). Efficient hybrid modeling and sorption model discovery for non- linear advection-diffusion-sorption systems: A systematic scientific machine learning approach. Chemical Engineering Science Recovers equations with the same 2nd order Taylor expansion
  • 16. Julia Computing Confidential Scientific Machine Learning Digital Twins: More Realistic Results than Pure ML Physically-Informed Machine Learning Using knowledge of the physical forms as part of the design of the neural networks. Formulation: Koopman + SIREN + Physics Smoother, more accurate results ln(x) ex
  • 17. Neuroblox: UDEs in Psychopharmacology
  • 18. Many other SciML Methods can be rephrased as UDEs
  • 19. Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by Learning Structured Stochastic Differential Equations β€’ Semilinear Parabolic Form (Diffusion-Advection Equations, Hamilton-Jacobi-Bellman, Black-Scholes) β€’ Make (πœŽπœŽπ‘‡π‘‡ 𝛻𝛻𝛻) 𝑑𝑑, 𝑋𝑋 a neural network. β€’ Solve the resulting SDEs and learn πœŽπœŽπ‘‡π‘‡π›»π›»π›» via: Simplified: β€’ Transform the PDE into a Backwards SDE: a stochastic boundary value problem. The unknown is a function! β€’ Learn the unknown function via neural network. β€’ Once learned, the PDE solution is known. Solving high-dimensional partial differential equations using deep learning, 2018, PNAS, Han, Jentzen, E
  • 20. Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by Learning Structured Stochastic Differential Equations Solving high-dimensional partial differential equations using deep learning, 2018, PNAS, Han, Jentzen, E
  • 21. Solving Semilinear Parabolic PDEs (Nonlinear Black-Scholes) by Learning Structured Stochastic Differential Equations β€’ This is equivalent to training the universal SDE: β€’ Solves a 100 dimensional PDE in minutes on a laptop! β€’ As a universal SDE, we can solve this with high order (less neural network evaluations), adaptivity, etc. methods using DiffEqFlux.jl. Thus we automatically extend the deep BSDE method to better discretizations by using this interpretation!
  • 22. Extending the Method: Learning Nonlinearities While Solving?
  • 23. Does doing such methods require differentiation of the simulator?
  • 24. 3D simulations are high resolution but too expensive. Can we learn faster models? High fidelity surrogates of ocean columns for climate models Ramadhan, Ali, John Marshall, Andre Souza, Gregory LeClaire Wagner, Manvitha Ponnapati, and Christopher Rackauckas. "Capturing missing physics in climate model parameterizations using neural differential equations." arXiv preprint arXiv:2010.12559 (2020). (Update going online in the next month)
  • 25. Derive a 1D approximation to the 3D model Incorporate the β€œconvective adjustment” Only okay, but why? Neural Networks Infused into Known Partial Differential Equations
  • 26. Good Engineering Principles: Integral Control!
  • 27. The adjoint methods (start skipping from here) Method Stability Stiff Performance Scaling Memory Usage BacksolveAdjoint Poor Low. O(1) InterpolatingAdjoint Good High. Requires full continuous solution of forward QuadratureAdjoint Good Higher. Requires full continuous solution of forward and Lagrange multiplier BacksolveAdjoint (Checkpointed) Okay Medium. O(c) where c is the number of checkpoints InterpolatingAdjoint (Checkpointed) Good Medium. O(c) where c is the number of checkpoints ReverseDiffAdjoint Best Highest. Requires full forward and reverse AD of solve TrackerAdjoint Best Highest. Requires full forward and reverse AD of solve ForwardLSS/AdjointLSS/N ILSS Chaos Not even comparable: expensive. Super duper high OMG.
  • 28. The adjoint equation is an ODE! How do you get z(t)? One suggestion: Reverse the ODE Timeseries is not stored, therefore O(1) in memory! Machine Learning Neural Ordinary Differential Equations Chen, Ricky TQ, et al. "Neural ordinary differential equations." Advances in neural information processing systems. 2018.
  • 29. Rackauckas, Christopher, and Qing Nie. "Differentialequations. jl–a performant and feature-rich ecosystem for solving differential equations in julia." Journal of Open Research Software 5.1 (2017). Rackauckas, Christopher, and Qing Nie. "Confederated modular differential equation APIs for accelerated algorithm development and benchmarking." Advances in Engineering Software 132 (2019): 1-6. β€œAdjoints by reversing” also is unconditionally unstable on some problems! Advection Equation: Approximating the derivative in x has two choices: forwards or backwards If you discretize in the wrong direction you get unconditional instability You need to understand the engineering principles and the numerical simulation properties of domain to make ML stable on it.
  • 30. Problems With NaΓ―ve Adjoint Approaches On Stiff Equations Error grows exponentially… 𝑒𝑒′ 𝑑𝑑 = πœ†πœ†πœ†πœ†(𝑑𝑑), plot the error in the reverse solve: Kim, Suyong, Weiqi Ji, Sili Deng, and Christopher Rackauckas. "Stiff neural ordinary differential equations." Chaos (2021). How do you get u(t) while solving backwards? 3 options! 1. 2. Store u(t) while solving forwards (dense output) 3. Checkpointing Unstable High memory More Compute Each choices has an engineering trade-off!
  • 31. Problems With NaΓ―ve Adjoint Approaches On Stiff Equations Error grows exponentially… 𝑒𝑒′ 𝑑𝑑 = πœ†πœ†πœ†πœ†(𝑑𝑑), plot the error in the reverse solve: Compute cost is cubic with parameter size when stiff Size of reverse ODE system is: 2𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 Linear solves inside of stiff ODE solvers, ~cubic Thus, adjoint cost: 𝑂𝑂 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 + 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 3 Kim, Suyong, Weiqi Ji, Sili Deng, and Christopher Rackauckas. "Stiff neural ordinary differential equations." Chaos (2021).
  • 32. Gives about a 10x performance improvement for adjoint calculations on PDEs β€œAdjoint” can mean many many different things… Ma, Yingbo, Vaibhav Dixit, Michael J. Innes, Xingjian Guo, and Chris Rackauckas. "A comparison of automatic differentiation and continuous sensitivity analysis for derivatives of differential equation solutions." In 2021 IEEE High Performance Extreme Computing Conference (HPEC), pp. 1-9. IEEE, 2021.
  • 33. Therefore, any solver you can differentiate can do UDE things
  • 34. Improving Coverage of Automatic Differentiation over Solvers https://scimlbase.sciml.ai/dev/ The SciML Common Interface for Julia Equation Solvers LinearSolve.jl: Unified Linear Solver Interface 𝐴𝐴(𝑝𝑝)π‘₯π‘₯ = 𝑏𝑏 NonlinearSolve.jl: Unified Nonlinear Solver Interface 𝑓𝑓 𝑒𝑒, 𝑝𝑝 = 0 DifferentialEquations.jl: Unified Interface for all Differential Equations 𝑒𝑒′ = 𝑓𝑓(𝑒𝑒, 𝑝𝑝, 𝑑𝑑) 𝑑𝑑𝑑𝑑 = 𝑓𝑓 𝑒𝑒, 𝑝𝑝, 𝑑𝑑 𝑑𝑑𝑑𝑑 + 𝑔𝑔 𝑒𝑒, 𝑝𝑝, 𝑑𝑑 π‘‘π‘‘π‘Šπ‘Šπ‘‘π‘‘ Optimization.jl: Unified Optimization Interface minimize 𝑓𝑓 𝑒𝑒, 𝑝𝑝 subject to 𝑔𝑔 𝑒𝑒, 𝑝𝑝 ≀ 0, β„Ž 𝑒𝑒, 𝑝𝑝 = 0 Integrals.jl: Unified Quadrature Interface οΏ½ 𝑙𝑙𝑙𝑙 𝑒𝑒𝑒𝑒 𝑓𝑓 𝑑𝑑, 𝑝𝑝 𝑑𝑑𝑑𝑑 Unified Partial Differential Equation Interface 𝑒𝑒𝑑𝑑 = 𝑒𝑒π‘₯π‘₯π‘₯π‘₯ + 𝑓𝑓 𝑒𝑒 𝑒𝑒𝑑𝑑𝑑𝑑 = 𝑒𝑒π‘₯π‘₯π‘₯π‘₯ + 𝑓𝑓(𝑒𝑒)
  • 35. Differential Equations Go Beyond ODEs β€’Discrete equations (function maps, discrete stochastic (Gillespie/Markov) simulations) β€’Ordinary differential equations (ODEs) β€’Split and Partitioned ODEs (Symplectic integrators, IMEX Methods) β€’Stochastic ordinary differential equations (SODEs or SDEs) β€’Stochastic differential-algebraic equations (SDAEs) β€’Random differential equations (RODEs or RDEs) β€’Differential algebraic equations (DAEs) β€’Delay differential equations (DDEs) β€’Neutral, retarded, and algebraic delay differential equations (NDDEs, RDDEs, and DDAEs) β€’Stochastic delay differential equations (SDDEs) β€’Experimental support for stochastic neutral, retarded, and algebraic delay differential equations (SNDDEs, SRDDEs, and SDDAEs) β€’Mixed discrete and continuous equations (Hybrid Equations, Jump Diffusions) β€’(Stochastic) partial differential equations ((S)PDEs) (with both finite difference and finite element methods) … But if you keep adding solver choices, then you’re okay?
  • 36. Unified Interfaces to Partial Differential Tooling Lots of Auto-Discretizers: β€’ Physics-Informed NNs: NeuralPDE.jl β€’ Finite Difference / WENO: MethodOfLines.jl β€’ Neural Operators: NeuralOperators.jl β€’ Finite Volume: Trixi.jl β€’ Finite Element: Gridap.jl β€’ Pseudospectral: ApproxFun.jl β€’ High Dimension: HighDimPDE.jl
  • 37. New SciML Docs: Comprehensive Documentation of Differentiable Simulation
  • 38. SciML Interface Coverage is Growing: Bringing AD to All Solvers by Default LinearSolve.jl 1. SuiteSparse.jl (KLU, UMFPACK) 2. RecursiveFactorization.jl 3. Base.LinearAlgebra 4. FastLapackInterface.jl 5. Pardiso.jl 6. CUDA.jl (automated GPU offloading) 7. IterativeSolvers.jl 8. Krylov.jl 9. KrylovKit.jl … More keep being added (PETSc, Magma, HSL, Hypre, Elemental, CuSolverRF, …) NonlinearSolve.jl 1. NLsolve.jl (KLU, UMFPACK) 2. SteadyStateDiffEq.jl 3. MINPACK 4. SUNDIALS (KINSOL) 5. New methods … More keep being added (PETSc, SpeedMapping.jl, etc.)
  • 39. SciML Interface Coverage is Growing: Bringing AD to All Solvers by Default Integrals.jl 1. QuadGK.jl 2. Cuba.jl 3. Cubature.jl 4. Hcubature.jl 5. MonteCarloIntegration.jl Optimization.jl
  • 40. What’s something that’s not quite β€œjust an ODE” where the UDE technique can give an equation discovery method?
  • 41. DeepNLME: Integrate neural networks into traditional NLME modeling DeepNLME is SciML-enhanced modeling for clinical trials β€’ Automate the discovery of predictive covariates and their relationship to dynamics β€’ Automatically discover dynamical models and assess the fit β€’ Incorporate big data sources, such as genomics and images, as predictive covariates DeepNLME is SciML-enhanced modeling for clinical trials
  • 42. From Dynamics to Nonlinear Mixed Effects (NLME) Modeling Goal: Learn to predict patient behavior (dynamics) from simple data (covariates) Covariates Structural Model (pre) Dynamics Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0 Intution: πœ‚πœ‚ (the random effects) are a fudge factor Find πœƒπœƒ (the fixed effect, or average effect) such that you can predict new patient dynamics as good as possible Requires special fitting procedures (Pumas)
  • 43. We have been using Pumas software for our pharmacometric needs to support our development decisions and regulatory submissions. Pumas software has surpassed our expectations on its accuracy and ease of use. We are encouraged by its capability of supporting different types of pharmacometric analyses within one software. Pumas has emerged as our "go-to" tool for most of our analyses in recent months. We also work with Pumas-AI on drug development consulting. We are impressed by the quality and breadth of the experience of Pumas-AI scientists in collaborating with us on modeling and simulation projects across our pipeline spanning investigational therapeutics and vaccines at various stages of clinical development Husain A. PhD (2020) Director, Head of Clinical Pharmacology and Pharmacometrics, Moderna Therapeutics, Inc The Impact of Pumas (PharmacUtical Modeling And Simulation) β€œ Built on SciML
  • 44. From Dynamics to Nonlinear Mixed Effects (NLME) Modeling Goal: Learn to predict patient behavior (dynamics) from simple data (covariates) Covariates Structural Model (pre) Dynamics Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0 Intution: πœ‚πœ‚ (the random effects) are a fudge factor Find πœƒπœƒ (the fixed effect, or average effect) such that you can predict new patient dynamics as good as possible How can we find these models?
  • 45. From Dynamics to Nonlinear Mixed Effects (NLME) Modeling Goal: Learn to predict patient behavior (dynamics) from simple data (covariates) Covariates Structural Model (pre) Dynamics Math: Find (πœƒπœƒ, πœ‚πœ‚) such that E πœ‚πœ‚ = 0 How can we find these models? Idea: Parameterize the model such that the models can be neural networks, where the weights of the neural networks are fixed effects! Indirect learning of unknown functions!
  • 46. From Dynamics to Nonlinear Mixed Effects (NLME) Modeling
  • 47.
  • 48. DeepNLME in Practice: Data Mining for Predictive Covariates Automate the discovery of covariate models β€’ Train convolutional neural networks to incorporate images as covariates β€’ Train transformer models to utilize natural language processing on electronic health records β€’ Utilize automated model discovery to prune genomics data to find the predictive subset Utilize GPU acceleration for neural networks Currently being tested on clinical trial data
  • 49. Can we generalize Differentiable Simulation beyond continuous models?
  • 50. Differentiation of Chaotic Systems: Shadow Adjoints chaotic systems: trajectories diverge to o(1) error … but shadowing lemma guarantees that the solution lies on the attractor β€’ Shadowing methods in DiffEqSensitivity.jl β€’ AD and finite differencing fails! https://frankschae.github.io/post/shadowing/
  • 51. Differentiation of Chaotic Systems: Shadow Adjoints
  • 52. Poisson Jump Equations: Stochastic Chemical Reactions Loman, Torkel, Yingbo Ma, Vasily Ilin, Shashi Gowda, Niklas Korsbo, Nikhil Yewale, Christopher Vincent Rackauckas, and Samuel A. Isaacson. "Catalyst: fast biochemical modeling with Julia." bioRxiv (2022).
  • 53. ~100x performance improvements in Gillespie SSAs with Catalyst.jl
  • 54. New Automatic Differentiation of Discrete Stochastic Spaces? Traditional AD Discrete Stochastic AD Automatic Differentiation of Programs with Discrete Randomness Accepted to NeurIPS 2022!
  • 55. Infinitesimal Changes -> O(1) Changes
  • 56. O(1) changes with infinitesimal probability
  • 57. StochasticAD.jl: Unbiased Stochastic Derivatives with Linear Cost Perform AD on Agent- Based models, particle filters, chemical reactions, and more!
  • 59. But wait, why not PINNs? How does differentiable simulation compare to PINNs?
  • 60. Keeping Neural Networks Small Keeps Speed For Inverse Problems DiffEqFlux.jl (Julia UDEs) DeepXDE (TensorFlow Physics-Informed NN) Problem: parameter estimation of Lorenz equation from data On t in (0,3)
  • 61. Note on Neural Networks β€œOutperforming” Classical Solvers
  • 62. Note on Neural Networks β€œOutperforming” Classical Solvers Oh no, we’re doomed!
  • 63. Stay tuned… Julia’s numerical solver is faster by 7,000x Julia: Laptop CPU DeepONet: Tesla V100 GPU
  • 64. Code Optimization in Machine Learning vs Scientific Computing Big O(n^3) operations? Just use a GPU Don’t worry about overhead You’re fine! Simplest code is ~3x from optimized Scientific codes O(n) and O(n^2) operations Mutation and Memory management: 10x Manual SIMD: 5x …
  • 65. SimpleChains + StaticArray Neural ODEs About a 5x improvement ~1000x in a nonlinear mixed effects context Caveat: Requires sufficiently small ODEs (<20)
  • 66. And simulation processes are still improving rapidly.
  • 67. New Parallelized GPU ODE Parallelism: 30x Faster than Before Matches State of the Art on CUDA, but also works with AMD, Intel, and Apple GPUs Utkarsh, U., Churavy, V., Ma, Y., Besard, T., Gymnich, T., Gerlach, A. R., ... & Rackauckas, C. (2023). Automated Translation and Accelerated Solving of Differential Equations on Multiple GPU Platforms. arXiv preprint arXiv:2304.06835.
  • 68. DifferentialEquations.jl is generally: β€’ 50x faster than SciPy β€’ 50x faster than MATLAB β€’ 100x faster than R’s deSolve , Christopher, and Qing Nie. "Confederated modular differential equation APIs for accelerated algorithm development and benchmarking." Advances in Engineering Software 132 (2019): 1-6. Foundation: Fast Differential Equation Solvers https://github.com/SciML/SciMLBenchmarks.jl Rackauckas, Christopher, and Qing Nie. "Differentialequations.jl–a performant and feature-rich ecosystem for solving differential equations in julia." Journal of Open Research Software 5.1 (2017). Rackauckas, Christopher, and Qing Nie. "Confederated modular differential equation APIs for accelerated algorithm development and benchmarking." Advances in Engineering Software 132 (2019): 1-6. 1. Speed 2. Stability 3. Stochasticity 4. Adjoints and Inference 5. Parallelism Non-Stiff ODE: Rigid Body System 8 Stiff ODEs: HIRES Chemical Reaction Network
  • 69. New Parallelized Extrapolation Methods for Stiff ODEs: 2x-4x improvements Caveat: only good for 5-200 ODEs with no implicit parallelism in f Elrod, Chris, Yingbo Ma, and Christopher Rackauckas. "Parallelizing Explicit and Implicit Extrapolation Methods for Ordinary Differential Equations." arXiv preprint arXiv:2207.08135 (2022). Accepted to HPEC 2022!
  • 70. SciML Open Source Software Organization sciml.ai ● DifferentialEquations.jl: 2x-10x Sundials, Hairer, … ● DiffEqFlux.jl: adjoints outperforming Sundials and PETSc-TS ● ModelingToolkit.jl: 15,000x Simulink ● Catalyst.jl: >100x SimBiology, gillespy, Copasi ● DataDrivenDiffEq.jl: >10x pySindy ● NeuralPDE.jl: ~2x DeepXDE* (more optimizations to be done) ● NeuralOperators.jl: ~3x original papers (more optimizations required) ● ReservoirComputing.jl: 2x-10x pytorch-esn, ReservoirPy, PyRCN ● SimpleChains.jl: 5x PyTorch GPU with CPU, 10x Jax (small only!) ● DiffEqGPU.jl: Some wild GPU ODE solve speedups coming soon And 100 more libraries to mention… If you work in SciML and think optimized and maintained implementations of your method would be valuable, please let us know and we can add it to the queue. Democratizing SciML via pedantic code optimization Because we believe full-scale open benchmarks matter