Contribution of the language network to the comprehension of Python programming code - Liu, Yun-Fei; Wilson, Colin; Bedny, Marina (Brain and language, 2024)
•The language network responds early during programming code comprehension.•It encodes the distinction between different algorithms (FOR loop vs IF conditional).•Its univariate response to code is much weaker than in the reasoning network.•Initial representation of programming algorithm is encoded in the language network.•This study shows the reuse of the language network for code comprehension. Does the perisylvian language network contribute to comprehension of programming languages, like Python? Univariate neuroimaging studies find high responses to code in fronto-parietal executive areas but not in fronto-temporal language areas, suggesting the language network does little. We used multivariate-pattern-analysis to test whether the language network encodes Python functions. Python programmers read functions while undergoing fMRI. A linear SVM decoded for-loops from if-conditionals based on activity in lateral temporal (LT) language cortex. In searchlight analysis, decoding accuracy was higher in LT language cortex than anywhere else. Follow up analysis showed that decoding was not driven by presence of different words across functions, “for” vs “if,” but by compositional program properties. Finally, univariate responses to code peaked earlier in LT language-cortex than in the fronto-parietal network. We propose that the language system forms initial “surface meaning” representations of programs, which input to the reasoning network for processing of algorithms.