Source-linked AI summary

Broadly Applicable Approximate MCMC for Switching Stochastic Differential Equations Using Uniformization and Time-Conditioned Factorized Neural Likelihood Estimation

Shion Hosoda, Michiaki Hamada

arXiv:2610.10194v1stat.MLcs.LG

TL;DR

Bayesian inference for SSDEs remains challenging, and existing methods are restricted to particular observation and model settings. This paper combines uniformization with time-conditioned FNLE in an approximate MCMC sampler for joint inference. It reports recovery of regimes and parameters in synthetic experiments and a persistent transition in real data.

  • Problem

    Bayesian SSDE inference jointly estimates latent states, regimes, and parameters from noisy observations, while existing methods are typically restricted to particular state, drift, or diffusion settings and uniformization needs generally unavailable SDE transition densities.

    Source: §1 · p. 1
  • Method

    The approximate MCMC sampler combines uniformization with time-conditioned FNLE for transition densities and SIR for approximate conditional intermediate-state sampling.

    Source: §1 · p. 2
  • Results

    The sampler recovered regime paths and parameters for three synthetic SSDE models and identified a persistent regime transition in a real dataset.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The approach applies to SSDEs without analytically tractable transition densities, including models for which prior methods have limited applicability.

    Source: §1 · p. 2

    The local sensitivity result does not guarantee the marginal posterior or the full sampler, and its conditions are not guaranteed by FNLE training.

    Source: §4.4 · p. 6

Abstract

from arXiv · show

Switching stochastic differential equations (SSDEs) describe continuous-time dynamics whose parameters switch according to a latent regime process that follows a continuous-time Markov chain (CTMC). By allowing dynamics to change between regimes, SSDEs represent heterogeneous system behavior and have been applied across diverse fields. However, Bayesian inference for SSDEs remains difficult, and existing SSDE inference methods have limited applicability, with restrictions such as noise-free observations, univariate states, linear drift, or state-independent diffusion. In this study, we propose an approximate Markov chain Monte Carlo sampler for SSDEs using uniformization and factorized neural likelihood estimation (FNLE), a simulation-based inference method. Uniformization provides an exact representation of the CTMC but requires SDE transition densities over arbitrary time intervals. We approximate these densities by training a time-conditioned FNLE model. The resulting sampler is broadly applicable to SSDEs without requiring analytically tractable transition densities. In synthetic-data experiments, our method recovered regime paths and parameters for three SSDE models for which previous methods have limited applicability. We also applied our method to a real dataset and detected a regime transition.

1 INTRODUCTION

SSDEs model continuous-time dynamics whose drift and diffusion switch with a latent regime, but Bayesian inference is difficult and existing methods cover restricted settings. The paper combines uniformization with time-conditioned FNLE to infer states, regimes, and parameters, and reports recovery in synthetic and real-data applications.

1 INTRODUCTION

  • Existing SSDE inference methods are typically restricted by noise-free observations, univariate states, linear drift, or state-independent diffusion.The paper compares approaches with differing restrictions, including methods demonstrated only for univariate nonlinear models or more restrictive multivariate dynamics.Source: §1 · p. 1, §1.1 · p. 2
  • Uniformization represents a CTMC as a discrete regime sequence at Poisson event times, but SSDE inference then requires transition densities that are generally unavailable.Standard FNLE is trained for a fixed transition interval and cannot directly handle the varying intervals introduced by uniformization.Source: §1 · pp. 1–2
  • The proposed approximate MCMC sampler combines uniformization with time-conditioned FNLE and uses SIR to approximate conditional intermediate-state sampling.It starts from an exact uniformization-based sampler for tractable SSDEs and extends the approach to SSDEs without analytically tractable transition densities.Source: §1 · p. 2
  • The sampler recovered regime paths and parameters across three synthetic SSDE models and identified a persistent regime transition in real data.The synthetic models span nonlinear drift, state-dependent diffusion, and multivariate latent states; the real-data analysis detected a persistent change.Source: §1 · p. 2

1.1 Related Work

  • Unlike neural stochastic flows formulated without SDE-parameter conditioning, the transition approximation conditions on both time intervals and model parameters for joint inference.The paper places this distinction in the context of existing SSDE inference approaches with differing model restrictions and uncertainty treatments.Source: §1.1 · p. 2

2 BACKGROUND

