arXiv:2610.09318eess.ASOct 2026

Manuscript Offprint

arXiv:2610.09318

CASM: Context-Aware Semi-Markov Post-Processor for Beat Tracking

Zhanhong He, Hanyu Meng, Yaolong Ju

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

ABSTRACT

In music beat tracking, model-predicted activations must be decoded into a discrete, musically coherent event sequence. Direct peak picking closely follows local evidence but can retain spurious peaks or miss weak beats. Dynamic Bayesian networks (DBNs), a widely used structured post-processor, improve sequence consistency under predefined global tempo, meter, and transition constraints, but their behavior can depend strongly on these settings. We introduce CASM, a context-aware semi-Markov decoder that instead conditions its temporal constraint on local activation evidence. CASM also accounts for ambiguity among competing periodic interpretations, including half- and double-tempo alternatives. Deterministic safeguards prevent implausible outputs and preserve beat-downbeat consistency. Applied to fixed activations from three neural beat trackers (BeatThis, MSCNN, and TCN), CASM improves temporal continuity while preserving event-level F1 across the GTZAN and SMC datasets, without backbone retraining or dataset-specific retuning. Further analysis shows that CASM is less sensitive than the DBN baseline to the composition of the calibration data. 1^{1}

Index Terms— beat tracking, context-aware, semi-Markov decoder, post-processing, local periodicity

1. INTRODUCTION

Beats give music its temporal scaffold, so reliable beat tracking is crucial for music production, analysis, synchronization, and interactive systems [1]. More recently, beat tracking has become a key component of multimodal AI-generated content (AIGC), where the estimated beats serve as timing anchors for aligning generated content such as dance [2], video [3, 4], and music [5, 6]. Most music beat trackers operate in two stages: a network maps audio to frame-wise beat activations, and a post-processor converts these activations into discrete events. Despite recent attempts to remove the post-processor [7–9], many contemporary systems [10–14] still rely on it to obtain musically coherent estimates. No matter how accurate the neural activations become, direct peak picking makes decisions locally without considering the periodicity of beat sequences. Post-processing addresses this limitation by combining local activation evidence with the temporal regularity of music.

For post-processors, the key design question is how to balance temporal regularity against local activation evidence. A weak regularity constraint preserves the network's predictions but may leave missed or spurious beats uncorrected. An overly strong constraint can instead suppress valid peaks under expressive timing or rapid local tempo variation, which is common in classical music performances [15].

Many existing post-processors tilt this balance toward predefined temporal constraints. Early dynamic programming approach [16] assumes a single global tempo per track and penalizes inter-beat intervals (IBIs) that deviate from it. Conditional random fields (CRFs) [17, 18] learn sequence preferences that permit a range of local tempo variation while discouraging abrupt IBI changes. The dominant post-processor is the dynamic Bayesian network (DBN) [19, 20], which operates under pre-specified tempo ranges, meter states, and tempo transition probabilities. This design works well when these assumptions match the recording, but may require per-track or corpus-specific retuning when they do not [21].

The recently proposed PLPDP [22] shifts this balance to local evidence-conditioned temporal constraint. It derives a time-varying IBI and confidence from the predominant local pulse (PLP), which set the preferred period and how strongly it is enforced. However, because this confidence is derived from PLP peak heights, it reflects how strong the selected period is but not whether a competing period is nearly as plausible. A strong period may still be nearly tied with a metrical alternative, such as half or double tempo, and enforcing it strongly then risks committing to the wrong metrical level.

We introduce CASM, an offline context-aware semi-Markov post-processor. While semi-Markov decoding has shown leading performance and efficiency in real-time beat tracking [23], CASM operates offline on the complete activation sequence (with access to future context), so its performance is not directly comparable with that of causal online systems [24,25]. The core philosophy is simple. Whereas PLPDP measures periodicity strength, CASM additionally accounts for periodicity ambiguity. It constructs a sparse path over activation-supported peaks and enforces strict temporal regularity when periodic cues are clear, but relaxes this constraint to let neural activations dominate when competing periods create ambiguity. A beat-count safeguard and a beat-synchronous meter decoder bound this behavior and keep the decoding deterministic. CASM offers three core advantages:

• Backbone-agnostic and transferable. CASM is a plug-in post-processor to cooperate with existing beat trackers and requires no backbone retraining. With a single fixed configuration, it improves every metric in our controlled comparison across BeatThis [8], MSCNN [26], and TCN [27] on both SMC [28] and GTZAN [29] datasets.

• Low tuning burden. Like PLPDP, CASM derives the preferred interval and constraint strength from each activation sequence, avoiding per-track or per-dataset BPM and meter retuning.

• Open and reproducible. We release CASM as an open-source Python package with the configuration used in our experiments and a madmom-like activation-to-event interface.

*Corresponding author, juyaolong@gbu.edu.cn.

1^{1}Code and demo are available at https://zhanh-he.github.io/casm-beat-tracking

Figure

Fig. 1. CASM behavior on BeatThis activations. (a) CASM enforces stronger temporal regularization when periodicity is clear, but (b) closely follows direct peak-picking outputs when periodicity is ambiguous. w(ci)w(c_i) denotes the strength of temporal regularization.

References (34)