MUSE-Explainer: Counterfactual Explanations for Symbolic Music Graph Classification Models
Baptiste Hilaire, Emmanouil Karystinaios, Gerhard Widmer
TL;DR
The paper tackles interpretability for symbolic music analysis by introducing MUSE-Explainer, a counterfactual explainer tailored to music graphs. It constructs musically coherent counterfactuals via a two-component outer/inner model that learns sequences of edits—pitch, onset, duration changes, or note additions/removals—applied to heterogeneous, directed score graphs, and optimizes a loss $L$ that balances counterfactual accuracy with staying close to the original input: $L(\mathbf{G},\mathbf{G}_{\text{orig}},y,\lambda_{\mathbf{gp}},\lambda_{\mathbf{nd}}, \lambda) = \lambda \; \mathbf{ent}(f(\mathbf{G}),y) + (\lambda_{\mathbf{nd}} \mathbf{D}_{\mathbf{nd}}(\mathbf{G},\mathbf{G}_{\text{orig}}) + \lambda_{\mathbf{gp}} \mathbf{D}_{\mathbf{gp}}(\mathbf{G},\mathbf{G}_{\text{orig}}))$, ensuring explanations are both actionable and musically valid. The method operates on heterogeneous directed graphs with nodes like 'note' and edges such as 'onset','consecutive','during','rest', optionally incorporating beat/measure nodes, and it visualizes results via the SMUG-Explain/Verovio ecosystem. Experiments on cadence detection in Mozart piano sonatas show the approach can flip predictions and provide intuitive, music-aware insights, with a modular design enabling tuning and extension to other graph-based musical tasks. Overall, MUSE-Explainer advances interpretable symbolic music analysis by delivering coherent, visualizable counterfactual explanations compatible with standard music tooling.
Abstract
Interpretability is essential for deploying deep learning models in symbolic music analysis, yet most research emphasizes model performance over explanation. To address this, we introduce MUSE-Explainer, a new method that helps reveal how music Graph Neural Network models make decisions by providing clear, human-friendly explanations. Our approach generates counterfactual explanations by making small, meaningful changes to musical score graphs that alter a model's prediction while ensuring the results remain musically coherent. Unlike existing methods, MUSE-Explainer tailors its explanations to the structure of musical data and avoids unrealistic or confusing outputs. We evaluate our method on a music analysis task and show it offers intuitive insights that can be visualized with standard music tools such as Verovio.
