Knowledge graphs and music

Opinion
Interdisciplinary
Mathematics
Chord progressions are walks on the tonnetz and counterpoint rules are path constraints. Music theory is graph theory in disguise, and graph reasoning could serve it.
Published

August 28, 2026

Illustration: Knowledge graphs and music

A chord progression is a walk on the tonnetz, the toroidal lattice where every triangle is a triad and every edge is a voice-leading move. Counterpoint rules aren’t stylistic preferences; they’re path constraints on a weighted graph. The parallel fifths prohibition? It’s an excluded subgraph. The resolution of a tritone? A shortest-path problem in harmonic space.

The link between molecules and graphs was figured out decades ago. Graph-native reasoning (subgraph isomorphism, centrality, motif detection) transformed how we understand chemical structure and reactivity. Drug repurposing followed.

Nobody has seriously done this for music (as far as I can see). The patterns are there though. The circle of fifths is a Cayley graph of Z12 (the ring of integers modulo 12.). Modulations are graph homomorphisms between tonal regions. Bach’s voice leading follows rules that look exactly like flow constraints in a network. The question isn’t whether the graph structure exists, it does. The question is whether graph-native reasoning can surface compositional patterns that centuries of human analysis missed.

I don’t think I will get any time soon a customer asking me to help out but I love the idea and what it could reveal. I think the right tool isn’t a music theory thing, rather a knowledge graph that encodes harmonic objects as nodes, voice-leading moves as edges, and lets you query across a corpus the way chemists query molecular databases.

There is an interesting angle related to category theory but I’ll leave that for another post.