The background defines an SSDE as continuous latent dynamics governed by a regime process, then describes uniformization and FNLE as building blocks for inference. Uniformization yields a discrete-time representation of the CTMC, while FNLE approximates transition densities through learned local factors.

2.1 Switching Stochastic Differential Equations

  • An SSDE has a continuous latent state whose regime determines its drift and diffusion, with the regime evolving as a CTMC.The formulation defines regime-specific drift and diffusion functions and distinguishes the continuous state and regime paths.Source: §2.1 · pp. 2–3

2.2 Uniformization of Continuous-Time Markov Chains

  • Uniformization augments the regime path with Poisson-process candidate times, yielding a discrete representation whose regime conditional factors as an HMM for FFBS.The event sequence combines true regime jumps with candidate times; the transition matrix depends on the rate matrix and whether a time is an event or observation-only time.Source: §2.2 · p. 3

2.3 Factorized Neural Likelihood Estimation for Transition Densities

  • FNLE approximates intractable Markov-process transition densities by learning conditional densities from simulated transitions and factorizing trajectory likelihoods.Conditional normalizing flows support density evaluation and sampling, enabling likelihood approximation and SIR proposals in the sampler.Source: §2.3 · pp. 3–4

3 PROBLEM SETTING

The model allows regime-specific drift and diffusion while sharing their functional forms across regimes. Observations are noisy, and inference targets latent variables and model parameters.

3 PROBLEM SETTING

  • Drift and diffusion share common functional forms across regimes, with regime-specific parameters selected by θ_k = h_k(Θ).The transformations in h_k enforce parameter constraints.Source: §3 · p. 4
  • At discrete observation times, the model relates observations to latent states with observation noise.The unknown variables include observation-noise variances, and the initial state and regime have independent priors.Source: §3 · p. 4
  • The target is the joint posterior of latent states, regimes, SDE parameters, observation-noise variances, and the transition-rate matrix given the observations.The posterior is proportional to the joint density of the observations and unknown variables.Source: §3 · p. 4

4 PROPOSED METHOD

The method first constructs an exact uniformization-based sampler for tractable SSDEs, then replaces unavailable transition densities with time-conditioned FNLE for an approximate sampler. Its approximation has grid-consistency and finite-particle errors, while a conditional-mode sensitivity result relies on uniform conditions not guaranteed by FNLE training.

4.1 Exact MCMC for Tractable SSDEs

  • For tractable SSDEs, uniformization augments the posterior with candidate times and supports finite-dimensional updates by marginalizing intervening paths.The exact sampler updates candidate times, bridge states, grid states, regimes, parameters, observation noise, and transition rates; its sweep preserves the exact posterior marginal under exact bridge sampling and conditional-invariant MH kernels.Source: §4 · p. 4, §4.1 · pp. 4–5

4.2 Time-Conditioned FNLE for SDE Transition Densities

  • Time-conditioned FNLE approximates regime-specific SDE transition densities by conditioning on elapsed time between successive states.A model can be shared across regimes with common drift and diffusion forms by conditioning on θ_k; otherwise, separate models can be trained for distinct functional forms.Source: §4.2 · p. 5

4.3 Approximate Markov Chain Monte Carlo Sampler with FNLE

  • The approximate sampler substitutes FNLE densities into the exact updates and uses SIR to sample candidate-time states, while retaining FFBS for regimes and NUTS for states and parameters.SIR approximates the bridge using particles proposed from the fixed left endpoint and weighted by the FNLE density at the fixed right endpoint; the candidate-time, observation-noise, and transition-rate updates are unchanged.Source: §4.3 · p. 5

4.4 Approximation Properties

  • FNLE approximation and finite SIR particles introduce distinct errors, and grid changes can make successive updates fail to preserve a common approximate target.The stated conditional-mode displacement bound requires uniform control of parameter-dependent log-density error and quadratic separation; these conditions are not guaranteed by FNLE training, and the result does not guarantee the marginal posterior or full sampler. At fixed observation frequency, the bound remains uniformly bounded as N increases if Ω(Q), δ, and c^-1 remain bounded.Source: §4.4 · pp. 5–6
  • Figure 2 compares exact MCMC with approximate samplers whose FNLE models are trained on exact transitions or Euler–Maruyama simulations.The supplied passages identify the comparison but do not state its outcome.Source: Figure 2 · p. 6

