EP.005 · Research talk · NeurIPS 2022

Your Brain on Code: What Brains and AI Models Both Learn

Shashank Srikant · Runs Manana Labs, a boutique consulting group specializing in AI and deep tech

Hosted by Dr. Omar Costilla Reyes

First published On Interpretable Updated 38 minCognitive ScienceNeuroscienceInterpretable AI

Listen or watch

Download MP3(14 MB)
0:0037:38

Audio edition, 38 min. Keyboard: K play/pause, J back 15 s, L forward 30 s. The audio edition covers the first 38 minutes, the neuroscience part of the session. The hands-on coding tutorial that follows is in the video.

Full video, 2 hr 13 min.

Chapters(10)

About this episode

What happens in the brain when someone reads a program? In this session, Shashank Srikant reviews cognitive neuroscience research that uses fMRI recordings of programmers reading Python. Two brain systems that support very different kinds of thinking, the Multiple Demand system and the language system, each encode specific properties of code. He then shows how machine-learning models of code can be aligned with these brain recordings, and how programs can be modified so that a model predicts stronger responses in particular brain regions. That comparison is an interpretability method in its own right: lining up a model's internal representations with brain signals shows what the model encodes, and where it differs from people. It is why this episode sits on Interpretable.

Listen if: You are curious about cognitive neuroscience, brain imaging, or methods for understanding what AI models learn.

The research behind the episode

NeurIPS 20222022Peer reviewed

Convergent Representations of Computer Programs in Human and Artificial Neural Networks

Shashank Srikant, Benjamin Lipkin, Anna Ivanova, Evelina Fedorenko, et al.

Advances in Neural Information Processing Systems 35: 18834–18849

In plain language

The study uses fMRI recordings of programmers reading Python to ask which properties of a program the brain represents. It scores static and runtime properties of code against brain signals, then maps brain recordings onto the representations learned by machine-learning models of code.

Why it matters for health

Comparing brains with AI models is a growing tool in cognitive neuroscience: it shows what each system has learned, and where models of the mind need to improve.

Key findings

  1. 01The Multiple Demand system and the language system both encode specific properties of code.
  2. 02Both systems align with the representations learned by machine-learning models of code.
  3. 03The results point to at least two distinct neural mechanisms behind understanding and evaluating programs.

What you'll learn

  • How neuroscientists use fMRI to study reading and understanding code
  • Which brain systems are involved in program comprehension, and how they differ from reading language
  • How AI models of code can be compared with brain activity, and used to probe it

Working on something like this?

Suggest a guest or a paper for a future episode, or talk to equ about AI for health in your own work.