Seeded Randomness Protocol¶
Control protocol — instantiates Deterministic Transition Contract
Routes every random draw through one recorded seed and a pinned generator, so a stochastic transition becomes exactly reproducible on demand without giving up its statistical variety.
Randomness is the one source of nondeterminism you often want to keep — the variety is the point — yet still need to reproduce for testing, audit, and debugging. A Seeded Randomness Protocol resolves that tension. It mandates that every stochastic draw in a transition come from a pseudo-random generator initialized by a single recorded seed, using a pinned generator algorithm and version, so the "random" stream is fully determined by the seed and replays identically whenever the seed is reused. Its defining move is to make randomness a controlled input rather than an ambient leak: the transition still explores a rich space of outcomes across seeds, but for any given recorded seed it produces one and only one reproducible successor. Change the seed and you get fresh variety; reuse it and you get the exact same run.
Example¶
A machine-learning team trains a fraud-detection model whose pipeline is soaked in randomness: the initial network weights, the shuffling of training batches, and dropout are all drawn "randomly." Two engineers run the "same" training on the same data and get models that disagree on 2% of cases — and nobody can tell whether a promising accuracy bump came from a real code improvement or from a lucky roll.
The protocol ends the ambiguity. Every random source in the pipeline — weight initialization, data shuffling, dropout masks — is required to draw from one generator seeded by a single recorded value, say seed = 20260815, and the generator's algorithm and library version are pinned so the same seed yields the same stream on every machine. Now training run A and training run B with the same seed produce byte-identical models. When an engineer claims a change improved accuracy, the team re-runs with the same seed and sees whether the improvement survives — isolating real signal from lucky variance. To explore genuine variety, they deliberately sweep seeds 1…30 and report the distribution, so the reported gain is a real effect across seeds rather than one fortunate draw.
How it works¶
The protocol turns ambient randomness into a recorded, replayable input:
- Route all draws through one seeded generator. Ban implicit or ambient entropy (wall-clock seeds, OS randomness) inside the transition; every draw comes from a generator explicitly initialized from the recorded seed.
- Record the seed as a first-class input. The seed is logged alongside the run so the exact random stream can be regenerated later — the seed is what makes an otherwise-stochastic run reproducible.
- Pin the generator. Fix the PRNG algorithm and its implementation version,[n1] because the same seed produces different streams under different generators — so reproducibility requires pinning the machinery, not just the seed.
- Separate reproduce-mode from explore-mode. Reusing a seed reproduces a run exactly; sweeping seeds restores deliberate variety, with the ensemble reported rather than a single cherry-picked draw.
Tuning parameters¶
- Seed scope — one global seed, or independent per-stream seeds (one for shuffling, one for initialization). Per-stream seeds let you vary one source while holding others fixed; a single global seed is simpler but couples all randomness together.
- Generator choice — which PRNG algorithm is pinned. Faster generators trade statistical quality for speed; cryptographic ones are stronger but slower — and once chosen it must be frozen for reproducibility.
- Entropy policy strictness — whether any unseeded randomness is tolerated. Zero-tolerance guarantees reproducibility but forbids convenient library defaults that reach for the clock.
- Seed-sweep breadth — how many seeds define the "explore" ensemble. More seeds give a truer picture of variance but multiply compute.
- Seed provenance — fixed constant, per-run recorded draw, or derived from a run ID. Fixed constants ease debugging; recorded per-run seeds preserve genuine variety while staying replayable.
When it helps, and when it misleads¶
Its strength is any transition that must be both stochastic and reproducible: simulations, ML training, randomized trials, procedural generation, Monte Carlo estimation. It keeps the variety while making every run replayable and every claimed improvement separable from luck.
It misleads when a fixed seed is mistaken for correctness. Locking one seed makes a run reproducible, not representative — a pipeline that looks great on seed = 42 may be fragile across the distribution, and reporting a single seeded result quietly overfits to one lucky roll. The subtler failure is an unpinned generator: the same seed silently produces a different stream after a library upgrade, so a run that was "reproducible" stops reproducing with no code change. The guarding discipline is to reproduce with a fixed seed but evaluate across a seed sweep, and to pin the generator version so the seed's meaning never drifts.
How it implements the components¶
entropy_and_randomness_policy— it is the randomness policy: all draws are seeded and recorded, ambient entropy is forbidden, and the seed becomes a controlled, replayable input.environment_version_pin— it pins the generator algorithm and implementation version, because the seed reproduces a run only against a fixed PRNG.
It does not implement parallelism_control_scope — the concurrency source of nondeterminism is Concurrency Serialization Gate; this protocol governs the randomness source instead. Nor does it broadly pin dependencies — the full environment lock is Dependency Version Lockfile, which this protocol relies on for everything beyond the generator itself.
Related¶
- Instantiates: Deterministic Transition Contract — closes the randomness source of nondeterminism while preserving deliberate variety.
- Consumes: Dependency Version Lockfile pins the broader environment the seeded generator runs within.
- Sibling mechanisms: Concurrency Serialization Gate · Dependency Version Lockfile · Deterministic Replay Harness
Editorial Notes¶
Form Classification¶
Form family: Control, Automation & Runtime
Rationale: Seeded Randomness Protocol operates as a live operational control that automatically routes, enforces, adapts, or responds during execution because it routes every random draw through one recorded seed and a pinned generator, so a stochastic transition becomes exactly reproducible on demand without giving up its statistical variety.
Independent corroboration: The frozen evidence defines Seeded Randomness Protocol as 'Routes every random draw through one recorded seed and a pinned generator, so a stochastic transition becomes exactly reproducible on demand without giving up its statistical variety', so its operative form is Control, Automation & Runtime.
Nearest alternative: Protocol, Workflow & Routine — Seeded Randomness Protocol includes features of a repeatable ordered procedure or handoff sequence that coordinates action, but its defining operation is a live operational control that automatically routes, enforces, adapts, or responds during execution.
Review outcome: Independent reviewer agreement; medium confidence.
Origin Attribution¶
Primary origin: Computer Science & Software Engineering
Origin pattern: Single lineage
Present-day reach: Multi-domain
Rationale: Pinned pseudorandom generators and recorded seeds are canonical computational reproducibility mechanisms.
Related originating lineages:
- Engineering & Design — Engineering design, reliability, and systems-safety practice supplies a parallel or contributing lineage for the mechanism's defining operation: routes every random draw through one recorded seed and a pinned generator, so a stochastic transition becomes exactly reproducible on demand without giving up its statistical variety.
- Statistics & Experimental Design — Simulation practice materially uses seeded randomness for replicable stochastic analysis.
Review resolution: The blind reviewers agree that computer_science is the primary origin and differ only on alternate origin disagreement, domain reach disagreement. I preserve every independently explained alternate from both records rather than imposing a numeric cap. I retain single_lineage because the combined record shows one traceable formative lineage. The broader reach of multi_domain records portability separately from historical provenance, and encyclopedia_synthesis=false preserves the affirmative synthesis judgment where either reviewer identified one.
Review outcome: Reconciled after independent review; high confidence.
Notes¶
[n1] A pseudo-random number generator produces a stream that looks random but is fully determined by its starting seed — reuse the seed and you get the identical sequence. The Mersenne Twister is a widely used example; because different generators map the same seed to different streams, the algorithm and its version are part of what must be fixed for reproducibility. ↩