Most of the ODEs do not have Closed form analytical solution, so we approximate them numerically.

How are PINNs and PPINNs evaluated?

<aside> 💡

Evaluating Physics-Informed Neural Networks (PINNs) or Parallel PINNs (PPINNs) without an external ground-truth dataset relies on measuring how well the model satisfies the underlying mathematical and physical laws. Since the governing equations are known, the "data" is replaced by the physical constraints themselves. 1. Physics Residual Loss ($L_{phy}$) The primary evaluation metric is the residual of the differential equation. • For a system where $\frac{dy}{dt} - f(t, y) = 0$, the PINN calculates its own derivative using automatic differentiation. • The evaluation is the magnitude of the error $| \frac{dy_{NN}}{dt} - f(t, y_{NN}) |$ across a set of test collocation points. • A lower residual (e.g., your achieved magnitude of $10^{-7}$) indicates that the network has successfully "learned" the physics of the system. 2. Satisfaction of Initial and Boundary Conditions Since no external dataset exists, the model must be strictly evaluated at the fixed points we know are true: • Initial Conditions (IC): The model is checked at $t=0$ to ensure $y(0)$ and $y'(0)$ match the starting physical state of the oscillator. • Boundary Conditions (BC): For PPINNs, evaluation includes checking the "interface matching" where segments meet. For example, the prediction at the end of the $t=0-1000$ segment must perfectly match the start of the $t=1001-2000$ segment to ensure continuity. 3. Conservation Laws and Invariants Physical systems often have properties that must remain constant or follow a specific trend: • Energy Conservation: In a damped system, the total energy should decay at a rate consistent with the damping coefficient. • Stability Analysis: The solution is evaluated to see if it exhibits "energy drift," which is a common failure in simpler methods like Euler's. If the PINN's output remains stable over long horizons ($t=2000$) without diverging, it is considered physically valid. 4. Self-Consistency and Convergence TestingResolution Independence: The model is evaluated by increasing the density of collocation points. If the solution remains the same regardless of how many points are sampled, the model is converged. • Cross-Solver Comparison: While you are building a "no-data" solver, you use classical high-fidelity methods like RK4 as a "Ground Truth" for final validation to prove the NN has found the correct mathematical path. 5. PPINN Specific: Parallel ConsistencyCoarse-Fine Error: In the Parareal framework, the "Fine" solver results are compared against the "Coarse" predictions. • Iteration Count: The number of iterations required for the parallel segments to synchronize is a measure of the model's efficiency.

</aside>