| name | graphidyom-musical-expectation-modeling |
| title | GraphIDyOM: A graph-native Python reimplementation of IDyOM for musical expectation modelling |
| description | Graph-native Python reimplementation of the Information Dynamics of Music (IDyOM) model that represents predictive memories as explicit graph objects for musical expectation modeling and network analysis. |
| authors | ["Lluc Bono Rosselló"] |
| arxiv_id | 2607.25787 |
| date | 2026-07-28 |
| categories | ["q-bio.NC","cs.SD","computational-neuroscience","music-cognition","graph-neural-networks"] |
| trigger_words | ["graphidyom","musical expectation","IDyOM","information dynamics music","graph-native music modeling","predictive memory graphs"] |
GraphIDyOM: Graph-Native Musical Expectation Modeling
Overview
GraphIDyOM is a graph-native Python reimplementation of the Information Dynamics of Music (IDyOM) model, which provides event-by-event estimates of uncertainty and surprise from symbolic musical sequences. The original Lisp implementation was difficult to integrate with contemporary Python workflows and had inaccessible internal memory structures. GraphIDyOM solves these issues by representing long-term and short-term predictive memories as explicit graph objects while preserving IDyOM's variable-order, multiple-viewpoint architecture.
Core Features
1. Graph-Native Memory Representation
- Long-term memory: Explicit graph objects representing learned musical patterns
- Short-term memory: Graph structures for recent context and recency-sensitive retrieval
- Variable-order architecture: Preserves IDyOM's ability to learn patterns of varying lengths
- Multiple-viewpoint support: Handles different musical feature dimensions simultaneously
2. Enhanced Accessibility and Integration
- Python-native: Integrates seamlessly with modern Python data science workflows
- Memory export: Internal memory structures can be analyzed and exported for research
- Local server support: Provides programmatic access through HTTP endpoints
- Event-wise outputs: Returns information content and entropy for each musical event
3. Validation and Performance
- Faithful reimplementation: Validated against original Lisp IDyOM across configurations
- Benchmarked performance: Outperforms recent reimplementations in coverage and speed
- Configuration support: Works with single, projected, and multiple-viewpoint setups
Implementation Guidelines
Basic Usage
from graphidyom import GraphIDyOM
model = GraphIDyOM(viewpoints=['pitch', 'duration', 'onset'])
training_sequences = load_midi_sequences('dataset/')
model.train(training_sequences)
test_sequence = load_midi_sequence()
info_content, entropy = model.predict(test_sequence)
long_term_graph = model.get_long_term_memory()
short_term_graph = model.get_short_term_memory()