Making Resynthesized Pitch Data Trustworthy: A Harmonic-Lattice Filter for Analysis/Synthesis Training Sets

Pitch trackers estimate the fundamental frequency of a sound, written $F_0$: the repetition rate of a voice or instrument that sets the note we hear. The best ones are neural networks trained on audio with exact frame-by-frame pitch labels. Such labels are hard to get for real recordings, so the field relies on a trick called analysis/synthesis. A classical tracker estimates pitch and harmonic amplitudes from a clean recording, and the recording is then rebuilt from those numbers, so the rebuilt audio matches its label by construction. This is how Mdb-Stem-Synth was built, and it is the training and evaluation data behind CREPE.

We argue that "correct by construction" has a specific, checkable hole. When the analysis tracker halves the pitch, it measures harmonic amplitudes at multiples of $F_0/2$. The odd multiples carry almost no energy, so the rebuilt signal is mathematically periodic at $F_0/2$ but has energy only at multiples of $F_0$. A listener, and any pitch tracker, hears $F_0$, yet the label says $F_0/2$. Training on such frames teaches the network to make octave errors, which are the field's most persistent failure. We propose a filter that inspects each synthetic frame's own harmonic parameters and keeps only frames whose label really is the fundamental. With that filter, we scale analysis/synthesis from a few hundred clean music stems to hundreds of hours of unlabeled speech.

Core Claim

A synthetic pitch frame should enter the training set only if two things hold. First, the labeled $F_0$ is the coarsest spacing of the synthesized harmonics. Second, the harmonic model explains the original audio well. Write $a_k$ for the synthesized amplitude of harmonic $k=1,\dots,K$ at the labeled pitch. The sub-lattice energy fraction for an integer $m \ge 2$ is

$$\rho_m = \frac{\sum_{k:\, m \mid k} a_k^2}{\sum_{k=1}^{K} a_k^2},$$

which is the share of energy sitting only on every $m$-th harmonic. If $\rho_m$ is close to 1 for some $m$, the audible fundamental is $m F_0$, and the label is wrong for practical purposes. The second test catches the opposite error. Write $X$ for the original magnitude spectrum and $\hat X$ for the spectrum of the rebuilt frame. The residual is

$$r = \frac{\lVert X - \hat X \rVert}{\lVert X \rVert},$$

measured on voiced frames. When analysis doubles the pitch, the rebuilt audio is self-consistent at $2F_0$, but the original's energy at odd multiples of the true $F_0$ goes unexplained, so $r$ is large. Halving errors give wrong labels and are caught by $\rho_m$. Doubling errors give unrepresentative but correctly labeled audio and are caught by $r$.

This splits the octave problem into two physically different cases with two different remedies. Our central bet is that the split matters more than the number of trackers consulted.

Relation to Prior Work

The method is a transplant of one idea from synthetic-text curation: check a sample against a deterministic source of truth, not against more opinions. TableLLM admits a synthetic example only when free-form reasoning and executed code reach the same answer. Scaling Code-Assisted Chain-of-Thoughts discards traces whose code fails to execute. Our sub-lattice test plays the role of execution: it applies the definition of "fundamental" directly to the generator's own output. Exact-match execution checks do not carry over to continuous signals, and the research file names this as an open problem. We handle it with graded scores ($\rho_m$, $r$) and tolerance thresholds, and we tune those thresholds on held-out data.

The closest competing transplant is committee voting. Ensemble-Instruct keeps generations only when several different language models agree, and this lifted MPT-7B from 39.9 to 46.8 Rouge-L on SuperNI. That result motivates filtering at all. It also points to a constraint: committees fail when their members share biases. Classical trackers all reward harmonic reinforcement, so they may well share octave errors. We test this directly rather than assume it.

On the pitch side, three papers motivate the work and three supply its parts. CREPE and RMVPE (RMVPE) show that supervised training with added noise gives robustness down to 0 dB signal-to-noise ratio (SNR). However, both rely on fixed labeled corpora and treat synthetic labels as perfect. PESTO shows the other side of the trade-off. It is self-supervised, trained by requiring that shifting the input in log-frequency shifts the output equally, and it generalizes across domains: about 88% Raw Pitch Accuracy (RPA) on PTDB speech after training on music, against 63% for the supervised PENN. But it degrades in heavy noise. SLASH anchors self-supervised learning to absolute pitch using a subharmonic-summation prior and a differentiable-synthesis loss. Its prior is applied to every frame without any check, which is exactly the gap a frame-level filter addresses.

For the analysis stage we reuse classical noise-robust estimators: subharmonic summation, frequency-domain autocorrelation, temporal peak accumulation, and the harmonic chirp transform. The chirp transform matters because it keeps harmonic amplitudes sharp during pitch glides, which makes $\rho_m$ trustworthy on moving pitch.

Research Program

The pipeline has four stages. First, run harmonic analysis on all 585 hours of LibriTTS-R speech, using a chirp-aware harmonic model so amplitudes stay sharp during glides. Second, rebuild every voiced frame and compute $\rho_m$ for $m \in \{2,3\}$ and the residual $r$. Third, apply one of three policies to frames that fail $\rho_m$: discard them; relabel them to $mF_0$, the repair option; or keep them, as a control. Frames that fail $r$ get two policies: discard, or keep, since their labels are technically correct. Fourth, add noise and reverberation to the surviving clean resynthesized audio. This happens only after filtering, so the filter never judges noisy audio. We then train a CREPE-architecture model with CREPE's 360-bin Gaussian-blurred targets.