5 NUMERICAL EXPERIMENTS

The experiments compare approximate and exact MCMC on a tractable OU model, test recovery on three intractable synthetic SSDEs, and apply the sampler to ecological time-series data.

5.2 Synthetic-Data Experiments

  • Across three synthetic SSDEs, posterior means were close to true parameters with narrow 95% credible intervals, and regime probabilities recovered switching; mixing was poor for τ1 in CLE and τ1, τ2 in SIR.Figure 3 covers Lotka–Volterra, gene-expression chemical Langevin, and susceptible–infected–recovered models.Source: Figure 3 · p. 7, §5.2 · p. 8

5.1 Posterior Comparison on an Ornstein–Uhlenbeck Model

  • On the tractable OU benchmark, both approximate samplers produced parameter marginals similar to exact MCMC, including when FNLE was trained on Euler–Maruyama simulations.All three samplers recovered the SDE parameters and regime path, with R-hat values close to one.Source: §5.1 · p. 7

5.3 Real-Data Application

  • In the Didinium–Paramecium series, regime-2 probability rose around t = 7 and remained near one, while the initial regime corresponded to a transient previously excluded before LV fitting.The analysis used 71 paired abundance observations and a two-regime LV SSDE.Source: §5.3 · p. 8, Figure 4 · p. 8

6 CONCLUSION

The conclusion summarizes the sampler’s performance across synthetic and real-data analyses. The paper also reports its AI-use practices and makes its experiment code available.

6 CONCLUSION

  • The sampler combines time-conditioned FNLE and uniformization for joint inference, recovered parameters and regime paths in three synthetic SSDEs, and identified a persistent transition in the Didinium–Paramecium series.The real-data transition separates initial transient dynamics from subsequent predator–prey dynamics.Source: §6 · pp. 8–9

AI use statement

  • The authors report using generative AI across modeling, methods, experiments, writing, and code, with manual review of AI-assisted code, draft text, and proofs.They state that they take responsibility for the final content.Source: AI use statement · p. 10

Code Availability

  • The numerical-experiment code is available in the fnle-ssde GitHub repository.The paper provides the repository address.Source: Code Availability · p. 10

Factorized Neural Likelihood Estimation: Supplementary Materials

The supplement derives an exact uniformization-based sampler and details its updates, path augmentation, and invariance. It also describes how the sampler handles candidate times and regimes.

A EXACT SAMPLING CONSTRUCTION

  • Each sweep samples candidate times and unretained states, then updates latent states, regimes, parameters, and observation-noise variance; candidate times are marginalized before updating Q.The derivation starts from the proper full-path posterior and assumes exact transition densities and bridge sampling.Source: A EXACT SAMPLING CONSTRUCTION · p. 13, §A.2.4 · p. 14

A.1 Uniformization Matrices and Candidate Times

  • Uniformization chooses Ω greater than every regime’s exit rate and uses Poisson event times to create a discrete-time regime chain; observation-only times preserve the regime.Candidate times are sampled by a Poisson–Uniform construction within intervals of constant regime.Source: §A.1 · p. 13

A.2.1 Candidate Grids and Path Augmentation

  • Between retained times, candidate grids are augmented with path values sampled from bridge distributions conditional on the candidate-time states.The candidate-time marginal follows from the Markov property and Chapman–Kolmogorov equation.Source: §A.2.1 · pp. 13–14

A.2.2 Latent-State Update

  • The latent-state update factors by the Markov property over the regime sequence on each interval, then incorporates the observation likelihood.The passage identifies the resulting update as Eq. (15).Source: §A.2.2 · p. 14

A.2.3 Regime Conditional Distribution

  • The regime and intervening-state block uses uniformization transitions at event times and identity transitions at observation-only times.The derivation expresses the regime conditional using the Poisson-process density and Bayes’ rule.Source: §A.2.3 · p. 14

A.2.4 Parameter Updates

  • Parameter updates use the independent prior for Θ, update observation noise through observed states, and update Q after marginalizing candidate times.After the collapsed Q update, candidate times must be regenerated using the updated Q before further grid-dependent updates.Source: §A.2.4 · p. 14

A.2.5 Trimming and Invariance Across Iterations

  • Trimming unused path draws preserves the retained-variable transition kernel and leaves the full-path posterior marginal invariant at sweep boundaries.The resulting (Z, Θ, τ², Q) marginal is the desired posterior marginal.Source: §A.2.5 · p. 15

