Decoding the Representation of Code in the Brain: An fmri Study of Code Review and Expertise

Similar documents
Code Inspection and the Brain

Decoding the representation of code in the brain: An fmri study of code review and expertise

Maguire (2000) Navigation-related structural changes in the hippocampi of taxi drivers.

Classification and Statistical Analysis of Auditory FMRI Data Using Linear Discriminative Analysis and Quadratic Discriminative Analysis

Twelve right-handed subjects between the ages of 22 and 30 were recruited from the

Case reports functional imaging in epilepsy

Functional MRI Mapping Cognition

Methods for Seeing the Brain (

PHYSICS OF MRI ACQUISITION. Alternatives to BOLD for fmri

Functional Elements and Networks in fmri

fmri: What Does It Measure?

An Overview of a MEG Study

WHAT DOES THE BRAIN TELL US ABOUT TRUST AND DISTRUST? EVIDENCE FROM A FUNCTIONAL NEUROIMAGING STUDY 1

Rajeev Raizada: Statement of research interests

The neurolinguistic toolbox Jonathan R. Brennan. Introduction to Neurolinguistics, LSA2017 1

Outline. Biological Psychology: Research Methods. Dr. Katherine Mickley Steinmetz

Feature Integration Theory

Image Classification with TensorFlow: Radiomics 1p/19q Chromosome Status Classification Using Deep Learning

A U. Methods of Cognitive Neuroscience 2/8/2016. Neat Stuff! Cognitive Psychology

Procedia - Social and Behavioral Sciences 159 ( 2014 ) WCPCG 2014

MSc Neuroimaging for Clinical & Cognitive Neuroscience

Incorporation of Imaging-Based Functional Assessment Procedures into the DICOM Standard Draft version 0.1 7/27/2011


Action Recognition. Computer Vision Jia-Bin Huang, Virginia Tech. Many slides from D. Hoiem

PsychoBrain. 31 st January Dr Christos Pliatsikas. Lecturer in Psycholinguistics in Bi-/Multilinguals University of Reading

Methods to examine brain activity associated with emotional states and traits

Detection of Cognitive States from fmri data using Machine Learning Techniques

Eye movements, recognition, and memory

Improving Attention and Learning in Children & Adolescents: The Role of Working Memory

Classification of Honest and Deceitful Memory in an fmri Paradigm CS 229 Final Project Tyler Boyd Meredith

An Overview of BMIs. Luca Rossini. Workshop on Brain Machine Interfaces for Space Applications

Neuroimaging and Assessment Methods

Classical Conditioning V:

Contributions to Brain MRI Processing and Analysis

Title:Atypical language organization in temporal lobe epilepsy revealed by a passive semantic paradigm

Neural Correlates of Human Cognitive Function:

Chapter 5. Summary and Conclusions! 131

Evaluation for Epilepsy Surgery

Introduction to Computational Neuroscience

The Brain and Behavior

Computational Cognitive Neuroscience (CCN)

Group-Wise FMRI Activation Detection on Corresponding Cortical Landmarks

Introduction. Visual Perception Aditi Majumder, UCI. Perception is taken for granted!

Beyond R-CNN detection: Learning to Merge Contextual Attribute

A possible mechanism for impaired joint attention in autism

Test Bank. Multiple Choice

Multitasking: Why Your Brain Can t Do It and What You Should Do About It.

Evaluating Quality in Creative Systems. Graeme Ritchie University of Aberdeen

Social and Pragmatic Language in Autistic Children

Prof. Greg Francis 7/31/15

Recording ac0vity in intact human brain. Recording ac0vity in intact human brain

Seamless pre-surgical fmri and DTI mapping

A hierarchical modeling approach to data analysis and study design in a multi-site experimental fmri study

Edge Detection Techniques Using Fuzzy Logic

University of Cambridge Engineering Part IB Information Engineering Elective

Biomarkers Workshop In Clinical Trials Imaging for Schizophrenia Trials

COGNITIVE SCIENCE 17. Peeking Inside The Head. Part 1. Jaime A. Pineda, Ph.D.

Evolutionary Psychology 12/6/2012

1st Degree Goal Setting

Table 1. Summary of PET and fmri Methods. What is imaged PET fmri BOLD (T2*) Regional brain activation. Blood flow ( 15 O) Arterial spin tagging (AST)

Ch.20 Dynamic Cue Combination in Distributional Population Code Networks. Ka Yeon Kim Biopsychology

Introduction to Computational Neuroscience

What do you think of the following research? I m interested in whether a low glycemic index diet gives better control of diabetes than a high

Classifying instantaneous cognitive states from fmri data

An fmri Phantom Based on Electric Field Alignment of Molecular Dipoles

Supplementary Information Methods Subjects The study was comprised of 84 chronic pain patients with either chronic back pain (CBP) or osteoarthritis

Representational similarity analysis

Comparing event-related and epoch analysis in blocked design fmri

Supplementary materials for: Executive control processes underlying multi- item working memory

PHYSIOLOGICAL RESEARCH

Vault Reconstruction System. Meet Your Match

Eavesdropping on the Mind. COGS 17 - Winter 2019 Andrew Shibata

THEMATIC CONCENTRATIONS (See following pages for details)

Brain Imaging Applied to Memory & Learning

mri sequences 8267BD21D03EEA3AE7926DD1904E7425 Mri Sequences 1 / 6

8/24/2018. Welcome to Biopsychology! Areas of Study Within Biopsychology and Some Related Disciplines. Jane Goodall studying chimpanzees

Introduction to Functional MRI

BOLD Based MRI Functional Connectivity December 2, 2011

ANALYSIS AND DETECTION OF BRAIN TUMOUR USING IMAGE PROCESSING TECHNIQUES

Carnegie Mellon University Annual Progress Report: 2011 Formula Grant

The Methods of Cognitive Neuroscience. Sensory Systems and Perception: Auditory, Mechanical, and Chemical Senses 93

Can neuromarketing help predict food purchase & preference?

Prediction of Successful Memory Encoding from fmri Data

POC Brain Tumor Segmentation. vlife Use Case

Edinburgh Imaging Academy online distance learning courses. Functional Imaging

Simultaneous Measurement of Program Comprehension with fmri and Eye Tracking: A Case Study

Neuroanatomy of Emotion, Fear, and Anxiety

Identification of Neuroimaging Biomarkers

(SAT). d) inhibiting automatized responses.

