Physics Reference

This page collects the key mathematical formulas and physical equations implemented in the SFI library. Notation follows the conventions of the PASTIS paper (Ronceray, 2025) and is used consistently throughout the documentation.

Notation

Throughout SFI the following symbols are used consistently. Bold face denotes vectors and matrices; italic denotes scalars.

\(\mathbf{x}_t\)

State (position) vector at time \(t\). Shape (N_particles, d) or (d,) for a single particle.

\(\mathbf{v}_t\)

Velocity, either known or reconstructed via finite differences (secant velocities).

\(\Delta\mathbf{x}_t\)

Displacement \(\mathbf{x}_{t+1} - \mathbf{x}_t\).

\(\mathbf{F}(\mathbf{x})\)

Drift / force field (Itô convention unless stated otherwise).

\(\mathbf{D}(\mathbf{x})\)

Diffusion tensor (Itô convention).

\(\bar{\mathbf{D}}\)

Empirical (time-averaged) diffusion tensor. In code: inf.diffusion_average.

\(\mathbf{B}\)

Noise amplitude: \(\mathbf{B} = \sqrt{2\mathbf{D}}\).

\(\mathrm{d}W_t\)

Wiener increment (Gaussian white noise), \(\mathrm{d}W \sim \mathcal{N}(0,\,I\,\mathrm{d}t)\).

\(b_i(\mathbf{x})\)

Basis function \(i\) evaluated at \(\mathbf{x}\). Scalar by default; bold \(\mathbf{b}_i\) when vector-valued.

\(\hat{F}_i\)

Inferred coefficient for basis function \(i\).

\(n\)

Library (basis) size — number of basis functions.

\(G_{ij}\)

Gram matrix \(G_{ij} = \langle \mathbf{b}_i \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_j \rangle\).

\(M_i\)

Force moment \(M_i = \langle \mathbf{v}_t \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_i \rangle\).

\(\Lambda\)

Measurement / localization noise covariance.

\(p_{\text{PASTIS}}\)

PASTIS significance threshold (model selection parameter).

Note

Code mapping: the code attribute diffusion_average corresponds to \(\bar{\mathbf{D}}\). Older versions of SFI used the symbol \(A = 2\bar{\mathbf{D}}\); throughout these docs we normalise to \(\bar{\mathbf{D}}\).

Dynamical equations

Overdamped Langevin SDE

Source: SFI.inference.overdamped.OverdampedLangevinInference, SFI.langevin.overdamped.OverdampedProcess

\[\mathrm{d}\mathbf{x}_t = \mathbf{F}(\mathbf{x}_t)\,\mathrm{d}t + \sqrt{2\,\mathbf{D}(\mathbf{x}_t)}\;\mathrm{d}W_t\]

\(\mathbf{F}(\mathbf{x})\) is the Itô drift, \(\mathbf{D}(\mathbf{x})\) the diffusion tensor (Itô convention), and \(\mathrm{d}W_t\) a Wiener increment.

Underdamped Langevin SDE

Source: SFI.inference.underdamped.UnderdampedLangevinInference, SFI.langevin.underdamped.UnderdampedProcess

\[\mathrm{d}\mathbf{x}_t = \mathbf{v}_t\,\mathrm{d}t, \qquad \mathrm{d}\mathbf{v}_t = \mathbf{F}(\mathbf{x},\mathbf{v})\,\mathrm{d}t + \sqrt{2\,\mathbf{D}(\mathbf{x},\mathbf{v})}\;\mathrm{d}W_t\]

Only positions \(\mathbf{x}(t)\) are observed; velocities are reconstructed from finite differences (secant velocities).

Simulation

Euler–Maruyama integrator (overdamped)

Source: SFI.langevin.overdamped_make_step

\[\mathbf{x}_{t+\mathrm{d}t} = \mathbf{x}_t + \mathrm{d}t\,\mathbf{F}(\mathbf{x}_t) + \sqrt{2\,\mathrm{d}t}\;\mathbf{B}(\mathbf{x}_t)\,\boldsymbol{\xi}_t\]

where \(\mathbf{B} = \sqrt{2\mathbf{D}}\) and \(\boldsymbol{\xi}_t \sim \mathcal{N}(\mathbf{0}, \mathbf{I})\).

Velocity-Verlet integrator (underdamped)

Source: SFI.langevin.underdamped_make_step

Stochastic splitting (kick–drift–kick):

