IDyOMpy: A new Python-based model for statistical analysis of musical expectations

J Neurosci Methods. 2024 Dec 19:110347. doi: 10.1016/j.jneumeth.2024.110347. Online ahead of print.

Abstract

Background: IDyOM (Information Dynamics of Music) is the statistical model of music the most used in the community of neuroscience of music. It has been shown to allow for significant correlations with EEG (Marion, 2021), ECoG (Di Liberto, 2020) and fMRI (Cheung, 2019) recordings of human music listening. The language used for IDyOM -Lisp- is not very familiar to the neuroscience community and makes this model hard to use and more importantly to modify.

New method: IDyOMpy is a new Python re-implementation and extension of IDyOM. This new model allows for computing the information content and entropy for each melody note after training on a corpus of melodies. In addition to those features, two new features are presented: probability estimation of silences and enculturation modeling.

Results: We first describe the mathematical details of the implementation. We extensively compare the two models and show that they generate very similar outputs. We also support the validity of IDyOMpy by using its output to replicate previous EEG and behavioral results that relied on the original Lisp version (Gold, 2019; Di Liberto, 2020; Marion, 2021). Finally, it reproduced the computation of cultural distances between two different datasets as described in previous studies (i.e. Pearce, 2018).

Comparison with existing methods and conclusions: Our model replicates the previous behaviors of IDyOM in a modern and easy-to-use language -Python. In addition, more features are presented. We deeply think this new version will be of great use to the community of neuroscience of music.

Keywords: Expectations; IDyOM; Music cognition; Statistical model of music.