Turning large language models into cognitive models

Marcel Binz, Eric Schulz

Abstract

Large language models are powerful systems that excel at many tasks, ranging from translation to mathematical reasoning. Yet, at the same time, these models often show unhuman-like characteristics. In the present paper, we address this gap and ask whether large language models can be turned into cognitive models. We find that -- after finetuning them on data from psychological experiments -- these models offer accurate representations of human behavior, even outperforming traditional cognitive models in two decision-making domains. In addition, we show that their representations contain the information necessary to model behavior on the level of individual subjects. Finally, we demonstrate that finetuning on multiple tasks enables large language models to predict human behavior in a previously unseen task. Taken together, these results suggest that large, pre-trained models can be adapted to become generalist cognitive models, thereby opening up new research directions that could transform cognitive psychology and the behavioral sciences as a whole.

Introduction

While Large Language Models (LLMs) like GPT-4 exhibit remarkable capabilities, their behavior often diverges from human psychology. In sequential decision-making, for instance, LLMs may appear "too rational" or fail to replicate the specific learning curves and exploratory biases characteristic of human thought. Traditionally, cognitive scientists have relied on specialized mathematical models to explain these mental processes. However, these models are typically narrow and task-specific. This research introduces CENTaUR, a framework designed to bridge the gap between the broad capabilities of LLMs and the specific "human-likeness" required for cognitive modeling.

Methods

The researchers utilized LLaMA-65B as a foundation for the CENTaUR (Cognitive Embedding-based Neural Task-Augmented User Representation) framework. The process involves three key stages: converting psychological experiments into text-based prompts, extracting hidden activations (embeddings) from the frozen LLM's final layer, and training a simple regularized logistic regression layer on top of these embeddings to predict human choices.

The CENTaUR framework: converting experimental prompts into choices via LLM embeddings and a linear head.

The study employed two primary datasets: choices13k (decisions from descriptions with known odds) and the Horizon Task (decisions from experience requiring a balance of exploration and exploitation). A third, Experiential-Symbolic Task, served as a hold-out for generalization testing.

Results

The results demonstrate that LLM embeddings are "psychologically rich," containing the features necessary to mimic human biases when properly aligned via the linear head.

Superior Accuracy and Human-likeness

In the choices13k task, CENTaUR achieved a Negative Log-Likelihood (NLL) of 48,002.3, outperforming the traditional state-of-the-art model, BEAST (NLL = 49,448.1). Crucially, CENTaUR corrected the "super-human" tendencies of raw LLaMA. In the Horizon Task, CENTaUR matched human "regret" levels (2.38 vs. human 2.33), whereas raw LLaMA exhibited significantly higher regret (7.21).

Comparison of human behavior, raw LLaMA, and CENTaUR across decision-making tasks, showing regret levels and psychometric curves.

Qualitatively, CENTaUR matched human behavior in the Horizon Task by becoming more exploratory (random) when the time horizon was longer—a classic human trait that raw LLMs fail to exhibit.

Generalization and Individual Differences

CENTaUR successfully modeled individual differences by incorporating random effects into the linear layer. Furthermore, the model demonstrated zero-shot generalization; when trained on the first two tasks, it accurately predicted behavior in the third, unseen task. This suggests the model learns a general manifold of human decision-making rather than task-specific rules.

Discussion

CENTaUR represents a significant step toward a "foundation model of human cognition." While the model currently acts as a "black box" regarding the underlying mental mechanisms, future work using explainability techniques could reveal the symbolic logic within the embeddings. Expanding this approach to broader cognitive domains like language acquisition or social reasoning could transform behavioral science by providing a scalable tool for prototyping experiments and behavioral policy without requiring extensive human subjects.

Summary updated

BibTeX
@inproceedings{binz2024turning,
  author = {Marcel Binz and Eric Schulz},
  title = {{Turning large language models into cognitive models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=eiC4BKypf1},
}
Figure