Table of Contents
Fetching ...

SMUG-Explain: A Framework for Symbolic Music Graph Explanations

Emmanouil Karystinaios, Francesco Foscarin, Gerhard Widmer

TL;DR

SMUG-Explain tackles the interpretability challenge of graph neural networks operating on musical scores by producing post-hoc explanations anchored in the score itself. The framework constructs a heterogeneous score graph and uses gradient-based explainers (notably Integrated Gradients) to produce subgraph and feature-importance explanations, visualized in an interactive Verovio-based interface. It applies the approach to a cadence-detection model trained on a large multi-corpus dataset and demonstrates qualitative analyses on Mozart, Bach, and Chopin excerpts, while quantifying explanations with a characterization score. The work highlights that musically meaningful explanations can relate to voice-leading and tonal context and points toward future musicologically trustworthy, user-friendly tools.

Abstract

In this work, we present Score MUsic Graph (SMUG)-Explain, a framework for generating and visualizing explanations of graph neural networks applied to arbitrary prediction tasks on musical scores. Our system allows the user to visualize the contribution of input notes (and note features) to the network output, directly in the context of the musical score. We provide an interactive interface based on the music notation engraving library Verovio. We showcase the usage of SMUG-Explain on the task of cadence detection in classical music. All code is available on https://github.com/manoskary/SMUG-Explain.

SMUG-Explain: A Framework for Symbolic Music Graph Explanations

TL;DR

SMUG-Explain tackles the interpretability challenge of graph neural networks operating on musical scores by producing post-hoc explanations anchored in the score itself. The framework constructs a heterogeneous score graph and uses gradient-based explainers (notably Integrated Gradients) to produce subgraph and feature-importance explanations, visualized in an interactive Verovio-based interface. It applies the approach to a cadence-detection model trained on a large multi-corpus dataset and demonstrates qualitative analyses on Mozart, Bach, and Chopin excerpts, while quantifying explanations with a characterization score. The work highlights that musically meaningful explanations can relate to voice-leading and tonal context and points toward future musicologically trustworthy, user-friendly tools.

Abstract

In this work, we present Score MUsic Graph (SMUG)-Explain, a framework for generating and visualizing explanations of graph neural networks applied to arbitrary prediction tasks on musical scores. Our system allows the user to visualize the contribution of input notes (and note features) to the network output, directly in the context of the musical score. We provide an interactive interface based on the music notation engraving library Verovio. We showcase the usage of SMUG-Explain on the task of cadence detection in classical music. All code is available on https://github.com/manoskary/SMUG-Explain.
Paper Structure (14 sections, 1 equation, 4 figures, 1 table)

This paper contains 14 sections, 1 equation, 4 figures, 1 table.

Figures (4)

  • Figure 1: An example of a score graph depicting the different graph edge types in different colours.
  • Figure 2: A demonstration of the SMUG-Explain Web interface. In this example, we view the first bars of Mozart's Piano Sonata K280 2$^{nd}$ mvt. It includes a Roman numeral analysis and the cadence label predicted by our model at the top. The purple dashed lines are the produced explanation for the note highlighted in red. Note the vertical connection line in the very first bar, which is also a part of this explanation. At the bottom, we can view the feature importance for the explained note.
  • Figure 3: The first bars of the Fuga No. 5 of the Well-Tempered Clavier book No. 1. Top: the score and the explanation of the wrong prediction of the highlighted note in red. Middle: feature importance for the highlighted note. Bottom: a Schenkerian analysis of the segment by marlowe2019schenkerian
  • Figure 4: Excerpt of Nocturne Op. 48, no. 1 in C minor by F. Chopin. Top: excerpts of the explanation for Cadence on measure 24. Bar numbers are notated to the top left of each score segment. Middle: Feature importance for the highlighted C4 note in red. Bottom: Middleground voice leading analysis (from swinkin2007schenkerian).