Abstract
Beat tracking is a fundamental task in Music Information Retrieval (MIR), yet its performance is often limited by the scarcity of expert-annotated data. We propose a contrastive self-supervised learning (SSL) framework that leverages rhythmic priors to learn beat-related representations from vast unlabeled audio collections. By utilizing Predominant Local Pulse (PLP) and a power-of-two sampling strategy, our model learns to identify rhythmic relationships without explicit labels. Our approach demonstrates state-of-the-art performance in few-shot learning scenarios, outperforming existing unsupervised methods and rivaling fully supervised systems on standard benchmarks.
Introduction
Identifying the "pulse" or beat of a musical piece is a task humans perform intuitively but remains computationally challenging. Deep learning models for beat tracking typically require large amounts of labeled data, which is expensive and time-consuming to produce. While fields like computer vision benefit from millions of labeled images, the MIR community has access to only a few thousand annotated tracks. To address this data bottleneck, we explore self-supervised learning to harness the abundance of unlabeled music available online.
Methodology
Our framework is inspired by Contrastive Predictive Coding (CPC) and employs a Log-Mel-Spectrogram-Transformer as an encoder. The core innovation lies in the contrastive sampling strategy, which uses rhythmic priors to define positive and negative pairs without ground-truth labels.
Predominant Local Pulse (PLP)
We use the PLP technique to generate a rhythmic "proxy" from the audio signal. This provides a grid of candidate beat positions (tatums), serving as a structural scaffold for the learning process.
Contrastive Sampling Strategy
The sampling process identifies three types of pairs relative to a random anchor peak in the PLP:
- Anchor: A selected peak in the PLP signal.
- Positives: Peaks located at distances of $2^n$ units (e.g., 2, 4, 8) from the anchor. This leverages the binary metric structure prevalent in Western music.
- Negatives: "Easy" negatives are random time steps that are not PLP peaks, while "Hard" negatives are PLP peaks that do not fall on power-of-two intervals.
The model is trained using the NT-Xent loss, which encourages the encoder to produce similar embeddings for anchor-positive pairs while maximizing the distance between anchor-negative pairs in the latent space.
Experimental Setup
The model undergoes a two-stage training process:
- Unlabeled Pre-training: We utilize approximately 8,000 hours of unlabeled audio (~165,000 tracks) from the Free Music Archive (FMA), MTG-Jamendo, and MagnaTag-aTune (MTT).
- Few-Shot Fine-tuning: The pre-trained model is fine-tuned on standard MIR benchmarks, including SMC, Ballroom, Hainsworth, and GTZAN, using a varying number of labeled tracks to evaluate few-shot performance.
Results
Our SSL-pre-trained model consistently outperforms the previous state-of-the-art unsupervised method, Zero-Note Samba (ZeroNS). Notably, the model achieves significant improvements in both F1 scores and continuity-based metrics (CMLt/CMLc).
Few-Shot Performance
The model's ability to generalize from minimal data is a key strength. As shown in Figure 3, the performance improves rapidly with only a few labeled examples, reaching high accuracy with as few as 10 to 32 tracks.
Comparison with Supervised SOTA
In cross-validation experiments on the GTZAN dataset, our model achieved an F1 score of 0.876. This result is remarkably close to fully supervised state-of-the-art models, which range between 0.885 and 0.887, despite our model using significantly less labeled data.
Discussion and Limitations
The success of this approach highlights the power of incorporating domain-specific priors—such as the binary rhythmic structure—into SSL frameworks. However, the current "power-of-two" assumption is a limitation for music with non-binary meters, such as waltzes (3/4) or compound meters (6/8). Future work will explore adaptive sampling mechanisms and additional audio features to better handle diverse metrical structures.
Conclusion
We have presented a contrastive SSL scheme for beat tracking that effectively learns rhythmic representations from unlabeled data. By bridging the gap between unsupervised and supervised learning, this framework enables high-performance beat tracking in data-scarce environments, paving the way for more scalable MIR systems.
Summary updated