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

Differentiable Time-Frequency Scattering on GPU

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

Abstract: Joint time-frequency scattering (JTFS) is a convolutional operator in the time-frequency domain which extracts spectrotemporal modulations at various rates and scales. It offers an idealized model of spectrotemporal receptive fields (STRF) in the primary auditory cortex, and thus may serve as a biological plausible surrogate for human perceptual judgments at the scale of isolated audio events. Yet, prior implementations of JTFS and STRF have remained outside of the standard toolkit of perceptual similarity measures and evaluation methods for audio generation. We trace this issue down to three limitations: differentiability, speed, and flexibility. In this paper, we present an implementation of time-frequency scattering in Python. Unlike prior implementations, ours accommodates NumPy, PyTorch, and TensorFlow as backends and is thus portable on both CPU and GPU. We demonstrate the usefulness of JTFS via three applications: unsupervised manifold learning of spectrotemporal modulations, supervised classification of musical instruments, and texture resynthesis of bioacoustic sounds.

Introduction

Audio processing often requires features that align with human perceptual similarity—how we actually distinguish between a violin and a flute. Neurophysiological research suggests that the primary auditory cortex responds to spectrotemporal modulations (changes in frequency and amplitude over time), which are modeled by Spectrotemporal Receptive Fields (STRF).

Joint Time-Frequency Scattering (JTFS) provides a mathematically rigorous framework for computing these modulations. However, previous implementations (primarily in MATLAB) suffered from three major "deal-breakers" for modern AI research: a lack of differentiability, poor scalability on GPUs, and inflexibility for integration with Python-based deep learning pipelines. This paper introduces a differentiable, GPU-accelerated Python implementation of JTFS, extending the Kymatio library to address these limitations.

Methodology: The JTFS Operator

The JTFS operator extracts spectrotemporal modulations by applying a series of wavelet transforms to an audio signal:

  1. First Order: It computes a standard scalogram (similar to a Constant-Q Transform).
  2. Second Order: It applies a 2-D wavelet transform across both the time and log-frequency axes of that scalogram. This step captures "spins"—upward or downward frequency sweeps—and modulation rates.
  3. Averaging: Low-pass filtering is applied to ensure the representation is invariant to small shifts in time or pitch.
Spectrograms (top) and JTFS coefficients (bottom) for various signals: (a) modulated chirp, (b) downward glissando, (c) laughing gull, and (d) northern goshawk.

Our implementation introduces several technical innovations:

  • Differentiability: By utilizing PyTorch and TensorFlow backends, JTFS can be integrated as a fixed or trainable frontend in neural networks, allowing for backpropagation.
  • $\mu$-log Compression: A mean-based logarithmic activation function normalizes the dynamic range of scattering coefficients, making them more suitable for neural network processing.
  • Hybrid Architecture: We demonstrate a "hybrid representation learning" approach, using JTFS as a fixed frontend for a 2-D convolutional neural network (EfficientNetB0).

Experiments and Datasets

We evaluated the implementation across three distinct tasks:

  • Synthetic AM/FM Chirps: A dataset of 4,096 signals varying in carrier frequency, modulation rate, and chirp rate to test if the feature space aligns with physical parameters.
  • Medley-solos-DB: A dataset of 12,236 audio clips across 8 musical instrument classes (e.g., tenor sax, trumpet, piano), used for supervised classification.
  • Bioacoustic Sounds: Recordings of bird calls (Laughing gull and Northern goshawk) used to demonstrate texture resynthesis.

Key Results and Insights

The GPU-enabled implementation achieved a 10x speedup in audio resynthesis compared to traditional CPU-based MATLAB toolboxes. On the Medley-solos-DB classification task, the JTFS + ConvNet hybrid achieved 81.4% accuracy, significantly outperforming the Constant-Q Transform (68.4%) and 1D Time Scattering (74.0%).

Detailed view of a modulated chirp and its JTFS representation, highlighting the capture of upward frequency sweeps.

Key insights include:

  • Topological Alignment: Using Isomap (unsupervised manifold learning), we show that JTFS Euclidean distances align much better with physical parameters like chirp rate than MFCCs or standard 1D scattering. It effectively "disentangles" factors of variability.
  • The Power of Fixed Frontends: In data-limited regimes, a fixed, bio-inspired frontend like JTFS provides a significant advantage by extracting perceptually relevant structures that a standard CNN might miss.
  • Recovering Synchronicity: Unlike 1D scattering, which treats frequency bands independently, JTFS captures temporal alignment across different frequencies. This is critical for resynthesizing complex textures like bird calls where the timing of frequency components is essential.

Conclusion

This work provides a portable and efficient tool for incorporating bio-inspired spectrotemporal features into modern audio research. While the non-convexity of the loss function can lead to artifacts in resynthesis, the differentiability of this implementation opens new avenues for using JTFS as a perceptual loss function in generative models like GANs or diffusion models. Future work will explore "Parametric Scattering," where wavelet filters themselves are learned via backpropagation.

Summary updated

BibTeX
@misc{muradeli2022differentiable,
  author = {John Muradeli and Cyrus Vahidi and Wang, Changhong and Han, Han and Vincent Lostanlen and Mathieu Lagrange and György Fazekas},
  title = {{Differentiable Time-Frequency Scattering on GPU}},
  year = {2022},
  eprint = {2204.08269},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.08269},
}
Figure