Managing The Difficult Colleague Jeff Morris MD, MBA, FACS: Physician Coach & National Speaker Studer Group

Training fmri Classifiers to Discriminate Cognitive States across Multiple Subjects

Cognitive Science (COG SCI)

2017 Edument AB. All Rights Reserved. Stepping Back: The Big Picture

Which Division Of The Nervous System Controls The Ability To Dance

IBDP Subject Overview Subject Area: _Psychology DP Level: SL

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2014

Neural Networks: Tracing Cellular Pathways. Lauren Berryman Sunfest 2000

Flightfax R Online newsletter of Army aircraft mishap prevention information

Transcription:

Decoding the Representation of Code in the Brain: An fmri Study of Code Review and Expertise Benjamin Floyd, Tyler Santander, University of Virginia University of Michigan

University of Michigan Looking to grow in PL/SE over next few years Have your senior PhD students contact me 2

Understanding Understanding Source Code (ICSE 2014) Described an fmri study framework for SE Found five brain regions associated with code comprehension Encouraged future fmri+se research

Understanding Understanding Source Code (ICSE 2014) Described an fmri study framework for SE Found five brain regions associated with code comprehension Encouraged future fmri+se research Today: Understanding 'Understanding Understanding Source Code'?

Special Note This Talk Advertisement for the paper Elide analysis details for time Confidence in results Motivation and Background Experiment and Results Call to Arms

Expertise Individual differences in programming and debugging time, as well as program efficiency, can vary up to 28:1 Novices and experts solve physics problems with different efficiency and categorize them differently Medical imaging studies have found neural correlates of expertise/learning in golf, juggling, London taxi navigation, etc. Could this apply to CS? 6

Functional Magnetic Resonance Imaging (fmri) Noninvasive way to study the neurobiological substrates of cognitive functions in vivo Which parts of the brain are in use? Your brain needs energy but does not store it So can track where oxygen is consumed Oxygenated and deoxygenated hemoglobin have different magnetic properties that can be detected Millimeter scale (>> EEG or PET, etc.) Blood-oxygen level dependent (BOLD) signal 7

