Focal Modulation Network: A Novel Solution for Polyphonic Music Instrument Recognition without Attention and Aggregation Strategy
Abstract
This study introduces a novel framework for recognizing multiple predominant instruments in polyphonic music using Focal Modulation Networks (FMN). Unlike traditional methods that rely on sliding window analysis and aggregation strategy, FMN leverages a focal modulation module for hierarchical contextualization and gated aggregation, leading to improved accuracy and interpretability. Trained on single-instrument data, the model effectively recognizes multiple instruments in unseen polyphonic compositions. Extensive experiments show our proposed FMN outperforms existing transformer architectures, including Vision Transformers (ViT), Swin Transformers (SwinT), and Compact Convolutional Transformers (CCT), with improved accuracy and interpretability, achieving state-of-the-art results. The proposed scheme reports micro and macro F1 scores of 0.66 and 0.58, representing 10% and 16% improvements over the state-of-the-art Han's model, respectively.