Transformers in Pseudo-Random Number Generation: A Dual Perspective on Theory and Practice
Not on the map. Why?
Abstract (arXiv)
Pseudo-random number generators (PRNGs) are high-nonlinear processes, and they are key blocks in optimization of Large language models. Transformers excel at processing complex nonlinear relationships. Thus it is reasonable to generate high-quality pseudo-random numbers based on transformers. In this paper, we explore this question from both theoretical and practical perspectives, highlighting the potential benefits and implications of Transformer in PRNGs. We theoretically demonstrate that decoder-only Transformer models with Chain-of-Thought can simulate both the Linear Congruential Generator (LCG) and Mersenne Twister (MT) PRNGs. Based on this, we conclude that the log-precision decoder-only Transformer can represent non-uniform AC0. Our simulative theoretical findings are validated through experiments. The random numbers generated by Transformer-based PRNGs successfully pass the majority of NIST tests, whose heat maps exhibit clear statistical randomness. Finally, we assess their capability in prediction attacks.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 16 of its 38 references that are in the map. First posted on arXiv 2 Aug 2025.
Builds on
16 of 38 references.
References · 16
- 2017Attention Is All You Needcited by 60,361
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 294
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
- 2022Why Can GPT Learn In-Context? Language Models Implicitly Perform Gradient Descent as Meta-Optimizerscited by 204
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 193
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 83
- 2023Sumformer: Universal Approximation for Efficient Transformerscited by 30
4 more
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2023Accelerating Large Language Model Decoding with Speculative Sampling
- 2023The Expressive Power of Transformers with Chain of Thought
- 2026Seed Hijacking of LLM Sampling and Quantum Random Number Defense
- 2026The Expressive Power of Low Precision Softmax Transformers with (Summarized) Chain-of-Thought
- 2024Theoretical limitations of multi-layer Transformer
- 2026Every Bit Counts: A Theoretical Study of Precision-Expressivity Tradeoffs in Quantized Transformers
- 2024New constructions of pseudorandom codes
- 2026LoopSpec: Pipelined Self-Speculative Decoding for Looped Transformers