\[\begin{split}\mathbf{v}_{1/2} &= \mathbf{v} + \tfrac{1}{2}\mathrm{d}t\,\mathbf{F}(\mathbf{x},\mathbf{v}) + \sqrt{\mathrm{d}t/2}\;\mathbf{B}(\mathbf{x},\mathbf{v})\, \boldsymbol{\xi}_1 \\ \mathbf{x}' &= \mathbf{x} + \mathrm{d}t\,\mathbf{v}_{1/2} \\ \mathbf{v}' &= \mathbf{v}_{1/2} + \tfrac{1}{2}\mathrm{d}t\,\mathbf{F}(\mathbf{x}',\mathbf{v}_{1/2}) + \sqrt{\mathrm{d}t/2}\;\mathbf{B}(\mathbf{x}',\mathbf{v}_{1/2})\, \boldsymbol{\xi}_2\end{split}\]

Preserves the symplectic structure of the deterministic part.

Noise amplitude from diffusion tensor

Source: SFI.langevin.base_setup_diffusion

\[\mathbf{B} = \sqrt{2\,\mathbf{D}}\]

For scalar \(\sigma\): \(\mathbf{B} = \sqrt{2\sigma}\,\mathbf{I}_d\). For constant matrix \(\mathbf{D}\): PSD matrix square root. For state-dependent \(\mathbf{D}(\mathbf{x})\): evaluated at each step.

Diffusion estimators

MSD diffusion estimator (overdamped)

Source: SFI.inference.overdamped_D_msd

\[\hat{\mathbf{D}}_{\text{MSD}}(t) = \frac{1}{2\,\mathrm{d}t}\, \Delta\mathbf{x}_t \otimes \Delta\mathbf{x}_t\]

Simplest estimator; biased by measurement noise.

Vestergaard–Blainey–Flyvbjerg estimator (the "noisy" estimator)

Source: SFI.inference.overdamped_D_noisy

\[\hat{\mathbf{D}}_{\text{V}}(t) = \tfrac{1}{4}\bigl[ \Delta\mathbf{x}_t \otimes \mathbf{v}_t + 2\,\Delta\mathbf{x}_t \otimes \mathbf{v}_{t-1} + 2\,\Delta\mathbf{x}_{t-1} \otimes \mathbf{v}_t + \Delta\mathbf{x}_{t-1} \otimes \mathbf{v}_{t-1} \bigr]\]

Two-point estimator robust to measurement noise (Vestergaard, Blainey, & Flyvbjerg, Phys. Rev. E, 2014).

Weak-noise diffusion estimator (overdamped)

Source: SFI.inference.overdamped_D_weaknoise

\[\hat{\mathbf{D}}_{\text{WN}}(t) = \tfrac{1}{4}\bigl(\Delta\mathbf{x}_t - \Delta\mathbf{x}_{t-1}\bigr) \otimes \bigl(\mathbf{v}_t - \mathbf{v}_{t-1}\bigr)\]

Uses successive-displacement differences; suitable when localization noise is negligible.

Measurement noise estimator (overdamped)

Source: SFI.inference.overdamped_Lambda

\[\hat{\Lambda}_t = -\,\tfrac{1}{2}\bigl[ \Delta\mathbf{x}_t \otimes \Delta\mathbf{x}_{t-1} + \Delta\mathbf{x}_{t-1} \otimes \Delta\mathbf{x}_t \bigr]\]

Estimates localization / measurement noise from anti-correlation of successive displacements.

MSD diffusion estimator (underdamped)

Source: SFI.inference.underdamped_D_msd_uli

\[\hat{\mathbf{D}}_{\text{MSD}}^{\text{ULI}}(t) = \frac{3}{4\,\mathrm{d}t^3}\, (\Delta\mathbf{x}_t - \Delta\mathbf{x}_{t-1}) \otimes (\Delta\mathbf{x}_t - \Delta\mathbf{x}_{t-1})\]

Weak-noise diffusion estimator (underdamped)

Source: SFI.inference.underdamped_D_weaknoise_uli

\[\hat{\mathbf{D}}_{\text{WN}}^{\text{ULI}}(t) = \frac{1}{2\,\mathrm{d}t^3}\, (2\,\Delta\mathbf{x}_t - \Delta\mathbf{x}_{t-1} - \Delta\mathbf{x}_{t+1}) \otimes (\cdots)\]

Noisy diffusion estimator (underdamped)

