🌻
Models
Search...
Ctrl + K
Models
Differential Equations
Ordinary Differential Equations
Neural Ordinary Differential Equations (ODE)
Previous
Language Ordinary Differential Equations (ODE)
Next
Adjoint Sensitive Method
Last updated
3 years ago
return X, y #upper case: matrix, lower case: vector
Traditional neural network:
x
→
f
(
x
)
→
y
x \rightarrow f(x) \rightarrow y
x
→
f
(
x
)
→
y
f
(
x
)
=
a
x
+
b
f(x) = ax + b
f
(
x
)
=
a
x
+
b
l
o
s
s
=
(
f
(
x
)
−
y
)
2
=
(
a
x
+
b
−
y
)
2
loss = (f(x) - y)^2 = (ax + b -y)^2
l
oss
=
(
f
(
x
)
−
y
)
2
=
(
a
x
+
b
−
y
)
2
a
=
a
−
∂
l
o
s
s
∂
a
(gradient descent)
a = a - \frac{\partial loss}{\partial a} \tag{gradient descent}
a
=
a
−
∂
a
∂
l
oss
(
gradient descent
)
a
=
a
−
2
(
a
x
+
b
−
y
)
⋅
x
⋅
L
R
a = a - 2(ax + b - y) \cdot x \cdot LR
a
=
a
−
2
(
a
x
+
b
−
y
)
⋅
x
⋅
L
R
Neural ODE:
ODE solver
b
=
b
−
2
(
a
x
+
b
−
y
)
⋅
Y
⋅
L
R
b = b - 2(ax + b - y) \cdot Y \cdot LR
b
=
b
−
2
(
a
x
+
b
−
y
)
⋅
Y
⋅
L
R
θ
=
[
a
,
b
]
\theta = [a,b]
θ
=
[
a
,
b
]
∂
z
∂
t
=
f
(
z
,
t
,
θ
)
\frac{\partial z}{\partial t} = f(z, t, \theta)
∂
t
∂
z
=
f
(
z
,
t
,
θ
)
x
→
g
(
x
)
→
y
=
z
0
→
g
(
x
)
→
z
t
x \rightarrow g(x) \rightarrow y = z_0 \rightarrow g(x) \rightarrow z_t
x
→
g
(
x
)
→
y
=
z
0
→
g
(
x
)
→
z
t
l
o
s
s
=
(
z
t
−
O
D
E
(
f
(
z
0
)
)
)
2
loss = (z_t - ODE(f(z_0)))^2
l
oss
=
(
z
t
−
O
D
E
(
f
(
z
0
))
)
2
∂
l
o
s
s
∂
z
T
=
2
×
(
z
t
−
O
D
E
(
f
(
z
0
)
)
)
\frac{\partial loss}{\partial z_T} = 2 \times (z_t - ODE(f(z_0)))
∂
z
T
∂
l
oss
=
2
×
(
z
t
−
O
D
E
(
f
(
z
0
)))
θ
=
θ
−
2
∂
l
o
s
s
∂
θ
⋅
L
R
\theta = \theta - 2\frac{\partial loss}{\partial \theta} \cdot LR
θ
=
θ
−
2
∂
θ
∂
l
oss
⋅
L
R
Traditional neural network:
Neural ODE: