MilaDy · 2027

Interactive diagrams

Six diagrams to manipulate in the browser

About Each diagram is a small, self-contained JavaScript program that runs in your browser, with no server. The formulas it uses are written at the top of each file (assets/interactive/<name>.js), together with their references. These diagrams complement the figures of the report and the static or interactive diagrams of the preparation modules; they do not replace the proofs.

The six diagrams follow the order of the curriculum: the transport of probability distributions that underlies flow matching, the projection that makes a field divergence-free, the difference between a per-sample constraint and a distributional constraint, two dynamical systems from the internship, the reversal model and the ABC kinematic dynamo, then the infrastructure’s simulation pipeline.

1. Flow matching: transporting a distribution

A flow matching model transports a simple distribution, here a Gaussian, to the data distribution through a velocity field v(\mathbf{x}, t). This diagram uses the exact marginal field for a target distribution made of two symmetric Gaussians \pm\mathbf{m}(\lambda): it is the field that a network would try to learn. The slider \lambda plays the role of a physical conditioning parameter, like Rm in the internship.

Notice two things. The conditional paths \mathbf{x}_t = (1-t)\mathbf{x}_0 + t\mathbf{x}_1 are straight and often cross. The trajectories of the marginal flow are curved; two particles are never at the same point at the same time (uniqueness of solutions of the differential equation), but their tracks in the plane can intersect at different times. Conditional paths with different directions pass through the same point (\mathbf{x}, t), and v(\mathbf{x}, t) is their average. The final distribution is symmetric because the field is: this is Proposition 4 of the report at work.

Further reading: module p7 — generative models, chapter on flow matching.

2. Leray projection

Every periodic vector field decomposes into a divergence-free part and a gradient part (Helmholtz–Hodge decomposition). The Leray projection \mathbb{P} removes exactly the gradient part: in Fourier space, \hat{\mathbf{u}}_{\mathbf{k}} \mapsto \hat{\mathbf{u}}_{\mathbf{k}} - \mathbf{k}(\mathbf{k}\cdot\hat{\mathbf{u}}_{\mathbf{k}})/|\mathbf{k}|^2. The slider \alpha sets the compressible part of the field; the color map shows \nabla\cdot\mathbf{u}.

The projection can only remove energy (\|\mathbb{P}\mathbf{u}\|^2 \le \|\mathbf{u}\|^2). On a bounded domain, it would require solving a Poisson problem with boundary conditions: this is one of the reasons why the report prefers to generate potentials.

Further reading: module p1 — vector calculus and Fourier and experiment E2.

3. Distributional constraint or per-sample constraint

In a statistically stationary state, the energy variation r = \mathrm{d}E/\mathrm{d}t = P - \varepsilon fluctuates: it is zero only on average. This diagram compares three distributions of r: the true distribution, the distribution of a biased model in which each sample is projected onto r = 0, and the same distribution corrected by exponential tilting w_i \propto e^{\beta r_i}. The per-sample projection satisfies the constraint by destroying the variance; the tilting corrects the mean while distorting the distribution as little as possible in the Kullback–Leibler sense.

Check “missing support”: if the model has never produced the right tail of the true distribution, no reweighting can create it. The effective sample size collapses. This is what experiments E1 and E2 observe, and that is why the report imposes the constraint during training instead.

Further reading: module p5 — probability and optimal transport (I-projection) and module p8 — physical constraints.

4. Dipole reversals: the Gissinger model

Gissinger’s three-mode model (2012) couples a dipolar mode D, a quadrupolar mode Q and a velocity mode V. It reproduces chaotic reversals of the dipole, analogous to those of the VKS experiment. Vary \Gamma: up to \Gamma = 0.86, the trajectory stays on one side (no reversal); just above (from 0.865 on E1’s fine grid; a longer check already finds some at 0.8625), the two symmetric attractors have merged and D changes sign irregularly, rarely at first, then more and more often as \Gamma increases.

The diagram counts the zero crossings of D and compares them with the estimate given by Rice’s formula, computed from the visited states alone: \nu_0 \approx \mathbb{E}\big[|\dot D|\,\mathbf{1}_{|D|<h}\big]/(2h). This is the idea behind Proposition 8 of the report: a generative model of the stationary distribution is enough to predict the reversal frequency, without integrating in time.

Further reading: module p4 — dynamical systems and experiment E1.

5. ABC kinematic dynamo

The ABC flow (A = B = C = 1) is a kinematic dynamo: for certain values of the magnetic Reynolds number Rm = 1/\eta, an initially weak magnetic field grows exponentially. The curve shows the growth rate \lambda(Rm) computed in this repository on a 32^3 grid; the shaded areas are the dynamo windows. The map shows a slice of |\mathbf{B}| for the most unstable mode.

The measured thresholds (Rm \approx 8.87, 17.6 and 26.8) recover the known windows (8.9 < Rm < 17.5, then Rm \gtrsim 27). This computation serves as a 3D test bench for the PhD: generating eigenmodes conditioned on Rm from a vector potential.

Further reading: module p3 — MHD and the dynamo effect and experiment E3.

6. The simulation pipeline

This last diagram does not illustrate a mathematical notion but the repository’s computing tool: the pipeline that leads from a campaign of simulations to the evaluation of a model, and what changes from one target to another (laptop, cloud VM with GPU, Slurm cluster). Pick a target, then click a stage: the diagram shows what it does, what it writes to the catalog and to storage, and the exact command on that target. The “Follow a campaign” button walks through the seven stages.

Further reading: page Computing and data, Figures 1 and 2.

Sources