cascade-heat14-heat11-stationary-ar2-fastpaths
Heat14 starts from Heat11. It preserves Heat11's family weights, curriculum, observation model, integrated-SV correction, and AR(1) stationary-SD correction. It adds one mathematical update and four narrow algorithmic fast paths.
Mathematical and algorithmic AR(2) update
Heat11 used a zero-initialized AR(2), generated 512 discarded burn-in points, and
treated sampled sigma as innovation SD. Heat14 uses the PACF parameterization
a1 = p1*(1-p2), a2 = p2.
Yule-Walker gives
rho(1) = p1
and
sigma_eps^2 / sigma_x^2 = (1-p1^2)*(1-p2^2).
Heat14 therefore uses
sigma_eps = sigma_x*sqrt((1-p1^2)*(1-p2^2))
and samples the two presample states directly from the exact stationary Gaussian law:
x[-2] = sigma_x*z0
x[-1] = sigma_x*(p1*z0 + sqrt(1-p1^2)*z1).
A Numba recurrence then emits x[0:L]. This removes all 512 discarded points,
removes finite-burn bias, preserves the configured PACF, and makes sigma the
stationary process SD. AR(2) has 9.5% final and 12% curriculum-start mass.
References:
Throughput fast paths
ou_stochastic_volreplaces two Python loops of per-row SciPylfiltercalls with the existing compiled batched AR(1) recurrence. Initial conditions and equations are unchanged.physical_sensorsdoes not generate a spectral GP for pressure rows because the pressure branch completely replaces the base containing that GP. The branch law is unchanged; only unused work is removed.seasonal_countssamples Gamma shape parameters only for rows selected for Gamma-Poisson overdispersion. The Poisson call remains batched.regime_shiftsamples its three sparse Bernoulli jump fields by drawing an exact Binomial event count and a uniform subset of positions, rather than allocating three dense uniform matrices. This is distributionally identical to independent Bernoulli events and is already used elsewhere in Heat11. Nofastmathor parallel Numba mode is used. This avoids floating-point reassociation and thread-scheduling overhead for modest family batches.
Implementation guidance follows the
Numba performance recommendations:
compile stateful recurrences and avoid unnecessary temporary arrays. NumPy's
random Generator API remains unchanged.
Scope and validation
Fixed-seed corpus bytes change because unused random draws are removed and AR(2) is intentionally recalibrated. Non-AR(2) family distributions are intended to remain unchanged. The relevant gates are:
- warmed, alternating Heat11/Heat14 throughput benchmarks;
- exact recurrence comparison for the OU fast path;
- AR(2) stationary SD and ACF checks across parameter extremes;
- unchanged config apart from
nameanddescription; cascade verifyin the pinned worker image.