Table of Contents

Interface IInverseProblem<T>

Namespace
AiDotNet.PhysicsInformed.Interfaces
Assembly
AiDotNet.dll

Defines the interface for inverse problems in physics-informed neural networks.

public interface IInverseProblem<T>

Type Parameters

T

The numeric type (float, double, etc.) used for calculations.

Remarks

For Beginners: An inverse problem is about finding unknown causes from observed effects.

Forward Problem (typical):

  • Known: Initial conditions, boundary conditions, physical parameters
  • Find: Solution at all points in space and time
  • Example: Given thermal conductivity k, find temperature distribution T(x,t)

Inverse Problem:

  • Known: Some observations of the solution
  • Find: Unknown physical parameters or hidden fields
  • Example: Given temperature measurements, find thermal conductivity k

Types of Inverse Problems:

  1. Parameter Identification:

    • Find unknown constants in the PDE
    • Example: Identify diffusion coefficient from concentration data
  2. Source Identification:

    • Find unknown source terms
    • Example: Locate pollution source from downstream measurements
  3. Boundary Identification:

    • Determine unknown boundary conditions
    • Example: Infer surface heat flux from internal temperature sensors
  4. Geometry Identification:

    • Find unknown shape of domain
    • Example: Detect tumor location from external measurements

Challenges:

  1. Ill-posedness: Small noise in data → large errors in parameters
  2. Non-uniqueness: Multiple parameter values may fit the data
  3. Regularization: Need to impose constraints for stable solutions

PINN Advantage for Inverse Problems:

  • Learns solution AND parameters simultaneously
  • Physics constraints act as regularization
  • Can handle noisy and sparse data
  • No need for iterative PDE solves

Properties

HasMeasurementNoiseLevel

Gets whether the measurement noise level is known.

bool HasMeasurementNoiseLevel { get; }

Property Value

bool

InitialParameterGuesses

Gets initial guesses for the unknown parameters.

T[] InitialParameterGuesses { get; }

Property Value

T[]

Remarks

For Beginners: Initial guesses help the optimization start in a reasonable region.

  • If you have prior knowledge, use it!
  • Otherwise, use typical values for the problem type
  • The PINN will refine these during training

MeasurementNoiseLevel

Gets the measurement noise level (if known).

T MeasurementNoiseLevel { get; }

Property Value

T

Remarks

Knowing the noise level helps with:

  • Choosing appropriate regularization
  • Estimating uncertainty in parameters
  • Weighing data vs physics loss Check HasMeasurementNoiseLevel before accessing this property. Returns default(T) if unknown.

NumberOfParameters

Gets the number of unknown parameters.

int NumberOfParameters { get; }

Property Value

int

Observations

Gets the observation data points.

IReadOnlyList<(T[] location, T[] value)> Observations { get; }

Property Value

IReadOnlyList<(T[] location, T[] value)>

Remarks

For Beginners: Observations are measurements of the solution at specific locations. More observations generally lead to better parameter estimates. The quality and distribution of observations matters!

Returns a list of (location, observed_value) pairs.

ParameterLowerBounds

Gets lower bounds for the parameters (for constrained optimization).

T[]? ParameterLowerBounds { get; }

Property Value

T[]

Remarks

Physical constraints often impose bounds:

  • Diffusion coefficient > 0
  • Density > 0
  • Some ratios between 0 and 1 Null means no lower bound.

ParameterNames

Gets the names of the unknown parameters to identify.

string[] ParameterNames { get; }

Property Value

string[]

Remarks

Example parameter names:

  • "thermal_conductivity"
  • "diffusion_coefficient"
  • "wave_speed"
  • "viscosity"

ParameterUpperBounds

Gets upper bounds for the parameters.

T[]? ParameterUpperBounds { get; }

Property Value

T[]

Remarks

Upper bounds can prevent non-physical solutions:

  • Speed of sound can't exceed material limit
  • Concentration can't exceed saturation Null means no upper bound.

Methods

CreateParameterizedPDE(T[])

Applies parameters to the underlying PDE and returns the modified PDE specification.

IPDESpecification<T> CreateParameterizedPDE(T[] parameters)

Parameters

parameters T[]

The parameter values to apply.

Returns

IPDESpecification<T>

A PDE specification with the given parameters.

Remarks

For Beginners: This creates a "configured" version of the PDE with specific parameter values. During training:

  1. Parameters are updated
  2. This method creates a new PDE with those parameters
  3. The PINN evaluates residuals using the new PDE
  4. Gradients flow back to update parameters

ValidateParameters(T[])

Validates that the parameter values are physically meaningful.

bool ValidateParameters(T[] parameters)

Parameters

parameters T[]

The parameter values to validate.

Returns

bool

True if parameters are valid, false otherwise.

Remarks

Beyond simple bounds, this can check:

  • Parameter combinations (e.g., CFL condition)
  • Physical consistency (e.g., energy conservation constraints)
  • Material property relationships