Controlling Contrastive Self-Supervised Learning with Knowledge-Driven Multiple Hypothesis: Application to Beat Tracking

Antonin Gagneré, Slim Essid, Geoffroy PeetersarXiv 2025 · DOI

Introduction: Embracing Rhythmic Ambiguity

In many machine learning tasks, data is inherently ambiguous. In music, specifically beat and downbeat tracking, different listeners might interpret the same rhythm differently—one person might tap twice as fast as another, or start their "one-count" on a different beat. Both interpretations can be musically valid.

Standard Self-Supervised Learning (SSL) usually relies on a single "ground truth" view (e.g., an augmented version of an image is the same object). Forcing a model to commit to one interpretation of an ambiguous rhythmic signal during pre-training can lead to poor representations. This paper introduces Knowledge-Driven Multiple Hypothesis Learning (KD-MHL), a self-supervised framework that trains models to handle data ambiguity by considering multiple plausible interpretations simultaneously, guided by musical domain knowledge.

Methodology: The KD-MHL Framework

The proposed KD-MHL framework consists of three main components designed to leverage rhythmic knowledge without manual labels:

  1. Multi-Hypothesis Heads: An encoder extracts a general representation of the audio, which is then passed to multiple "heads." Each head represents a different metrical hypothesis, such as different tempos or starting points.
  2. Knowledge-Driven Scoring: Since this is self-supervised, the system uses a Predominant Local Pulse (PLP) function—a signal processing technique—to identify potential beat candidates. A scoring function then evaluates how well each hypothesis aligns with the actual audio features (like chromagrams).
  3. Selection Mechanism ($n$-WTA): The framework uses a "Winner-Takes-All" (WTA) strategy. During training, only the top $n$ best-scoring hypotheses contribute to the loss function. This allows the encoder to learn features compatible with the most plausible rhythmic interpretations without being penalized by unlikely ones.
Detailed architecture of the Knowledge-Driven Multiple Hypothesis Learning (KD-MHL) framework.

The backbone of the model is a sophisticated architecture using Partial Transformers that process audio features across time and frequency separately before integrating them.

Experimental Setup and Datasets

The model was pre-trained on the Million Song Dataset (MSD), utilizing over 3 million 20-second audio chunks. Fine-tuning and evaluation were conducted on a collection of standard Music Information Retrieval (MIR) datasets, including Ballroom, Beatles, Hainsworth, Harmonix, HJDB, SMC, and RWC-Popular. To evaluate generalization, the GTZAN dataset was used as an unseen test set.

Key Results and Insights

The proposed method achieved significant improvements over existing state-of-the-art (SOTA) models. A key insight was the power of the $n$-WTA strategy; researchers found that selecting the top 3 hypotheses (3-WTA) generally performed better than selecting just the single best one. This suggests that keeping a few plausible options open during training helps the model learn more robust and flexible representations.

Comparison of the proposed KD-MHL method against state-of-the-art models on the GTZAN dataset.

As shown in the results table, the KD-MHL model (specifically the self-training variant) achieved an average score of 84.3 on the GTZAN test set, surpassing the previous SOTA of 80.6. The model also showed particularly strong gains on difficult datasets like Hainsworth (+3.5 points in beat metrics) and SMC (+2.5 points), which are known for their rhythmic complexity.

Conclusion and Future Work

KD-MHL demonstrates that treating ambiguity as a feature rather than a bug can significantly enhance self-supervised learning for rhythmic tasks. While the system's performance is currently tied to the quality of the PLP function and manual scoring heuristics, it establishes a new benchmark for beat tracking. Future work could involve more complex musical meters, non-integer rhythmic relationships, and even more diverse datasets for pre-training to further improve generalization across musical genres.

Summary updated

BibTeX
@misc{gagnere2025controlling,
  author = {Antonin Gagneré and Slim Essid and Geoffroy Peeters},
  title = {{Controlling Contrastive Self-Supervised Learning with Knowledge-Driven Multiple Hypothesis: Application to Beat Tracking}},
  year = {2025},
  eprint = {2510.25560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.25560},
}
Figure