Skip to content
Methodology 7 of 8

SLURP: Reproducible Monte Carlo

Why every analysis on this platform produces bit-identical results when re-run.

In most Monte Carlo systems, re-running an analysis produces slightly different numbers each time — that's the price of randomness. This seems fine until you try to compare two scenarios. If scenario A gets 2.15% growth and scenario B gets 2.28%, is that difference real? Or did scenario A just happen to draw unluckier random numbers?

The answer in most systems: you can't know for sure. You can run each scenario a thousand times to average out noise, but then you're multiplying compute time by a thousand just to separate structural differences from random fluctuation.

Compass solves this differently. Every Monte Carlo computation across the platform draws from the same pre-generated, validated noise library — a SLURP. Two scenarios with the same trial index see exactly the same random shocks. Any difference in outcomes is 100% structural.

What is a SLURP?

SLURP stands for Stochastic Library Units with Relationships Preserved. It's a binary file containing pre-drawn Monte Carlo samples laid out as a 5-dimensional tensor of known shape: (trial, node, step, analysis, global). The library is generated once, offline, with a specific global seed; every runtime consumption indexes into the same tensor.

Two arrays inside every SLURP:

  • noise_tensor — pre-baked standard-normal draws (n_sims × n_steps × n_nodes) for the dynamics-noise term in the scenario engine.
  • shock_uniforms — pre-baked Uniform(0, 1) draws (n_sims × n_shock_slots) for shock magnitudes and coupling perturbations. Stored as uniforms so downstream consumers can push them through arbitrary inverse CDFs.

Storage is float32 — halves the file size vs float64 with negligible statistical precision loss. The production default library is ~31 MB, loaded once at process start.

SIPmath 3.0 alignment

SLURP file format aligns with the open SIPmath 3.0 standard developed by the Probability Management organization. Alignment means three things: (1) files are portable across tools that speak SIPmath, (2) they carry metadata about how they were generated, and (3) they preserve correlations across inputs when the library was generated with a copula transform (as the GDPNow SLURP is).

The HDR fallback

Not every environment can ship a 31 MB binary asset — local dev, CI, ephemeral testing environments. For those, Compass provides a fallback called the Hierarchical Deterministic RNG (HDR): given any 5-D coordinate (trial, node, step, analysis, global), it produces the same random value the SLURP would have. HDR is slower than SLURP lookup but bit-identical.

This matters for audits: when a SLURP file isn't available, running the same analysis still produces the same numbers as when the SLURP was loaded. Reproducibility is preserved end to end.

The coherence guarantee in practice

Suppose you run two scenarios: “Taiwan blockade” and “negotiated resolution.” Both request n_sims = 10,000. Trial 4,217 in the blockade scenario uses noise_tensor[4217, :, :] — the same slice trial 4,217 in the negotiation scenario uses. The only difference between the two trials is the structural inputs (shocks, coupling overrides) you specified.

The consequence: if scenario A produces worse outcomes than scenario B, the difference is real. It's the structural signal you asked for, not random variation masquerading as signal. Comparing 10K-trial distributions becomes an honest apples-to-apples exercise rather than a sleight-of-hand.

For the SIPmath 3.0 standard see probabilitymanagement.org/sipmath.