Master PINN-for-seismology workflow card
Learning objectives
- Tie together every part of the textbook in one decision flow
- Use as a planning checklist when designing a real PINN-FWI pipeline
- Use as a cross-reference card when reviewing somebody else's design
This is the SINGLE PAGE you keep open when you sit down to build a real PINN-for-seismology pipeline. It tells you, at every decision point, which part of the textbook to revisit and which production tools / papers to reach for. Use it as a planning checklist, an interview-prep cheat sheet, or a reviewer's rubric.
Step 1 — Frame the problem
Before any code, answer four questions:
- What PDE governs the data? Acoustic wave (most surface seismic), Helmholtz (frequency-domain), eikonal (travel times), elastic (multi-component), Maxwell (CSEM), advection-diffusion (flow). The PDE choice picks the architecture.
- Forward or inverse? Forward = predict wavefield from velocity. Inverse = recover velocity from wavefield. Hybrid (initialiser/regulariser) is increasingly the default.
- Single problem or parametric? One velocity model = vanilla PINN. Many velocity models / repeated forward solves = operator learning (FNO, DeepONet, §8).
- What does success look like? Quantitative target (e.g., 5% L² error vs FDTD, 95% UQ coverage of well-log truth) defined BEFORE training. Without it, you can't tell when to stop.
Step 2 — Pick the architecture (Parts 2-4)
Decision tree:
- Smooth low-frequency target (eikonal, far-field Helmholtz): Vanilla MLP with tanh, 4-6 layers × 64-128 neurons. Often enough.
- High-frequency wavefield (≥10 Hz at km scale): Fourier-feature input encoding (§2.2) with σ tuned to the wavefield frequency band, OR SIREN body (§2.3) with magnitude-aware init.
- Mixed-scale signal (carrier + envelope, multiple bands): Multi-scale architecture (§2.5) with parallel networks per band.
- Domain with hard BCs (Dirichlet on rigid walls, periodic, Neumann): Hard-BC architecture (§2.4) — ansatz that satisfies BC structurally. Soft-BC fallback if shape is irregular.
- Source-point singularity (eikonal, point source): Factored formulation T(x) = T₀(x) · (1 + τ(x; θ)) (§7.3, §10.8 reproduction).
- Anisotropy (TTI / VTI): Add tilt + Thomsen ε, δ as inputs (§4.4). Otherwise ignore at your peril near salt flanks.
- Operator learning (parametric / amortised): FNO for regular grid I/O; DeepONet for scattered-point I/O; hybrid for mixed (§8).
Step 3 — Configure training (Part 3)
The five default switches that fix 80% of PINN training failures:
- Loss balancing: NTK weights (best, principled), GradNorm, or ReLoBRaLo. NEVER hand-tune λ values to start. (§3.3)
- Adaptive sampling: RAR (Lu et al 2021) — add collocation points where residual is high. Improves convergence on localised features (sources, sharp gradients). (§3.7)
- Causality penalty: For time-domain PDEs, weight earlier times before later — prevents future-leakage learning (§3.5, Wang-Sankaran-Perdikaris 2022).
- Adam → L-BFGS: Adam first (10k epochs, escape bad init), then L-BFGS to polish (5k-50k iterations, gain 1-3 orders of magnitude precision). (§3.6)
- Frequency continuation for FWI: low-to-high frequency schedule (§4.8, §6.4). Without it, cycle skipping kills convergence on Marmousi-class problems.
Step 4 — Add UQ (Part 9)
Production seismic-imaging output is INCOMPLETE without uncertainty:
- Cheapest: Bootstrap-posterior FWI (§9.6) — re-noise data + jitter init, run N inversions, report mean ± σ. N=100-1000 in production. Always combine data-bootstrap + init-bootstrap for honest coverage.
- Mid-tier: Deep ensembles (§9.5) — N replicas with different random inits, ensemble disagreement = epistemic UQ. Combines well with bootstrap-posterior.
- Top-tier: Stein Variational GD (SVGD), Hamiltonian Monte Carlo (HMC), or full Bayesian PINN with weight-space variational inference. Production code: HypoSVI for hypocentres.
- Calibration check: 95% credible intervals must cover the truth in 95% of independent runs. Production codes inflate 1.5-3× to compensate for under-coverage of pure data-bootstrap.
Step 5 — Validate (Part 10)
Before shipping a PINN-FWI result:
- Synthetic test on the same setup: Replace observed data with synthetic from a known truth velocity. Recover within 5% L² error before trusting on real data.
- Well-tie validation: Compare inverted velocities at well-log locations to the actual logs. Flag discrepancies > 200 m/s for review.
- Held-out shots: Withhold 5-10% of source gathers from inversion; predict their wavefields; compare. Out-of-sample misfit should be similar to in-sample.
- Mass-balance (4D): For CO₂ monitoring, mass derived from inverted Δv must match injection-ledger volume within 10-20%. Sleipner closes within ±10%.
- Coverage probability (UQ): Run M=20+ independent inversions on synthetics with KNOWN truth. Empirical coverage of 95% CIs should be 90-95% (calibration), 80-89% (under-coverage; inflate intervals), <80% (broken — diagnose).
Production reference list
Open-source codes worth reading + adapting:
- SimPEG (simpeg.xyz): geophysical inversion in Python. Vibrant community; gravity / magnetic / DC-resistivity / EM all included. Good place to learn classical inversion code patterns.
- DeepXDE (Lu et al 2021): PINN library. Includes RAR, NTK weighting, hard-BC builders, and benchmark problems. Companion paper SIAM Review 63(1).
- JAX-FEM, FEniCS: differentiable finite-element libraries — useful when comparing PINN to classical discretisations.
- HypoSVI (Smith et al 2022): production hypocentre + velocity joint inversion via PINN-eikonal + SVGD. Open-source on GitHub.
- Devito (devitoproject.org): symbolic finite-difference DSL, GPU-friendly. Production FWI codes use it as forward kernel.
What this textbook does NOT cover (knowingly)
- Full elastic 3D PINN-FWI: active research, no production-grade open code yet. Watch arXiv 2024-2025.
- GPU performance engineering: CUDA kernels, mixed precision, distributed training. Use PyTorch / JAX defaults; revisit when training time exceeds 1 day.
- Real-time embedded deployment: running a trained PINN on FPGA / edge devices. Niche; mostly defence applications.
- Quantum-PINN hybrids: exploratory; nothing deployable as of 2024.
The closing thought
The TOOL is now in your hands. The textbook covers eleven parts — from "what is a neuron?" all the way to reproducing a 2021 PINN paper end-to-end on real-data benchmarks. Every widget trains a real neural network in your browser. Every formula is honest. Every citation is real.
What you do next is up to you. Some good first projects:
- Reproduce a recent PINN paper (§10.8 walkthrough) on a problem from your own domain.
- Take an open dataset (Marmousi II, Sleipner OBC, USArray TA waveforms) and apply the §10.X capstone recipe at production scale.
- Add a NEW physics constraint not covered here (anelastic attenuation, fractures, induced seismicity triggering) and write the loss term yourself.
- Read the Karniadakis et al 2021 review (Nat. Rev. Phys. 3, 422-440) end-to-end, marking everywhere this textbook gave you a stronger or different intuition.
The toolkit is yours. Go build.
References
- Karniadakis, G.E., Kevrekidis, I.G., Lu, L., Perdikaris, P., Wang, S., Yang, L. (2021). Physics-informed machine learning. Nat. Rev. Phys. 3, 422–440.
- Cuomo, S., Di Cola, V.S., Giampaolo, F., et al. (2022). Scientific machine learning through physics-informed neural networks: Where we are and what is next. J. Sci. Comput. 92(3), 88.
- Lu, L., Meng, X., Mao, Z., Karniadakis, G.E. (2021). DeepXDE: A deep learning library for solving differential equations. SIAM Review 63(1), 208–228.
- Rasht-Behesht, M., Huber, C., Shukla, K., Karniadakis, G.E. (2022). PINNs for wave propagation and full waveform inversions. JGR Solid Earth 127, e2021JB023120.
- Virieux, J., Operto, S. (2009). An overview of full-waveform inversion in exploration geophysics. Geophysics 74(6), WCC1–WCC26.