Source: SFI.inference.underdamped_D_noisy_uli

\[\hat{\mathbf{D}}_{\text{noisy}}^{\text{ULI}}(t) = \frac{3}{11\,\mathrm{d}t^3}\,\operatorname{sym}\! \bigl[-a + b + c - 3d + e + f\bigr]\]

where \(a = \Delta\mathbf{x}_t \otimes \Delta\mathbf{x}_t\), \(b = \Delta\mathbf{x}_{t-1} \otimes \Delta\mathbf{x}_{t-1}\), etc. Optimally handles both signal and localization noise.

Measurement noise estimator (underdamped)

Source: SFI.inference.underdamped_Lambda_uli

\[\hat{\Lambda}^{\text{ULI}} = \frac{1}{44}\,\operatorname{sym}\! \bigl[10a + b + c + 8d - 10e - 10f\bigr]\]

Same displacement products \((a\ldots f)\) as the noisy diffusion estimator. Extracts localization noise for underdamped systems.

Force inference

Linear force regression (overdamped)

Source: SFI.inference.overdamped.OverdampedLangevinInference.infer_force_linear()

\[\hat{\mathbf{F}}(\mathbf{x}) = \sum_{i=1}^{n} \hat{F}_i\, \mathbf{b}_i(\mathbf{x}) \qquad\text{where}\qquad G\,\hat{F} = M\]

\(G_{ij} = \langle \mathbf{b}_i \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_j \rangle\) is the \(\bar{\mathbf{D}}\)-weighted Gram matrix, \(M_i = \langle \mathbf{v}_t \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_i \rangle\) are the force moments, and \(n\) is the library size (number of basis functions).

Overdamped force moments

Source: SFI.inference.overdamped_force_moments

Itô moments:

\[M_i = \bigl\langle \mathbf{v}_t \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_i(\mathbf{x}_t) \bigr\rangle\]

Stratonovich moments (trapezoid + gradient correction):

\[M_i^{\text{S}} = \tfrac{1}{2}\bigl\langle \mathbf{v}_t \cdot \bar{\mathbf{D}}^{-1} \cdot \bigl[\mathbf{b}_i(\mathbf{x}_t) + \mathbf{b}_i(\mathbf{x}_{t+1})\bigr] \bigr\rangle \;-\; \bigl\langle \mathbf{D}_{\text{inst}} : (\bar{\mathbf{D}}^{-1} \cdot \nabla_{\mathbf{x}} \mathbf{b}_i) \bigr\rangle\]

Underdamped force moments (ULI)

Source: SFI.inference.underdamped_force_moments

\[M_i = \bigl\langle \hat{\mathbf{a}}_t \cdot \bar{\mathbf{D}}^{-1} \cdot \mathbf{b}_i(\hat{\mathbf{x}}_t, \hat{\mathbf{v}}_t) \bigr\rangle \;+\; w \,\bigl\langle -\mathbf{D}_{\text{inst}} : (\bar{\mathbf{D}}^{-1}\cdot\partial_{\mathbf{v}} \mathbf{b}_i) \bigr\rangle\]

where \(w = (1+2\ell)/3\), with \(\ell=1\) (symmetric), \(\ell=0\) (early), \(\ell=-\tfrac{1}{2}\) (anticipated).

Exact banded-innovations NLL (parametric estimators)

Source: SFI.inference.parametric_corebanded_nll_gram

The single-step RK4 flow residuals \(r_k = x_{k+1} - \Phi(x_k;\theta)\) carry a block-banded covariance \(\Sigma\) (overdamped: block-tridiagonal; underdamped: pentadiagonal). The block LDLᵀ factorisation \(\Sigma = L\,S\,L^\top\) has a banded unit-lower factor, so the innovations

\[e_m = r_m - L^{(1)}_m e_{m-1} \;[-\, L^{(2)}_m e_{m-2}], \qquad \tilde e_m = R_m^{-1} e_m, \quad R_m = \operatorname{chol} S_m,\]

whiten the residual stream exactly in one sequential pass, and

\[-2\log L(\theta, \mathbf{D}, \Lambda) = \sum_m \tilde e_m^\top \tilde e_m \;+\; 2 \sum_m \log \det R_m \;+\; \mathrm{const}.\]

Whitening the regressor columns alongside yields the exact GLS Gram and moments as plain sums — no overlapping windows, no truncated precision. The default reverse-time (anti-causal) recursion keeps every errors-in-variables instrument–residual pairing measurement-noise-clean. Full construction: Parametric estimators — algorithm and parameters.

