NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Streaming Interval Signatures from Pitch-Shift NMF

Most music-matching systems get transposition invariance in one of two ways. Some turn audio into discrete notes and compare the pitch differences between consecutive notes. Others train a deep network to ignore key changes. The first breaks on polyphonic audio, because there is no reliable note sequence to take differences of. The second produces one vector per whole track, which dilutes a short stolen hook inside an otherwise unrelated song. We propose a third route that works directly on audio. First, factor a log-frequency spectrogram into a few spectral shapes that are allowed to slide up and down in pitch. This is non-negative matrix factorization (NMF), a method that writes a spectrogram as an additive sum of non-negative templates times non-negative activations, extended here with a pitch-shift axis. Second, summarize the activations by how strongly energy at one pitch offset co-occurs with energy a fixed interval and time lag later. That summary is a soft, polyphony-friendly version of a relative interval encoding, and it is unchanged by transposing the whole piece or shifting it in time.

The second half of the idea is practical. Live copyright monitoring and interactive plagiarism analysis need this signature computed as audio streams in. We design the per-frame update so that its cost has a fixed upper bound on every frame, not just on average, and we test whether that bound matters in practice. Two sentences for a colleague: decompose audio into pitch-shiftable parts, then describe the music by the interval-and-lag co-occurrences of those parts, which needs no transcription and no voice separation. Do it with a fixed, provable amount of work per audio frame, and use it to find short transposed or retimed fragments inside long recordings.

Core Claim

Let $V(f,t)$ be a constant-Q magnitude spectrogram. Its frequency bins are log-spaced, so transposing by a semitone moves harmonic peaks by a fixed number of bins. We model it as

$$V(f,t) \approx \sum_{k=1}^{K}\sum_{s} W_k(f-s)\,H_k(s,t),$$

where $W_k$ is the $k$-th non-negative spectral template (for example, a harmonic voice shape), $s$ is a pitch offset in bins, and $H_k(s,t)\ge 0$ says how strongly template $k$, shifted by $s$, is active at frame $t$. From the activations we compute, over a sliding window $\mathcal{T}$ of frames,

$$A_{jk}(\delta,\ell)=\sum_{t\in\mathcal{T}}\sum_{s} H_j(s,t)\,H_k(s+\delta,\,t+\ell),$$

the total co-activation of template $j$ at some pitch and template $k$ at an interval $\delta$ higher and $\ell$ frames later. Adding a constant to every $s$ (a key change) leaves $A$ unchanged. Shifting the excerpt in time also leaves $A$ unchanged, up to window-edge effects.

Our claim is that $A$ does three useful things at once. It matches relative interval encodings on clean transposition and retiming. It degrades gracefully under inserted or dropped notes and polyphonic texture, because a spurious note perturbs only the terms it touches. Nothing in the signature depends on a correct note ordering. Finally, $A$ and $H$ can be maintained per frame under a deterministic work bound. The combination that is new is three things together: a pitch-shift factorization of audio, a second-order interval statistic over its activations used as a matching signature, and a certified worst-case per-frame cost.

Relation to Prior Work

Two lines of work motivate the representation. SIA(M)ESE treats scores as point sets and finds the translation vectors (time shift, pitch shift) that map a query onto a database. Our $A$ is essentially a soft, audio-derived histogram of such difference vectors. SIA(M)ESE assumes symbolic points; we derive the points from audio activations. BMM-Det converts monophonic melodies into pitch-interval and duration-ratio sequences, cuts them into overlapping clips, and scores a pair of songs by maximum-weight bipartite matching between clips. It reports 70.5% accuracy on MPD-Set and 82.8% on 29 real legal cases, with perfect transposition and duration robustness but about 33% under "Melody Change." BMM-Det supplies our fragment-level matching protocol and is our main symbolic competitor. We differ from it in the input: we need no symbolic monophonic melody, and our clips are signature windows rather than delta chains.

Shifted NMF supplies the factorization idea and also constrains it. That paper models continuous delays through phase rotations in the Fourier domain, which ties it to least-squares loss and periodic boundaries. Its delay estimates got stuck in local minima in 4 of 4 trials unless they were periodically reset by global cross-correlation. We therefore avoid continuous shift estimation. Pitch shifts are a discrete axis of $H$, which makes the activation problem convex for fixed templates and lets us use the generalized Kullback-Leibler loss of standard multiplicative-update NMF. Earlier NMF audio work used sparse activations for separation (reverberant source separation) and for multipitch tracking (real-time pitch determination). Online variants (online NMF for enhancement, accelerated stochastic approximation) update frame by frame, but they run iterations until convergence, so their per-frame cost varies. None of them builds an invariant matching signature from shifted activations.

