Skip to main content
QUICK REVIEW

[Paper Review] Bach or Mock? A Grading Function for Chorales in the Style of J.S. Bach

Alexander Fang, Alisa Liu|arXiv (Cornell University)|Jun 23, 2020
Music and Audio ProcessingComputer Science12 references6 citations
TL;DR

This paper proposes a learnable, interpretable grading function that evaluates four-part chorales for stylistic authenticity in the manner of J.S. Bach using 10 musical features, including pitch, rhythm, intervals, harmony, parallel intervals, and repeated sequences. The function uses Wasserstein distances between feature distributions of generated chorales and real Bach chorales, weighted by error ratios, and achieves 92.6% accuracy in distinguishing Bach from generated chorales—outperforming human experts at 86.7%.

ABSTRACT

Deep generative systems that learn probabilistic models from a corpus of existing music do not explicitly encode knowledge of a musical style, compared to traditional rule-based systems. Thus, it can be difficult to determine whether deep models generate stylistically correct output without expert evaluation, but this is expensive and time-consuming. Therefore, there is a need for automatic, interpretable, and musically-motivated evaluation measures of generated music. In this paper, we introduce a grading function that evaluates four-part chorales in the style of J.S. Bach along important musical features. We use the grading function to evaluate the output of a Transformer model, and show that the function is both interpretable and outperforms human experts at discriminating Bach chorales from model-generated ones.

Motivation & Objective

  • To address the lack of automatic, interpretable, and musically grounded evaluation metrics for deep learning models generating music in the style of J.S. Bach.
  • To reduce reliance on expensive and inconsistent human evaluation by developing a consistent, scalable benchmark for music generation models.
  • To identify specific musical weaknesses in generated chorales through feature-wise grading, enabling targeted model improvement.
  • To evaluate whether an automated grading function can outperform human experts in distinguishing authentic Bach chorales from model-generated ones.

Proposed method

  • The grading function computes a real-valued score for a chorale using a weighted sum of Wasserstein distances between its feature distributions and those of real Bach chorales.
  • Features include pitch distribution (scale degrees), rhythm (note durations in quarter-note units), voice-specific interval distributions (melodic intervals), harmonic quality (major/minor/dominant 7th), parallel interval errors (fifths, octaves), and repeated sequence lengths.
  • The parallel errors feature uses a dynamic weight based on the error-to-note ratio relative to Bach’s average, penalizing chorales with disproportionately high error counts.
  • The function is implemented using music21 and trained on a corpus of 351 authentic Bach chorales to define ground-truth distributions.
  • The overall grade is computed via a weighted sum: $ g(c) = \sum_{f\in\text{features}} w_f \cdot \text{Wass}(P_c^f, P_{\text{Bach}}^f) $, where lower values indicate better stylistic fidelity.
  • The model’s performance is evaluated using a paired discrimination test comparing human judgments to the grading function’s predictions.

Experimental results

Research questions

  • RQ1Can a fully automatic, interpretable grading function reliably evaluate the stylistic authenticity of AI-generated four-part chorales in the style of J.S. Bach?
  • RQ2How do the individual musical features (e.g., intervals, parallelisms, rhythm) contribute to the overall grading score, and what weaknesses do they reveal in generated music?
  • RQ3Does the grading function outperform human experts in distinguishing real Bach chorales from model-generated ones?
  • RQ4To what extent can the grading function serve as a consistent, scalable benchmark for comparing different music generation models?
  • RQ5How do the distributions of musical features in generated chorales compare to those in authentic Bach chorales across key dimensions like pitch, harmony, and rhythmic structure?

Key findings

  • The grading function achieved 92.6% accuracy in paired discrimination tasks, outperforming human experts, who achieved 86.7% accuracy.
  • The Kolmogorov–Smirnov test confirmed a highly significant separation between the grade distributions of Bach chorales and generated chorales, with a p-value of 1e-78.
  • Generated chorales exhibited significantly worse performance than Bach chorales across all features, with the largest deviations in parallel errors (median 2.16 vs. 0.0) and repeated sequences (median 1.86 vs. 1.29).
  • The grading function successfully identified specific compositional flaws, such as six parallel octaves and unisons and an abnormally long repeated sequence of quarter-note E’s in the alto voice.
  • The model struggled most with avoiding parallel fifths and octaves, as evidenced by a median parallel error distance of 2.16 compared to 0.0 in Bach chorales.
  • The function’s interpretability was demonstrated by highlighting feature-specific distances, enabling researchers to diagnose model limitations and guide model refinement.

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.