To the brain, reading computer code is not the same as reading language

Reading code activates a general-purpose brain network, but not language-processing centers.

The brain does not read computer code like a language
Photo by ThisisEngineering RAEng on Unsplash
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. 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. This finding goes against the hypothesis that math and coding rely on the same brain mechanisms.

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.

Reprinted with permission of MIT News. Read the original article.

A landslide is imminent and so is its tsunami

An open letter predicts that a massive wall of rock is about to plunge into Barry Arm Fjord in Alaska.

Image source: Christian Zimmerman/USGS/Big Think
Surprising Science
  • A remote area visited by tourists and cruises, and home to fishing villages, is about to be visited by a devastating tsunami.
  • A wall of rock exposed by a receding glacier is about crash into the waters below.
  • Glaciers hold such areas together — and when they're gone, bad stuff can be left behind.

The Barry Glacier gives its name to Alaska's Barry Arm Fjord, and a new open letter forecasts trouble ahead.

Thanks to global warming, the glacier has been retreating, so far removing two-thirds of its support for a steep mile-long slope, or scarp, containing perhaps 500 million cubic meters of material. (Think the Hoover Dam times several hundred.) The slope has been moving slowly since 1957, but scientists say it's become an avalanche waiting to happen, maybe within the next year, and likely within 20. When it does come crashing down into the fjord, it could set in motion a frightening tsunami overwhelming the fjord's normally peaceful waters .

"It could happen anytime, but the risk just goes way up as this glacier recedes," says hydrologist Anna Liljedahl of Woods Hole, one of the signatories to the letter.

The Barry Arm Fjord

Camping on the fjord's Black Sand Beach

Image source: Matt Zimmerman

The Barry Arm Fjord is a stretch of water between the Harriman Fjord and the Port Wills Fjord, located at the northwest corner of the well-known Prince William Sound. It's a beautiful area, home to a few hundred people supporting the local fishing industry, and it's also a popular destination for tourists — its Black Sand Beach is one of Alaska's most scenic — and cruise ships.

Not Alaska’s first watery rodeo, but likely the biggest

Image source: whrc.org

There have been at least two similar events in the state's recent history, though not on such a massive scale. On July 9, 1958, an earthquake nearby caused 40 million cubic yards of rock to suddenly slide 2,000 feet down into Lituya Bay, producing a tsunami whose peak waves reportedly reached 1,720 feet in height. By the time the wall of water reached the mouth of the bay, it was still 75 feet high. At Taan Fjord in 2015, a landslide caused a tsunami that crested at 600 feet. Both of these events thankfully occurred in sparsely populated areas, so few fatalities occurred.

The Barry Arm event will be larger than either of these by far.

"This is an enormous slope — the mass that could fail weighs over a billion tonnes," said geologist Dave Petley, speaking to Earther. "The internal structure of that rock mass, which will determine whether it collapses, is very complex. At the moment we don't know enough about it to be able to forecast its future behavior."

Outside of Alaska, on the west coast of Greenland, a landslide-produced tsunami towered 300 feet high, obliterating a fishing village in its path.

What the letter predicts for Barry Arm Fjord

Moving slowly at first...

Image source: whrc.org

"The effects would be especially severe near where the landslide enters the water at the head of Barry Arm. Additionally, areas of shallow water, or low-lying land near the shore, would be in danger even further from the source. A minor failure may not produce significant impacts beyond the inner parts of the fiord, while a complete failure could be destructive throughout Barry Arm, Harriman Fiord, and parts of Port Wells. Our initial results show complex impacts further from the landslide than Barry Arm, with over 30 foot waves in some distant bays, including Whittier."

The discovery of the impeding landslide began with an observation by the sister of geologist Hig Higman of Ground Truth, an organization in Seldovia, Alaska. Artist Valisa Higman was vacationing in the area and sent her brother some photos of worrying fractures she noticed in the slope, taken while she was on a boat cruising the fjord.

Higman confirmed his sister's hunch via available satellite imagery and, digging deeper, found that between 2009 and 2015 the slope had moved 600 feet downhill, leaving a prominent scar.

Ohio State's Chunli Dai unearthed a connection between the movement and the receding of the Barry Glacier. Comparison of the Barry Arm slope with other similar areas, combined with computer modeling of the possible resulting tsunamis, led to the publication of the group's letter.

While the full group of signatories from 14 organizations and institutions has only been working on the situation for a month, the implications were immediately clear. The signers include experts from Ohio State University, the University of Southern California, and the Anchorage and Fairbanks campuses of the University of Alaska.

Once informed of the open letter's contents, the Alaska's Department of Natural Resources immediately released a warning that "an increasingly likely landslide could generate a wave with devastating effects on fishermen and recreationalists."

How do you prepare for something like this?

Image source: whrc.org

The obvious question is what can be done to prepare for the landslide and tsunami? For one thing, there's more to understand about the upcoming event, and the researchers lay out their plan in the letter:

"To inform and refine hazard mitigation efforts, we would like to pursue several lines of investigation: Detect changes in the slope that might forewarn of a landslide, better understand what could trigger a landslide, and refine tsunami model projections. By mapping the landslide and nearby terrain, both above and below sea level, we can more accurately determine the basic physical dimensions of the landslide. This can be paired with GPS and seismic measurements made over time to see how the slope responds to changes in the glacier and to events like rainstorms and earthquakes. Field and satellite data can support near-real time hazard monitoring, while computer models of landslide and tsunami scenarios can help identify specific places that are most at risk."

In the letter, the authors reached out to those living in and visiting the area, asking, "What specific questions are most important to you?" and "What could be done to reduce the danger to people who want to visit or work in Barry Arm?" They also invited locals to let them know about any changes, including even small rock-falls and landslides.

Cephalopod aces 'marshmallow test' designed for eager children

The famous cognition test was reworked for cuttlefish. They did better than expected.

The common cuttlefish

Credit: Hans Hillewaert via Wikicommons
Surprising Science
  • Scientists recently ran the Stanford marshmallow experiment on cuttlefish and found they were pretty good at it.
  • The test subjects could wait up to two minutes for a better tasting treat.
  • The study suggests cuttlefish are smarter than you think but isn't the final word on how bright they are.
Keep reading Show less

If we do find alien life, what kind will it be?

Three lines of evidence point to the idea of complex, multicellular alien life being a wild goose chase. But are we clever enough to know?

A scene from the 1996 Tim Burton film "Mars Attacks!"

Credit: "Mars Attacks!" / Warner Bros
13-8
  • Everyone wants to know if there is alien life in the universe, but Earth may give us clues that if it exists it may not be the civilization-building kind.
  • Most of Earth's history shows life that is single-celled. That doesn't mean it was simple, though. Stunning molecular machines were being evolved by those tiny critters.
  • What's in a planet's atmosphere may also determine what evolution can produce. Is there a habitable zone for complex life that's much smaller than what's allowed for microbes?
Keep reading Show less
Quantcast