Random Seeds and Stochastic Reproducibility
Randomized computations reproduce only when their randomness is controlled; a recorded seed turns chance into a repeatable input.
Deterministic Randomness
Most simulation randomness is not truly random. It comes from a pseudorandom number generator, a deterministic algorithm that produces a stream of numbers appearing random but fully determined by an initial seed. Record the seed and the same stream, and the same result, follows exactly. Forget the seed and the run cannot be reproduced.
Where Randomness Enters
- Monte Carlo integration and particle transport.
- Stochastic optimization and neural-network initialization.
- Data shuffling and train-test splitting.
- Sampling for uncertainty quantification.
Reproducibility Requires More Than a Seed
Fixing one global seed is often not enough. Parallel runs may draw from separate streams whose interleaving depends on thread scheduling; libraries may keep their own hidden generators; and reordering draws changes results. Reproducible stochastic work uses seeded, independent streams per worker and records every generator's seed, so the same computation on the same setup yields the identical sequence.
Pseudorandom Is Not Random
A pseudorandom generator only imitates randomness; its output is fully determined and eventually repeats after a period. Good generators have long periods and pass statistical tests, but they are the wrong tool where genuine unpredictability matters, such as cryptography, which needs hardware entropy instead. For simulation, deterministic pseudorandomness is a feature, because it is exactly what makes a stochastic run reproducible.
Reporting Stochastic Results Honestly
A single seeded run reports one draw from a distribution, not the truth. Sound practice reports results across many seeds with a spread, so a reader sees the variability, and separately fixes a seed when exact reproduction of a specific figure is the goal. Cherry-picking a lucky seed is a form of misconduct.
At Kronos
Stochastic physics and uncertainty studies record seeds so a specific published figure can be regenerated, while ensemble results are reported with their spread rather than a single favorable draw. This keeps the exact-reproduction requirement and the honest-variability requirement both satisfied.