I’m fitting a small system-identification model: a mass–spring–damper m\\ddot x + c\\dot x + kx = H\[u\](t-d), observed with Gaussian noise \\sigma, where d \\in \\{0,1,2,3\\} is a discrete input delay. H is a Prandtl–Ishlinskii operator: a weighted sum of 3 play operators with ordered widths 0 < r_1 < r_2 < r_3 (parametrised as cumulative positive increments) and weights on the simplex (additive log-ratio).
**Sampler (hand-written):** Metropolis-within-Gibbs, with exact Gibbs on d and adaptive random-walk moves on the rest, plus parallel tempering (8 temperatures, \\beta from 1 down to 0.007) and long runs (10k warm-up, 20k kept, extended up to 3 times). Health check: \\hat R < 1.01 and bulk ESS \\ge 400 on every parameter.
**What I see:** for simpler input nonlinearities (tanh saturation, hard clip, dead zone), simulation-based calibration with 100 replications looks fine, and 87–96% of fits pass the health check. For hysteresis, only 3 of 20 SBC fits pass, and the rank histograms of two width parameters look off (\\chi^2 p ≈ 0.02; one is U-shaped, which suggests posteriors that are too narrow).
**Questions:**
1. Is this a known hard posterior? I suspect widths the input never exceeds are unidentified and trade off against the weights. Are there reparametrisations or priors that usually help?
2. Would NUTS be a trustworthy reference here, given that the play operator is only piecewise smooth in its widths? Or would tempered SMC be the better reference?
3. With 20 SBC replications, is a U-shaped histogram meaningful evidence, or only a hint?
Your question is fairly involved, so it’s somewhat difficult for people to drop in with a quick answer. Here are a few suggestions/questions
Can you fix the formatting in the mathematical definition of the mode?
Can you share a plot of what your simulated true/observed data looks like (for both the forcing inputs that results in good SBC and for the hysteretic ones)?
With regards to your questions, in general, ODE models tend to have difficult posteriors and my intuition is that the path dependent behavior will only make things worse in this regard. The specific question about the widths/weights would probably be easier to answer after seeing your example data. I personally am not super well versed in Stan’s ODE solver. However, I would expect that if you can write the model in Stan then running HMC would give better posterior samples or at least flag the difficulty of the problem (e.g., divergent transitions, slow mixing, etc).
I haven’t seen it before, but hard posteriors are easy to find. The problem with a lot of ODE models in practice is that random inits in the tails often require stiff solvers (e.g., bdf) as opposed to evaluations in the bulk of the probability mass, where you can often get away with much faster non-stiff solvers (e.g., rk45).
Yes, if there’s a sampling problem, usually due to posterior correlation from non-identifiability, reparameterization is often the only solution.
NUTS has built-in diagnostics which will warn you if you know the answer is wrong. But otherwise you’ll need to do something like simulation-based calibration for general solutions or posterior predictive checks for fits against real data.
20 SBC replications is usually not enough but if it’s strongly U-shaped, then yes, that’s definitely a hint.