The matrix-exponential flow
A linear vector field whose flow has a closed form: an exact log-determinant, an exact inverse, and the ceiling every affine map shares
02 · The matrix-exponential flow¶
Notebook 00 trained FFJORD, whose map is the solution of an ODE with a free-form vector field and whose log-determinant is the integral of a trace (3), and notebook 01 made that trace cheap with a stochastic estimate. Both still need an ODE solver. When the vector field is linear, , the solution has a closed form, the matrix exponential, and so do its inverse and its log-determinant. MatrixExponential is that solution plus a shift that switches on with time. It is the simplest neural flow Biloš et al., 2021, a model of the solution map itself rather than of the vector field. The matrix-exponential example shows it pushing a circle, fitting a tilted Gaussian and sweeping ; here we derive why it works and measure where it stops.
import subprocess
import sys
try:
import google.colab # noqa: F401
IN_COLAB = True
except ImportError:
IN_COLAB = False
if IN_COLAB:
repo = "git+https://github.com/jejjohnson/gauss_flows@main"
subprocess.run(
[
sys.executable,
"-m",
"pip",
"install",
"-q",
f"gauss-flows-maps @ {repo}#subdirectory=packages/gauss-flows-maps",
f"gauss-flows-models @ {repo}#subdirectory=packages/gauss-flows-models",
f"gauss-flows-docs[notebooks] @ {repo}#subdirectory=docs",
],
check=True,
)import warnings
warnings.filterwarnings("ignore", message=r".*IProgress.*")
import equinox as eqx
import jax
import jax.numpy as jnp
import jax.random as jr
import matplotlib.pyplot as plt
import numpy as np
import optax
from flowjax.bijections import Scan
from flowjax.distributions import StandardNormal, Transformed
from jaxtyping import ArrayLike, Float
from pipekit_train import ArrayDataset, TrainingLoop
from pipekit_train.backends.equinox import EquinoxModelOp
from scipy import stats
from sklearn.datasets import make_moons
from gauss_flows_docs.environment import watermark
from gauss_flows_docs.plotting import (
DATA_COLOR,
GAUSS_KW,
LATENT_COLOR,
SCATTER_KW,
style_ax,
use_compact_figures,
)
from gauss_flows_maps.bijections import MatrixExponential
from gauss_flows_maps.conditioning import pack_time_control
from gauss_flows_models.inference import negative_log_likelihood
from gauss_flows_models.info_theory import gaussian_entropy
jax.config.update("jax_enable_x64", True)
np.set_printoptions(precision=3, suppress=True)
rng = np.random.default_rng(0)
# Figures are stored as palette PNGs to keep the notebook small.
use_compact_figures()
watermark("jax", "numpy", "optax", "flowjax", "pipekit_train", "gauss_flows_maps")Python implementation: CPython
Python version : 3.13.12
IPython version : 9.12.0
jax : 0.12.1
numpy : 2.4.3
optax : 0.2.8
flowjax : 19.1.0
pipekit_train : 0.3.4
gauss_flows_maps: 0.3.1
Compiler : Clang 21.1.4
OS : Linux
Release : 6.8.0-1044-azure
Machine : x86_64
Processor : x86_64
CPU cores : 16
Architecture: 64bit
1. The layer¶
MatrixExponential maps a point at a time to
where the generator (the layer’s W) and the offset are its weights, and the time gate is a scalar function with : by default (TimeIdentity), or a small network built to vanish at zero (TimeTanh, TimeFourier). The time enters as the layer’s condition, packed by pack_time_control. At the exponential is and the shift is zero, so the layer is the identity whatever its weights. We build one with weights large enough to see and apply it at and .
# Shapes: state (D_x) = 2
# today (gauss_flows)
# z = e^{tA} x + φ(t) b, with A and b drawn from 𝒩(0, 0.6²) and φ(t) = t
layer: MatrixExponential = MatrixExponential(jr.key(0), shape=(2,), w_init_scale=0.6)
# x ~ 𝒩(0, I), (state)
point: Float[ArrayLike, " state"] = jr.normal(jr.key(1), (2,))
# today (gauss_flows)
# t = 0 as the layer's condition, (1)
time_zero: Float[ArrayLike, " 1"] = pack_time_control(0.0)
# today (gauss_flows)
# t = 1 as the layer's condition, (1)
time_one: Float[ArrayLike, " 1"] = pack_time_control(1.0)
print(f"x = {np.asarray(point)}")
print(f"z at t = 0 = {np.asarray(layer.transform(point, time_zero))}")
print(f"z at t = 1 = {np.asarray(layer.transform(point, time_one))}")x = [-1.184 -0.116]
z at t = 0 = [-1.184 -0.116]
z at t = 1 = [-4.235 -0.662]
The layer returns its input at bit for bit. The default w_init_scale is 10-2, which starts a fresh layer close to the identity at as well, the same start the couplings of Part 5 take; unlike the mixture couplings there (gauss_flows#265), nothing in the layer is interchangeable, so each weight gets its own gradient from the first step.
# today (gauss_flows)
# A of a fresh layer, drawn from 𝒩(0, 0.01²), (state, state)
fresh_generator: Float[ArrayLike, "state state"] = MatrixExponential(
jr.key(0), shape=(2,)
).W
print(f"fresh A =\n{np.asarray(fresh_generator)}")fresh A =
[[ 0.019 -0.005]
[ 0.004 0.024]]
2. The log-determinant and the inverse in closed form¶
The Jacobian of (1) in is , whatever and are. Jacobi’s formula, which says that the determinant of the exponential of a square matrix is the exponential of its trace, turns the log-determinant into a trace:
It needs no ODE solve and no trace estimate, and it does not depend on : the layer changes every volume by the same factor. The determinant is always positive, so the layer never flips orientation. The inverse is the same exponential at , because :
We check (2) against the log-determinant of the autodiff Jacobian at 21 times in .
# Shapes: time (N_q) = 21 query times
PerTime = Float[ArrayLike, " time"]
# tᵢ, 21 times evenly spread over [−1, 1], (time)
query_times: PerTime = jnp.linspace(-1.0, 1.0, 21)
# user
# log |det ∂z/∂x| at time t, from a dense LU of the autodiff Jacobian
def autodiff_log_det(time: float) -> float:
"""The log-determinant of the layer's Jacobian at ``point`` and ``time``, by autodiff."""
# today (gauss_flows)
# J = ∂z/∂x at t, (latent, state)
jacobian: Float[ArrayLike, "latent state"] = jax.jacfwd(layer.transform)(
point, pack_time_control(time)
)
return jnp.linalg.slogdet(jacobian)[1]
# user
# log |det J| at each tᵢ, by autodiff, (time)
dense_log_dets: PerTime = jax.vmap(autodiff_log_det)(query_times)
# tᵢ tr(A), (time)
closed_log_dets: PerTime = query_times * jnp.trace(layer.W)
print(f"tr(A) = {float(jnp.trace(layer.W)):+.4f}")
print(
f"max |autodiff - t tr(A)| over 21 times: {float(jnp.abs(dense_log_dets - closed_log_dets).max()):.1e}"
)tr(A) = +2.5571
max |autodiff - t tr(A)| over 21 times: 4.4e-16
The two agree to machine precision. The layer’s own transform_and_log_det returns the closed form, and its inverse applies (3). We round-trip 2,000 points at with the test of (4).
# Shapes: sample (N) = 2,000
SampleState = Float[ArrayLike, "sample state"]
# x ~ 𝒩(0, I), (sample, state)
samples: SampleState = jr.normal(jr.key(2), (2000, 2))
# today (gauss_flows)
# z = e^{A} x + b at t = 1, (sample, latent)
latents: Float[ArrayLike, "sample latent"] = jax.vmap(
layer.transform, in_axes=(0, None)
)(samples, time_one)
# today (gauss_flows)
# x̂ = e^{−A} (z − b), (sample, state)
recovered: SampleState = jax.vmap(layer.inverse, in_axes=(0, None))(latents, time_one)
print(f"round trip, max |x̂ - x| = {float(jnp.abs(recovered - samples).max()):.1e}")round trip, max |x̂ - x| = 8.9e-16
When is skew-symmetric, with , its trace is zero and is the rotation of (6): the layer keeps every volume, and its linear part is one of the orthogonal maps of Part 2. We set the generator of a layer without a shift to the skew part of the one above.
StateMatrix = Float[ArrayLike, "state state"]
# S = A − Aᵀ, (state, state)
skew_generator: StateMatrix = layer.W - layer.W.T
# today (gauss_flows)
# z = e^{tS} x, a layer with no shift
unshifted: MatrixExponential = MatrixExponential(jr.key(0), shape=(2,), use_bias=False)
# today (equinox)
# the same layer with S as its generator
skew_layer: MatrixExponential = eqx.tree_at(lambda m: m.W, unshifted, skew_generator)
# today (gauss_flows)
# Q = e^{S}, the Jacobian at t = 1, (latent, state)
rotation: Float[ArrayLike, "latent state"] = jax.jacfwd(skew_layer.transform)(
point, time_one
)
print(f"max |QᵀQ - I| = {float(jnp.abs(rotation.T @ rotation - jnp.eye(2)).max()):.1e}")
print(
f"log_det = {float(skew_layer.transform_and_log_det(point, time_one)[1]):+.1e}"
)max |QᵀQ - I| = 2.2e-16
log_det = +0.0e+00
3. A flow, but of which ODE?¶
Without the shift, the layer is the exact flow of the linear ODE , and flows compose in time:
so the map at time followed by the map at time is the map at time . The shift breaks this. Differentiating (1) in and replacing by (3) gives the vector field the layer follows:
Its second term depends on (for the default it is , constant only when ), so the layer is the flow of a time-dependent vector field. It is still a neural flow in the sense of Biloš et al. (2021), the identity at and invertible at every , but two steps in time are no longer one longer step. We measure both statements, with and .
# user
# the layer's map at time t, z = e^{tA} x + φ(t) b
def flow_map(
flow_layer: MatrixExponential, time: float, state: Float[ArrayLike, " state"]
) -> Float[ArrayLike, " latent"]:
"""The output of ``flow_layer`` for ``state`` at ``time``."""
# today (gauss_flows)
# z = e^{tA} x + φ(t) b, (latent)
return flow_layer.transform(state, pack_time_control(time))
# today (gauss_flows)
# the layer above without its shift, z = e^{tA} x
linear_layer: MatrixExponential = eqx.tree_at(lambda m: m.W, unshifted, layer.W)
for name, flow_layer in [("no shift", linear_layer), ("with shift", layer)]:
# user
# F(0.3, F(0.5, x)) − F(0.8, x), (latent)
gap: Float[ArrayLike, " latent"] = flow_map(
flow_layer, 0.3, flow_map(flow_layer, 0.5, point)
) - flow_map(flow_layer, 0.8, point)
print(
f"{name:>10}: max |F(0.3, F(0.5, x)) - F(0.8, x)| = {float(jnp.abs(gap).max()):.1e}"
) no shift: max |F(0.3, F(0.5, x)) - F(0.8, x)| = 8.9e-16
with shift: max |F(0.3, F(0.5, x)) - F(0.8, x)| = 2.2e-01
Without the shift the two agree to machine precision; with it they differ by a fifth of a unit. The field (5) is still exact: we compare the time derivative of the layer’s output, by autodiff, with its right-hand side at .
# today (gauss_flows)
# dz/dt at t = 0.5, by autodiff in t, (latent)
time_derivative: Float[ArrayLike, " latent"] = jax.jacfwd(flow_map, argnums=1)(
layer, 0.5, point
)
# user
# z at t = 0.5, (latent)
half_way: Float[ArrayLike, " latent"] = flow_map(layer, 0.5, point)
# A z + (φ'(t) I − φ(t) A) b with φ(t) = t, at t = 0.5, (latent)
field: Float[ArrayLike, " latent"] = (
layer.W @ half_way + (jnp.eye(2) - 0.5 * layer.W) @ layer.b
)
print(f"max |dz/dt - field| = {float(jnp.abs(time_derivative - field).max()):.1e}")max |dz/dt - field| = 5.0e-16
4. Trained at : the ceiling of an affine map¶
To fit a density we pin the time at for every point, as the example does, and train by maximum likelihood with the recipe of Part 4. At a fixed time a layer is an affine map of , and so is a chain of them, so the flow’s density is a Gaussian whatever its depth. On training rows with sample mean and sample covariance (divided by ), the best Gaussian is the one with those moments, and its mean negative log-likelihood (1) is the entropy (2) of that Gaussian:
One layer can reach it: the symmetric square root is the exponential of . On data that is not Gaussian, the ceiling lies above the data’s own entropy by its negentropy (3), and no number of layers closes that gap. We test both statements on a tilted Gaussian and on two moons, with one layer and with three.
# Shapes: sample (N) = 2,000; train (N_t) = 1,600 rows; held_out (N_v) = 400 rows
# R, the rotation by π/6, (state, state)
tilt: StateMatrix = np.array(
[[np.cos(np.pi / 6), -np.sin(np.pi / 6)], [np.sin(np.pi / 6), np.cos(np.pi / 6)]]
)
# x = R diag(1.7, 0.7) w + (0.5, −0.5), with w ~ 𝒩(0, I), (sample, state)
gaussian_points: SampleState = (
rng.standard_normal((2000, 2)) * [1.7, 0.7]
) @ tilt.T + [
0.5,
-0.5,
]
# two moons with noise 0.06, (sample, state)
moon_points: SampleState = make_moons(2000, noise=0.06, random_state=0)[0]
# each coordinate standardised to zero mean and unit variance, (sample, state)
moon_points = (moon_points - moon_points.mean(axis=0)) / moon_points.std(axis=0)
# the two datasets by name
datasets: dict = {"tilted Gaussian": gaussian_points, "two moons": moon_points}The task is Part 4’s, with the packed time of each row passed to the flow as its condition.
# Shapes: batch (N_b) = 256
Scalar = Float[ArrayLike, ""]
# user
# pipekit-train's task: 𝓛(θ) at the packed times of one batch
class TimedFlowNLL:
"""pipekit-train's task: the mean negative log-likelihood of a batch at its times."""
# user
# 𝓛(θ) = −(1/N_b) ∑ₙ log p_x(xₙ | tₙ; θ), also logged
def loss_fn(self, flow, batch, key):
# the points of the batch and their packed times, (batch, state), (batch, 1)
batch_points: Float[ArrayLike, "batch state"]
batch_times: Float[ArrayLike, "batch 1"]
batch_points, batch_times = batch
# today (gauss_flows)
# −(1/N_b) ∑ₙ log p_x(xₙ | tₙ; θ)
loss: Scalar = negative_log_likelihood(
flow, batch_points, condition=batch_times
)
return loss, {"loss": loss}Every run takes 2,000 Adam steps of 256 rows on a one-cycle cosine rate that peaks at 10-2, with the gradient clipped to a global norm of 1. The chain starts from fresh layers, near the identity.
# Shapes: step = 2,000 training steps
# today (optax)
# the learning rate of each step: up to 10⁻², then down to almost zero
schedule: optax.Schedule = optax.cosine_onecycle_schedule(
transition_steps=2000, peak_value=1e-2
)
# the settings every run shares
loop_settings: dict = {
"task": TimedFlowNLL(),
"optimizer_config": {"name": "adam", "lr": schedule, "clip_norm": 1.0},
"max_steps": 2000,
"steps_per_epoch": 100,
"log_every_n_steps": 100,
"batch_size": 256,
"seed": 1,
}fit_chain builds a chain of fresh layers and trains it. The layers share one type and differ only in their weights, so they are built at once with eqx.filter_vmap and applied in turn by FlowJax’s Scan.
# user
# p_x = (e^{A_K} … e^{A_1})_# 𝒩(0, I) at t = 1, trained on the first 1,600 rows
def fit_chain(points: SampleState, depth: int) -> Transformed:
"""A chain of ``depth`` fresh layers on a standard normal, trained at t = 1."""
# today (gauss_flows)
# depth fresh layers stacked on a leading axis, each with A, b ~ 𝒩(0, 0.01²)
layers: MatrixExponential = eqx.filter_vmap(
lambda key: MatrixExponential(key, shape=(2,))
)(jr.split(jr.key(3), depth))
# today (flowjax)
# the layers applied in turn, on a standard-normal base
flow: Transformed = Transformed(StandardNormal((2,)), Scan(layers))
# today (pipekit)
# the training rows, each with t = 1 as its condition
train_data = ArrayDataset(points[:1600], jnp.broadcast_to(time_one, (1600, 1)))
# today (pipekit)
# θ after 2,000 steps, held by the model op
trained_op: EquinoxModelOp
trained_op, _ = TrainingLoop(
EquinoxModelOp(flow), train_data, **loop_settings
).run()
return trained_op.moduleWe train four flows, one and three layers on each dataset, and compare their training loss with the ceiling (6), which gaussian_entropy computes from the sample covariance.
PerSample = Float[ArrayLike, " sample"]
# user
# 𝓛 = −(1/N) ∑ₙ log p_x(xₙ | t)
def mean_nll(flow: Transformed, points: SampleState, time: float) -> float:
"""The mean negative log-likelihood of ``points`` under ``flow`` at ``time``."""
# today (gauss_flows)
# t as the condition of every row, (sample, 1)
times: Float[ArrayLike, "sample 1"] = jnp.broadcast_to(
pack_time_control(time), (len(points), 1)
)
# today (gauss_flows)
# −(1/N) ∑ₙ log p_x(xₙ | t)
return float(negative_log_likelihood(flow, points, condition=times))
# user
# the four trained flows, keyed by dataset and depth
fits: dict = {
(name, depth): fit_chain(points, depth)
for name, points in datasets.items()
for depth in (1, 3)
}for (name, depth), flow in fits.items():
# the rows the flow was trained on, (train, state)
train_points: Float[ArrayLike, "train state"] = datasets[name][:1600]
# today (gauss_flows)
# ½ log det(2πe Σ̂_x) of the training rows
ceiling: float = float(gaussian_entropy(jnp.cov(train_points.T, bias=True)))
print(
f"{name:>15}, {depth} layer(s): training NLL {mean_nll(flow, train_points, 1.0):.4f}, ceiling {ceiling:.4f}, held-out NLL {mean_nll(flow, datasets[name][1600:], 1.0):.4f}"
)tilted Gaussian, 1 layer(s): training NLL 3.0135, ceiling 3.0135, held-out NLL 2.9864
tilted Gaussian, 3 layer(s): training NLL 3.0135, ceiling 3.0135, held-out NLL 2.9863
two moons, 1 layer(s): training NLL 2.7341, ceiling 2.7341, held-out NLL 2.6934
two moons, 3 layer(s): training NLL 2.7341, ceiling 2.7341, held-out NLL 2.6935
Every flow ends on the ceiling to four decimals, with one layer as with three: depth adds parameters but not a single new density. On the tilted Gaussian the ceiling is the right answer. On the moons it is not, and the latent shows what is missing. We send the 400 held-out rows of each dataset through the three-layer flow and read the moments of the latent.
# user
# z = f⁻¹(x) at t = 1, the latent of each held-out row
def to_latent(
flow: Transformed, points: SampleState
) -> Float[ArrayLike, "sample latent"]:
"""The latent of each row of ``points`` under ``flow`` at t = 1."""
# today (flowjax)
# x = e^{A_K} … (e^{A_1} z + b_1) … + b_K inverted layer by layer, (sample, latent)
return jax.vmap(flow.bijection.inverse, in_axes=(0, None))(points, time_one)
# user
# the held-out latent of each dataset under its three-layer flow
held_latents: dict = {
name: to_latent(fits[(name, 3)], points[1600:]) for name, points in datasets.items()
}
for name, latent in held_latents.items():
print(
f"{name:>15}: mean {np.asarray(latent.mean(axis=0))}, correlation {np.corrcoef(np.asarray(latent).T)[0, 1]:+.3f}, excess kurtosis {stats.kurtosis(np.asarray(latent), axis=0)}"
)tilted Gaussian: mean [-0. 0.101], correlation -0.056, excess kurtosis [-0.258 -0.267]
two moons: mean [-0.084 0.007], correlation -0.004, excess kurtosis [-0.6 -1.17]
circle: Float[ArrayLike, "sample state"] = np.column_stack(
[np.cos(np.linspace(0, 2 * np.pi, 200)), np.sin(np.linspace(0, 2 * np.pi, 200))]
)
fig, axes = plt.subplots(2, 2, figsize=(8, 8))
for row, (name, points) in zip(axes, datasets.items(), strict=True):
row[0].scatter(*np.asarray(points[1600:]).T, color=DATA_COLOR, **SCATTER_KW)
row[1].scatter(*np.asarray(held_latents[name]).T, color=LATENT_COLOR, **SCATTER_KW)
for radius in (1.0, 2.0):
row[1].plot(*(radius * circle).T, **GAUSS_KW)
row[0].set(title=f"{name}, data", xlabel="x₁", ylabel="x₂")
row[1].set(
title=f"{name}, latent",
xlabel="z₁",
ylabel="z₂",
xlim=(-3.2, 3.2),
ylim=(-3.2, 3.2),
)
for ax in row:
ax.set_aspect("equal")
style_ax(ax)
fig.tight_layout()
plt.show()
Figure 1:Each dataset (left) and the latent of its 400 held-out rows under a trained three-layer chain at t = 1 (right), with the circles of radius 1 and 2 of N(0, I). The Gaussian becomes a round cloud; the moons are whitened but stay two crescents.
Both latents have a mean near zero and almost no correlation on these held-out rows: an affine flow whitens. The Gaussian’s latent has an excess kurtosis (2) of -0.26 in each coordinate, about one standard error () from zero, as a normal sample of 400 rows would. The moons’ are -0.60 and -1.17, two and a half and almost five standard errors below zero: their tails are too light, with the mass pushed out to the two crescents. Whitening is all an affine map can do, so its training loss stops at the ceiling and the shape of the moons survives; bending them needs a map that is not linear in , an FFJORD field (notebook 00) or the couplings of Part 5.
5. The times nobody trained¶
The flow was trained at only, but it is defined at every , and the example sweeps to show the family that runs from the base at to the fit at . Nothing in the loss asks anything of that family between the two ends: the path is whatever the parameterisation happens to give. We measure the held-out NLL of each three-layer flow on a grid of times from 0 to 1.5.
# Shapes: time (N_q) = 31 query times
# tᵢ, 31 times evenly spread over [0, 1.5], (time)
sweep_times: PerTime = np.linspace(0.0, 1.5, 31)
# user
# held-out 𝓛 at each tᵢ, for each dataset
sweep_nll: dict = {
name: np.array(
[mean_nll(fits[(name, 3)], points[1600:], float(time)) for time in sweep_times]
)
for name, points in datasets.items()
}
for name, curve in sweep_nll.items():
print(
f"{name:>15}: NLL {curve[0]:.3f} at t = 0, {curve[20]:.3f} at t = 1, lowest {curve.min():.3f} at t = {sweep_times[curve.argmin()]:.2f}"
)tilted Gaussian: NLL 3.646 at t = 0, 2.986 at t = 1, lowest 2.981 at t = 0.90
two moons: NLL 2.805 at t = 0, 2.694 at t = 1, lowest 2.694 at t = 1.00
fig, ax = plt.subplots(figsize=(6, 4))
for name, curve in sweep_nll.items():
ax.plot(sweep_times, curve, marker="o", markersize=3, label=name)
ax.axvline(1.0, color="0.5", ls=":")
ax.set(
xlabel="time t", ylabel="held-out NLL (nats)", title="NLL of p_t on held-out rows"
)
ax.legend()
style_ax(ax)
fig.tight_layout()
plt.show()
Figure 2:Held-out NLL of each trained three-layer chain at the times from 0 to 1.5. Training fixed only t = 1 (dotted); at t = 0 every chain is the identity and its NLL is that of the data under N(0, I).
Both curves fall smoothly from the identity at to a minimum close to and rise again past it. For the moons the minimum is at ; for the Gaussian it is at , 0.005 nats below the trained time, so on held-out rows even the end the loss fixed is not quite the best time. The smoothness comes from the exponential, not from the data: the loss saw only , so the intermediate densities interpolate the two ends without being fitted to anything. To make the intermediate times mean something, the training data has to carry them, as in the conditional flows that take time as a covariate.
Recap¶
| Piece | Equation | In code |
|---|---|---|
| the layer, the identity at | (1) | MatrixExponential, pack_time_control(t) |
| the log-determinant, a trace | (2) | layer.transform_and_log_det |
| the inverse, the exponential at | (3) | layer.inverse |
| a skew-symmetric generator is a rotation | (6) | eqx.tree_at(lambda m: m.W, …) |
| the linear part composes in time, the shift does not | (4) | |
| the time-dependent field the layer follows | (5) | jax.jacfwd(flow_map, argnums=1) |
| the ceiling of any affine flow | (6) | gaussian_entropy of the sample covariance |
Next. A matrix-exponential flow is exact and cheap but affine at any fixed time, and FFJORD is free-form but needs a solver for every density. Notebook 03 puts a neural ODE inside a variational autoencoder: the ODE models whole trajectories, and the Gaussian is asked of a latent code rather than of the data.
- Biloš, M., Sommer, J., Rangapuram, S. S., Januschowski, T., & Günnemann, S. (2021). Neural Flows: Efficient Alternative to Neural ODEs. Advances in Neural Information Processing Systems (NeurIPS).