Learning to program “recycles” preexisting frontoparietal population codes of logical algorithms - Liu (劉耘非), Yun-Fei; Bedny, Marina (The Journal of neuroscience, 2025)
Computer programming is a cornerstone of modern society, yet little is known about how the human brain enables this recently invented cultural skill. According to the neural recycling hypothesis, cultural skills (e.g., reading, math) repurpose preexisting neural “information maps”. Alternatively, such maps could emerge de novo during learning, as they do in artificial neural networks. Representing and manipulating logical algorithms, such as “for” loops and “if” conditionals, is key to programming. Are representations of these algorithms acquired when people learn to program? Alternatively, do they predate instruction and get “recycled”? College students (n=22, 11 females and 11 males) participated in a functional magnetic resonance imaging (fMRI) study before and after their first programming course (Python) and completed a battery of behavioral tasks. After a one-semester Python course, reading Python functions (relative to working memory control) activated an independently localized left-lateralized fronto-parietal reasoning network. This same network was already engaged by pseudocode - plain English descriptions of Python, even before the course. Critically, multivariate population codes in this fronto-parietal network distinguished “for” loops and “if” conditional algorithms, both before and after. Representational similarity analysis revealed shared information in the fronto-parietal network before and after instruction. Programming recycles preexisting representations of logical algorithms in fronto-parietal cortices, supporting the recycling framework of cultural skill acquisition. Significance Statement Computer programming is a foundational skill in modern society, yet its neural basis remains poorly understood. The neural recycling hypothesis proposes that new cultural abilities, such as reading and math, emerge by repurposing preexisting neural representations. We tested this hypothesis in programming by tracking brain activity before and after individuals learned to code. Using fMRI, we found that a left-lateralized fronto-parietal reasoning network represents core programming algorithms (“for” loops and “if” conditionals) even before formal instruction. After learning Python, this network continued to encode these algorithms, showing consistent neural representations before and after instruction. These findings support the idea that programming recycles preexisting cognitive structures for logical reasoning, providing a neural basis for how culture builds upon biological foundations.