The course
Studying machines as behaving objects
Large language models are now consulted by hundreds of millions of people, yet nobody — including the teams that build them — can say with confidence how they produce what they produce. They are neural networks with billions of parameters, trained on corpora too large to inspect. Their most interesting capacities — in-context learning, apparent reasoning, apparent theory of mind — were not designed in but emerged, and emergent capacities are precisely the ones that cannot be read off from the components that gave rise to them.
There are two ways to understand such a system. One is to look inside, tracing how weights and activations implement behaviour: mechanistic interpretability, the analogue of neuroscience. The other is to look at what the system does — to treat the model as a black box, manipulate its inputs, measure its outputs, and infer the processes that best explain the relationship between them. This is the analogue of psychology, and the subject of the week.
The idea of studying machines as behaving objects is not new: Herbert Simon held that artificial intelligence is a genuine empirical science, and Rahwan and colleagues argued in 2019 for a science of machine behaviour. The specific proposal to run models through the experimental paradigms of human psychology was crystallised by Hagendorff and colleagues as machine psychology. The premise of this week is that the programme is a rigorous method rather than a loose analogy — provided we are careful about two things: the epistemology that licenses the inference, and the fact that we are studying what one might call an alien mind, a system that perceives and acts through a world of tokens, not bodies and senses, and whose behaviour may look human while resting on quite different underlying processes.
That tension organises the course. Machine psychology is legitimate; the same inferential logic that lets us attribute latent processes to humans applies to any cognitive system. But the interpretation is not transferable wholesale, and the temptation to read a model as we read a person is exactly what makes the discipline both necessary and hazardous.
Who this is for. Master's and PhD students in cognitive science, behavioural science and machine learning. No prior modelling background is assumed; the little that is needed is built up gently over the week. Mornings are lectures; afternoons are a hands-on group project, presented on the Friday.
Instructors
Team
Stefan de Lavergne
Teaching assistant
Contact: machinepsychologycourse@gmail.com. This generic address will redirect emails to our personal accounts.
At a glance
The week
Each morning lecture supplies a premise the afternoon session then puts to work. The logic runs motivation → licence → method → interpretation: each lecture removes an objection to the next.
Timetable subject to final confirmation by the PSL week administration.
Mornings
The four lectures
Click any lecture to expand its content, learning objectives and core readings.
L1 Why machine psychology? The black box and the case for behaviour What are these systems, why must we discover how they work despite having built them, and why through behaviour rather than code? expand
The lecture opens with a shared-ground primer — what is a language model: a network trained to predict the next token, the tokeniser, the transformer's attention mechanism, and a first pass over the training pipeline (pretraining, supervised fine-tuning, RLHF, and increasingly RLVR). It then states the paradox: we hold every weight and still cannot account for the competence, because the interesting capacities emerged. It distinguishes the two research programmes — mechanistic interpretability (look inside; currently limited to narrow circuits) and behavioural study (input–output relations) — and places the enterprise in its lineage from Simon through Rahwan to Hagendorff. The load-bearing distinction is between a benchmark (how well a system performs) and a psychological experiment (designed so that different underlying processes yield different behaviours). It closes on a first result: Binz and Schulz on GPT-3, and biases that appeared in one model generation and vanished in the next.
L2 The philosophical foundations: methodological behaviourism and the behavioural inference principle Are we entitled to infer unobservable cognitive processes from observable behaviour — on what grounds, and against which classic objections? expand
The lecture begins from the claim that cognitive science, its self-image notwithstanding, is at root a methodological behaviourism: it infers latent processes that best explain public behaviour, always open to correction. It anchors this in Turing's 1950 imitation game — the behavioural inference principle is at once Turing's heir and his correction — and introduces the explanandum/explanans distinction to police the confusion between behaviour and the constructs that explain it. The inferential machinery is built gently as a conceptual Bayes rule: the probability of a process given a behaviour rises with how specifically the process predicts it (likelihood), is weighted by how plausible the process is in this kind of system (prior), and is discounted by how easily the behaviour could arise otherwise (marginal). This single expression explains why identical behaviour warrants different conclusions in a human, a monkey and a model, and makes the mimicry problem precise. The lecture separates behavioural equivalence, computational equivalence and the behavioural inference principle; meets the Chinese Room, Blockhead and zombie objections from within an inductive framework; and turns the lens on the interpreter, naming the biases that distort both inflationary and deflationary readings.
- Palminteri & Wu, Beyond computational equivalence: the behavioural inference principle (2026) primary
- Turing, Computing machinery and intelligence, Mind (1950) historical anchor
- Palminteri & Pistilli, The cognitive biases that may exacerbate inflationary and deflationary positions about LLMs (2026)
- Niv, The primacy of behavioral research for understanding the brain (2021)
- Shanahan, Talking about large language models (2022) counter-voice
Where the disagreement lives
Whether behaviour can ever suffice (Block, Searle, biological-naturalist positions) versus the functionalist and methodological-behaviourist reply. Both are taught.
L3 Adapting the experiment: task design, analysis, and the notion of subject How must a psychological experiment be rebuilt when the subject has no body, no fixed identity, a possibly contaminated memory of the test, and outputs that shift with the wording of the prompt? expand
The lecture reactivates the primer from Lecture 1 and draws out its consequences: each training stage shapes behaviour and priors differently, which is why the mechanics matter for design. It introduces the Umwelt of the model — von Uexküll's term for the world as a creature perceives and acts on it — as the organising idea: the model's world is a stream of token identifiers, so tasks built on human sensory experience do not translate cleanly. It then works through the design problems: modality (converting a perceptual paradigm into text without giving the answer away), contamination (the model may have seen the test in training, so one measures retrieval rather than cognition — with remedies including reframing, procedural generation and black-box detection), and prompt variability and stochasticity (small wording changes and sampling both move the output, requiring paraphrase batteries and repeated administration). This yields the reconceived notion of subject: a model is better treated as a population of participants than as one individual, which reshapes the statistics.
- Yax & Palminteri, The motivation and methods for machine psychology (chapter) primary provided in class
- Hagendorff et al. (2024) — design-and-analysis section
- Ivanova, Running cognitive evaluations on LLMs: the do's and don'ts (2023)
- Hayes, Yax & Palminteri, Relative value biases in LLMs (2024) worked example
L4 Scope and interpretation: alien minds, anthropomorphism, and the limits of the claim Once we have a clean result, what may we conclude? Can models stand in for human participants? And how do we keep interpretation honest? expand
The lecture returns to the Bayesian compass from Lecture 2 to make the central interpretive point precise: the likelihood term is system-independent, but the prior is not, because a network trained on text need not develop the mechanisms evolution installed in brains. So similar behaviour need not mean similar cognition; behavioural correspondence is the beginning of an inference, not its conclusion. It develops the specific hazards — anthropomorphism (importing human interpretive defaults into a system that does not share our Umwelt) and goal alignment (which answer the model is even trying to give: the statistically human answer, the answer a user would like, or the correct one). It surveys the encouraging-but-contested proposals to use models as substitutes for human participants and defends the course's position — the method is legitimate, the substitution is not automatic — before extending the inflationary/deflationary frame into the ethical and public, with the consciousness debate as the sharpest case study.
- Palminteri & Pistilli (2026) — ethical/public stakes and moral status
- Palminteri & Wu (2026) — priors and consciousness attribution
- Mahowald et al., Dissociating language and thought in large language models (2024)
- Shanahan, McDonell & Reynolds, Role play with large language models, Nature (2023)
- Butlin et al., Consciousness in artificial intelligence (2023) optional contrast
Where the disagreement lives
The whole lecture is disagreement — substitution optimists versus sceptics, inflationary versus deflationary readings, consciousness attributed versus withheld. The aim is fluency in the strongest version of each, not settlement.
Afternoons
The practical strand
The mornings argue that machine psychology is a legitimate method; the afternoons make you do it. Working in small groups, you will turn a psychological result into a contamination-aware, prompt-robust experiment on a language model, collect data, analyse it as one would analyse a human sample, and defend an interpretation calibrated to the evidence. That experience is what makes the morning caveats concrete: the anthropomorphism worries of Lecture 4 land far harder once you have felt how difficult a clean, prompt-robust task is to build.
The five sessions follow the dependency structure of an experiment, compressed into a week: fix a question and a prior, design a text-based task compatible with the model's Umwelt, control for contamination and variability, collect data, analyse the model as a population, and interpret with the Bayesian compass. A throwaway pilot is pushed into Monday afternoon on purpose — the fastest way to expose a broken task is to run it once.
Two tracks, one experiment
Every group works on the same scientific object but reaches it by one of two routes, so a mixed cohort can move together. Using a language model as a coding assistant is explicitly encouraged — a fitting move in a course about language models.
Template track
A minimal, well-documented starter repository — an API client, a prompt-batching loop, a results logger — which you extend to your own task.
Notebook track
A fuller, cell-by-cell notebook that already implements one complete example experiment (the text bandit task), which you adapt by changing the task text, conditions and analysis rather than writing the scaffolding.
Session by session
MonTopic, pipeline, first contactexpand
By the end, each group has chosen a topic and can state in one sentence the psychological finding it will test; has seen the full pipeline demonstrated on one worked example (the text bandit task); has working online access to at least one open-weight model; and has run a throwaway pilot — one prompt sent, one response logged — to confirm the plumbing works. This is the “first contact” that surfaces access problems while a TA is in the room to fix them.
Checkpoint: a one-line topic statement approved by an instructor, and one logged model response.
TueSharpening the question, building the taskexpand
Convert a topic into a defensible experiment. Groups write their question as a behavioural inference — which cognitive process, from which behaviour, against which alternative, and what would each hypothesis predict? — and design the task so that different underlying processes would produce different behaviours. Three design obligations are imposed as a checklist before any real data are collected: contamination (is the item one the model likely saw in training, and how will that be reframed or checked?), prompt variability (prepare a battery of paraphrases, not a single wording), and stochasticity (administer each condition many times).
Checkpoint: a written task specification — question as inference, task text, paraphrase set, contamination and repetition plan.
WedData collection and first analysisexpand
Groups run the full design — every condition, across the paraphrase battery, repeated enough to estimate response distributions — and, where their question and provider allow, run a contamination check. They then analyse, treating each of the model's repeated responses as analogous to one participant, which licenses ordinary population statistics and comparison with a human reference. Groups that finish early begin the model-comparison extension: repeating the experiment on a second, deliberately different open-weight model.
Checkpoint: a dataset and at least one figure or statistic bearing on the research question.
ThuInterpretation and presentation preparationexpand
Groups assemble the Friday talk around the pipeline they have walked, and apply the Bayesian compass honestly: behavioural similarity to humans is the beginning of an inference, not its end. They name the confounds their result cannot escape — goal alignment chief among them — and state where their result sits between the inflationary and deflationary readings. A strong talk states what the result licenses and, in the same breath, what it does not.
Checkpoint: a complete draft presentation and a completed rehearsal.
FriPresentations and validationexpand
Each group presents and defends its experiment (a ten-to-fifteen-minute talk with questions). This is the assessed deliverable. The rubric rewards methodological honesty over headline results: a clean null, well interpreted, passes as comfortably as a positive finding.
Project menu
Candidate topics
Pick from this list or propose your own for instructor approval. Every topic must have a clear human result to test against, be renderable in text without depending on perception, and admit a discriminating design rather than a benchmark.
Reinforcement learning & value encoding
The text bandit task: does a model encode absolute or relative value? The chapter's own worked example, with scaffolding ready to go.
Heuristics & biases
Framing, anchoring, the conjunction fallacy, base-rate neglect — rendered in text. Contamination is the central obstacle, and therefore the central lesson.
The Cognitive Reflection Test & contamination
Use a heavily-memorised instrument to study contamination: detect it, reframe items, and show the behaviour change. Best with log-probability access.
Social & economic games
Ultimatum, dictator, trust, prisoner's dilemma as text — do model choices track human distributions? Goal alignment (sycophancy) is the interpretive crux.
Prompt sensitivity as the object
Rather than treating paraphrase variation as noise, measure it: how much does a meaning-preserving reformatting move a decision?
Cross-model comparison
Take any one effect and ask whether it holds across deliberately different open-weight models, using PhyloLM-style reasoning to choose them.
Validation
Assessment
Assessment is pass/fail on two binding criteria taken together: attendance across the week, and a satisfactory final group presentation on the Friday. A lightweight, shared rubric is communicated on Monday so the target is known from the outset.
A strong presentation shows:
A clear research question stated as an inference A task that could actually discriminate the hypotheses Visible handling of contamination, prompt variability & stochasticity An analysis that treats the model as a population An interpretation calibrated to the evidence, including its limitsThe rubric rewards methodological honesty over headline results. A resit route (a revised presentation or short written report) is available within the following week.
Bibliography
Core reading list
One primary paper per evening is a sensible load for a one-week intensive; the remaining titles are offered as optional depth. Links point to the publisher of record or an open preprint.