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. The aim of this work is to investigate the cooperative behavior of Llama2, Llama3 and GPT3.5 when playing the Iterated Prisoner's Dilemma against random adversaries displaying various levels of hostility. I introduce a systematic methodology to evaluate an LLM's comprehension of the game's rules and its capability to parse historical gameplay logs for decision-making, showing the impact that different framing can have on the LLMs' prompt understanding. I conducted simulations of games lasting for 100 rounds and analyzed the LLM's decisions in terms of dimensions defined in the behavioral economics literature. I find that Llama2 and GPT3.5 exhibit more cooperative behavior than humans at every level of opponent hostility, although they maintain a cautious approach, requiring an opponent defection rate below 30% to significantly engage in cooperation. In contrast, Llama3 demonstrates behaviors more aligned with human results, showing greater strategic thinking, less cooperation, and more exploitative tendencies. These results indicate substantial variability in responses among different models, even in identical environments, games, and framings. My systematic approach to studying LLMs in game theoretical scenarios is a step towards using these simulations to inform practices of LLM auditing and alignment.
Il comportamento dei Large Language Models (LLM) come agenti sociali artificiali è in gran parte inesplorato e mancano ancora prove estensive su come questi agenti reagiscano a semplici stimoli sociali. Testare il comportamento degli agenti AI in esperimenti classici di Teoria dei Giochi fornisce un promettente quadro teorico per valutare le norme e i valori di questi agenti in situazioni sociali archetipiche. L'obiettivo di questo lavoro è investigare il comportamento cooperativo di Llama2, Llama3 e GPT3.5 giocando il Dilemma del Prigioniero ripetuto contro avversari casuali che mostrano vari livelli di ostilità. Introduco una metodologia sistematica per valutare la comprensione da parte di un LLM delle regole del gioco e la sua capacità di analizzare lo storico delle partite per prendere decisioni, mostrando l'impatto che diversi contesti possono avere sulla comprensione dei prompt da parte degli LLM. Ho condotto simulazioni di giochi della durata di 100 round e analizzato le decisioni degli LLM in termini di dimensioni definite nella letteratura dell'economia comportamentale. Trovo che Llama2 e GPT3.5 mostrano un comportamento più cooperativo rispetto agli esseri umani a ogni livello di ostilità dell'avversario, sebbene mantengano un approccio cauto, richiedendo un tasso di diserzione dell'avversario inferiore al 30% per impegnarsi significativamente nella cooperazione. Al contrario, Llama3 mostra comportamenti più allineati ai risultati umani, mostrando una maggiore capacità di pensiero strategico, meno cooperazione e tendenze più sfruttatrici. Questi risultati indicano una notevole variabilità nelle risposte tra i diversi modelli, anche in ambienti, giochi e contesti identici. Il mio approccio sistematico allo studio degli LLM in scenari teorici di gioco è un passo verso l'utilizzo di queste simulazioni per informare le pratiche di audit e allineamento degli LLM.
LLM's dilemma: analyzing the behaviors of Large Language Models in the iterated prisoner's dilemma
FONTANA, NICOLÒ
2023/2024
Abstract
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. The aim of this work is to investigate the cooperative behavior of Llama2, Llama3 and GPT3.5 when playing the Iterated Prisoner's Dilemma against random adversaries displaying various levels of hostility. I introduce a systematic methodology to evaluate an LLM's comprehension of the game's rules and its capability to parse historical gameplay logs for decision-making, showing the impact that different framing can have on the LLMs' prompt understanding. I conducted simulations of games lasting for 100 rounds and analyzed the LLM's decisions in terms of dimensions defined in the behavioral economics literature. I find that Llama2 and GPT3.5 exhibit more cooperative behavior than humans at every level of opponent hostility, although they maintain a cautious approach, requiring an opponent defection rate below 30% to significantly engage in cooperation. In contrast, Llama3 demonstrates behaviors more aligned with human results, showing greater strategic thinking, less cooperation, and more exploitative tendencies. These results indicate substantial variability in responses among different models, even in identical environments, games, and framings. My systematic approach to studying LLMs in game theoretical scenarios is a step towards using these simulations to inform practices of LLM auditing and alignment.File | Dimensione | Formato | |
---|---|---|---|
2024_07_Fontana_Thesis.pdf
accessibile in internet per tutti
Descrizione: Master Thesis
Dimensione
1.07 MB
Formato
Adobe PDF
|
1.07 MB | Adobe PDF | Visualizza/Apri |
2024_07_Fontana_ExecutiveSummary.pdf
accessibile in internet per tutti
Descrizione: Executive Summary
Dimensione
569.68 kB
Formato
Adobe PDF
|
569.68 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/223940