The worst-case lens comes from dynamic algorithms. There, "worst-case update time" means a bound that holds for every single insertion, as opposed to an amortized bound that permits occasional expensive rebuilds (vertex sparsifiers, deterministic rounding of fractional matchings). We deliberately do not import those dynamic matching machineries. Our streaming problem adds one query fragment at a time against a fixed reference set, and a bounded inverted-index lookup suffices. Polylogarithmic-amortized graph algorithms would add large constants without addressing our bottleneck. The incremental metric bipartite matching work (localized push-relabel, under 50 ms per update at 10,000 points, amortized) serves only as an optional comparison for the clip-matching step.

On the deep side, CoverHunter (Conformer encoder plus coarse-to-fine alignment) and DisCover (mutual-information disentanglement of pitch and timbre) lead whole-track retrieval. We do not expect to beat them there. Our target is fragment-level, interpretable, latency-bounded matching, where the Version Identification survey and BMM-Det both point to weaknesses of global embeddings.

Research Program

The first component is the factorization. We learn a small set of templates offline ($K$ between 4 and 16) on constant-Q spectrograms from training splits, using KL-divergence multiplicative updates. The shift axis spans roughly two octaves of bins. At inference the templates are frozen. Each new frame's activation column then solves a convex non-negative KL problem. We cap the activations at the top $S$ shift-template pairs per frame, which makes the representation sparse.

The second component is the bounded update. Per frame, we run a fixed number $m$ of accelerated projected-gradient steps, warm-started from the previous frame. That costs $O(m\,F K)$ using precomputed template correlations. Because the problem is convex, we can report a per-frame duality-gap certificate rather than merely hoping for convergence. Updating $A$ for the new frame adds only the pairs between the new column and the last $L$ columns, which costs $O(S^2 L)$. Each retrieval vote comes from quantized $(j,k,\delta,\ell)$ keys looked up in an inverted index whose posting lists are capped at $P$ entries; overly common keys are pruned like stop-words. Every frame therefore costs at most $O(mFK + S^2L + S^2LP)$ deterministically. The analysis states this bound and the suboptimality it implies for $H$.

The third component is fragment scoring. Windowed signatures play the role of BMM-Det's clips. A song pair is scored by matching clips with the same bipartite protocol BMM-Det uses, which keeps the comparison controlled. We also test a greedy best-match score to see whether the full assignment is needed at all.

An analysis thread asks when log-frequency shift is a faithful model of transposition. Formant envelopes do not move with pitch, so we measure how signature similarity decays with transposition size on rendered audio. This is the main threat to the method.

Baselines

The naive reference is a 12-bin chromagram with a circular key shift and subsequence dynamic time warping against each reference. It is the textbook transposition- and tempo-tolerant matcher. We run it on the same audio and fragment queries, with the key shift chosen by best alignment, and report both accuracy and per-query time. Beating it means higher fragment accuracy on polyphonic audio at a lower, bounded per-frame cost.

The strongest symbolic competitor is BMM-Det. It reports 70.5% accuracy on MPD-Set, 1.00 on Transposition and Duration Variance, about 33% on Melody Change, and 82.8% on the Real-life set against 75.9% for its nearest baseline. On symbolic input we run our method with $V$ set to a piano roll, which makes the template a single impulse and turns $A$ into an exact interval-lag histogram. We use BMM-Det's clip segmentation, matching, and splits. Beating it means matching its 1.00 on Transposition and Duration Variance and exceeding 70.5% overall. On audio renderings of the same pieces, the fair version of BMM-Det runs on notes from an automatic transcriber; that is the transcription cascade.

The strongest audio competitor is CoverHunter, with reported mAP 0.875 on SHS100K-TEST and 0.865 on Da-TACOS. We use its released configuration where available. On whole-track retrieval we report our method and a late fusion with CoverHunter, and count it a success only if fusion improves mAP. On the fragment-in-unrelated-track task, beating CoverHunter's embedding means a higher hit rate at the same index size. For DisCover we quote MAP 0.658 on SHS100K as context only.