Kinematic reconstructions (ULI)

Source: SFI.inference.underdamped_X_sym_uli, _V_sym_uli, _A_sym_uli, etc.

Three reconstruction modes for the unobserved velocity:

Symmetric:

\[\hat{\mathbf{x}}(t) = \tfrac{1}{3}\bigl[\mathbf{x}_{t-1}+\mathbf{x}_t+\mathbf{x}_{t+1}\bigr], \quad \hat{\mathbf{v}}(t) = \frac{\Delta\mathbf{x}_t+\Delta\mathbf{x}_{t-1}}{2\,\mathrm{d}t}, \quad \hat{\mathbf{a}}(t) = \frac{\Delta\mathbf{x}_t - \Delta\mathbf{x}_{t-1}}{\mathrm{d}t^2}\]

Early:

\[\hat{\mathbf{x}}(t) = \mathbf{x}_t, \quad \hat{\mathbf{v}}(t) = \frac{\Delta\mathbf{x}_{t-1}}{\mathrm{d}t}\]

Anticipated:

\[\hat{\mathbf{x}}(t) = \tfrac{1}{3}\bigl[\mathbf{x}_t + \mathbf{x}_{t+1} + \mathbf{x}_{t+2}\bigr], \quad \hat{\mathbf{a}}(t) = \frac{\Delta\mathbf{x}_{t+1} - \Delta\mathbf{x}_t}{\mathrm{d}t^2}\]

Error analysis

Force coefficient covariance & predicted error

Source: SFI.inference.base.BaseLangevinInference.compute_force_error()

In the estimator’s extensive normalization — \(G_{ij} = \sum_t \mathrm{d}t\;\mathbf{b}_i^\top (2\bar{\mathbf{D}})^{-1}\mathbf{b}_j\), \(M_i = \sum_t \mathrm{d}\mathbf{x}_t^\top (2\bar{\mathbf{D}})^{-1}\mathbf{b}_i\) (the fit \(G\hat F = M\) is invariant under this rescaling) — the Gram is the Hessian of the Onsager–Machlup action, hence exactly the Fisher information of the coefficients:

\[\operatorname{Cov}(\hat{F}) = G^{-1}, \qquad I_F = \tfrac{1}{2}\,\hat{F}^\top M, \qquad \text{NMSE}_{F,\text{pred}} = \frac{\operatorname{Tr}\bigl(G\cdot\operatorname{Cov}(\hat{F})\bigr)}{2\,I_F} = \frac{N_b}{2\,I_F}\]

Assumes the sampling error dominates; measurement noise and discretization biases are not addressed.

Normalized MSE metrics (force & diffusion)

Source: SFI.inference.base.BaseLangevinInference.compare_to_exact()

\[\text{NMSE}_F = \frac{\langle (\mathbf{F}_{\text{exact}} - \hat{\mathbf{F}})^\top \bar{\mathbf{D}}^{-1} (\mathbf{F}_{\text{exact}} - \hat{\mathbf{F}}) \rangle} {\langle \hat{\mathbf{F}}^\top\,\bar{\mathbf{D}}^{-1}\, \hat{\mathbf{F}} \rangle}\]
\[\text{NMSE}_D = \frac{\langle \operatorname{tr}(\bar{\mathbf{D}}^{-1}\,\mathbf{E}\, \bar{\mathbf{D}}^{-1}\,\mathbf{E}) \rangle} {\langle \operatorname{tr}(\bar{\mathbf{D}}^{-1}\,\hat{\mathbf{D}}\, \bar{\mathbf{D}}^{-1}\,\hat{\mathbf{D}}) \rangle}\]

where \(\mathbf{E} = \mathbf{D}_{\text{exact}} - \hat{\mathbf{D}}\).

Model selection

Source: SFI.inference.sparsitySparseScorer, select_by_ic()

\[\begin{split}\text{AIC}(k) &= \mathcal{I}(k) - k \\ \text{BIC}(k) &= \mathcal{I}(k) - \tfrac{1}{2}\,k\,\ln n \\ \text{PASTIS}(k) &= \mathcal{I}(k) - k\,\ln(n / n_0)\end{split}\]

where \(\mathcal{I}(k) = \tfrac{1}{2}\,\hat{F}_B^\top M_B\) is the log-likelihood gain with \(k\) basis terms selected from a library of size \(n\), and \(n_0\) is the PASTIS prior scale.

