MMIC: A forward-bidirectional mamba architecture for musical instrument classification
摘要
Musical instrument classification, a fundamental task in music information retrieval (MIR), identifies instrument types from audio signals. Existing deep learning approaches face a trade-off between performance and computational efficiency: transformer-based architectures exhibit quadratic computational complexity that limits scalability for long audio sequences, while convolutional neural networks have limited capacity to capture long-range temporal dependencies. Here we present MMIC (Mamba Music Instrument Classification), an architecture based on selective state space models that achieves linear complexity while maintaining strong modeling capacity. MMIC employs Mamba blocks to process mel spectrogram patches and implements a forward-bidirectional hybrid strategy (Fo-Bi) that balances efficiency and bidirectional context modeling. Evaluated on a 20-class instrument dataset, MMIC achieves 96.55% accuracy, outperforming current state-of-the-art models while requiring only 26.0 million parameters and 12.1 ms inference time per sample. This work demonstrates that linear-complexity architectures can match or exceed transformer performance in audio classification tasks, providing an efficient solution for real-time music analysis. The code is available at https://huggingface.co/jiaxiang08/MMIC.