Course · Scientific computingPhase 10 · Study guide

Are you fitting the physical model or the solver’s error?

Domain Specialization · Local CPULaptop CPU4 lessons (~6.8h)

Revision v0.7.0 ·

Use an analytic system to separate simulation correctness, numerical discretization and parameter inference. An accurate autodiff derivative can still belong to an inaccurate discretized model.

Preparation: Math & optimization

Runtime: CPU; target accelerator execution requires separate evidence

Check your starting point

A solver’s output is differentiable. Does that establish that its gradient matches the continuous differential equation?

Compare your reasoning

No. Autodiff follows the implemented discrete steps. Compare a discrete reference and refine the step size toward an analytic or higher-accuracy continuous reference.

If this is unfamiliar, work through Differentiate through a solver before attempting the project.

Build in stages

1. Validate dynamics and axes

Compare one integration step independently, refine the grid and separate independent trajectory axes from dependent time steps.

2. Fit an identifiable inverse problem

Check objective derivatives, choose observations that constrain the unknown parameter and evaluate predictions at held-out times. Separate noise sensitivity from discretization bias.

Try a changed condition

Make a prediction before opening the reasoning. Keep your answer and the evidence you would collect.

All observations are taken at the initial time of a decay process. Can they identify its decay rate?

Compare an approach

They identify initial amplitude but contain no elapsed-time decay signal. Collect later observations and inspect parameter sensitivity; more optimizer steps cannot create missing information.

Diagnose a likely failure

Symptom: The fitted rate changes as the time step is refined.

Check next: Compare solver error and parameter estimates across resolutions before attributing the shift to physical variation.

Decide what is ready

Use scientific-inverse. Keep discrete and continuous references, a refinement study, derivative checks, recovered parameters and a held-out/noise sensitivity report.

Where to put your project code

Write your code in: projects/scientific-inverse/my_model.py (copy projects/scientific-inverse/starter/model.py first: cp projects/scientific-inverse/starter/model.py projects/scientific-inverse/my_model.py).

Verify your implementation: python3 projects/scientific-inverse/tests/check.py --stage all --impl projects/scientific-inverse/my_model.py

Run the staged project checks on your implementation in projects/scientific-inverse/my_model.py and record your transfer experiment results in your portfolio.

Open A differentiable inverse problem

What still needs further work

Adaptive solvers, event handling, stiff systems, PDEs and domain-specific physical validation remain outside the scalar ODE lab.