Abstract
One uniquely human trait is our inability to be random. We see and produce patterns where there should not be any and we do so in a predictable way. LLMs are supplied with human data and prone to human biases. In this work, we explore how LLMs approach randomness and where and how they fail through the lens of the well studied phenomena of generating binary random sequences. We find that GPT 4 and Llama 3 exhibit and exacerbate nearly every human bias we test in this context, but GPT 3.5 exhibits more random behavior. This dichotomy of randomness or humaness is proposed as a fundamental question of LLMs and that either behavior may be useful in different circumstances.
Introduction
Humans are famously poor at generating random sequences. We frequently fall prey to the "Gambler’s Fallacy" (negative recency), assuming that a streak of one outcome makes the alternative "due." We also exhibit a "heads-first" bias when asked to imagine coin tosses. As Large Language Models (LLMs) are trained on vast corpora of human-generated text, a critical question arises: do these models act as pure mathematical random number generators, or do they mirror—and perhaps amplify—human cognitive shortcuts?
Methodology
Researchers Katherine Van Koevering and Jon Kleinberg investigated this by treating LLMs as participants in behavioral experiments. They prompted GPT-3.5, GPT-4, and Llama 3 to "Flip 20 coins" and "Flip 20 fair coins." The study employed several analytical lenses:
- Temperature Variation: Testing models across a range of temperatures (0.0 to 1.5) to observe how stochasticity in token selection affects sequence patterns.
- N-gram Analysis: Analyzing overlapping 8-flip windows to compare model output with established human behavioral data (KLM and Rapoport et al. benchmarks).
- Predictability Testing: Using a LASSO regression model to predict the next flip in a sequence. A truly random sequence yields a Mean Squared Error (MSE) of 0.25; lower values indicate predictable patterns.
Key Insights and Results
The "Humanness" Paradox
A primary finding is that as models become more "advanced" and aligned with human preferences, they become less objectively random. GPT-4 and Llama 3 did not just mimic human biases; they often exacerbated them.
Exacerbated Alternation and Predictability
Humans tend to over-alternate between heads and tails, switching roughly 60% of the time instead of the expected 50%. At low temperatures, GPT-4 produced sequences that alternated nearly 100% of the time (e.g., H, T, H, T...). This makes these models significantly more predictable than humans. While human sequences typically yield an MSE of 0.24, GPT-4 and Llama 3 reached MSEs as low as 0.15 and 0.22, respectively.
GPT-3.5: The Random Outlier
Interestingly, the older GPT-3.5 proved more capable of producing random-looking sequences than its successor. It lacked the rigid alternation patterns seen in GPT-4, suggesting that further "alignment" training may be embedding human cognitive biases more deeply into model weights.
Instruction Sensitivity and Bias
The models showed a strong "First Flip Bias," starting with "Heads" over 88% of the time. Llama 3 exhibited an extreme bias at low temperatures, failing to produce a single "Tails" in 660 trials until the temperature was raised to 1.5. Furthermore, explicitly instructing the models to flip "fair" coins had negligible impact on these biases, indicating a gap between the models' semantic understanding of fairness and their ability to simulate it.
Discussion and Limitations
This study focuses on binary sequences, which are foundational but may not represent how LLMs handle more complex distributions. Additionally, a "temperature ceiling" exists; above 1.5, model output becomes incoherent, preventing analysis of whether extreme randomness can eventually override human-like bias. These findings suggest the need for standardized bias testing to help users determine when an LLM is providing unbiased assistance versus reflecting human error.
Summary updated