The PASTIS significance \(p_{\text{PASTIS}}\) corresponds to the threshold above which a basis term is considered supported by the data.

Observables

Information functional & entropy production (overdamped)

Source: SFI.langevin.overdamped.OverdampedProcess.simulate()

\[I \approx \tfrac{1}{4}\sum_t \Delta\mathbf{x}_t^\top\,\mathbf{D}^{-1}(\mathbf{x}_t)\, \mathbf{F}(\mathbf{x}_t)\]
\[S \approx \sum_t \Delta\mathbf{x}_t^\top\,\mathbf{D}^{-1}(\mathbf{x}_{\text{mid}})\, \tfrac{1}{2}\bigl[\mathbf{F}(\mathbf{x}_t) +\mathbf{F}(\mathbf{x}_{t+1})\bigr]\]

\(I\) estimates the information content; \(S\) the entropy production (time-reversal asymmetry).

Basis functions

Multivariate polynomial basis

Source: SFI.bases.monomials_up_to()

\[b_\alpha(\mathbf{x}) = \prod_{k=1}^{d} x_k^{\alpha_k}, \qquad |\alpha| \le \texttt{order}\]

Full polynomial dictionary up to a given total degree, optionally including velocity monomials and lifted to vector or matrix rank.

Radial pair interaction basis

Source: SFI.bases.pairs.radial_pair_basis()

\[\mathbf{b}_\alpha(\mathbf{r}_{ij}) = \phi_\alpha(r_{ij})\;\hat{\mathbf{r}}_{ij}\]

Scalar radial kernel \(\phi_\alpha\) times the unit displacement vector. Available kernel families: exponential-polynomial, Gaussian, power-law, and compactly supported.

Discrete Laplacian on regular grid

Source: SFI.bases.spde.Laplacian

\[\nabla^2 u \approx \sum_{\alpha=1}^{n_{\dim}} \frac{u_{+\alpha} + u_{-\alpha} - 2\,u_0}{\Delta x_\alpha^2}\]

Finite-difference Laplacian using a cross stencil on a Cartesian grid. Available as a composable operator via the Laplacian class. See Spatial field inference (SPDE) for a full introduction to SPDE operators.

Additional formulas from API documentation

The following entries are collected automatically from .. physics:: directives in the API documentation:

Dynamical equations

Overdamped Langevin SDE (in api/SFI.inference)

[Dynamical equations] Overdamped Langevin SDE

\[\frac{\mathrm{d}x}{\mathrm{d}t} = F(x) + \sqrt{2\,D(x)}\;\mathrm{d}\xi(t)\]

\(F(x)\) is the Itô drift, \(D(x)\) the diffusion tensor (Itô convention), and \(\mathrm{d}\xi\) is Gaussian white noise.

Underdamped Langevin SDE (in api/SFI.inference)

[Dynamical equations] Underdamped Langevin SDE

\[\frac{\mathrm{d}x}{\mathrm{d}t} = v, \qquad \frac{\mathrm{d}v}{\mathrm{d}t} = F(x,v) + \sqrt{2\,D(x,v)}\;\mathrm{d}W_t\]

Only positions \(x(t)\) are observed; velocities are reconstructed from finite differences.

Inference

State-dependent diffusion inference (overdamped) (in api/SFI.inference)

[Inference] State-dependent diffusion inference (overdamped)

With the force \(\hat F\) held fixed, the state-dependent diffusion \(D(x;\theta_D)\) is optimised by minimising the exact banded negative log-likelihood; \(\Lambda\) from the force inference is held fixed. A rank-2 basis gives \(D(x) = \sum_j (\theta_D)_j\, d_j(x)\); a PSF is evaluated directly.

Parametric force inference (overdamped) (in api/SFI.inference)

[Inference] Parametric force inference (overdamped)

The observed positions follow \(y_t = x_t + \eta_t\) where \(\eta \sim \mathcal{N}(0, \Lambda)\). The deterministic flow \(\Phi(x;\theta) = z(\Delta t) - x\) (one RK4 step by default) defines the residual \(r_t = y_{t+1} - y_t - \Phi(y_t;\theta)\). Residuals follow a block-tridiagonal Gaussian that is whitened exactly (reverse-time innovations), and the whitened sensitivities enter the Gauss–Newton normal equations; under measurement noise the left factor is replaced by the η-clean skip instrument \(\psi_{\rm inst} = \partial\Phi/\partial\theta\) evaluated at the lagged clean point (eiv=True), giving a consistent estimating equation.

