Accordion music generation and variation algorithm integrating knowledge graph and transformer

Accordion music generation remains challenging due to the complexity of its structural organization and the lack of explicit performance-related information. This study proposes an enhanced generation framework that integrates a Knowledge Graph (KG) with a Generative Pre-trained Transformer (GPT). A specialized accordion KG is constructed to represent fundamental music theory principles and instrument-specific performance characteristics, including the unique left-hand bass accompaniment patterns of the accordion. Based on this knowledge representation, several improvements are introduced into the Transformer architecture. A Graph-Guided Self-Attention (GGSA) mechanism is developed to dynamically regulate attention distributions using knowledge-based constraints. In addition, a Variation Feature Injection Module (VFIM) is incorporated to generate recursive variations while preserving essential thematic characteristics. The proposed framework further models accordion-specific performance factors, including bellows pressure variations and fingering patterns. The Nottingham Database is adopted as the experimental corpus. The original symbolic music data are enhanced through instrument-specific representation processing, in which pitch, duration, and chord sequences are extracted to construct a performance-aware musical representation. Experimental results demonstrate that the proposed model achieves a perplexity (PPL) of 3.42 and a harmonic validity rate of 94.8%. The generated melodies exhibit improved structural coherence, more natural coordination between left-hand accompaniment and right-hand melody, and stronger thematic consistency during variation generation. These findings indicate that integrating knowledge constraints with sequence modeling can effectively improve the structural quality and performance logic representation of accordion music generation. The proposed approach provides a potential technical foundation for automated composition, intelligent music education assistance, and the digital creation of instrument-specific music.

Authors

Institutions

Publication Details

Journal
Discover Artificial Intelligence
Published
2026-10-15
DOI
https://doi.org/10.1007/s44163-026-02151-w
Primary Topic
Music Technology and Sound Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Accordion music generation and variation algorithm integrating knowledge graph and transformer

董梁飞, Ming Zhao
Discover Artificial Intelligence
Music Technology and Sound Studies
article

Accordion music generation and variation algorithm integrating knowledge graph and transformer

董梁飞, Ming Zhao
article en

Abstract

Accordion music generation remains challenging due to the complexity of its structural organization and the lack of explicit performance-related information. This study proposes an enhanced generation framework that integrates a Knowledge Graph (KG) with a Generative Pre-trained Transformer (GPT). A specialized accordion KG is constructed to represent fundamental music theory principles and instrument-specific performance characteristics, including the unique left-hand bass accompaniment patterns of the accordion. Based on this knowledge representation, several improvements are introduced into the Transformer architecture. A Graph-Guided Self-Attention (GGSA) mechanism is developed to dynamically regulate attention distributions using knowledge-based constraints. In addition, a Variation Feature Injection Module (VFIM) is incorporated to generate recursive variations while preserving essential thematic characteristics. The proposed framework further models accordion-specific performance factors, including bellows pressure variations and fingering patterns. The Nottingham Database is adopted as the experimental corpus. The original symbolic music data are enhanced through instrument-specific representation processing, in which pitch, duration, and chord sequences are extracted to construct a performance-aware musical representation. Experimental results demonstrate that the proposed model achieves a perplexity (PPL) of 3.42 and a harmonic validity rate of 94.8%. The generated melodies exhibit improved structural coherence, more natural coordination between left-hand accompaniment and right-hand melody, and stronger thematic consistency during variation generation. These findings indicate that integrating knowledge constraints with sequence modeling can effectively improve the structural quality and performance logic representation of accordion music generation. The proposed approach provides a potential technical foundation for automated composition, intelligent music education assistance, and the digital creation of instrument-specific music.

Discover Artificial IntelligenceVol. 6(1)
Yanshan University (CN)
Openalex Percentile: Top 16%
Music Technology and Sound Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.