Guelph Neural ODEs Tutorial
Guelph Neural ODEs Tutorial
Mathematics of
Neural ODEs
Vikram Voleti
PhD student - Mila, University of Montreal Prof. Christopher Pal
Visiting Researcher - University of Guelph Prof. Graham Taylor
2. Neural ODEs
○ Adjoint method
○ Applications
3. Recent research
2. Neural ODEs
3. Recent research
Solution:
Solution:
Solution:
Solution:
Solution:
Approximations to
i.e. Numerical Integration :
● Euler method
● Runge-Kutta methods
● ...
Solution:
Step size
Update using derivative
https://guide.freecodecamp.org/mathematics/differential-equations/eulers-method/
Solution:
https://lpsa.swarthmore.edu/NumInt/NumIntFirst.html
Solution:
Solution:
Solution:
Solution:
Solution:
Solution:
Final time
Initial time
Initial value
Differential
Any ODE solver of our choice!
Solution:
Solution:
http://faculty.bard.edu/belk/math213/InitialValueProblems.pdf
Solution:
1. The solution curves for this differential equation completely fill the plane, and
2. Solution curves for different solutions do not intersect.
http://faculty.bard.edu/belk/math213/InitialValueProblems.pdf
Solution:
1. The solution curves for this differential equation completely fill the plane, and
2. Solution curves for different solutions do not intersect.
http://faculty.bard.edu/belk/math213/InitialValueProblems.pdf https://openreview.net/pdf?id=B1e9Y2NYvS
3. Recent research
Solution:
is a neural network!
https://arxiv.org/pdf/1806.07366.pdf
ODEs
Residual
networks
Skip connection
https://arxiv.org/pdf/1806.07366.pdf https://arxiv.org/pdf/1512.03385.pdf
ODEs
Residual
networks
Euler discretization
Skip connection
Forward propagation:
Stacked ResBlocks
https://arxiv.org/pdf/1806.07366.pdf https://arxiv.org/pdf/1512.03385.pdf
ODEs
Residual
networks
Euler discretization
Skip connection
Forward propagation:
Stacked ResBlocks
How to compute this?
https://arxiv.org/pdf/1806.07366.pdf https://arxiv.org/pdf/1512.03385.pdf
ODEs
Back-propagate through the
ODE Solver!
Euler discretization
Forward propagation:
Update to reduce .
https://arxiv.org/pdf/1806.07366.pdf
ODEs
Back-propagate through the
ODE Solver!
Forward propagation:
Can we do better?
Yes.
Update to reduce .
https://arxiv.org/pdf/1806.07366.pdf
https://arxiv.org/pdf/1806.07366.pdf
We need a(t)
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Initial value
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Initial value
Vector-Jacobian Product
(can be efficiently evaluated by autodiff)
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Initial value
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Back-propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Back-propagation:
Forward propagation:
Back-propagation:
https://arxiv.org/pdf/1806.07366.pdf
Forward propagation:
Back-propagation:
Update to reduce .
https://arxiv.org/pdf/1806.07366.pdf
Neural ODE
Neural ODE
https://openreview.net/pdf?id=B1e9Y2NYvS
Neural ODE
Neural ODE
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
ODE-Net:
L
i
n
e
a
Neural ODE r
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Neural ODE
(such as
real image manifold)
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Neural ODE
Likelihood estimation
using Change of Variables formula
Train f to maximize the likelihood of the samples from target distribution log p(x_1),
by computing x(t_0) using the Neural ODE with x(t_1) as the initial value, and the Change of Variables formula.
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Neural ODE
Likelihood estimation
using Change of Variables formula
Generate samples
Sample from the noise distribution, transform it into a sample from the target distribution
using the trained Neural ODE.
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Encode the
observed data
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Decode the
latent points
Compute loss
Applications
Supervised Learning Continuous Normalizing Flows Generative Latent Models
Solve the Neural ODE for
latent points in future time steps
Decode the
latent points
Future generation!
3. Recent research
https://arxiv.org/pdf/1810.01367.pdf
https://arxiv.org/pdf/1904.01681.pdf
https://arxiv.org/pdf/1906.04596.pdf
● Improves the generative latent variable framework for irregularly-sampled time series
https://sites.google.com/view/neurips2019lire/accepted-papers?authuser=0
https://papers.nips.cc/paper/9497-ode2vae-deep-generative-second-order-odes-with-bayesian-neural-networks.pdf
https://arxiv.org/pdf/1910.05513.pdf, https://openreview.net/pdf?id=B1e9Y2NYvS
https://arxiv.org/pdf/2002.02798.pdf
● https://math.temple.edu/~queisser/assets/files/Talk3.pdf
● Textbook : https://users.math.msu.edu/users/gnagy/teaching/ode.pdf
● https://lpsa.swarthmore.edu/NumInt/NumIntFirst.html
● http://homepages.cae.wisc.edu/~blanchar/eps/ivp/ivp
● Autodiff tutorial:
http://www.cs.toronto.edu/~rgrosse/courses/csc421_2019/readings/L06%20Automatic%20Differentiation.pdf
● Course on Neural Networks & Deep Learning by Roger Grosse & Jimmy Ba, University of Toronto -
http://www.cs.toronto.edu/~rgrosse/courses/csc421_2019/
voletiv.github.io