Linear force regression (overdamped) (in api/SFI.inference)

[Inference] Linear force regression (overdamped)

\[\hat F(x) = \sum_a C_a\, b_a(x) \qquad\text{where}\qquad G\,C = M\]

\(G_{ab} = \langle b_a(x_t)\, b_b(x_t) \rangle\) is the Gram matrix, \(M_a = \langle v_t \cdot A^{-1} \cdot b_a \rangle\) are the force moments, and \(A = 2\bar D\).

State-dependent diffusion inference (underdamped) (in api/SFI.inference)

[Inference] State-dependent diffusion inference (underdamped)

With the force \(\hat F(x,v)\) held fixed, the state-dependent diffusion \(D(x,v;\theta_D)\) is optimised by minimising the exact banded NLL of the pentadiagonal (bandwidth-2) residual covariance; \(\Lambda\) from the force inference is held fixed.

Parametric force inference (underdamped) (in api/SFI.inference)

[Inference] Parametric force inference (underdamped)

The phase-space dynamics \(\dot{x}=v,\;\mathrm{d}v = F(x,v)\mathrm{d}t + \sqrt{2D}\,\mathrm{d}W\) are factored into deterministic flow + noise. Three-point shooting residuals follow a pentadiagonal Gaussian that is whitened exactly (reverse-time innovations) before entering the Gauss–Newton normal equations; the process noise enters at \(\Delta t^3\). Under measurement noise the left factor is the η-clean skip instrument built from the lagged clean position pair (eiv=True) — consistent where the naive MLE is velocity-EIV-biased.

Error analysis

Normalized MSE metrics (force & diffusion) (in api/SFI.inference)

[Error analysis] Normalized MSE metrics (force & diffusion)

\[\text{NMSE}_F = \frac{\langle (F_{\text{exact}} - \hat F)^\top A^{-1} (F_{\text{exact}} - \hat F) \rangle} {\langle \hat F^\top A^{-1} \hat F \rangle}\]
\[\text{NMSE}_D = \frac{\langle \operatorname{tr}(A^{-1} E\, A^{-1} E) \rangle} {\langle \operatorname{tr}(A^{-1} \hat D\, A^{-1} \hat D) \rangle}\]
where \(E = D_{\text{exact}} - \hat D\).

NMSE_diffusion = MSE_diffusion / < tr(A_inv Dh A_inv Dh) >

Force coefficient covariance & predicted error (in api/SFI.inference)

[Error analysis] Force coefficient covariance & predicted error

\[\operatorname{Cov}(C) = G^{-1}, \qquad \mathbb{E}\!\left[\langle \delta F^\top A^{-1} \delta F \rangle\right] = \operatorname{Tr}\!\left(G\,\operatorname{Cov}(C)\right), \qquad I_F = \tfrac{1}{2}\,C^\top M, \qquad \text{NMSE}_{F,\text{pred}} = \frac{\operatorname{Tr}(G\cdot\operatorname{Cov}(C))}{C^\top M} = \frac{\operatorname{Tr}(G\cdot\operatorname{Cov}(C))}{2 I_F}\]

Assumes the sampling error dominates; measurement noise and discretization biases are not addressed.

Model selection

Information criteria for sparse model selection (in api/SFI.inference)

[Model selection] Information criteria for sparse model selection

\[\begin{split}\text{AIC}(k) &= \mathcal{I}(k) - k \\ \text{BIC}(k) &= \mathcal{I}(k) - \tfrac{1}{2}\,k\,\ln\tau \\ \text{EBIC}(k) &= \text{BIC}(k) - 2\gamma\,\ln\binom{n_0}{k} \\ \text{PASTIS}(k) &= \mathcal{I}(k) - k\,\ln(n_0 / p_0) \\ \text{SIC}(k) &= \mathcal{I}(k) - k\,\ln(\mathcal{I}_{\text{total}})\end{split}\]

where \(\mathcal{I}(k)\) is the log-likelihood gain with k basis terms out of \(n_0\) candidates, \(\tau\) is the total trajectory time, \(p_0\) is the PASTIS significance level, and \(\gamma \in [0,1]\) controls EBIC stringency.

Observable

Entropy production estimator (overdamped, linear basis) (in api/SFI.inference)

