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

Mesostructures: Beyond Spectrogram Loss in Differentiable Time-Frequency Analysis

Cyrus Vahidi, Han Han, Changhong Wang, Mathieu Lagrange, György Fazekas, Vincent Lostanlen · DOI

Abstract

Computer musicians refer to mesostructures as the intermediate levels of articulation between the microstructure of waveshapes and the macrostructure of musical forms. Examples of mesostructures include melody, arpeggios, syncopation, polyphonic grouping, and textural contrast. Despite their central role in musical expression, they have received limited attention in deep learning. Currently, autoencoders and neural audio synthesizers are only trained and evaluated at the scale of microstructure: i.e., local amplitude variations up to 100 milliseconds or so. In this paper, we formulate and address the problem of mesostructural audio modeling via a composition of a differentiable arpeggiator and time-frequency scattering. We empirically demonstrate that time--frequency scattering serves as a differentiable model of similarity between synthesis parameters that govern mesostructure. By exposing the sensitivity of short-time spectral distances to time alignment, we motivate the need for a time-invariant and multiscale differentiable time--frequency model of similarity at the level of both local spectra and spectrotemporal modulations.

Introduction

In the world of computer music, sound exists at three scales: microstructure (the tiny oscillations of a waveshape), macrostructure (the overall form of a song), and mesostructure. Mesostructures are the "in-between" elements: the trill of a flute, the rhythmic bounce of an arpeggio, or the texture of a rain sound.

Currently, most "differentiable audio" models, such as autoencoders or neural synthesizers, are trained using spectrogram loss. While useful for microstructural details, spectrograms are extremely sensitive to time shifts. A minor misalignment—such as a 50-millisecond delay—results in a massive Euclidean distance between spectrograms. This sensitivity creates a chaotic loss surface full of local minima, hindering the ability of neural networks to learn high-level musical parameters through gradient descent.

Methodology

To address these limitations, we propose utilizing Joint Time-Frequency Scattering (JTFS) as a differentiable, time-invariant operator.

The JTFS Operator

JTFS is a 2D wavelet decomposition applied to the time-frequency plane. Unlike standard spectrograms, it captures both temporal modulations (how frequencies change over time) and frequential modulations (how they are distributed across the pitch scale). This multiscale approach allows the model to perceive structural patterns rather than just instantaneous spectral snapshots.

Differentiable Arpeggiator and Sound Matching

We developed a fully differentiable "chirplet" synthesizer capable of generating complex arpeggios. By framing sound matching as an optimization task, we evaluate the ability of gradient descent to recover synthesizer parameters (e.g., chirp rate, rhythm speed) from a target signal. We compare the performance of JTFS against a standard Multi-Scale Spectrogram (MSS) loss.

Key Insights: Loss Surface Topology

A critical finding of this work is the difference in loss surface topology between MSS and JTFS. When visualizing the error as a function of Amplitude Modulation (AM) and Frequency Modulation (FM) rates, the MSS loss surface appears as a jagged mountain range fraught with local minima. In contrast, the JTFS surface is characterized by a smooth, bowl-like shape, providing a clear gradient path toward the global minimum.

Comparison of loss surfaces for JTFS and MSS. The JTFS surface (left) is smooth and convex, while the MSS surface (right) is jagged and prone to local minima.

Experimental Results

Our empirical tests demonstrate that JTFS enables robust parameter recovery where MSS fails.

  • Convergence: Using JTFS, gradient descent successfully recovers the correct synthesizer parameters regardless of the initial guess. MSS only succeeds when initialized very close to the target.
  • Time-Shift Invariance: JTFS is stable to global time shifts. Because it captures the rate of change rather than exact temporal alignment, it recognizes identical arpeggios even when they are unaligned. As shown in the figure below, JTFS maintains low parameter error across significant time shifts, whereas MSS error spikes as soon as misalignment occurs.
Stability of parameter recovery error across different time shifts. JTFS remains robust to shifts, while MSS performance degrades immediately.

Conclusion

While JTFS is computationally more intensive than standard Short-Time Fourier Transforms (STFT), its ability to model mesostructural similarity makes it a powerful tool for differentiable audio analysis. Future work will explore applying JTFS to complex tasks like neural audio restoration and generative modeling of textures, potentially combining its structural strengths with the high-fidelity reconstruction of modern neural vocoders.

Summary updated

BibTeX
@article{vahidi2023mesostructures,
  author = {Cyrus Vahidi and Han Han and Changhong Wang and Mathieu Lagrange and György Fazekas and Vincent Lostanlen},
  title = {{Mesostructures: Beyond Spectrogram Loss in Differentiable Time-Frequency Analysis}},
  journal = {Journal of the Audio Engineering Society},
  year = {2023},
  doi = {10.17743/jaes.2022.0103},
}
Figure