Nicer Than Humans: How do Large Language Models Behave in the Prisoner's Dilemma?
作者: Nicoló Fontana, Francesco Pierri, Luca Maria Aiello
分类: cs.CY, cs.AI, cs.GT, physics.soc-ph
发布日期: 2024-06-19 (更新: 2024-09-19)
备注: v1: 9 pages, 8 figures, 1 table v2: 11 pages, 14 figures, 1 table. Increased number of models studied, expanded results and conclusion, added references, corrected typos
💡 一句话要点
在囚徒困境中LLM表现优于人类:评估AI代理的合作行为与价值观
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 囚徒困境 博弈论 合作行为 社会代理 AI对齐 行为经济学
📋 核心要点
- 现有研究缺乏对LLM作为社会代理行为的深入探索,尤其是在简单社会刺激下的反应。
- 该研究采用迭代囚徒困境,评估LLM在博弈中的合作行为,并分析其对规则的理解和决策能力。
- 实验结果表明,LLM在合作性上至少与人类相当,部分模型甚至优于人类,但模型间存在差异。
📝 摘要(中文)
本文探讨了大型语言模型(LLMs)作为人工社会代理的行为,旨在评估它们在简单社会刺激下的反应。通过在迭代囚徒困境中测试LLMs(Llama2、Llama3和GPT3.5)与不同敌意程度的对手的博弈行为,研究人员建立了一个评估AI代理规范和价值观的理论框架。该研究提出了一种系统的方法,用于评估LLM对游戏规则的理解以及解析历史游戏日志以进行决策的能力。通过模拟100轮的博弈,分析了LLMs在行为经济学维度上的决策。结果表明,所有模型都不倾向于主动背叛,而是谨慎行事,仅在对手背叛率较低时才倾向于合作。总体而言,LLMs的行为至少与典型的人类玩家一样具有合作性,但不同模型之间存在显著差异。Llama2和GPT3.5比人类更具合作性,尤其是在对手背叛率低于30%时,表现出更强的宽容性和非报复性。Llama3则更像人类,除非对手始终合作,否则会表现出持续的不合作和剥削行为。这种研究LLMs在博弈论场景中的系统方法,是利用这些模拟来指导LLM审计和对齐实践的一步。
🔬 方法详解
问题定义:论文旨在研究大型语言模型(LLMs)在模拟社会情境下的行为模式,具体选择迭代囚徒困境作为实验环境。现有方法缺乏对LLM在博弈论场景下合作行为的系统性评估,难以理解其内在的价值观和行为准则。
核心思路:论文的核心思路是将LLM视为人工社会代理,通过让它们参与迭代囚徒困境,观察其在不同策略对手下的决策行为。这种方法能够揭示LLM在合作与背叛之间的权衡,从而评估其合作倾向和对社会规范的理解。通过分析LLM的历史游戏记录,可以进一步了解其决策过程和策略演变。
技术框架:该研究的技术框架主要包括以下几个阶段:1) 选择LLM模型(Llama2, Llama3, GPT3.5);2) 设计迭代囚徒困境的博弈环境,包括对手策略(不同背叛率的随机策略);3) 编写提示词,引导LLM理解游戏规则并进行决策;4) 进行多轮博弈模拟(100轮);5) 记录和分析LLM的决策行为,包括合作率、背叛率、报复性等指标。
关键创新:该研究的关键创新在于:1) 系统性地将LLM置于博弈论场景中进行评估,提供了一种量化LLM社会行为的方法;2) 引入了行为经济学的维度来分析LLM的决策,例如宽容性、报复性等;3) 揭示了不同LLM模型在合作行为上的差异,为LLM的审计和对齐提供了新的视角。
关键设计:关键设计包括:1) 提示词的设计,确保LLM能够理解游戏规则并做出合理的决策;2) 对手策略的设计,涵盖了不同程度的合作和背叛,以测试LLM的适应性;3) 评估指标的选择,包括合作率、背叛率、宽容性、报复性等,以全面评估LLM的合作行为。
🖼️ 关键图片
📊 实验亮点
实验结果表明,Llama2和GPT3.5在对手背叛率低于30%时,比人类更具合作性,表现出更强的宽容性和非报复性。Llama3则表现出更接近人类的不合作和剥削行为,除非对手始终合作。这些结果揭示了不同LLM在合作行为上的差异,为LLM的审计和对齐提供了重要参考。
🎯 应用场景
该研究成果可应用于LLM的审计和对齐,帮助开发者了解LLM的潜在行为风险,并设计更符合人类价值观的AI系统。通过博弈论模拟,可以评估LLM在不同社会情境下的决策,从而提高其可靠性和安全性。此外,该方法还可以用于研究其他AI代理的社会行为,促进人机协作的优化。
📄 摘要(原文)
The behavior of Large Language Models (LLMs) as artificial social agents is largely unexplored, and we still lack extensive evidence of how these agents react to simple social stimuli. Testing the behavior of AI agents in classic Game Theory experiments provides a promising theoretical framework for evaluating the norms and values of these agents in archetypal social situations. In this work, we investigate the cooperative behavior of three LLMs (Llama2, Llama3, and GPT3.5) when playing the Iterated Prisoner's Dilemma against random adversaries displaying various levels of hostility. We introduce a systematic methodology to evaluate an LLM's comprehension of the game rules and its capability to parse historical gameplay logs for decision-making. We conducted simulations of games lasting for 100 rounds and analyzed the LLMs' decisions in terms of dimensions defined in the behavioral economics literature. We find that all models tend not to initiate defection but act cautiously, favoring cooperation over defection only when the opponent's defection rate is low. Overall, LLMs behave at least as cooperatively as the typical human player, although our results indicate some substantial differences among models. In particular, Llama2 and GPT3.5 are more cooperative than humans, and especially forgiving and non-retaliatory for opponent defection rates below 30%. More similar to humans, Llama3 exhibits consistently uncooperative and exploitative behavior unless the opponent always cooperates. Our systematic approach to the study of LLMs in game theoretical scenarios is a step towards using these simulations to inform practices of LLM auditing and alignment.