When a beat tracker follows an expressive piano performance, it usually does not fail at random. It locks onto half the annotated tempo, or double it, or the offbeat, and stays there for a while before jumping again. Recent work recasts these jumps as a symptom of "glassy," shattered solution landscapes of the kind statistical physicists use to explain why random constraint problems become hard. We think that analogy points the wrong way. Most beat trackers solve a one-dimensional chain problem. Physics has long shown that one-dimensional systems with short-range interactions have no true phase transition. What they have instead are domain walls: places where the system switches from one locally consistent state to another, occurring at a finite rate set by the cost of a single wall. Our claim is that metric-level switching is exactly this phenomenon. Its rate follows from a computable correlation length, the typical number of beats between switches. That length depends in a predictable way on how much the performer bends tempo.
This gives a quantitative, testable theory where the music literature currently has only descriptions. It predicts how fast tracking accuracy decays as the evaluation window grows, and why the decay is so steep on Chopin Mazurkas and so mild on rock. It also separates failures caused by a wrong prior, which can be fixed by fitting the tempo model, from failures that are intrinsic to the information available. Finally, it identifies the one place where genuine computational difficulty can enter: long-range couplings, such as a requirement that repeated sections share a metrical level. These couplings turn the chain into a loopy graph. There, and only there, the physics of message-passing breakdown becomes relevant.
Core Claim
Consider the standard state-space view of beat tracking. A hidden state at each beat carries tempo and phase, and the hidden states are linked only to their neighbors, as in the bar-pointer hidden Markov model (HMM) used by madmom and the undirected model of Beat Tracking the Graphical Model Way. In this model, the posterior over the global "metrical level" variable has no long-range order. Write $T$ for the transfer operator of the chain, the matrix that propagates beliefs from one beat to the next. Write $\lambda_1 > \lambda_2$ for its two largest eigenvalues. The correlation length in beats is
$$\xi = \frac{1}{\ln(\lambda_1/\lambda_2)},$$
and the probability that a window of $L$ consecutive beats contains no level switch decays as $\exp(-L/\xi)$. This is the standard transfer-matrix result for one-dimensional chains, and it is rigorous rather than heuristic.
The new content is how $\xi$ depends on the performance. Model the performer's log-tempo as a random walk with per-beat variance $\sigma^2$, which we call the rubato strength. Let $\delta$ be the per-beat penalty the rhythm prior assigns to the wrong metrical level, which measures how strongly note durations favor one level. A switch from one level to its double requires the tempo to change by a factor of two. If the switch is spread over $k$ beats, as a gradual ritardando, the wall costs roughly $(\ln 2)^2/(2k\sigma^2) + k\delta$. Minimizing over $k$ gives a wall cost $\Delta = \ln 2\,\sqrt{2\delta}/\sigma$. At low temperature this yields
$$\ln \xi \approx \frac{\ln 2\,\sqrt{2\delta}}{\sigma},$$
so the log correlation length scales as $1/\sigma$. This single relation explains, in one mechanism, three findings that An Analysis Method for Metric-Level Switching in Beat Tracking documents only descriptively. First, on Maz-5 the HMM's L-correct score, which rewards long uninterrupted stretches at the annotated level, collapses to 0.128 while its Annotation Coverage Ratio (ACR-any, credit for tracking any of ten metrical variants) stays at 0.726. Second, peak picking without any temporal model collapses as the context length grows. Third, rock (81.4% tempo-stable tracks) is nearly immune to the problem.
Positioning Against Prior Work
Three groups of prior work play different roles here.
The expressive-timing literature motivates the problem. Local Periodicity-Based Beat Tracking for Expressive Classical Piano Music shows that only 13.1% of Maz-5 tracks have stable tempo. It fixes the HMM's rigid transition penalties with local-pulse-derived penalties (PLPDP), at a cost in precision. The metric-level-switching paper names the multistable behavior and builds a metric (ACR) to score around it. Tempo tracking and rhythm quantization by sequential Monte Carlo poses tempo and rhythm as a joint inference problem with an inherent ambiguity between them. Machine Rhythm observes that performances are rarely metronomic even when intended to be. None of these works predicts how often switching should happen as a function of measurable performance statistics. That prediction is what we add.
The physics of phase transitions constrains the proposal, and partly contradicts the framing the research file suggests. The Statistical Mechanics of k-Satisfaction, Clustering of Solutions in the Random Satisfiability Problem, and Dynamic phase transition for decoding algorithms establish shattering and metastable trapping on sparse random graphs with loops and many interacting variables. A chain has none of that structure.
The correlation-decay viewpoint supplies our method. It comes from On the hardness of sampling independent sets beyond the tree threshold and Inapproximability After Uniqueness Phase Transition in Two-Spin Systems, where hardness begins exactly when the influence of distant boundaries stops decaying. On a chain, that influence always decays, at rate $1/\xi$. So we argue the "replica symmetry breaking" reading of metric switching is wrong for chain trackers, and we design an experiment that would falsify our position if it is the one that is wrong.
The heuristic-to-rigor line supplies the template for where rigor is achievable. Optimal errors and phase transitions in high-dimensional generalized linear models separates the information-theoretically optimal error from what an efficient algorithm achieves. We perform the same separation for beat tracking, between the Bayes-optimal error under the true generative model and the error of practical trackers. Unlike that setting, the chain case allows exact computation, so no replica trick is needed. Analysis of Belief Propagation for Non-Linear Problems explains when message passing remains valid as correlations grow. We use it to frame the loopy, repetition-coupled extension, which is the only regime where a computational question genuinely arises.
Research Program
The work has three parts.
The first part is theory on a teacher-student generator. We build a generator that samples a rhythm from a prior with controllable level-discrimination $\delta$, which tunes how strongly note durations favor one metrical level. It renders that rhythm through a log-tempo random walk with strength $\sigma$ and adds onset jitter $\tau$. The tempo-phase-level state space is discretized, so exact forward-backward inference under the true prior is polynomial. This gives the Bayes-optimal posterior, its switching rate, and $\xi$ computed exactly from the transfer operator. We prove the wall-cost scaling as a large-deviation statement in the small-$\sigma$ limit. We also characterize the scale symmetry, doubling tempo while halving durations, under which only the priors can break the tie. This tells us which part of observed "error" is pure convention: the annotator's chosen level, which no data can recover.
The second part is diagnosis on real recordings. From annotated beats we estimate a per-piece $\hat\sigma$ from log inter-beat-interval increments, and a proxy for $\delta$ from the note-onset distribution relative to the beat. We then test whether the predicted $\xi(\hat\sigma, \hat\delta)$ explains each tracker's observed switch-free run lengths.
The third part is the one place where loops matter, which we call the repetition-coupled tracker. Repeated sections in a score imply that their metrical levels should agree. We add factors coupling the level variables of aligned repeated bars. These factors can make $\xi$ effectively unbounded, so the tracker can recover from a wall by consulting a distant repeat. They also make the graph loopy. We compare exact inference (enumeration over per-section levels, which is small) against loopy max-belief propagation. The aim is to see whether message passing is trapped once couplings become strong. This is the music analogue of the computational-gap question.
Baselines
The naive reference point is simple peak picking on the same neural beat-activation function. It has no temporal model and serves as the floor that shows what any chain prior buys. Chiu et al. report that it collapses with context length, but we found no single reported Maz-5 F1 for it on Lacuna, so we will measure it ourselves.
The most established competitor is madmom's HMM tracker. On Maz-5 it reports F1 0.595, L-correct 0.128, and ACR-any 0.726, and with oracle novelty curves it reaches F1 0.794 (Chiu et al. 2023 and 2022). It is the strongest exact-inference chain model in wide use and our theory's direct subject.
The strongest existing method on expressive piano is PLPDP. It reports F1 0.838 on Maz-5, 0.982 with oracle novelty, and 0.493 on ASAP against 0.473 for prior post-processing trackers (Chiu et al.). It is the method most likely to already capture whatever per-piece tempo adaptation our theory recommends.
We also include Lang and de Freitas's max-belief-propagation tracker, which is the message-passing incumbent. Their paper reports success on 17 of 25 difficult songs but gives no Maz-5 number. Finally, we include a neural tracker, Beat Transformer. We found no reported Maz-5 or ASAP result for it on Lacuna.
All trackers run on identical activation functions from one shared network, with the oracle-novelty condition repeated for each. Each tracker gets the same hyperparameter search budget on a held-out Maz-5 split, using the published fold structure where it exists.
Two ablations isolate the key ingredients. The first is a matched-prior HMM, madmom's model with its tempo-transition variance set per piece from $\hat\sigma$ by empirical Bayes. It isolates whether the gain is just "use the right $\sigma$." The second is the repetition-coupled tracker with couplings switched off, which isolates the value of long-range structure.
Success has three conditions. On real data, $\xi$ predicted from $(\hat\sigma, \hat\delta)$ must rank pieces by observed switching rate with rank correlation clearly above what $\hat\sigma$ alone or tempo-stability labels provide. The repetition-coupled tracker must beat PLPDP's 0.838 F1 on Maz-5, or its 0.493 on ASAP. It must also raise L-correct substantially above 0.128 without the precision loss PLPDP concedes.
Why not just…?
Why not just tune the HMM's transition penalty per piece? This is the real threat. If the matched-prior HMM closes most of the gap to Bayes-optimal and matches PLPDP, then on chain models our contribution is explanatory and diagnostic rather than a better tracker. We accept that outcome. The theory would still tell practitioners which $\sigma$ to use, and it predicts that this fix lengthens $\xi$ only exponentially in $1/\sigma$, never removes walls. The experiment that settles it is the matched-prior ablation. If its L-correct-versus-$L$ curve still decays exponentially at the predicted rate, walls are intrinsic to the chain, and only the repetition coupling can remove them.
Why not just use PLPDP, which already handles local tempo variation? PLPDP's fixed 1s/3s/5s kernels and relaxed penalties improve Maz-5 F1 from 0.595 to 0.838, but its ASAP gain is small (0.473 to 0.493), and its authors report spurious beats. In our language, PLPDP lowers wall cost and lets the tracker follow rubato, which also makes false walls cheaper. Our prediction is that PLPDP's switch rate should track $\xi$ computed under its effective local variance. We test that directly. If PLPDP lies on the same curve, it is a point on our phase diagram, not an alternative to it.
Why not just treat switching as glassy and use cluster-level methods like survey propagation? On a chain, exact Viterbi or forward-backward already explores every state, so there are no clusters for local search to be trapped between. Benchmarking Graph Neural Networks in Solving Hard Constraint Satisfaction Problems shows trapping on random 4-SAT, where Focused Metropolis Search solves 95% of instances and QuerySAT 66%, but those are loopy random graphs. Our synthetic test is decisive. If exact inference under the true prior shows the same switching as practical trackers, switching is statistical, not computational, and cluster methods cannot help. If a cluster-level method beats exact chain inference, our framing is wrong.
Why not just train a large end-to-end network? A network's output must still be decoded into a consistent beat sequence. Any decoder with short-range temporal dependence inherits the domain-wall statistics. We run Beat Transformer with and without a chain decoder and check whether its switch-free run lengths obey $\exp(-L/\xi)$ for some effective $\xi$.
Proposed Experiments
On the synthetic generator, we sweep $\sigma$, $\delta$, and $\tau$. We verify that the exact transfer-matrix $\xi$ predicts Bayes-optimal switching, and that $\ln\xi$ is linear in $1/\sigma$ with the derived slope. We also measure how far madmom-default, PLPDP, and max-belief propagation fall from Bayes-optimal F1 as $\sigma$ grows. This is the analogue of the optimal-versus-algorithmic error map in Barbier et al..
On Maz-5, RWC-Jazz, and Rock, we plot L-correct as a function of $L$ for every tracker. We fit decay rates and regress them against predicted $\xi(\hat\sigma, \hat\delta)$. The three corpora span tempo stability of 13.1%, 74.8%, and 81.4%, giving a natural sweep in $\sigma$. The decisive check is whether one curve, with no per-corpus refitting, predicts all three.
On ASAP, where aligned scores reveal repeated sections, we compare the repetition-coupled tracker against PLPDP's 0.493 F1, along with L-correct and ACR. Within that tracker, we compare exact inference against loopy max-belief propagation as coupling strength increases. If loopy belief propagation diverges from the exact answer once couplings make $\xi$ effectively unbounded, we will have found the first real computational transition in beat tracking. It appears only where long-range musical structure, not rubato itself, makes the problem loopy.
References
- madmom: A New Python Audio and Music Signal Processing Library
- Beat Tracking the Graphical Model Way
- An Analysis Method for Metric-Level Switching in Beat Tracking
- Local Periodicity-Based Beat Tracking for Expressive Classical Piano Music
- Tempo tracking and rhythm quantization by sequential Monte Carlo
- Machine Rhythm
- The Statistical Mechanics of k-Satisfaction
- Clustering of Solutions in the Random Satisfiability Problem
- Dynamic phase transition for decoding algorithms
- On the hardness of sampling independent sets beyond the tree threshold
- Inapproximability after Uniqueness Phase Transition in Two-Spin Systems
- Optimal errors and phase transitions in high-dimensional generalized linear models
- Analysis of Belief Propagation for Non-Linear Problems: The Example of CDMA (or: How to Prove Tanaka's Formula)
- Beat Transformer: Demixed Beat and Downbeat Tracking with Dilated Self-Attention
- Benchmarking Graph Neural Networks in Solving Hard Constraint Satisfaction Problems