Wave
Second-order wave equation with a two-mode standing-wave solution:
with
Results
relative L2 error 1.2e-05recipe baseline (dynamic grad-norm weighting essential)100k steps, single GPU
The baseline recipe reproduces the standing wave to a relative L2 error of 1.2e-05. What makes this example instructive is why: the wave equation's three loss terms (displacement IC, velocity IC, residual) have wildly different gradient scales, and our experiments show that freezing the loss weights at constant values degrades the error by more than three orders of magnitude (to 2.6e-02) — the largest single-ingredient effect we measured anywhere in the suite. Grad-norm balancing, not the architecture or the optimizer, is what carries this problem.


Run
bash
cd examples/wave
python3 main.py --config=configs/baseline.py| Config | Description |
|---|---|
configs/baseline.py | PirateNet + causal weighting |
configs/pseudo_time.py | Adaptive pseudo-time stepping |
configs/fixed_pseudo_time.py | Constant pseudo-time weights |
Notes
- See the loss-balancing deep-dive for the grad-norm scheme this example depends on.