arXiv:2412.07446cs.AIcs.CL2024-12ICML被引 8

GPT在生成文本时,隐含学习了因果世界模型,可判断动作序列是否合理。

A Causal World Model Underlying Next Token Prediction: Exploring GPT in a Controlled Environment

  • 从注意力机制推导出因果解释,构建GPT的隐式世界模型
  • 在国际象棋和五子棋模拟中,对随机合法走法预测准确率高
  • 可零样本检测序列合理性,适合验证生成逻辑可靠性

生成式预训练变换器(GPT)仅通过预测下一个词进行训练,是否隐式学习了一个由序列生成的世界模型?我们通过推导GPT注意力机制的因果解释,提出一个由此衍生的因果世界模型。进一步提出,在推理阶段,GPT可被用于输入序列的零样本因果结构学习,并引入相应置信度评分。在受控环境中,使用奥赛罗和国际象棋策略游戏设置进行实证测试。将一个在真实对弈数据上预训练的GPT模型,应用于分布外的合成数据——即由随机合法走法组成的序列。结果表明,当注意力机制编码了因果结构时,该模型能以高置信度生成合法下一步动作;若生成非法动作,则未能捕捉因果结构。

原文摘要 · Abstract (English)

Are generative pre-trained transformer (GPT) models, trained only to predict the next token, implicitly learning a world model from which sequences are generated one token at a time? We address this question by deriving a causal interpretation of the attention mechanism in GPT and presenting a causal world model that arises from this interpretation. Furthermore, we propose that GPT models, at inference time, can be utilized for zero-shot causal structure learning for input sequences, and introduce a corresponding confidence score. Empirical tests were conducted in controlled environments using the setups of the Othello and Chess strategy games. A GPT, pre-trained on real-world games played with the intention of winning, was tested on out-of-distribution synthetic data consisting of sequences of random legal moves. We find that the GPT model is likely to generate legal next moves for out-of-distribution sequences for which a causal structure is encoded in the attention mechanism with high confidence. In cases where it generates illegal moves, it also fails to capture a causal structure.

因果建模GPT生成模型零样本

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。