Learning discriminative representations from complex music audio signals remains challenging due to substantial intra-class variability, overlapping spectral characteristics, and long-range temporal dependencies. This study proposes a music-aware transformer framework that integrates multi-scale spectrogram representation learning with adaptive attention optimization for intelligent music audio pattern recognition and music genre classification (MGC). The proposed framework transforms raw audio signals into normalized log-Mel spectrogram representations and employs hierarchical multi-scale feature extraction to simultaneously capture local rhythmic patterns and global harmonic structures. A music-aware self-attention mechanism is introduced to model contextual dependencies within the spectrogram domain, while a music-aware adaptive attention optimization (MAAO) algorithm dynamically adjusts attention-related optimization parameters according to spectral characteristics and attention responses during training. The proposed framework is extensively evaluated on three benchmark music datasets with different levels of complexity and rhythmic diversity, namely GTZAN, ballroom, and extended ballroom. Experimental results achieve classification accuracies of 93.5%, 99.2%, and 97.1%, respectively. Comparative analyses against recent deep learning baselines demonstrate consistent improvements in classification performance, while ablation studies verify the contribution of multi-scale representation learning and adaptive attention optimization to robustness and generalization capability. The cross-dataset evaluation further confirms stable performance under different genre distributions and recording conditions. The proposed framework provides an effective domain-aware representation learning solution for complex music understanding tasks and establishes a foundation for future extensions to other audio analysis applications.
No takes yet. Share an insight, caveat, or question.
Chen et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: