Music as Programs: Understanding Musical Structure via Program Induction

Published: 08 Sept 2025, Last Modified: 10 Sept 2025LLM4Music @ ISMIR 2025 PosterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: music cognition, program induction, cognitive science, bayesian modeling
TL;DR: we propose using LLM-guided program induction over a minimal musical DSL as a framework for building AI systems that learn cognitively-grounded, compositional representations of music
Abstract: Music is highly structured, in forms that reflect cultural traditions and human cognitive constraints. Building musical AI that explicitly models this structure can bring insights into music cognition, and enable more controllable and human-centered tools to empower musicians. To this end, we build on recent work on concept representation in cognitive science to model structured musical concepts as generative programs, and model reasoning about music structure as program induction. We leverage large language models (LLMs) as a backend for generating programs for tractable inference, where structure is represented by program-like primitives and their compositional transformations. In line with recent research on world-modeling with LLM-based program synthesis, we explore encoding these programs in a Turing-complete language, such as Python. We compare unconstrained program generation, and program generation constrained by a musical DSL of four operations (transpose, invert, retrograde, identity), finding that DSL constraints improve program discovery on unseen sequences. This result demonstrates the proof-of-concept validity and value of our approach toward building computational models of music cognition.
Submission Number: 20
Loading