<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PDE &amp; ML on Chen Kai Blog</title><link>https://www.chenk.top/en/pde-ml/</link><description>Recent content in PDE &amp; ML on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 14 Aug 2024 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/pde-ml/index.xml" rel="self" type="application/rss+xml"/><item><title>PDE and Machine Learning (8): Reaction-Diffusion Systems and Graph Neural Networks</title><link>https://www.chenk.top/en/pde-ml/08-reaction-diffusion-systems/</link><pubDate>Wed, 14 Aug 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/08-reaction-diffusion-systems/</guid><description>&lt;h2 id="what-this-article-covers">What This Article Covers&lt;/h2>
&lt;p>Stack 32 layers of GCN on a citation graph and accuracy collapses from 81 % to 20 %. Every node converges to the same vector. This is &lt;strong>over-smoothing&lt;/strong>, the GNN equivalent of heat death — and the diagnosis comes straight from PDE theory. &lt;strong>A GCN layer is one explicit-Euler step of the heat equation on a graph&lt;/strong>, and the heat equation has exactly one fixed point: the constant. The cure was published in 1952. Alan Turing showed that adding a &lt;em>reaction&lt;/em> term to a diffusion equation can make a uniform state spontaneously break apart into stripes, spots, or labyrinths. The same trick — a learned reaction term — keeps deep GNNs alive.&lt;/p></description></item><item><title>PDE and Machine Learning (7): Diffusion Models and Score Matching</title><link>https://www.chenk.top/en/pde-ml/07-diffusion-models/</link><pubDate>Tue, 30 Jul 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/07-diffusion-models/</guid><description>&lt;h2 id="what-this-article-covers">What This Article Covers&lt;/h2>
&lt;p>Since 2020, &lt;strong>diffusion models&lt;/strong> have become the dominant paradigm in generative AI. From DALL·E 2 to Stable Diffusion to Sora, their generation quality and training stability are unmatched by GANs and VAEs. Beneath this success lies a remarkably clean mathematical structure: &lt;strong>diffusion models are numerical solvers for partial differential equations&lt;/strong>.&lt;/p>
&lt;ul>
&lt;li>Adding Gaussian noise corresponds to integrating the &lt;strong>Fokker–Planck equation&lt;/strong> forward in time.&lt;/li>
&lt;li>Learning to denoise is equivalent to learning the &lt;strong>score function&lt;/strong> $\nabla\log p_t$.&lt;/li>
&lt;li>DDPM is a discretised &lt;strong>reverse SDE&lt;/strong>; DDIM is the corresponding &lt;strong>probability-flow ODE&lt;/strong>.&lt;/li>
&lt;li>Stable Diffusion is the same machinery, executed in a low-dimensional latent space.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>What you will learn&lt;/strong>&lt;/p></description></item><item><title>PDE and Machine Learning (6): Continuous Normalizing Flows and Neural ODE</title><link>https://www.chenk.top/en/pde-ml/06-continuous-normalizing-flows/</link><pubDate>Mon, 15 Jul 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/06-continuous-normalizing-flows/</guid><description>&lt;h2 id="what-this-article-covers">What This Article Covers&lt;/h2>
&lt;p>Generative modeling reduces to one geometric question: &lt;strong>how do you transform a simple distribution (a Gaussian) into a complex one (faces, molecules, motion)?&lt;/strong> Discrete normalizing flows stack invertible blocks, but each block needs a Jacobian determinant at $O(d^3)$ cost. &lt;strong>Neural ODEs&lt;/strong> replace discrete depth with a continuous ODE; &lt;strong>Continuous Normalizing Flows (CNF)&lt;/strong> then push densities through that ODE using the &lt;em>instantaneous&lt;/em> change-of-variables formula, dropping density computation to $O(d)$. &lt;strong>Flow Matching&lt;/strong> removes the divergence integral altogether and turns training into plain regression on a target velocity field.&lt;/p></description></item><item><title>PDE and Machine Learning (5): Symplectic Geometry and Structure-Preserving Networks</title><link>https://www.chenk.top/en/pde-ml/05-symplectic-geometry/</link><pubDate>Sun, 30 Jun 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/05-symplectic-geometry/</guid><description>&lt;h2 id="what-this-article-covers">What this article covers&lt;/h2>
&lt;p>Train an unconstrained neural network on pendulum data and ask it to extrapolate. After a few seconds of integration the prediction is fine; after a minute the pendulum has either crept to a halt or, more often, accelerated to escape velocity. Energy was supposed to be conserved, but the network has no idea what energy is. The bug is not in the data, the optimizer, or the depth of the network. &lt;strong>The bug is in the architecture.&lt;/strong> A standard MLP can represent any vector field, including unphysical ones, and a tiny systematic bias in that vector field is amplified into macroscopic energy drift over a long rollout.&lt;/p></description></item><item><title>PDE and Machine Learning (4): Variational Inference and the Fokker-Planck Equation</title><link>https://www.chenk.top/en/pde-ml/04-variational-inference/</link><pubDate>Sat, 15 Jun 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/04-variational-inference/</guid><description>&lt;h2 id="seven-dimensions-of-this-article">Seven Dimensions of This Article&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Motivation&lt;/strong>: why VI and MCMC look different but solve the same PDE.&lt;/li>
&lt;li>&lt;strong>Theory&lt;/strong>: derivation of the Fokker-Planck equation from the SDE.&lt;/li>
&lt;li>&lt;strong>Geometry&lt;/strong>: KL divergence as a Wasserstein gradient flow.&lt;/li>
&lt;li>&lt;strong>Algorithms&lt;/strong>: Langevin Monte Carlo, mean-field VI, and SVGD.&lt;/li>
&lt;li>&lt;strong>Convergence&lt;/strong>: log-Sobolev inequality and exponential KL decay.&lt;/li>
&lt;li>&lt;strong>Numerical experiments&lt;/strong>: 7 figures with reproducible code.&lt;/li>
&lt;li>&lt;strong>Application&lt;/strong>: Bayesian neural networks via posterior sampling.&lt;/li>
&lt;/ol>
&lt;h2 id="what-you-will-learn">What You Will Learn&lt;/h2>
&lt;ul>
&lt;li>How the Fokker-Planck equation governs probability density evolution from any Itô SDE.&lt;/li>
&lt;li>Langevin dynamics as a practical sampling algorithm and its discretization error.&lt;/li>
&lt;li>Why minimizing $\mathrm{KL}(q\|p^\star)$ in Wasserstein space &lt;em>is&lt;/em> the Fokker-Planck PDE.&lt;/li>
&lt;li>The deep equivalence between variational inference and Langevin MCMC in continuous time.&lt;/li>
&lt;li>Stein Variational Gradient Descent (SVGD): a deterministic particle method that bridges both worlds.&lt;/li>
&lt;li>Practical posterior inference for Bayesian neural networks.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>Probability theory (Bayes&amp;rsquo; rule, KL divergence, expectations).&lt;/li>
&lt;li>Wasserstein gradient flows from Part 3.&lt;/li>
&lt;li>Light stochastic calculus intuition (Brownian motion, Itô integral).&lt;/li>
&lt;li>Python / PyTorch for the experiments.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="1-the-inference-problem">1. The Inference Problem&lt;/h2>
&lt;p>Bayesian inference asks for the posterior&lt;/p></description></item><item><title>PDE and Machine Learning (3): Variational Principles and Optimization</title><link>https://www.chenk.top/en/pde-ml/03-variational-principles/</link><pubDate>Fri, 31 May 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/03-variational-principles/</guid><description>&lt;p>What is the essence of neural-network training? When we run gradient descent in a high-dimensional parameter space, is there a deeper continuous-time dynamics at work? As the network width tends to infinity, does discrete parameter updating converge to some elegant partial differential equation? The answers live at the intersection of the calculus of variations, optimal transport, and PDE theory.&lt;/p>
&lt;p>The last decade of deep-learning success has rested mostly on engineering intuition. Recently, however, mathematicians have made a striking observation: &lt;strong>viewing a neural network as a particle system on the space of probability measures&lt;/strong>, and studying its evolution under Wasserstein geometry, exposes the global structure of training — convergence guarantees, the role of over-parameterization, the meaning of initialization. The tool that makes this visible is &lt;strong>the variational principle&lt;/strong> — from least action in physics, through the JKO scheme of modern optimal transport, to the mean-field limit of neural networks.&lt;/p></description></item><item><title>PDE and Machine Learning (2) — Neural Operator Theory</title><link>https://www.chenk.top/en/pde-ml/02-neural-operator-theory/</link><pubDate>Thu, 16 May 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/02-neural-operator-theory/</guid><description>&lt;p>A classical PDE solver — finite difference, finite element, spectral — is a function: feed it one initial condition and one set of coefficients, get back one solution. A PINN is the same kind of object dressed in neural-network clothes: each new initial condition demands a fresh round of training. Switch the inflow velocity on a wing or move a single sensor reading in a forecast and you reset the clock.&lt;/p></description></item><item><title>PDE and Machine Learning (1): Physics-Informed Neural Networks</title><link>https://www.chenk.top/en/pde-ml/01-physics-informed-neural-networks/</link><pubDate>Wed, 01 May 2024 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/pde-ml/01-physics-informed-neural-networks/</guid><description>&lt;blockquote>
&lt;p>&lt;strong>Series chapter 1 — about a 35-minute read.&lt;/strong> This is the foundation of the entire series. Neural operators, variational principles, score matching — every later chapter is, at heart, &lt;em>the same idea&lt;/em>: how do we encode physical or mathematical constraints directly into the optimisation objective of a neural network? Get PINNs right and the rest is &amp;ldquo;swap one constraint for another&amp;rdquo;.&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="1-prologue-a-metal-rod">1 Prologue: a metal rod&lt;/h2>
&lt;p>Suppose you want the temperature distribution $u(x,t)$ along a metal rod. Half a century of numerical analysis offers two standard answers:&lt;/p></description></item></channel></rss>