[论文解读] An experimental exploration of Marsaglia's xorshift generators, scrambled
本文提出了一类高效且高质量的伪随机数生成器,基于Marsaglia的Xorshift生成器,并通过非线性混淆乘法进行增强。通过系统性地测试参数组合并探索高维变体,作者识别出生成器——特别是Xorshift1024*和Xorshift64*——其周期达到$2^{1024}-1$和$2^{4096}-1$,通过所有BigCrush测试,并且仅使用八个逻辑运算、一次加法和一次乘法,在速度和统计质量上优于现有替代方案。
Marsaglia proposed recently xorshift generators as a class of very fast, good-quality pseudorandom number generators. Subsequent analysis by Panneton and L'Ecuyer has lowered the expectations raised by Marsaglia's paper, showing several weaknesses of such generators, verified experimentally using the TestU01 suite. Nonetheless, many of the weaknesses of xorshift generators fade away if their result is scrambled by a non-linear operation (as originally suggested by Marsaglia). In this paper we explore the space of possible generators obtained by multiplying the result of a xorshift generator by a suitable constant. We sample generators at 100 equispaced points of their state space and obtain detailed statistics that lead us to choices of parameters that improve on the current ones. We then explore for the first time the space of high-dimensional xorshift generators, following another suggestion in Marsaglia's paper, finding choices of parameters providing periods of length $2^{1024} - 1$ and $2^{4096} - 1$. The resulting generators are of extremely high quality, faster than current similar alternatives, and generate long-period sequences passing strong statistical tests using only eight logical operations, one addition and one multiplication by a constant.
研究动机与目标
- 通过系统性实验评估并改进Marsaglia的Xorshift生成器的统计质量。
- 研究通过乘法实现的非线性混淆对Xorshift生成器统计特性的影响。
- 设计具有极长周期($2^{1024}-1$和$2^{4096}-1$)的高维Xorshift生成器,使用优化的参数集。
- 将所提出的生成器与MT19937和WELL等成熟的非密码学PRNG进行性能和统计质量比较。
提出的方法
- 在100个状态点对Xorshift64生成器进行系统采样,以检测统计弱点并评估参数选择。
- 通过常数乘法对Xorshift生成器的输出进行混淆,模拟雪崩效应,以减少线性伪影。
- 使用1024位和4096位状态设计高维Xorshift生成器,参数集经选择以实现完整周期。
- 使用C99代码实现并基准测试生成器,包括用于生成非重叠序列的跳跃函数。
- 使用TestU01套件(特别是BigCrush)评估统计质量,通过反向生成器测试以减轻高位偏差。
- 在速度、周期长度和测试套件表现方面,将所提出的生成器与MT19937、WELL1024a、WELL19937a及其他标准生成器进行比较。
实验结果
研究问题
- RQ1哪些Xorshift64生成器的参数组合在经乘法混淆后,能实现最高的统计质量并全部通过BigCrush测试?
- RQ2具有1024位和4096位状态的高维Xorshift生成器是否能实现$2^{1024}-1$和$2^{4096}-1$的完整周期,同时保持高性能和高质量?
- RQ3乘数的选择(如$M_{32}$、$M_8$、$M_2$)如何影响混淆后Xorshift生成器的统计质量?
- RQ4所提出的生成器在速度和统计质量方面与广泛使用的MT19937和WELL19937a相比如何?
- RQ5对Xorshift生成器输出进行混淆在多大程度上消除了原始版本中常见的线性伪影?
主要发现
- Xorshift1024*生成器实现了$2^{1024}-1$的周期,通过所有BigCrush测试,且是测试中最快的生成器,平均每个输出耗时1.62纳秒。
- 使用参数$A_1(12,25,27) \cdot M_{32}$的Xorshift64*生成器虽在MatrixRank测试中失败,但其线性伪影少于MT19937、WELL1024a或WELL19937a。
- 成功构建了具有1024位和4096位状态的高维Xorshift生成器,分别实现了$2^{1024}-1$和$2^{4096}-1$的完整周期,使用了优化的移位和旋转参数。
- 用于混淆的乘数对统计质量无显著影响;$M_{32}$、$M_8$和$M_2$表现相似,表明对乘数选择具有鲁棒性。
- Xorshift1024*生成器比WELL19937a快近四倍,且在BigCrush测试中表现更优,尽管其状态空间小得多。
- 本研究证实,TestU01在高维测试中比Dieharder具有更高的分辨率,且反向生成器测试对于检测高位偏差至关重要。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。