Research

NIN Social
Brain Lab

Technical lead for the Social Brain Lab at the Netherlands Institute for Neuroscience. Two deliverables, one engagement: a public-facing website that lab members can maintain themselves with AI augmentation, and the experimental software for an fMRI social aggression paradigm where the deception has to hold for a full scanner session.

Client Netherlands Institute for Neuroscience
PIs Keysers & Gazzola
Year 2026 — ongoing
Type Research infrastructure

A neuroscience lab with research-grade questions and engineering-grade needs.

The Social Brain Lab studies how brains respond to others — pain, empathy, aggression, social agency. The science is world-class. The engineering bandwidth inside the lab is the engineering bandwidth of any working research group: a few people who can code, none of them full-time on infrastructure.

The engagement covers two distinct deliverables that needed the same shape of partner. A senior engineer who could design things lab members would own afterwards.

A public website the lab can run by itself.

The Social Brain Lab needed a public face. Seventeen pages: PI bios, group members, research areas, publications, news, opportunities. The constraint was the long-term one. The lab had to be able to update it without calling an engineer back every time a paper landed or a postdoc joined.

The architecture decision was an entity-driven static site. All content lives in versioned JSON files (one per entity: people.json, publications.json, projects.json). The pages render from those files at build time. Adding a person is a JSON edit, not an HTML edit.

The maintenance workflow uses ChatGPT Codex CLI plus GitHub plus Netlify. A lab member writes a natural-language change request ("add Dr. X to the postdoc list, replace her bio with this paragraph"), Codex makes the JSON edit, git push triggers Netlify deploy. No engineer in the loop. The lab tested it; it works.

entity-driven JSON static site generation Codex CLI GitHub + Netlify CI 17 pages

An fMRI experiment where the deception has to hold for the full scanner session.

The Social Brain Lab's aggression paradigm: a participant in an MRI scanner controls a pneumatic pump against what they believe is another human opponent. There is no opponent. The lab is measuring the empathy response to inflicting pain on someone the participant thinks is real.

For the measurement to be valid, the deception has to be airtight for sixty minutes of scanner time. A single tell breaks the experiment. The software is the experimental apparatus.

Two-panel schematic: entity-driven website on the left, fMRI experiment apparatus on the right
Left: entity-driven content architecture for the lab website. Right: pump-paradigm experiment with actor clips, blink-gated transitions, MRI sync.

The core design decisions:

  1. Real actor clips, not real-time synthesis. The technical design considered real-time face synthesis of opponent reactions and rejected it. Synthesis fails on pain expressions specifically — the uncanny-valley signal overlaps directly with the empathy measure the experiment is trying to capture. Pre-recorded clips from real actors, indexed by behavioural state, sidestep the problem.
  2. Blink-gated transitions. Cuts between clips happen during participant blinks, detected via eye-tracking. The participant never sees a discontinuity; the system can switch behavioural states without visible seams.
  3. Adaptive opponent behaviour. The opponent's apparent strategy responds to participant choices in plausible ways. Not random, not deterministic, behaviourally calibrated to feel like another person making decisions under the same constraints.
  4. MRI sync. Trial events are clocked against scanner pulses so the neuroimaging analysis can align stimuli to BOLD response down to TR-precision.

Two AI moves, two different reasons.

On the website: AI as a delegation tool. Codex turns natural language into deterministic edits, with git as the audit log. The lab gets autonomy without giving up version control or review.

On the experiment: AI as a research instrument. The opponent's adaptive behaviour is driven by a model that selects from the actor-clip library in response to participant actions. A rule-based system would be detectable; a model with the right inductive bias is not.

Where it stands.

v1
Website built, 17 pages, awaiting Netlify deploy
Design
Aggression experiment in technical design — platform, hardware, actor logistics
Open
Engagement open-ended; research infrastructure relationship

This is the engagement that anchors the research-track side of the practice. The relationship runs longer than any single deliverable, and the engineering decisions made here will shape the lab's experimental software stack for years.

Back to all work Discuss a project