对于大脑来说,阅读计算机代码与阅读语言不同(2020)
To the brain, reading computer code is not the same as reading language (2020)

原始链接: https://news.mit.edu/2020/brain-reading-computer-code-1215

这项研究探讨了学习编码与学习新语言的比较,揭示了尽管存在某些相似之处但有趣的差异。 尽管与学习语言需要新的符号理解类似,但计算机代码在阅读时不会涉及用于语言处理的特定大脑区域。 相反,麻省理工学院的科学家发现计算机代码激活涉及一个更广泛的神经网络,称为多需求网络。 该研究的主要作者、麻省理工学院研究生 Anna Ivanova 和 Evelina Fedorenko 表示,与语言或数学问题解决不同,编程涉及独特的大脑过程。 他们的结论是“理解计算机代码似乎是它自己的事”。 其他作者包括隶属于麻省理工学院计算机科学和人工智能实验室以及塔夫茨大学的个人。 该研究揭示了语言和计算思维之间的联系,通过编程与语言能力的关系来研究编程。 使用功能磁共振成像技术对精通每种语言的年轻成人参与者进行了研究,研究了两种可读的编程语言——Python 和 ScratchJr。 与预期相反,语言区域内的反应很少; 相反,多需求网络因其在处理多方面心理任务方面的作用而占据主导地位。 该研究的意义可以为编码教学的教育策略和方法提供信息。

这是文本的简化版本: 文学编程的发明者唐纳德·高德纳 (Donald Knuth) 旨在通过合理的顺序向读者传达其代码背后的逻辑。 他制定了一个巧妙的预处理计划,以满足编译器的需求和旧编程语言的清晰度要求,其中存在严格的排序规则。 现代编程语言提供了更大的灵活性,但仍然可以从有组织的演示中受益。 代码阅读可能涉及在不同深度解释其功能。 在基本层面上,人们掌握一段代码执行的一般操作。 更高级的理解需要理解细节,如函数调用、变量意义、cookie 解释等,并解决代码库中潜在的差距或矛盾。 代码解释和其他认知过程(例如阅读正式文档、神经成像技术和预测代码输出)之间的比较研究揭示了相似性和区别。 使用功能磁共振成像(fMRI)的研究人员发现,当人们检查代码时,语言相关区域的激活程度最低,而选择依赖多需求网络。 与口头或书面语言交流相比,编码和阅读代码提出了独特的挑战。 理解编程概念需要可视化解决问题的策略,遵守精确的语法,并掌握各种库和框架。 尽管编码和语言交流都需要心理处理,但前者往往会引发独特的神经反应模式。
相关文章

原文

In some ways, learning to program a computer is similar to learning a new language. It requires learning new symbols and terms, which must be organized correctly to instruct the computer what to do. The computer code must also be clear enough that other programmers can read and understand it.

In spite of those similarities, MIT neuroscientists have found that reading computer code does not activate the regions of the brain that are involved in language processing. Instead, it activates a distributed network called the multiple demand network, which is also recruited for complex cognitive tasks such as solving math problems or crossword puzzles.

However, although reading computer code activates the multiple demand network, it appears to rely more on different parts of the network than math or logic problems do, suggesting that coding does not precisely replicate the cognitive demands of mathematics either.

“Understanding computer code seems to be its own thing. It’s not the same as language, and it’s not the same as math and logic,” says Anna Ivanova, an MIT graduate student and the lead author of the study.

Evelina Fedorenko, the Frederick A. and Carole J. Middleton Career Development Associate Professor of Neuroscience and a member of the McGovern Institute for Brain Research, is the senior author of the paper, which appears today in eLife. Researchers from MIT’s Computer Science and Artificial Intelligence Laboratory and Tufts University were also involved in the study.

Language and cognition

A major focus of Fedorenko’s research is the relationship between language and other cognitive functions. In particular, she has been studying the question of whether other functions rely on the brain’s language network, which includes Broca’s area and other regions in the left hemisphere of the brain. In previous work, her lab has shown that music and math do not appear to activate this language network.

“Here, we were interested in exploring the relationship between language and computer programming, partially because computer programming is such a new invention that we know that there couldn’t be any hardwired mechanisms that make us good programmers,” Ivanova says.

There are two schools of thought regarding how the brain learns to code, she says. One holds that in order to be good at programming, you must be good at math. The other suggests that because of the parallels between coding and language, language skills might be more relevant. To shed light on this issue, the researchers set out to study whether brain activity patterns while reading computer code would overlap with language-related brain activity.

The two programming languages that the researchers focused on in this study are known for their readability — Python and ScratchJr, a visual programming language designed for children age 5 and older. The subjects in the study were all young adults proficient in the language they were being tested on. While the programmers lay in a functional magnetic resonance (fMRI) scanner, the researchers showed them snippets of code and asked them to predict what action the code would produce.

The researchers saw little to no response to code in the language regions of the brain. Instead, they found that the coding task mainly activated the so-called multiple demand network. This network, whose activity is spread throughout the frontal and parietal lobes of the brain, is typically recruited for tasks that require holding many pieces of information in mind at once, and is responsible for our ability to perform a wide variety of mental tasks.

“It does pretty much anything that’s cognitively challenging, that makes you think hard,” Ivanova says.

Previous studies have shown that math and logic problems seem to rely mainly on the multiple demand regions in the left hemisphere, while tasks that involve spatial navigation activate the right hemisphere more than the left. Working with Marina Bers, a professor of child study and human development at Tufts University, the MIT team found that reading computer code appears to activate both the left and right sides of the multiple demand network, and ScratchJr activated the right side slightly more than the left.

Effects of experience

The researchers say that while they didn’t identify any regions that appear to be exclusively devoted to programming, such specialized brain activity might develop in people who have much more coding experience.

“It’s possible that if you take people who are professional programmers, who have spent 30 or 40 years coding in a particular language, you may start seeing some specialization, or some crystallization of parts of the multiple demand system,” Fedorenko says. “In people who are familiar with coding and can efficiently do these tasks, but have had relatively limited experience, it just doesn’t seem like you see any specialization yet.”

In a companion paper appearing in the same issue of eLife, a team of researchers from Johns Hopkins University also reported that solving code problems activates the multiple demand network rather than the language regions.

The findings suggest there isn’t a definitive answer to whether coding should be taught as a math-based skill or a language-based skill. In part, that’s because learning to program may draw on both language and multiple demand systems, even if — once learned — programming doesn’t rely on the language regions, the researchers say.

“There have been claims from both camps — it has to be together with math, it has to be together with language,” Ivanova says. “But it looks like computer science educators will have to develop their own approaches for teaching code most effectively.”

The research was funded by the National Science Foundation, the Department of the Brain and Cognitive Sciences at MIT, and the McGovern Institute for Brain Research.

联系我们 contact @ memedata.com