Abstract
Schenkerian Analysis (SchA) is a powerful music theory framework for understanding hierarchical musical structure, yet it has remained largely inaccessible to machine learning due to a lack of computer-readable data. This paper introduces the largest SchA dataset to date, comprising over 140 expert-annotated excerpts. To facilitate this, we present a custom web-based notation tool and a novel representation of musical scores as heterogeneous-edge graphs. By framing SchA as a hierarchical graph clustering problem, this work establishes a foundation for structurally aware AI music generation and automated musicological analysis.
Introduction
Modern AI music generation models, such as Meta’s MusicGen or OpenAI’s Jukebox, demonstrate impressive capabilities in generating raw audio and surface-level textures. However, these models often lack a deep, theoretical understanding of long-term musical structure. In music theory, Schenkerian Analysis (SchA) provides a method for understanding how a piece of music "unfolds" over time by stripping away surface-level ornamentation to reveal a deep, hierarchical skeleton of melody and harmony. For example, a complex four-bar melody might be revealed as a simple elaboration of a descending scale.
Despite its analytical power, SchA is rarely utilized in Music Information Retrieval (MIR) or generative AI. The primary bottleneck is the absence of high-quality, machine-readable data. The previous benchmark, Schenker41, contains only 41 excerpts and suffers from limited ground-truth quality. Furthermore, existing computational models often rely on restrictive data structures like Maximal Outerplanar Graphs (MOPs), which force multi-voice music into a single theoretical line, thereby obscuring the underlying counterpoint. This paper addresses these challenges by providing the data, tooling, and mathematical representation necessary to integrate SchA into modern machine learning workflows.
Methodology
1. Custom Notation Software
To overcome the difficulty of data collection, we developed a custom web-based annotation tool using Vue and Electron. This software allows expert theorists to visualize and annotate scores with Schenkerian notation—such as structural slurs and beams—which the tool then automatically converts into a lightweight JSON format. This streamlined workflow significantly reduces the manual labor required to produce high-fidelity structural analyses.
2. Heterogeneous Graph Representation
Rather than using restrictive tree-like structures, we model musical scores as heterogeneous directed graphs $G = (A, X)$. In this model, nodes represent individual notes, while different edge types represent specific relationships: forward temporal progression, simultaneous onset, sustained notes, rests, and linear intervals. This graph-based approach allows for a more nuanced representation of music than traditional linear or tree-based models.
3. Hierarchical Graph Clustering
We frame the process of Schenkerian analysis as a hierarchical graph clustering problem. The transition from the "foreground" (the complete set of notes in the score) to the "background" (the fundamental structural notes) is represented mathematically through the multiplication of sequential clustering matrices. We provide an algorithm to convert JSON annotations directly into these clustering matrices, making the data immediately compatible with Graph Neural Networks (GNNs).
The New SchA Dataset
We introduce a new dataset of 145 Schenkerian analyses, currently the largest of its kind. The dataset primarily focuses on fugue subjects by J.S. Bach and Pachelbel, annotated by four expert music theorists. This collection supersedes the Schenker41 benchmark by more than 3x in volume and captures complex theoretical nuances—such as voice exchanges and unfoldings—that previous text-based formats were forced to ignore.
Key Insights and Discussion
Implicit Prolongation via Depth
In traditional computational SchA, analysts had to manually define every "prolongation" (the relationship where one note elaborates another). We discovered that by assigning a hierarchical depth integer to each note, prolongations can be automatically derived by traversing the graph at specific depth levels. This insight simplifies the JSON representation and accelerates data collection.
Preserving Counterpoint
Previous models using MOPs treated melodies as single theoretical voices. Our graph clustering approach allows for multiple independent theoretical voices (e.g., a distinct deep bass line supporting a treble line). This preserves the essential counterpoint that is often lost in simpler structural models.
Statistical Validation
Statistical analysis of the new dataset aligns with established music theory. For instance, the data confirms that surface-level treble motions are primarily stepwise (small intervals), while deep-level structural bass movements frequently jump by fifths or fourths, following the circle of fifths. This alignment suggests that our digital representation accurately captures human analytical intuition.
Conclusion and Future Work
While our approach marks a significant step forward, some limitations remain. The graph clustering algorithm currently struggles with edge cases where multiple theoretical voices converge on a single note. Additionally, handling "inner voices" with unspecified depths currently relies on heuristics.
Future work will focus on expanding the dataset beyond classical fugues to include a broader range of genres. Ultimately, this dataset and representation provide the necessary framework to train deep learning models for automated Schenkerian analysis, paving the way for AI systems that can compose music with a sophisticated, human-like understanding of structural hierarchy.
Summary updated