Back to portfolio

Case Study

Physics-Informed Neural Networks (PINNs)

Inverse modeling with uncertainty quantification

PyTorchNumPySciPyJAXWeights & Biases

Problem

Classical inverse solvers were brittle under noisy observations and lacked confidence estimates for downstream decisions.

System Architecture

High-level component flow.

Component

Observed Signals

Observed Signals is an internal service layer responsible for transformation, scoring, or orchestration.

Connected To

  • Sends output to PINN Core

Key Engineering Decisions

  • Embedded governing equations as soft constraints in the objective function.
  • Used adaptive residual weighting to balance data fidelity and physics priors.
  • Applied ensemble heads to estimate epistemic uncertainty for inverse parameters.

Implementation Details

  • Implemented a custom training loop with staged warm-up for stable residual optimization.
  • Integrated experiment tracking for hyperparameter sweeps on loss weighting schedules.
  • Validated with synthetic and semi-real benchmarks across multiple noise regimes.

Results

Parameter Error Reduction

41%

Convergence Stability

+29%

Ensemble Calibration

0.91 ECE

  • Reduced inverse parameter error by 41% relative to unconstrained baselines.
  • Improved convergence consistency across random seeds and noise settings.
  • Produced calibrated uncertainty intervals that aligned with held-out ground truth.

Code Snippet

PINN Loss

def pinn_loss(model, x, y):
    pred = model(x)
    data_loss = torch.mean((pred - y) ** 2)

    residual = pde_residual(model, x)
    physics_loss = torch.mean(residual ** 2)

    return data_loss + 0.2 * physics_loss

Lessons Learned

  • Physics priors increase sample efficiency when measurements are sparse.
  • Loss balancing is an engineering problem as much as a modeling problem.
  • Uncertainty outputs are critical for deploying scientific ML in real workflows.