Three ablations each isolate one ingredient. Replacing pitch-shift NMF with ordinary NMF (no shift axis, same total template count) tests whether the shift axis carries the invariance. Replacing $A$ with a delta chain read off the per-frame argmax of $H$ tests whether the soft second-order signature, rather than the factorization alone, buys robustness to insertions and polyphony. Replacing fixed-$m$ updates with iterate-to-convergence online NMF tests the price, in accuracy and in latency tails, of the worst-case cap. All variants share data, templates, and a matched hyperparameter search budget.

Why not just…?

Why not just train a deep network with pitch-shift and time-stretch augmentation? On whole-track retrieval this probably wins. CoverHunter's 0.875 mAP on SHS100K-TEST is a high bar, and we do not claim otherwise. The evidence against it in our setting is narrower: BMM-Det's real-case gain over its best global baseline (82.8% versus 75.9%) indicates that pooled embeddings miss short embedded fragments. The fragment-in-unrelated-track experiment tests exactly that. If CoverHunter's frame-level features with a sliding window match our hit rate there, the interpretability and bounded-cost arguments are all that remain, and we will say so.

Why not just use chroma with key rotation and dynamic time warping? It is the naive baseline above. Two reasons suggest it will fall short. Chroma folds octaves and smears bass and accompaniment into the same bins, which the version identification survey identifies as a source of false matches under rearrangement. And subsequence warping is quadratic per pair, so its streaming cost grows with database size. Our signature keeps pitch-register information inside each template. The experiment reports both accuracy and the per-query time curve as the reference set grows.

Why not just transcribe the audio to notes and run BMM-Det on intervals? This is the most serious alternative, because transcription keeps improving. We run it as a full pipeline on rendered MPD-Set audio and on cover audio. The question is whether its accuracy drops as we inject polyphonic accompaniment and as we vary the transcriber's note error rate. Our signature should degrade gradually with note errors, because each spurious note contributes only $O(SL)$ terms. A delta chain or clip sequence is affected more, and it needs a voice ordering that polyphony does not supply. If a strong transcriber makes the cascade match us at every accompaniment level, the representation contribution shrinks to cost and interpretability.

Why not just accept amortized or best-effort online updates? For offline batch analysis this is entirely fine. The bound matters only if iterate-to-convergence updates actually overrun a frame budget, for instance during dense polyphonic passages. We therefore measure the latency distribution, maximum and 99.9th percentile, of the unbounded variant on long streams. If its maximum fits comfortably within a 20 ms hop, we will report the worst-case cap as insurance rather than necessity. The analysis still gives a guarantee that does not depend on the input.

Proposed Experiments

The symbolic study runs on MPD-Set and the Real-life Plagiarism Dataset with piano-roll input, BMM-Det's protocol, and per-variation accuracy. It answers whether the interval-lag signature preserves perfect transposition and duration robustness while changing the Melody Change result. We expect only modest gains on Melody Change, since recomposed intervals change $A$ too. We will report it either way.

The audio study renders MPD-Set and the Real-life pairs to audio, with and without synthetic accompaniment, and compares our method against the transcription cascade, chroma with warping, and the ablations. The decisive check is the slope of accuracy against accompaniment density and transcriber error rate. Ours should stay flat where the cascade and the argmax-delta ablation fall.

The retrieval study evaluates whole-track mAP on SHS100K-TEST, Da-TACOS, and Covers80. No reported Covers80 number appears in the file, so we will establish our own CoverHunter run there. A fragment benchmark built from Da-TACOS splices 8 to 30 second excerpts, randomly transposed, into unrelated tracks. We measure hit rate at 1 and 10 against index size, using Discogs-VI-YT (Discogs-VI) as the distractor pool.

The streaming study runs hour-long streams, logs per-frame wall time and per-frame duality gap, and tests whether accuracy at $m$ between 3 and 10 steps matches the unbounded variant. It also checks that measured maximum latency tracks the stated bound as $S$, $L$, and $P$ vary.

A final transposition-fidelity check measures signature similarity between rendered versions of the same piece at transpositions of 0 to 12 semitones across several instruments. It tells us how far the log-frequency shift assumption holds before timbre envelopes break it.