LLM生成随机数其实不随机,反而被训练数据中的认知偏见主导。
Deterministic or probabilistic? The psychology of LLMs as random number generators
- 通过不同模型、温度和提示语测试,发现LLM生成数字时表现高度确定性。
- 模型如DeepSeek-R1虽输出相似,但内部推理过程可揭示其非随机本质。
- 适合关注AI认知偏见与生成可靠性的人阅读。
大型语言模型(LLMs)通过基于概率的上下文感知机制实现文本生成,模拟人类自然语言。本文系统研究了多种LLM在生成随机数时的表现,涵盖不同模型架构、数值范围、温度设置及提示语语言。结果表明,尽管其基于随机性的Transformer架构,这些模型在要求生成随机数值时往往表现出确定性响应。特别是模型类型和提示语语言的变化导致显著差异,归因于训练数据中深层嵌入的偏见。例如,DeepSeek-R1模型虽与其他模型结果相似,但其内部推理过程可揭示模型运作机制。这些偏见引发可预测模式,削弱了真正的随机性,说明LLM本质上只是复现人类自身的认知偏见。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have transformed text generation through inherently probabilistic context-aware mechanisms, mimicking human natural language. In this paper, we systematically investigate the performance of various LLMs when generating random numbers, considering diverse configurations such as different model architectures, numerical ranges, temperature, and prompt languages. Our results reveal that, despite their stochastic transformers-based architecture, these models often exhibit deterministic responses when prompted for random numerical outputs. In particular, we find significant differences when changing the model, as well as the prompt language, attributing this phenomenon to biases deeply embedded within the training data. Models such as DeepSeek-R1 can shed some light on the internal reasoning process of LLMs, despite arriving to similar results. These biases induce predictable patterns that undermine genuine randomness, as LLMs are nothing but reproducing our own human cognitive biases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。