Earworms (hopelessly catchy tunes) get stuck in certain brain shapes.

New Scientist reveals the anatomy of the earworm:

The study is the first to look at the neural basis for “involuntary musical imagery” – or “earworms”. They aren’t just a curiosity, says study co-author Lauren Stewart at Goldsmith’s, University of London, but could have a biological function.

Stewart, a music psychologist, was first inspired to study earworms by a regular feature on the radio station BBC 6Music, in which listeners would write in with songs they had woken up with in their heads. There was a lot of interest from the public in what they are and where they had come from, but there was little research on the topic, she says.

People who suffered earworms more frequently had thicker cortices in areas involved in auditory perception and pitch discrimination.

“Areas in the auditory cortex that we know are active when you actually listen to music seem to be physically different in people who are experiencing music that’s not even there,” says Stewart.

While this doesn’t shed any light on whether these differences in brain structure actually cause earworms, other differences were related to how the phenomenon affected people. Those who said they found earworms helpful for staying focused tended to have a larger hippocampus, an area involved in memory. The more people were annoyed by earworms, the more grey matter they had in the emotion-related temporal pole.

The differences were unrelated to how much musical training participants had, or how much they listened to music.

Stewart’s team induced earworms in unsuspecting volunteers by playing them movie trailers for Pretty Woman and James Bond. When given a task afterwards, volunteers got music from the films stuck in their heads less often if the task was more challenging. Those who were told to do nothing were most affected by the theme tunes, supporting the idea that earworms strike idle minds.