A Study in Contrasts A subject might be doing multiple things e.g., reading code and being nervous How can we tell if an observed pattern of activation corresponds to one activity? Experimental design and control Task A = reading code + nervous +... Task B = reading prose + nervous +... The contrast A-B shows patterns of brain activation that vary between the stimuli/tasks 8

High-Level Question Is reading code more like doing math or more like reading prose? 9

Code Review and Comprehension Developers spend more time understanding and comprehending code than any other activity NASA: understanding > correctness for reuse Code review is a de facto standard Should we accept this commented patch? Mandated in Facebook, Google, etc. One of the most effective techniques in software development 10

Experimental Design: 3 Tasks Code Comprehension Code Review (top 100 GitHub repos) Prose Review (College Board SAT, etc.) 11

Experiment Setup and Data 29 grads and undergrads (38% women) Right-handed, native English speakers, correctedto-normal vision, IRB-HSR #18420, etc. Placed in fmri, computer projection displayed via mirror A single participant completing four 11-minute runs produces 399,344,400 floating point numbers of data (153,594 voxels 650 volumes 4 runs) 12

Dead Fish and Software Bugs 13

Results: Mind Reading We can classify which task a participant is undertaking based solely on brain activity Balanced accuracy 79%, p <.001 These results suggest that Code Review, Code Comprehension, and Prose Review all have largely distinct neural representations 14

Results: Can we relate tasks to brain regions? Near-perfect correspondence: r=0.99, p<.001 A wide swath of prefrontal regions known to be involved in higher-order cognition (executive control, decision-making, language, conflict monitoring, etc.) were highly weighted Activity in those areas strongly drove the distinction between code and prose processing 15

Results: Can we relate expertise to classification accuracy? Expertise = (CS GPA) * (CS Credits Taken) How accurately our model distinguishes between Code Comprehension and Prose significantly predicted expertise (r = -0.44, p=0.016) The inverse relationship between accuracy and expertise suggests that, as one develops more skill in coding, the neural representations of code and prose are less differentiable. That is, programming languages are treated more like natural languages with greater expertise. 16

Costs and Reproducible Research Easy: recruiting Medium: equipment cost ($500/hour) Hard: IRB, HIPAA, experimental design All datasets and materials available online Including IRB protocol application, recruitment materials, screening forms, training videos, visual stimuli, etc. http://dijkstra.cs.virginia.edu/fmri/ 17

Future Studies Social relationships (boss over shoulder) Patch provenance (cheating) Industrial expertise (replicate protocol) Writing code (fmri-safe keyboard) Transcranial magnetic stimulation (read-write) Does any of this sound interesting? 18

Call To Arms By what mechanism do humans experience consciousness? Extending the human subjective experience of consciousness over time is a most important problem: NP-Hard in the sense that solving it would allow us to solve others. Is it solvable? I have funding and am looking for collaborators Come talk to me 19

Conclusion These studies are still exploratory Neural representations of programming and natural languages are distinct Our classifiers distinguish them based solely on brain activity The area is wide open for future work The same brain locations distinguish these tasks Greater expertise accompanies a lessdifferentiated neural representation 20

Bonus Slides 21

Medical Imaging and CS Future Potential Replace unreliable self-reporting Inform pedagogy Retrain aging engineers Guide technology transfer Understand expertise Foundational, fundamental understanding 22

Preprocessing and Overfitting A significant challenge in fmri analysis is processing the data correctly We cannot naively build a model from 150,000 features and 100 labeled instances Align and unwarp data, coregistered with a highresolution anatomical scan, generalized linear models, high pass filters, robust weighted least squares, multivariate Gaussian process classification, feature selection via Automated Anatomical Labeling atlas, kernel function, expectation propagation 23

Taxi Driver Study We found that compared with bus drivers, taxi drivers had greater gray matter volume in mid-posterior hippocampi and less volume in anterior hippocampi. Furthermore, years of navigation experience correlated with hippocampal gray matter volume only in taxi drivers, with right posterior gray matter volume increasing and anterior volume decreasing with more navigation experience. Maguire et al., London taxi drivers and bus drivers: a structural MRI and neuropsychological analysis. 24