Tangential probability-flow sampler
Implementation & benchmark of arXiv:2607.28344 — Reflected diffusion, no-flux continuity equations and confined Lagrangian flows in bounded domains
Source paper: Reflected diffusion, no-flux continuity equations and confined Lagrangian flows in bounded domains arXiv:2607.28344 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Modify the probability-flow ODE of a reflected diffusion so that its learned velocity is tangent to the constraint boundary. Use an exact tangent projection for box or sphere constraints, or a smooth boundary-collar correction for general domains, and train with an additional penalty on the predicted normal flux. This prevents numerical trajectories from leaving the domain and targets the no-flux structure directly instead of clipping samples after each solver step.
Formulas
Mathematical statement
The paper studies the reflected diffusion dX_t=f(X_t,t)dt+sigma(t)dW_t-nu(X_t)dL_t in a bounded domain Omega, where nu is the outward unit normal and L_t is boundary local time. Its density rho_t satisfies the no-flux Fokker-Planck equation with probability current J_t=f rho_t-(sigma(t)^2/2) grad rho_t and boundary condition J_t dot nu=0. Writing J_t=rho_t v_t gives the probability-flow velocity v_t=f-(sigma(t)^2/2) grad log rho_t=f-(sigma(t)^2/2)s_t, where s_t=grad log rho_t is the score. At boundary points with positive density, the no-flux condition implies v_t dot nu=0, namely tangency. For a differentiable defining function g with Omega={x:g(x)<=0} and grad g nonzero on the boundary, define nu=grad g divided by its norm and P_T=I-nu nu^T. The adapted sampler uses a collar correction that removes the normal component at the wall. The correction is exactly tangent on the boundary. Because projection changes the interior continuity equation, this is an implementable constrained approximation unless the learned velocity already satisfies no-flux. The paper's boundary-current counterexample motivates monitoring compressibility through particle density near the boundary, not merely checking whether individual samples stay inside.
Implementation notes
(1) Integration point: replace the drift evaluation in the reverse or probability-flow ODE sampler. Given state x, time t, score network s_theta(x,t), known forward drift f(x,t), diffusion scale sigma(t), domain function g(x), and normal nu(x), compute v=f-0.5 sigma^2 s_theta. Apply the collar correction only when abs(g(x)) is less than epsilon. For a box, use the normal of the closest active face; for a sphere, use nu=x divided by its norm; for a general implicit domain use nu=grad g divided by the norm of grad g. (2) Pseudocode: v = f(x,t) - 0.5*sigma(t)**2*score_theta(x,t); a=clip(1-abs(g(x))/eps,0,1); v=v-a*dot(v,nu(x))*nu(x); x=x+dt*v. If a solver step exits the domain, optionally apply one differentiable projection back to g<=0, but count these events separately. (3) During score training, add lambda_bc * a * dot(v,nu(x))**2 at noisy samples in the boundary collar. Estimate normals analytically for simple domains or with nu=grad(g)/norm(grad(g)); estimate violation frequency, boundary current, and compressibility empirically from particle histograms or the Jacobian trace of the corrected velocity. The paper supplies the no-flux and tangency rationale; epsilon, lambda_bc, and correction strength are experimental hyperparameters. (4) First experiment: train a small VP or VE score model on a two-dimensional Gaussian mixture truncated to [-1,1]^2 and on a disk. Compare ordinary probability flow, coordinate clipping, reflected Euler-Maruyama, and this tangent sampler at equal ODE function evaluations. Measure constraint violations, sliced Wasserstein distance to the target, boundary histogram error, and the fraction of trajectories requiring projection. The expected signal is near-zero wall crossing, fewer clipping artifacts, and lower distributional error at the same solver budget. Ablate the boundary penalty and collar correction to separate training and inference effects.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.