Training on speech and testing on singing and instruments makes this a cross-domain test of the trade-off between supervised and self-supervised training. It is also a fair comparison with SLASH, which pretrains on the same corpus.

We also audit an existing dataset. We compute the distribution of $\rho_2$ over MDB-stem-synth itself, to see whether the standard benchmark contains halved-label frames. If it does, part of the octave error measured on it is benchmark error. This is a measurement whose outcome we do not know in advance.

Baselines

The naive reference point is the same pipeline with no filter. Every resynthesized LibriTTS-R frame is used, with the same noise augmentation, architecture, steps, and tuning budget. Beating it is the minimum claim. The test is whether the gap between Raw Chroma Accuracy (RCA, which ignores octave) and RPA shrinks, because octave errors are precisely what separates the two metrics.

The strongest competitor for cross-domain generalization is PESTO. It reports 97.0% RPA on MDB-stem-synth, 97.7% RPA on MIR-1K, and about 88% RPA on PTDB when trained on music. We will retrain PESTO on LibriTTS-R so the training audio matches ours, and also report its published music-trained figures. On clean MDB-stem-synth, the supervised reference is CREPE at 96.7% RPA, against 91.9% for pYIN and 92.5% for SWIPE. SLASH is the natural competitor on identical training data. It reports beating DSP and self-supervised methods on 250 MIR-1K phrases and matching CREPE, but no reported result found on Lacuna for its absolute RPA or RCA. We will therefore rerun it on the same 250-phrase protocol.

For noise, RMVPE is the strongest reported system. The file gives its gain of up to 17.66% RPA over GIO at 0 dB pub noise, but no reported result found on Lacuna for its absolute low-SNR MIR-1K RPA. We will rerun it under the same degradation settings. Beating the baselines means two things. At 0 dB SNR we must match RMVPE-level robustness. At the same time, our speech-trained model must hold at least PESTO's cross-domain accuracy on MDB-stem-synth and MIR-1K.

Two ablations isolate the key ingredient. The first is committee filtering: keep a frame only if three or more of the classical analysis trackers agree within 50 cents. This copies Ensemble-Instruct and is matched to our filter in number of frames kept. The second is confidence filtering: threshold the analysis tracker's own voicing probability or peak salience, again at matched yield. Matching yield ensures any difference comes from which frames are rejected, not how many.

Why not just…?

Why not just threshold the analysis tracker's own confidence? This is the most serious threat. Confidence thresholding is cheap and standard, and a tracker may well be unsure on the frames where it halves the pitch. Our reason for doubt is that halving often happens on frames with strong, clean harmonics, where salience is high. The matched-yield confidence ablation settles this. If it closes most of the RPA–RCA gap, the lattice test adds nothing, and we will say so. We will also report per-frame overlap between the frames each filter rejects.

Why not just require agreement among several pitch trackers? Agreement filtering worked for text in Ensemble-Instruct. But the research file flags correlated failures as the open weakness of committees, and the classical trackers we would combine all score candidate pitches by summing harmonic energy, so they share a pull toward sub-harmonics. The committee ablation measures the rate of unanimous-but-wrong decisions directly, using the frames where $\rho_2$ flags a halving.

Why not just train on MDB-stem-synth with heavy noise augmentation, as RMVPE does with its data? That recipe gives noise robustness, but it keeps the domain narrow. The PENN collapse to 63% on PTDB, reported in PESTO, shows what narrow supervised training costs. Our filtered-speech model and an MDB-trained model with the same noise augmentation are evaluated on the same test sets. That comparison shows whether data breadth, not filtering, explains any gain.

Why not just use self-supervised training and skip labels entirely? PESTO and SLASH already do this well on clean audio. The PESTO results show the low-SNR weakness, and the SLASH ablation shows that removing absolute-pitch anchors hurts. Our proposal keeps supervised targets for robustness and borrows breadth from large unlabeled corpora. If SLASH, rerun under our noise settings, matches us, the contribution reduces to a dataset audit.

Proposed Experiments

The decisive check is the RPA–RCA gap on MIR-1K, MDB-stem-synth, and PTDB under clean conditions and at 20, 10, 5, and 0 dB SNR, with white, pink, brown, and pub noise. These are the conditions RMVPE uses. We compare five variants: no filter, confidence filter, committee filter, lattice-plus-residual discard, and lattice relabel.

The hypothesis is falsifiable in three ways. If the lattice filter does not reduce octave errors more than confidence filtering at matched yield, the core claim fails. If relabeling beats discarding, the frames are recoverable and should be kept, which changes how yield trades off against quality. If the residual-flagged frames, which carry correct labels, help when kept, then only label-breaking errors deserve filtering. That would be a useful lesson for continuous-signal filtering more broadly.

We additionally report log-$F_0$ root-mean-square error and voicing error, data yield per hour of source audio, and the MDB-stem-synth $\rho_2$ audit. The audit tells the field whether its main benchmark contains octave-mislabeled frames.