Research

Convergent representations of computer programs in human and artificial neural networks

NeurIPS

Authors

Published on

12/04/2022

Categories

NeurIPS Neuroscience

What aspects of computer programs are represented by the human brain during comprehension? We leverage brain recordings derived from functional magnetic resonance imaging (fMRI) studies of programmers comprehending Python code to evaluate the properties and code-related information encoded in the neural signal. We first evaluate a selection of static and dynamic code properties, such as abstract syntax tree (AST)-related and runtime-related metrics. Then, to learn whether brain representations encode fine-grained information about computer programs, we train a probe to align brain recordings with representations learned by a suite of ML models. We find that both the Multiple Demand and Language systems–brain systems which are responsible for very different cognitive tasks, encode specific code properties and uniquely align with machine learned representations of code. These findings suggest at least two distinct neural mechanisms mediating computer program comprehension and evaluation, prompting the design of code model objectives that go beyond static language modeling. We make all the corresponding code, data, and analysis publicly available at https://github.com/ALFA-group/code-representations-ml-brain

Please cite our work using the BibTeX below.

@inproceedings{
srikant2022convergent,
title={Convergent Representations of Computer Programs in Human and Artificial Neural Networks},
author={Shashank Srikant and Ben Lipkin and Anna A Ivanova and Evelina Fedorenko and Una-May O'Reilly},
booktitle={Advances in Neural Information Processing Systems},
editor={Alice H. Oh and Alekh Agarwal and Danielle Belgrave and Kyunghyun Cho},
year={2022},
url={https://openreview.net/forum?id=AqexjBWRQFx}
}
Close Modal