Inverse Problems#
underPINN supports joint optimisation of network weights and physics parameters, recovering unknown PDE coefficients directly from sparse, noisy observations.
examples/heat/inverse.py recovers the unknown thermal diffusivity α from 50 sparse
noisy observations of a 1-D diffusion field.
How it works#
Mechanism |
Description |
|---|---|
Joint optimisation |
The optimizer simultaneously updates network weights |
Log-parameterisation |
Optimising |
Observation loss |
A separate MSE term penalises the discrepancy between model predictions at the 50 observation locations and the noisy measurements; the PDE residual loss acts as the regulariser. |
# Simplified view of the inverse problem setup
from underPINN.pde.diffusion import DiffusionInversePDE
pde = DiffusionInversePDE(model, log_alpha_init=jnp.log(0.5))
# pde.log_alpha is a trainable parameter alongside model weights
# After training: alpha_recovered = jnp.exp(pde.log_alpha)
The 2-D diffusion inverse case (examples/inverse/inverse_diffusion.py) follows the
same pattern for a full 2-D domain.
Example |
Recovers |
Config |
|---|---|---|
1-D Heat — Inverse |
Thermal diffusivity |
|
2-D Diffusion Inverse |
|
|
Gradient flow
Because log_α is just another leaf in the same parameter pytree as the network
weights, gradients flow through both the PDE residual and the observation loss
simultaneously — no alternating-optimisation scheme or bi-level loop is required.
See also
PDE Library Reference for the full list of PDE residual classes, including
DiffusionInversePDE.