[Paper Review] SurpriseNet: Melody Harmonization Conditioning on User-controlled Surprise Contours
SurpriseNet is a conditional variational autoencoder (CVAE) that generates harmonic chord progressions conditioned on user-defined surprise contours derived from Markov chain transition probabilities. It achieves strong alignment between given and generated surprise contours (Spearman’s ρ = 0.517, p < 0.001), enabling user-controlled, diverse, and musically coherent melody harmonization with expanded chord space (633 types).
The surprisingness of a song is an essential and seemingly subjective factor in determining whether the listener likes it. With the help of information theory, it can be described as the transition probability of a music sequence modeled as a Markov chain. In this study, we introduce the concept of deriving entropy variations over time, so that the surprise contour of each chord sequence can be extracted. Based on this, we propose a user-controllable framework that uses a conditional variational autoencoder (CVAE) to harmonize the melody based on the given chord surprise indication. Through explicit conditions, the model can randomly generate various and harmonic chord progressions for a melody, and the Spearman's correlation and p-value significance show that the resulting chord progressions match the given surprise contour quite well. The vanilla CVAE model was evaluated in a basic melody harmonization task (no surprise control) in terms of six objective metrics. The results of experiments on the Hooktheory Lead Sheet Dataset show that our model achieves performance comparable to the state-of-the-art melody harmonization model.
Motivation & Objective
- To enable user-controlled melody harmonization by incorporating subjective musical qualities like surprise into the generation process.
- To model musical surprise as a time-varying contour using information theory, specifically negative log transition probabilities in a Markov chain.
- To develop a conditional VAE framework that jointly conditions on melody and user-specified surprise contours for expressive chord generation.
- To expand the chord space beyond standard triads to include extended and altered chords (e.g., 7th, 9th, 11th, 13th, slash chords), enhancing harmonic diversity.
- To evaluate the model’s ability to generate chord progressions that match both melodic coherence and user-defined surprise dynamics.
Proposed method
- Model musical surprise as the negative log transition probability of chord sequences in a first-order Markov chain, generating a time-varying surprise contour.
- Use a conditional variational autoencoder (CVAE) with joint conditioning on melody and surprise contour to learn latent representations of chord progressions.
- Train the model by reconstructing chord sequences from concatenated melody, surprise contour, and latent variables, using reparameterization for end-to-end optimization.
- During inference, sample from the standard normal prior in the latent space while conditioning on melody and surprise contour to generate diverse, coherent chord progressions.
- Extend the chord vocabulary from 96 to 633 types by incorporating all chord types from the Hooktheory Lead Sheet Dataset, including extended and altered chords.
- Apply a class-weighted loss in a variant model (weighted SurpriseNet) to encourage diversity but found it reduced contour fidelity compared to standard SurpriseNet.
Experimental results
Research questions
- RQ1Can a deep generative model effectively learn to produce chord progressions that match a user-specified surprise contour while remaining harmonically coherent with a melody?
- RQ2How well can the model’s generated surprise dynamics correlate with the user-provided surprise contour, and what metrics best capture this alignment?
- RQ3Does expanding the chord space to include extended and altered chords improve the expressiveness and diversity of generated progressions without sacrificing harmonic quality?
- RQ4How does the inclusion of class weights in the loss function affect the model’s ability to follow the surprise contour versus generating rare or complex chords?
- RQ5Can a CVAE-based framework successfully balance user control (surprise contour) with musical coherence (melody compatibility) in automatic melody harmonization?
Key findings
- SurpriseNet achieves a Spearman’s correlation of ρ = 0.517 (p < 0.001) between the user-defined surprise contour and the surprise dynamics in generated chord progressions, indicating strong alignment.
- The vanilla CVAE model performs comparably to the state-of-the-art melody harmonization model [3] on six objective metrics, validating its generative quality.
- Weighted SurpriseNet shows lower correlation (ρ = 0.406) and exhibits a tendency to overuse complex or rare chords, suggesting class weighting disrupts contour fidelity.
- Generated chord progressions consistently follow the temporal structure of the surprise contour, with visible changes in chord change frequency matching expected patterns (e.g., peak surprise in middle of song).
- The model successfully generates diverse, harmonic, and rhythmically coherent progressions across various surprise contour types, including normal, inverse normal, and sigmoid-like shapes.
- The expanded chord space (633 types) enables the generation of rich, expressive progressions including 7th, 9th, 11th, 13th, and slash chords, enhancing musical expressiveness.
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.