Cluster MCMC for rare neural trajectories
Implementation & benchmark of arXiv:2608.17511 — Conditional-path Monte Carlo for rare stochastic dynamics on networks: Details and derivations
Source paper: Conditional-path Monte Carlo for rare stochastic dynamics on networks: Details and derivations arXiv:2608.17511 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train or sample a neural state-space model in trajectory space rather than drawing complete rollouts independently. Construct a space-time path graph whose vertices are latent states and local transition events, then update connected clusters of the entire trajectory using conditional Gibbs or Swendsen-Wang-like moves while preserving fixed initial, terminal, or event-count constraints. This should replace exponentially small forward-rollout success probabilities with local conditional updates that change long portions of a valid trajectory at once.
Formulas
Mathematical statement
For a continuous-time Markov model with state trajectory $z(t)$, transition intensity $r_\theta(z\to z')$, and escape rate $R_\theta(z)=\sum_{z'\neq z}r_\theta(z\to z')$, the unnormalized path weight is $W_\theta[\omega]=\rho(z_0)\exp[-\int_0^T R_\theta(z(t))\,dt]\prod_k r_\theta(z_{k^-}\to z_{k^+})$, where $\omega$ contains event times and states. Uniformization chooses $\Gamma(z)\ge R_\theta(z)$ and inserts virtual events, giving a fixed opportunity rate. The resulting kernel is $K_\theta(z,z')=r_\theta(z\to z')/\Gamma(z)$ for $z'\neq z$ and $K_\theta(z,z)=1-R_\theta(z)/\Gamma(z)$. A cluster proposal must satisfy detailed balance $W(\omega)q(\omega\to\omega')=W(\omega')q(\omega'\to\omega)$; conditional Gibbs cluster resampling gives acceptance probability one. In the paper's edge construction, nonnegative rates require $\Gamma_x\ge\alpha_{i,j}+\alpha_{j,i}-\psi+|\Delta\phi|$ and $0\le\psi\le\min(\alpha_{i,j}-\phi^{\uparrow},\alpha_{j,i}-\phi^{\downarrow})$.
Implementation notes
1. Exact integration point: use this as a sampler or trainer for a neural continuous-time state-space or world model. Let the latent state be a binary or discretized vector $z_t$, and let an MLP produce positive local rates $r_\theta(z\to z')=\operatorname{softplus}(f_\theta(z,z'))+\epsilon$. Condition on a fixed start state and a rare terminal predicate, such as reaching a target class or exceeding a threshold during a long rollout. 2. Pseudocode: initialize one valid trajectory; compute each escape rate $R_\theta$; choose $\Gamma=(1+\delta)\max R_\theta$ with $\delta=0.05$; insert virtual self-events; build a space-time graph from adjacent time slices and local event factors; seed random graph vertices; grow clusters using conditional factor weights while freezing boundary vertices; resample each cluster from its conditional distribution; remove virtual events; repeat. 3. Computed from the paper: uniformization, local factorization, detailed-balance cluster construction, and rejection-free conditional updates. Estimated empirically: neural rates, cluster bond probabilities, the safe upper bound for $\Gamma$, and integrated autocorrelation time. 4. First cheap experiment: use a 20-node SIS-like binary latent process or a two-dimensional neural jump process with horizon $T=100$, conditioning on an outbreak or target event whose forward probability is below $10^{-4}$. Compare independent forward rollouts, single-site Metropolis path updates, and cluster CPMC. Measure valid-trajectory rate, effective samples per network evaluation, and autocorrelation of event size. The prediction is that cluster updates retain nonzero valid-sample production as event probability decreases, while single-site updates exhibit rapidly increasing $\tau_{\mathrm{int}}$; at the smallest event probability, cluster $\tau_{\mathrm{int}}$ should be at least five times smaller and cluster acceptance should exceed 0.5.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a readable fixed-endpoint trajectory-space cluster MCMC experiment with uniformization and reversible-kernel checks. Uniformization became nonnegative at Gamma/Rmax >= 1, detailed-balance error was 1.7e-18, and measured bond probabilities matched 1-exp(-2J) within 0.011. Cluster updates improved autocorrelation at strong coupling, but were worse at weak coupling, so the observed win is conditional rather than universal.
- Agent confidence
- 8/10
- Baseline
- Single-site Gibbs excursion autocorrelation: 0.76, 1.74, 3.72, 11.65 for J=0.3, 0.5, 0.7, 1.0.
- Idea
- Cluster MCMC excursion autocorrelation: 4.32, 3.17, 4.45, 3.23 for J=0.3, 0.5, 0.7, 1.0; mean accepted cluster sizes: 1.76, 2.60, 3.87, 6.36. At J=1.0, excursion autocorrelation was 3.6x lower than baseline.
Limitations: The test used a 1D Ising-like fixed-endpoint toy rather than a neural continuous-time state-space model or a terminal event with probability below 1e-4. It did not test neural rates, event-time resampling, a full space-time factor graph, FLOP-normalized comparisons, or high-dimensional trajectories.
How to run: python3 cluster_mcmc_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.17511)
Significantly WORSE than the tuned baseline (+238.3%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0008
- Idea mean
- 0.0026
- Effect (Δ)
- 0.0018 (+238.3%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±103.7%
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 9 configs
This MVP approximates cluster MCMC with contiguous block masking in supervised training rather than exact conditional Gibbs or Swendsen-Wang sampling. It did not test rare-event probabilities below 1e-4, continuous-time event-time resampling, full space-time factor graphs, or FLOP-normalized sampling efficiency.
How to run: python3 bench_cluster.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The full 8-seed Stage-2 benchmark used the registered dynamics track and matched rnn_small systems. The trajectory-cluster-inspired intervention was significantly worse: baseline MSE 0.0007652444 versus idea MSE 0.0025888690, paired delta +0.0018236246, permutation p=0.0081. The trained-model mechanism signature was present, but the independent task metric did not improve.
- Baseline
- MSE 0.0007652444473933429, best lr=0.006, epochs=18.
- Idea
- MSE 0.00258886901428923, best lr=0.006, epochs=18, block_prob=0.3; delta +0.0018236245668958873; p=0.0081.
Benchmark result
Significantly WORSE than the tuned baseline (+238.3%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0008
- Idea mean
- 0.0026
- Effect (Δ)
- 0.0018 (+238.3%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±103.7%
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 9 configs
This MVP approximates cluster MCMC with contiguous block masking in supervised training rather than exact conditional Gibbs or Swendsen-Wang sampling. It did not test rare-event probabilities below 1e-4, continuous-time event-time resampling, full space-time factor graphs, or FLOP-normalized sampling efficiency.
How to run: python3 bench_cluster.py
Artifacts
- bench_cluster.py 6.3 KB View Raw
- bench_report.json 3.3 KB View Raw
- cluster_mcmc_experiment.py 6.5 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T123429.md 5.0 KB View
- results.json 6.5 KB View Raw