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 study where a simulated opponent has to stay believable for a full scanner session.

Client Netherlands Institute for Neuroscience
PIs Keysers & Gazzola
Year 2026
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 work directly with the researchers — no coordinator or technical translator in the middle — and build things the lab would own afterwards. The PIs describe the science. I translate that into engineering.

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 a simulated opponent has to stay believable for the full session.

The Social Brain Lab's aggression study: a participant in an MRI scanner controls a pneumatic pump against what they believe is another person. The opponent is simulated. The lab is measuring the empathy response to inflicting pain on someone the participant takes to be real.

For the measurement to be valid, the simulated opponent has to stay believable for the full scanner session. 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.

The kind of partner a research lab actually needs.

This is the engagement that anchors the research side of the practice. The relationship runs longer than any single deliverable. A lab does world-class science and carries a thin engineering team, so it needs someone who can design infrastructure the lab will own afterwards: a website it can run without calling an engineer back, and experimental software precise enough to publish on.

The same need shows up in the quieter work alongside it. A research group running modern AI tools has to run them safely, and that is its own engineering problem.

Back to all work Discuss a project