When Vanilla PINNs Fail on Convection¶
This notebook reproduces the convection benchmark from Krishnapriyan et al. The PDE is $\frac{\partial u}{\partial t}+\beta\frac{\partial u}{\partial x}=0$ on a periodic domain with initial condition $u(x,0)=\sin(x)$. The exact solution is a translation in space. The shape does not change. That makes convection a clean test of whether a PINN can preserve transport.
1. What the reproduced sweep shows¶
In this local run, the mean relative $L^2$ error is 1.92e-02 at $\beta=20$. It rises to 1.10e+00 at $\beta=30$ and 1.14e+00 at $\beta=40$. The heatmaps below show what that failure looks like in space and time.

from rewrite_pinn_failure_modes import (
ConvectionConfig,
plot_failure_summary,
run_convection_case,
run_convection_sweep,
)
results = run_convection_sweep(verbose=False)
representative = run_convection_case(ConvectionConfig(beta=30.0, seed=0))
plot_failure_summary(results, representative);
2. Why this example matters¶
The network is not failing because the exact solution is complicated. The solution is a shifted sine wave. The difficulty comes from the optimization problem induced by the PINN loss. That is the point the chapter makes before turning to curriculum and sequence-to-sequence remedies.