Google DeepMind 的一项新研究发现,大语言模型无法自主进行真正的随机选择,在采样时往往会陷入 7 或 42 等偏好数字。测试显示 Gemini、Qwen3 和 OLMo 模型在多次采样中均未通过目标概率的统计检验,调整 temperature 或 top-p 也无法解决该问题。研究者建议如果智能体需要随机性,应在代码中生成后传入,而不是直接要求模型产生随机行为。
New Google DeepMind paper finds that AI models cannot make truly random choices on their own, but larger models pick correctly when a computer program gives them a random number first.
Agents often need to pick actions at random with set odds, like checking servers in an unpredictable order. LLMs say they will pick uniformly, then keep landing on favorites like 7, 42, or answer C.
They asked Gemini, Qwen3, and OLMo models to sample from simple distributions 1024 times each. They also tried other temperature and sampling settings, and gave models a random number to convert.
Every reported statistical test for matching the target odds failed, and changing temperature or top-p did not fix it. In a security game where truly random checks let attackers win 75% of the time, Gemini's picks let them win 96.6% to 99.9%.
If your agent needs randomness, generate it in code and pass it in, instead of asking the model to be random.
来源:Rohan Paul · x.com