B PROOF OF PROPOSITION 1

The supplement proves a bound for the FNLE-based conditional and documents SIR state sampling, conjugate updates, multi-series extensions, computational costs, and experiment settings.

B PROOF OF PROPOSITION 1

  • The proof controls the difference between exact and FNLE-based conditional densities for a fixed grid, then averages the pointwise bound over the uniformization construction to obtain Eq. (23).The number of grid points depends on the Poisson event count conditional on Q.Source: B PROOF OF PROPOSITION 1 · pp. 15–16

C.1 Sampling State Values at Candidate Times with SIR

  • For candidate-time states, SIR proposes paths using forward FNLE transitions, weights the particles, and resamples one path for each interval containing candidate times.The neighboring retained states are fixed during this construction.Source: §C.1 · p. 16

C.2 Conjugate Parameter Updates

  • With Gamma priors on off-diagonal transition rates, the conditional update for q_kh is Gamma-distributed using the jump count and holding time in regime k.The supplement also specifies an inverse-Gamma prior for observation-noise variances and gives a conjugate noise update.Source: §C.2 · p. 17

C.3 Extension to Multiple Time Series

  • For conditionally independent series with shared parameters, path and regime updates are performed separately, while shared parameters use contributions from all series.Each shared-parameter prior is included only once.Source: §C.3 · p. 17

C.4 Computational Complexity

  • Per sweep, emission construction uses K(L − 1) FNLE density evaluations, FFBS costs O(LK²), and SIR costs O(P|Tcand|) conditional FNLE samples and evaluations.These costs exclude offline FNLE training; NUTS cost depends on its trajectory-dependent gradient evaluations.Source: §C.4 · p. 18

D EXPERIMENTAL SETTINGS

  • The appendix records settings for the OU comparison, three synthetic SSDE experiments, and real-data LV analysis; the latter experiments use two regimes and Gaussian observation errors.The synthetic and real-data analyses observe every state component.Source: D EXPERIMENTAL SETTINGS · p. 18, §D.1 · p. 18

D.1.1 FNLE Training

The appendix details time-conditioned FNLE training, prior choices, MCMC updates and initialization, and the tractable OU benchmark used to compare exact and approximate sampling.

D.1.1 FNLE Training

  • FNLE was trained on scaled Euler–Maruyama increments across elapsed times, conditioning on θ, the current state, and elapsed time.The number of numerical transitions was sampled uniformly from 1 to nmax, with elapsed time ∆ = nh; the density was evaluated as a transition density by a change of variables.Source: §D.1.1 · p. 18
  • For the OU experiment, exact-transition FNLE training used exact simulated transitions, whereas Euler–Maruyama training used numerically generated transitions with the same conditioning inputs.Both approximate samplers used the FNLE-based SIR bridge update; only exact MCMC used the exact bridge distribution.Source: §D.1.1 · p. 19, §D.2.1 · p. 21

D.1.2 Prior Settings

  • Off-diagonal CTMC rates had independent Gamma(2, 20) priors in the shape–rate parameterization, and the initial state had an improper uniform prior.The initial regime probabilities were (1/2, 1/2); each SDE parameter prior was evaluated once per unique parameter.Source: §D.1.2 · p. 19

D.1.3 MCMC Settings and Initialization

  • The regime path was updated by log-space forward filtering and backward sampling, while path states and parameters were updated conditionally using Pyro NUTS.New candidate-time states used sampling-importance-resampling with 100 particles; production chains used one NUTS draw per sweep without warm-up or further step-size adaptation.Source: §D.1.3 · p. 20

D.2.1 Ornstein–Uhlenbeck Experiment

  • In the OU benchmark, exact MCMC used the exact transition density, while both approximate samplers used FNLE at inference and the FNLE-based SIR bridge update.The data had 101 observations over T = 100 at spacing 1.0, with observation standard deviations τ1 = τ2 = 0.01.Source: §D.2.1 · p. 21

D.2.2 Switching Lotka–Volterra Experiment

The synthetic Lotka–Volterra experiment used a two-state CTMC to generate regime switches and Euler–Maruyama to simulate the state path.

