[Paper Review] Modeling Musical Context with Word2vec
This paper proposes a word2vec-based skip-gram model with negative sampling to learn semantic vector representations of musical slices from Beethoven’s piano sonatas, treating polyphonic music as a sequence of context-rich segments. The model captures tonal relationships without explicit musical features, and replacements based on cosine similarity preserve low tonal distance, demonstrating effective modeling of musical context through distributional semantics.
We present a semantic vector space model for capturing complex polyphonic musical context. A word2vec model based on a skip-gram representation with negative sampling was used to model slices of music from a dataset of Beethoven's piano sonatas. A visualization of the reduced vector space using t-distributed stochastic neighbor embedding shows that the resulting embedded vector space captures tonal relationships, even without any explicit information about the musical contents of the slices. Secondly, an excerpt of the Moonlight Sonata from Beethoven was altered by replacing slices based on context similarity. The resulting music shows that the selected slice based on similar word2vec context also has a relatively short tonal distance from the original slice.
Motivation & Objective
- To investigate whether word2vec can model complex polyphonic musical context without explicit musical features like chords or rhythms.
- To evaluate if semantic similarity in vector space corresponds to tonal proximity in music.
- To test the practical utility of the model by replacing musical slices based on context similarity and assessing tonal continuity.
- To explore the potential of neural network-based distributional semantics in music representation beyond traditional musicological features.
Proposed method
- Represent each musical piece as non-overlapping, equal-length slices based on the most frequent time interval between note onsets.
- Treat each slice as a 'word' in a corpus, preserving all active pitches including held notes.
- Train a skip-gram model with negative sampling to learn dense vector representations of musical slices in a high-dimensional space.
- Use cosine similarity between slice vectors to identify contextually similar musical segments.
- Apply t-SNE to reduce and visualize the high-dimensional vector space, mapping tonal relationships.
- Replace original slices in a musical excerpt with the most contextually similar slices from the model and measure tonal distance using a tonnetz-based metric.
Experimental results
Research questions
- RQ1Can a word2vec model trained on raw musical slices learn meaningful representations of musical context without explicit musical feature engineering?
- RQ2Does the resulting vector space reflect tonal relationships such as perfect fifths or tritones, even without direct pitch or chord information?
- RQ3To what extent does replacing musical slices based on word2vec similarity preserve tonal continuity in a musical excerpt?
- RQ4How does the model handle sustained notes that span multiple slices, and what limitations does this reveal?
- RQ5Can the model generalize to musical structures beyond isolated chords, such as complex polyphonic textures?
Key findings
- The t-SNE visualization of the learned vector space reveals that tonally related chords—such as C and G (a perfect fifth apart)—tend to cluster together, even without explicit tonal information.
- Musical slices with distant tonal relationships, such as E and Eb, form distinct clusters in the reduced space, confirming that tonal proximity is encoded in the embeddings.
- When original slices were replaced with the most contextually similar slices based on cosine similarity, the average tonal distance between original and modified slices remained low (e.g., 1.25 for a D♭ major triad replacement).
- The model successfully captures contextual similarity in polyphonic music, as evidenced by the perceptual and quantitative continuity of the modified musical excerpt.
- The model does not capture voice-leading constraints, as seen in cases where better voice leading could be achieved by adjusting pitch registries, indicating a limitation in modeling voice independence.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.