Skip to main content
QUICK REVIEW

[Paper Review] Evaluating language models of tonal harmony

David R. W. Sears, Filip Korzeniowski|arXiv (Cornell University)|Jun 22, 2018
Music and Audio ProcessingComputer Science24 references13 citations
TL;DR

This study evaluates finite context (n-gram) and recurrent neural network (RNN) language models for chord prediction in a large-scale corpus of Western common-practice tonal music, using a data-driven chord encoding scheme that preserves harmonic diversity. The PPM-based finite context model outperforms RNNs, especially on piano music, due to its ability to assign probability to rare chord types, as confirmed by regression analysis showing RNNs struggle with improbable chords.

ABSTRACT

This study borrows and extends probabilistic language models from natural language processing to discover the syntactic properties of tonal harmony. Language models come in many shapes and sizes, but their central purpose is always the same: to predict the next event in a sequence of letters, words, notes, or chords. However, few studies employing such models have evaluated the most state-of-the-art architectures using a large-scale corpus of Western tonal music, instead preferring to use relatively small datasets containing chord annotations from contemporary genres like jazz, pop, and rock. Using symbolic representations of prominent instrumental genres from the common-practice period, this study applies a flexible, data-driven encoding scheme to (1) evaluate Finite Context (or n-gram) models and Recurrent Neural Networks (RNNs) in a chord prediction task; (2) compare predictive accuracy from the best-performing models for chord onsets from each of the selected datasets; and (3) explain differences between the two model architectures in a regression analysis. We find that Finite Context models using the Prediction by Partial Match (PPM) algorithm outperform RNNs, particularly for the piano datasets, with the regression model suggesting that RNNs struggle with particularly rare chord types.

Motivation & Objective

  • To develop a data-driven, flexible chord representation scheme that minimizes prior assumptions about chord typology in tonal music.
  • To evaluate state-of-the-art language models—finite context (n-gram) and RNNs—for chord prediction in a large-scale corpus of common-practice period music.
  • To compare predictive accuracy across model architectures and datasets, particularly focusing on performance differences in piano vs. orchestral music.
  • To explain model performance disparities using regression analysis, identifying key corpus-level predictors of prediction error.
  • To bridge the gap between data-driven harmonic modeling and expert-annotated chord typologies by enabling unsupervised discovery of harmonic structure.

Proposed method

  • A flexible, data-driven chord encoding scheme was developed to represent harmonic events based on pitch class sets and scale degrees, preserving over 200 distinct chord types per scale degree without prior typology assumptions.
  • The study used a composite corpus of over 1 million chord tokens from 1,000 compositions (1710–1910), including Bach chorales, Beethoven’s quartets and sonatas, Chopin’s piano works, and Joplin’s rags, encoded in MusicXML and MIDI formats.
  • Finite context models were implemented using the Prediction by Partial Match (PPM) algorithm, which assigns probability to unseen or rare chord types by leveraging context history.
  • Recurrent Neural Network (LSTM) models were trained end-to-end on chord onset sequences to predict the next chord in the sequence.
  • Model performance was evaluated using cross-entropy loss as a measure of predictive accuracy across different datasets and model configurations.
  • Stepwise regression analysis was applied to identify corpus-level features (e.g., vocabulary size, token frequency, monophonic content) that predict model performance differences.

Experimental results

Research questions

  • RQ1How do finite context (n-gram) and recurrent neural network (RNN) models compare in predicting chord progressions in a large-scale, data-driven corpus of common-practice tonal music?
  • RQ2Does the PPM algorithm in finite context models provide a performance advantage over RNNs, particularly in handling rare or unseen chord types?
  • RQ3What corpus-level features (e.g., vocabulary size, proportion of improbable or monophonic events) most strongly influence predictive accuracy across model architectures?
  • RQ4To what extent do model performance differences correlate with the musical genre or instrumentation, such as piano vs. orchestral music?
  • RQ5Can a data-driven chord representation scheme support more accurate and generalizable language modeling of tonal harmony than traditional, expert-annotated typologies?

Key findings

  • The finite context model using the PPM algorithm outperformed RNNs in chord prediction, particularly on piano datasets, with significantly lower cross-entropy scores.
  • PPM's ability to assign non-zero probability to unseen or rare chord types was a key factor in its superior performance, as confirmed by regression analysis showing RNNs struggled with improbable chord types.
  • For the finite context model, 53% of the variance in cross-entropy was explained by four predictors: number of tokens, vocabulary size, monophonic content, and improbable events.
  • In contrast, for the RNN (LSTM), the proportion of improbable events had a strong positive effect on cross-entropy (β = 0.463), indicating poor generalization to rare chords.
  • The RNN model showed better performance on shorter sequences with smaller vocabularies and benefited from repeated adjacent tokens, but was negatively affected by monophonic content and high vocabulary diversity.
  • Regression results confirmed that RNNs are less effective at modeling rare harmonic events, suggesting a fundamental limitation in their capacity to generalize across the full distribution of tonal harmony.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.