D.2.2 Switching Lotka–Volterra Experiment

  • The two-state regime path was generated with initial probabilities (1/2, 1/2), exact holding times, and exact jump destinations.The data-generating CTMC rates were q12 = q21 = 0.03.Source: §D.2.2 · p. 21
  • Conditional on the regime path, the state was simulated by Euler–Maruyama with step size h = 0.01 and independent Brownian increments.After each step, both state components were restricted to [0, 10^4].Source: §D.2.2 · p. 21
  • The experiment started at (1.0, 0.5) and used 101 paired observations over T = 100 at spacing 1.0, with τ1 = τ2 = 0.01.The observations corresponded to the two-dimensional Lotka–Volterra state.Source: §D.2.2 · p. 21

D.2.3 Switching Gene-Expression CLE Experiment

The gene-expression CLE experiment simulated a two-regime system and transformed protein copy number to fluorescence intensity for its second state component.

D.2.3 Switching Gene-Expression CLE Experiment

  • The two-state regime path was generated with initial probabilities (1/2, 1/2), exact holding times, and exact jump destinations.The data-generating CTMC rates were q12 = q21 = 0.05.Source: §D.2.3 · p. 21
  • Conditional on the regime path, the state was simulated by Euler–Maruyama with step size h = 0.01 and independent Brownian increments.After each step, both state components were restricted to [0, 10^4].Source: §D.2.3 · p. 21
  • The second state was defined as Yt,2 = c^2Pt, making γ the fluorescence-scaled production coefficient and c^2 the conversion from protein copy number to fluorescence intensity.The experiment started at (100, 0.5) and used 201 observations over T = 50 at spacing 0.25.Source: §D.2.3 · p. 21

D.2.4 Switching Susceptible–Infected–Recovered Epidemic Experiment

The appendix specifies the synthetic epidemic experiment, parameter and prior materials, real-data analysis, chain diagnostics, and computing and software resources.

D.2.4 Switching Susceptible–Infected–Recovered Epidemic Experiment

  • The epidemic experiment prescribed a single regime switch at the midpoint and simulated the state by Euler–Maruyama with h = 0.01, projecting states onto the feasible population simplex.The total population was fixed at 1000; the regime path was fixed to regime 1 on [0, 20) and regime 2 on [20, 40].Source: §D.2.4 · p. 21

D.2.5 Data-Generating Parameters and Inference Settings

  • The synthetic-experiment parameter table lists data-generating SDE parameters by regime, and regime labels were aligned to truth by minimizing the RMS discrepancy between posterior mean log parameters and true log parameters.Inference settings include FNLE ranges, parameter-sharing structures, and priors on the physical scale.Source: §D.2.5 · pp. 21–22, Table 7 · p. 22

D.3 Real-Data Experiment

  • The real-data Lotka–Volterra analysis used 71 paired Didinium and Paramecium abundance observations from Veilleux, with irregular times spanning 0 to 35.08 days.Both abundance variables were divided by 100 before fitting.Source: §D.3 · p. 22

D.3.1 Chain-Specific Posterior Distributions and Traces

  • Figure 5 presents chain-specific marginal posterior densities and traces for four real-data chains, with burn-in marked at sweep 5,000 of 10,000.Colors distinguish chains; solid and dotted lines distinguish regimes 1 and 2 for regime-specific parameters.Source: §D.3.1 · p. 22, Figure 5 · p. 23

D.4 MCMC Diagnostics

  • Appendix Tables 10–14 report per-parameter MCMC diagnostics for the OU, synthetic Lotka–Volterra, gene-expression CLE, epidemic, and real-data Lotka–Volterra analyses.The supplied table captions identify diagnostic coverage but do not state diagnostic values.Source: Table 10 · p. 25, Table 11 · p. 25, Table 12 · p. 26

D.5.1 Computing Infrastructure

  • All computations ran on a local PC with an Intel Core i7-1195G7 processor and 32 GiB of RAM using Ubuntu 22.04.5 LTS.The machine had 4 cores and 8 threads, and computations used only the CPU.Source: §D.5.1 · p. 27

D.5.2 Software and Existing Assets

  • FNLE training used sbi, posterior sampling used Pyro, and MCMC diagnostics used ArviZ; the real data are available in the rEDM R package.The passage lists package versions and states that exact software dependencies are provided in the supplementary uv.lock file.Source: §D.5.2 · p. 27
Loading 2610.10194v1…