Causal Training
TL;DR
Time-dependent PDEs must be solved forward in time, but the plain PINN loss lets the network fit late times before early ones — and converge to garbage. Causal weighting gates each time slice by the cumulative residual of everything earlier. Based on Wang, Sankaran & Perdikaris, Respecting Causality for Training PINNs, CMAME 2024.
The problem: PINNs violate causality
Minimizing the residual uniformly over
The fix: gate the residual by earlier convergence
Partition the temporal domain into
with stop_gradient). Slice
The causality parameter causal/min_weight).
In JAXPI
ForwardIVP implements the scheme by time-sorting each collocation batch (UniformSampler does this by default) and splitting it into num_chunks slices:
causal.enabled = True
causal.num_chunks = 32 # N_t
causal.tol = 1.0 # epsilonUnder multi-GPU sharding, per-chunk losses are all_gather-ed across devices in global time order before the gates are computed, so causality is exact for any device count — this equivalence is covered by the test suite.
Where it's used
Enabled in most time-dependent baselines; the cleanest demonstrations are Allen–Cahn (without it, the network collapses to the trivial equilibrium) and Advection at