[Observable] Entropy production estimator (overdamped, linear basis)

\[\Delta\hat S = 2\, M_v^\top G^{-1} M_v, \qquad M_{v,a} = \sum_t \mathrm{d}X_t \circ A^{-1}\, b_a, \qquad A = 2\bar D,\]
\[\hat{\dot S} = \frac{\Delta\hat S}{\tau_N}, \qquad \dot S_{\mathrm{bias}} = \frac{2 N_b}{\tau_N}, \qquad \delta \Delta S = \sqrt{2\,\Delta\hat S + (2 N_b)^2}.\]

\(\hat v = G^{-1} M_v\) is the basis projection of the phase-space velocity \(v = F - D\nabla\ln\rho\), \(N_b\) the number of basis degrees of freedom, and \(\tau_N\) the total particle-time. The projection makes \(\Delta\hat S\) a lower bound on the entropy produced in the observed phase space, up to the \(+2N_b\) fluctuation bias. The bias is reported both ways: the raw plug-in value keeps it, and DeltaS_debiased \(= \Delta\hat S - 2N_b\) subtracts it. This is exactly the AIC complexity correction applied to the trajectory information: \(\Delta\hat S\) is four times the plug-in information carried by the projected velocity field, and each fitted degree of freedom inflates a maximized (plug-in) information by \(+\tfrac12\) — the same counting that powers the AIC criterion of sparsify_force.

Entropy production estimator (underdamped, linear basis) (in api/SFI.inference)

[Observable] Entropy production estimator (underdamped, linear basis)

\[\Delta\hat S \;=\; \sum_t \bigl(\mathrm{d}\hat v_t \circ - \hat F^{+}\,\mathrm{d}t\bigr)^\top \bar D^{-1}\, \hat F^{-} \;=\; 2\,C^\top \varphi^{-} \;-\; 2\,C^\top G^{+-} C ,\]
\[\varphi^{-}_a = \sum_t \mathrm{d}t\; \hat a_t \cdot A^{-1} b^{-}_a(\hat x_t, \hat v_t), \qquad G^{+-}_{ab} = \sum_t \mathrm{d}t\; b^{+}_a \cdot A^{-1} b^{-}_b , \qquad A = 2\bar D,\]

with \(b^{\pm}(x,v) = \tfrac12[b(x,v) \pm b(x,-v)]\), the ULI symmetric kinematics \((\hat x, \hat v, \hat a)\), and \(C\) the fitted coefficients. In a steady state the expectation equals the entropy production rate whenever \(\nabla_v \cdot F^{+} = 0\) (standard mechanical even forces). The provisional fluctuation scale is set by the odd quadratic \(Q^{-} = 2\,C^\top G^{--} C \approx \int \hat F^{-}\!\cdot \bar D^{-1} \hat F^{-}\,\mathrm{d}t\) — the log ratio's two large contributions fluctuate even where their means cancel:

\[\delta \Delta S = \max\Bigl[ \sqrt{2\,Q^{-} + (2 N^{-})^2},\; \delta\Delta S_{\mathrm{block}}\Bigr], \qquad \dot S_{\mathrm{bias}} = \frac{2 N^{-}}{\tau_N},\]

where \(N^{-} = \operatorname{rank} G^{--}\) counts the odd-sector degrees of freedom (this reduces to the overdamped formula, where the odd sector is everything) and \(\delta\Delta S_{\mathrm{block}}\) is an empirical block-variance estimate that additionally captures the slowly-correlated fluctuations of the \(F^{+}\!\cdot\bar D^{-1} F^{-}\) current term.

Basis functions

Multivariate polynomial basis (in api/SFI.bases)

[Basis functions] Multivariate polynomial basis

\[\begin{split}f_\\alpha(x) = \\prod_{k=1}^{d} x_k^{\\alpha_k}, \\qquad |\\alpha| \\le \\texttt{order}\end{split}\]

Full polynomial dictionary up to a given total degree, optionally including velocity monomials and lifted to vector or matrix rank.

Radial pair interaction basis (in api/SFI.bases.pairs)

[Basis functions] Radial pair interaction basis

\[f_\alpha(\mathbf{r}_{ij}) = \phi_\alpha(r_{ij})\;\hat{\mathbf{r}}_{ij}\]

Scalar radial kernel \(\phi_\alpha\) times the unit displacement vector. Available kernel families: exponential-polynomial, Gaussian, power-law, and compactly supported.