S4-10 · 进阶 S4-10 · Advanced

随机种子 · 给随机带一个可重放的起点 Random Seed · Give Randomness a Replayable Starting Point

same seed + same probabilities + same steps → same pseudo-random path

随机种子(Random Seed)是初始化伪随机序列的值,使相同采样过程可以重放。随机不等于不可追踪,但复现还要求概率和执行步骤也一致。 A Random Seed initializes a pseudorandom sequence so the same sampling process can be replayed. Random does not mean untraceable, though probabilities and execution steps must also match.

01 · 给洗牌机记录起始刻度 01 · Recording a shuffler's starting dial

为什么记下同一个起始刻度能重放整副牌,而换一个数会从首个分叉开始不同? Why can the same starting dial replay a whole shuffle, while a different number forks at the first differing draw?

02 锁种子重放,换种子找首分叉 Lock and Replay, Then Change Seed to Find the First Fork

呼应随机带 Stochastic-band echo
状态 A Metric A
状态 B Metric B
状态 C Metric C

概率与输出均为固定种子的教学模拟,不代表真实模型。拖回主变量即可复核结论。 Probabilities and outputs are fixed-seed teaching simulations, not real model output. Move the main variable back to verify the conclusion.

03 把变化拆成 4 个零件 Break the Change into Four Parts

Random Seed
PART 01

种子 Seed

一个整数初始化伪随机数生成器,不是模型能力参数。 An integer initializes the pseudorandom generator; it is not a model capability setting.

PART 02

随机序列 Random sequence

固定算法和种子会产生同一串 0–1 抽样数。 A fixed algorithm and seed produce the same sequence of 0–1 draws.

PART 03

采样路径 Sampling path

每个随机数落入概率带的哪个区间,就选择对应 token。 Each random number lands in a probability band and selects its token.

PART 04

首个分叉 First fork

换种子后从第一个不同抽样开始,后续上下文也会随之改变。 After changing seed, the first different draw changes later context too.

04 最小机制:种子初始化 LCG,再把数落进概率带 Minimal Mechanism: Seed the LCG, Then Drop Numbers into Probability Bands

Random Seed
rn+1 = (arn + c) mod 232
本站统一使用固定种子 LCG;相同输入、分布和调用顺序才会得到相同路径。 This site uses a fixed-seed LCG. Identical input, distribution, and call order are all required for the same path.
锁定种子 Lock seed 随机序列固定 random sequence is fixed
重放采样 Replay sampling 路径逐格一致 path matches slot by slot
更换种子 Change seed 首个抽样分叉 first draw can fork

05 边界实验:解锁后仍把按钮叫“重放” Boundary Test: Call It Replay While the Seed Is Unlocked

主动制造失败 Create a failure

操作名字没变,起点已经偷偷变了 The button says replay, but the start silently changed

解锁种子并再运行一次。页面会显示首个分叉,证明“不记种子重跑”不是可审计的重放。 Unlock the seed and run again. The first-fork marker shows why rerunning without the seed is not an auditable replay.

尚未执行。先在主交互中观察正常机制。 Not run yet. Observe the normal mechanism in the main interaction first.
固定种子让模型完全确定。 A fixed seed makes the entire model deterministic. → ✓ 还要固定输入、概率、算法、硬件路径和调用顺序。 Input, probabilities, algorithm, execution path, and call order must also match.
随机就不可能复现。 Random means impossible to reproduce. → ✓ 伪随机过程可以用种子重放。 A pseudorandom process can be replayed from its seed.
换种子只影响最后一个词。 Changing seed affects only the last word. → ✓ 首个不同 token 会进入上下文并改变后续分布。 The first different token enters context and changes later distributions.
06 · 一句话带走 06 · One line to keep

随机种子给伪随机采样一个可重放起点;锁定后路径一致,换种子则能标出首个分叉。 A random seed gives pseudorandom sampling a replayable start. Lock it for the same path; change it to reveal the first fork.