Abstract
Music perception requires integrating individual notes into their broader musical context, yet how musical expertise shapes the neural encoding of this information across the auditory hierarchy remains unclear. Here, we address this by using the hierarchical representations from a generative music transformer model to predict human brain activity. We recorded scalp electroencephalography (EEG) from expert musicians and non-musicians, as well as intracranial EEG (iEEG) from six neurological patients, during listening to classical piano pieces. We found that deeper layers of the transformer, which represent more disentangled and contextual musical features, were more predictive of neural responses in both groups. However, this neural correspondence was significantly enhanced by musical expertise: for non-musicians, prediction accuracy plateaued across the model's final layers, whereas for musicians it continued to increase. This enhanced encoding in experts was also strongly lateralized to the left hemisphere. Finally, the iEEG recordings revealed an anatomical gradient for this function, where neural sites progressively farther from the primary auditory cortex encoded musical context more strongly. Our study reveals how musical training refines the hierarchical neural processing of music and provides a neuro-computational account of this remarkable cognitive skill.
Introduction: Decoding Musical Expertise
Music is a hierarchical experience: we perceive individual notes, then phrases, and eventually the overarching structure of a composition. For neuroscientists, the challenge has been quantifying this "context." How do you measure the difference between hearing a single C-sharp and hearing that same note as the climax of a Bach concerto?
Previous studies used "scrambling" techniques (randomizing note order) to study context, but these are blunt instruments. This paper addresses the gap by using the internal representations of a deep learning model—a Transformer—to probe the human auditory hierarchy. The authors ask: Does a musician’s brain actually "compute" music more like a deep neural network than a non-musician’s brain?
Methods: The AI-Brain Interface
The researchers recorded neural activity from three groups: 10 expert pianists (EEG), 10 non-musicians (EEG), and 6 neurological patients (intracranial EEG/iEEG) as they listened to 30 minutes of Bach piano pieces.
To analyze this data, they employed a 13-layer generative music transformer (Musicautobot). Like Large Language Models (LLMs), transformers process sequences by "attending" to previous tokens.
The researchers extracted "embeddings" (mathematical representations) from every layer of the model, used Non-negative Matrix Factorization (NMF) to reduce dimensionality, and trained Temporal Response Functions (TRFs)—linear mapping models—to see how well the features from each AI layer could predict the actual electrical fluctuations in the human brain.
Key Insights: Musicians as Long-Range Processors
- The Hierarchical Mirror: Just as transformer layers move from simple "syntax" to complex "semantics," the human auditory system follows a spatial gradient. iEEG data showed that the further a brain region is from the primary auditory cortex, the more it "matches" the deeper, more contextual layers of the AI.
- Context Windows: When the AI was restricted to seeing only a few previous notes, it predicted everyone's brain activity poorly. As the window grew, prediction accuracy improved. However, non-musicians plateaued at a context of ~100 notes, while musicians’ brains continued to show improved encoding up to 300 notes.
- Left-Hemisphere Recruitment: While music is often stereotyped as a "right-brain" activity, this study found that the enhanced encoding of structural context in musicians is strongly lateralized to the left hemisphere. This suggests that formal training might repurpose left-hemisphere "analytic" circuits for musical architecture.
- Disentangled Representations: Deeper AI layers "disentangle" features—meaning they separate pitch from duration more cleanly. Musicians' brains showed a significantly higher correlation with these disentangled layers, suggesting their neural representations are more refined and "organized" than those of laypeople.
Key Results
For non-musicians, the ability of the AI to predict brain activity plateaued in the final layers. For musicians, the correlation continued to climb, showing a tighter "sync" with the model's most abstract representations.
Furthermore, iEEG revealed that sites in the temporal pole and inferior frontal gyrus (higher-order areas) encoded musical context significantly more strongly than the primary auditory cortex (Heschl’s Gyrus). The difference in prediction accuracy between musicians and non-musicians was statistically significant across nearly all deeper layers of the model ($p < 0.001$).
Limitations and Future Work
The intracranial data came from patients who were not trained musicians; a direct iEEG comparison of expert musicians would be the "gold standard" for spatial localization. Additionally, the study used Western classical music (Bach). Future work could investigate if these findings hold for other genres or non-Western musical systems. Finally, while musicians didn't report being more "familiar" with the specific Bach snippets, their implicit knowledge of musical rules likely drove the results. Future work could investigate if these neural patterns emerge in non-musicians after short-term intensive training.
Summary updated