Skip to main content
QUICK REVIEW

[Paper Review] A Bi-Directional Transformer for Musical Chord Recognition

Jonggwon Park, Kyoyun Choi|arXiv (Cornell University)|Jul 5, 2019
Music and Audio ProcessingComputer Science31 references7 citations
TL;DR

This paper proposes a bi-directional Transformer model (BTC) for musical chord recognition that leverages self-attention to capture long-term dependencies in audio sequences without requiring separate feature extractors or decoders. BTC achieves competitive performance in a single training phase, with attention maps revealing its ability to adaptively focus on relevant chord segments and model long-range context effectively.

ABSTRACT

Chord recognition is an important task since chords are highly abstract and descriptive features of music. For effective chord recognition, it is essential to utilize relevant context in audio sequence. While various machine learning models such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs) have been employed for the task, most of them have limitations in capturing long-term dependency or require training of an additional model. In this work, we utilize a self-attention mechanism for chord recognition to focus on certain regions of chords. Training of the proposed bi-directional Transformer for chord recognition (BTC) consists of a single phase while showing competitive performance. Through an attention map analysis, we have visualized how attention was performed. It turns out that the model was able to divide segments of chords by utilizing adaptive receptive field of the attention mechanism. Furthermore, it was observed that the model was able to effectively capture long-term dependencies, making use of essential information regardless of distance.

Motivation & Objective

  • To address the challenge of capturing long-term dependencies in musical chord sequences for automatic chord recognition.
  • To develop a unified, end-to-end model that eliminates the need for separate feature extraction or sequence decoding modules like HMMs or CRFs.
  • To demonstrate the effectiveness of self-attention mechanisms in modeling chord transitions and segment boundaries in audio.
  • To visualize and analyze how attention mechanisms in the Transformer model localize and focus on relevant temporal segments for chord recognition.

Proposed method

  • The model employs a bi-directional Transformer architecture that processes raw audio features using self-attention mechanisms to capture contextual relationships across time.
  • Input features are derived from the constant-Q transform (CQT), which provides a time-frequency representation of the audio signal.
  • The model uses multi-head self-attention to compute attention weights across all time frames, enabling adaptive receptive fields that dynamically focus on relevant segments.
  • The final chord prediction is generated directly from the last layer of the Transformer without additional decoding heads or post-processing.
  • Attention maps are visualized to analyze how the model attends to different time frames during inference, revealing layer-specific attention patterns.
  • The model is trained end-to-end in a single phase using CQT features and ground-truth chord labels, avoiding complex pre-training or auxiliary models.

Experimental results

Research questions

  • RQ1Can a self-attention-based Transformer model effectively capture long-term dependencies in musical chord sequences without recurrence or convolution?
  • RQ2How does the bi-directional attention mechanism in the Transformer help in identifying relevant chord segments and boundaries in audio?
  • RQ3To what extent does the proposed BTC model outperform conventional models like CNNs and RNNs in chord recognition accuracy and training simplicity?
  • RQ4Can the attention mechanism in the Transformer model be interpreted to reveal meaningful patterns in chord recognition, such as segment division and feature focus?

Key findings

  • The BTC model achieves competitive performance compared to state-of-the-art models such as CNN+CRF and CRNN+CRF, despite requiring only a single training phase.
  • Attention map analysis shows that the model progressively broadens its receptive field across layers, starting with local context and evolving to focus on semantically relevant segments.
  • The model successfully divides chord sequences into distinct segments by leveraging the adaptive receptive field of self-attention, as evidenced by rectangular regions of high attention in intermediate layers.
  • The final layer attention maps align closely with the correct chord boundaries, indicating that the model learns to focus on essential information regardless of temporal distance.
  • In cases of chord ambiguity (e.g., G and B:min sharing common tones), multi-head attention helps suppress incorrect associations, leading to correct predictions through attention ensemble.
  • Despite its effectiveness, the model occasionally fails on chords with overlapping notes (e.g., A and F#:min), indicating limitations in handling high-similarity chord pairs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.