Korteweg–de Vries
Soliton dynamics with third-order dispersion:
with periodic boundaries and
Results
relative L2 error 1.5e-04recipe adaptive pseudo-time50k steps, single GPU
Adaptive pseudo-time stepping gives the best result on KdV: 1.5e-04 relative L2 error, about 2× better than the plain baseline (2.9e-04). The soliton train's fine dispersive structure is where the damping term helps — it suppresses the transient oscillations the optimizer otherwise chases during soliton fission. This example is also our cleanest optimizer comparison: swapping SOAP for Adam at identical settings costs 8× (2.2e-03) — see the SOAP deep-dive.


Run
bash
cd examples/kdv
python3 main.py --config=configs/pseudo_time.py| Config | Description |
|---|---|
configs/baseline.py | PirateNet + causal weighting |
configs/pseudo_time.py | Adaptive pseudo-time stepping (showcase) |
configs/fixed_pseudo_time.py | Constant pseudo-time weights |
Notes
- Third derivatives are computed with Taylor-mode automatic differentiation (
jax.experimental.jet), which is much cheaper than nestinggradthree times.