An explicit and differentiable Wilson-Daubechies-Meyer transform for gravitational-wave data analysis

Author(s)

Vajpeyi, Avi, Mentasti, Giorgio, Baghi, Quentin, Burke, Ollie, Speri, Lorenzo

Abstract

The Wilson-Daubechies-Meyer (WDM) time-frequency transform has been widely used in gravitational-wave astronomy, yet a self-contained, mathematically explicit reference for practitioners remains lacking. This is especially true for those wishing to adopt the transform in modern Python and JAX inference workflows. We present wdm_transform, an open-source Python package implementing the WDM wavelet-packet time-frequency transform, and document its mathematical foundations, statistical properties, and practical implementation for gravitational-wave data analysis. The package supplies NumPy and JAX backends, both transforms (forward and inverse) validated to floating-point precision, with the JAX backend enabling GPU-accelerated transforms of million-point data streams in tens of milliseconds. As a worked example, we verify that the WDM-domain likelihood reproduces frequency-domain posteriors for a resolved LISA galactic binary under a shared stationary noise model, confirming numerical equivalence of the two representations in that controlled setting. This work paves the way for systematic optimisation of WDM tilings, a particularly promising direction for the non-stationary noise, stochastic backgrounds, and data gaps anticipated in future detectors, and for direct comparisons with alternative time-frequency representations needed to meet the challenges of future gravitational-wave data analysis.

Figures

Schematic illustration of the WDM forward transform. (a)~Time-domain atoms $g_{nm}(t)$ for two representative WDM cells, labelled $\alpha$ and $\beta$. The higher-frequency cell $\beta$ has a more rapidly oscillating atom. (b)~Frequency-domain magnitudes $|\tilde{g}_{nm}(f)|$ for the same two cells, showing their localization around different frequency channels. (c)~The packed coefficient array $W_{nm}$, with time bins $n$ along the horizontal axis and frequency channels $m$ along the vertical axis. The highlighted cells correspond to the atoms shown in panels (a) and (b). Each interior cell stores $w_{nm} = \sqrt{2}\,(-1)^{nm}\,\mathrm{Re}[C^*_{nm}\,\tilde x_m[n]]$ (Eq.~\protect\eqref{eq:wnm_compact}); the phase factor $C_{nm}$ alternates between $1$ and $i$ on a checkerboard pattern, while the DC and Nyquist edge channels are stored separately.
Caption Schematic illustration of the WDM forward transform. (a)~Time-domain atoms $g_{nm}(t)$ for two representative WDM cells, labelled $\alpha$ and $\beta$. The higher-frequency cell $\beta$ has a more rapidly oscillating atom. (b)~Frequency-domain magnitudes $|\tilde{g}_{nm}(f)|$ for the same two cells, showing their localization around different frequency channels. (c)~The packed coefficient array $W_{nm}$, with time bins $n$ along the horizontal axis and frequency channels $m$ along the vertical axis. The highlighted cells correspond to the atoms shown in panels (a) and (b). Each interior cell stores $w_{nm} = \sqrt{2}\,(-1)^{nm}\,\mathrm{Re}[C^*_{nm}\,\tilde x_m[n]]$ (Eq.~\protect\eqref{eq:wnm_compact}); the phase factor $C_{nm}$ alternates between $1$ and $i$ on a checkerboard pattern, while the DC and Nyquist edge channels are stored separately.
\textbf{Orthogonality structure and empirical decorrelation of the sampled WDM transform.} Both panels use the small tiling $N_t = N_f = 8$, $N = N_t N_f = 64$, with packed atoms flattened by $\alpha = n(N_f + 1) + m$. Panel (a) lives in the $N_t(N_f+1) = 72$-dimensional packed coefficient space, while panel (b) lives in the $N$-dimensional signal space. The asymmetry $\boldsymbol{G}\boldsymbol{G}^\dagger \in \mathbb{C}^{72\times 72}$ versus $\boldsymbol{G}^\dagger \boldsymbol{G} \in \mathbb{C}^{64\times 64}$ is intrinsic to the rectangular embedding $G : \mathbb{C}^N \to \mathbb{C}^{N_t(N_f+1)}$ and is the matrix-level expression of the fact that $\boldsymbol{G}^\dagger \boldsymbol{G} = \mathbb{I}_N \neq \boldsymbol{G}\boldsymbol{G}^\dagger$. Faint grid lines in the panels mark the block boundaries $\alpha = n(N_f+1)$ for $n = 0, 1, \ldots, N_t$, separating successive time slices and making the $\pm N_t/2$ offset structure easy to read off by eye. \textbf{(a)} The packed-space Gram matrix $(\boldsymbol{G}\boldsymbol{G}^\dagger)_{(n,m),(p,q)} = \sum_\ell \tilde g_{nm}[\ell]\,\tilde g^*_{pq}[\ell]$. Interior channels ($m = 1,\ldots,N_f-1$) form an identity block, while the DC and Nyquist edge channels ($m \in \{0, N_f\}$) carry the off-diagonal entries at $p = n \pm N_t/2$ predicted by the first case of Eq.~\eqref{eq:orthonormality_like_cases}. These off-diagonals span the $N_t$-dimensional redundant subspace by which $GG^\dagger$ fails to be the identity. \textbf{(b)} The signal-space product $(\boldsymbol{G}^\dagger \boldsymbol{G})_{\ell\ell'} = \sum_{n,m} \tilde g_{nm}[\ell]\,\tilde g^*_{nm}[\ell']$, indexed by sample indices $(\ell,\ell')$ rather than the packed pair, equals $\mathbb{I}_N$ to machine precision ($\max|\boldsymbol{G}^\dagger \boldsymbol{G} - \mathbb{I}| \sim 10^{-15}$), demonstrating that the forward-then-inverse round trip is exact. The exact $\pm 1$ entries at the same $\pm N_t/2$ offsets seen in panel (a) are the empirical signature of the edge-channel redundancy: $w_{n,0}$ and $w_{n + N_t/2,\,0}$ (and likewise for $m = N_f$) are linearly dependent copies of the same underlying real degree of freedom, so their Pearson correlation is identically $\pm 1$ for any input.
Caption \textbf{Orthogonality structure and empirical decorrelation of the sampled WDM transform.} Both panels use the small tiling $N_t = N_f = 8$, $N = N_t N_f = 64$, with packed atoms flattened by $\alpha = n(N_f + 1) + m$. Panel (a) lives in the $N_t(N_f+1) = 72$-dimensional packed coefficient space, while panel (b) lives in the $N$-dimensional signal space. The asymmetry $\boldsymbol{G}\boldsymbol{G}^\dagger \in \mathbb{C}^{72\times 72}$ versus $\boldsymbol{G}^\dagger \boldsymbol{G} \in \mathbb{C}^{64\times 64}$ is intrinsic to the rectangular embedding $G : \mathbb{C}^N \to \mathbb{C}^{N_t(N_f+1)}$ and is the matrix-level expression of the fact that $\boldsymbol{G}^\dagger \boldsymbol{G} = \mathbb{I}_N \neq \boldsymbol{G}\boldsymbol{G}^\dagger$. Faint grid lines in the panels mark the block boundaries $\alpha = n(N_f+1)$ for $n = 0, 1, \ldots, N_t$, separating successive time slices and making the $\pm N_t/2$ offset structure easy to read off by eye. \textbf{(a)} The packed-space Gram matrix $(\boldsymbol{G}\boldsymbol{G}^\dagger)_{(n,m),(p,q)} = \sum_\ell \tilde g_{nm}[\ell]\,\tilde g^*_{pq}[\ell]$. Interior channels ($m = 1,\ldots,N_f-1$) form an identity block, while the DC and Nyquist edge channels ($m \in \{0, N_f\}$) carry the off-diagonal entries at $p = n \pm N_t/2$ predicted by the first case of Eq.~\eqref{eq:orthonormality_like_cases}. These off-diagonals span the $N_t$-dimensional redundant subspace by which $GG^\dagger$ fails to be the identity. \textbf{(b)} The signal-space product $(\boldsymbol{G}^\dagger \boldsymbol{G})_{\ell\ell'} = \sum_{n,m} \tilde g_{nm}[\ell]\,\tilde g^*_{nm}[\ell']$, indexed by sample indices $(\ell,\ell')$ rather than the packed pair, equals $\mathbb{I}_N$ to machine precision ($\max|\boldsymbol{G}^\dagger \boldsymbol{G} - \mathbb{I}| \sim 10^{-15}$), demonstrating that the forward-then-inverse round trip is exact. The exact $\pm 1$ entries at the same $\pm N_t/2$ offsets seen in panel (a) are the empirical signature of the edge-channel redundancy: $w_{n,0}$ and $w_{n + N_t/2,\,0}$ (and likewise for $m = N_f$) are linearly dependent copies of the same underlying real degree of freedom, so their Pearson correlation is identically $\pm 1$ for any input.
\textbf{Architecture of the \package\ package.} The public API exposes the \texttt{TimeSeries}, \texttt{FrequencySeries}, and \texttt{WDM} datatypes with reversible conversions between them. The forward and inverse WDM transforms, together with the shared window machinery (\texttt{windows.py}), are dispatched to interchangeable NumPy, CuPy, and JAX backends, so the same high-level code runs on CPU, GPU, or TPU.
Caption \textbf{Architecture of the \package\ package.} The public API exposes the \texttt{TimeSeries}, \texttt{FrequencySeries}, and \texttt{WDM} datatypes with reversible conversions between them. The forward and inverse WDM transforms, together with the shared window machinery (\texttt{windows.py}), are dispatched to interchangeable NumPy, CuPy, and JAX backends, so the same high-level code runs on CPU, GPU, or TPU.
\textbf{Forward WDM runtime versus input length.} All transforms use a fixed tiling with $N_t=1024$ time bins and $N_f=N/N_t$ frequency channels. \emph{Top}: median single-transform wall-clock runtime over 7 runs after one warmup call. The thin solid black line shows the $N\log_2 N$ reference scaling. \emph{Bottom}: batched-execution speedup (WDM transform only) $t_\mathrm{serial}/t_\mathrm{batch}$ for a batch size of $B=3$, where the serial baseline applies the kernel independently to each of the three channels and the batched call processes all three simultaneously. Reported timings exclude JAX JIT compilation and host--device data transfer.
Caption \textbf{Forward WDM runtime versus input length.} All transforms use a fixed tiling with $N_t=1024$ time bins and $N_f=N/N_t$ frequency channels. \emph{Top}: median single-transform wall-clock runtime over 7 runs after one warmup call. The thin solid black line shows the $N\log_2 N$ reference scaling. \emph{Bottom}: batched-execution speedup (WDM transform only) $t_\mathrm{serial}/t_\mathrm{batch}$ for a batch size of $B=3$, where the serial baseline applies the kernel independently to each of the three channels and the batched call processes all three simultaneously. Reported timings exclude JAX JIT compilation and host--device data transfer.
\textbf{Injected resolved galactic binary in both frequency and WDM domains.} (a): channel-A frequency-domain data, the instrumental noise PSD, and the injected source, with the analysis band shaded. Bottom: zooms of the source band in the frequency domain (left (b)) and in the whitened WDM time-frequency plane (right (c)), where amplitude is shown in units of the per-pixel noise standard deviation.
Caption \textbf{Injected resolved galactic binary in both frequency and WDM domains.} (a): channel-A frequency-domain data, the instrumental noise PSD, and the injected source, with the analysis band shaded. Bottom: zooms of the source band in the frequency domain (left (b)) and in the whitened WDM time-frequency plane (right (c)), where amplitude is shown in units of the per-pixel noise standard deviation.
\textbf{Frequency-domain versus WDM-domain posterior.} Overlaid corner plot for the two analyses of the same realization, with frequency in blue and WDM in orange, the injected truth marked as black solid line, and the prior shown as dotted line in the posterior marginals. The two posteriors overlap closely in $(f_0,\dot f,A,\phi_0)$, and both are far narrower than the prior.
Caption \textbf{Frequency-domain versus WDM-domain posterior.} Overlaid corner plot for the two analyses of the same realization, with frequency in blue and WDM in orange, the injected truth marked as black solid line, and the prior shown as dotted line in the posterior marginals. The two posteriors overlap closely in $(f_0,\dot f,A,\phi_0)$, and both are far narrower than the prior.
\textbf{Population PP plot.} Empirical distribution of the injected truth's posterior quantile across the 100 seeds, for each parameter, in the WDM domain (solid, lower opacity) and frequency domain (dashed). Grey shading shows the nested $1/2/3\sigma$ pointwise confidence bands expected under the uniform null. The two domains track each other closely and every parameter remains within the $3\sigma$ band. The smallest per-parameter Kolmogorov--Smirnov $p$-value across both domains is $\approx0.25$ (for $\phi_0$), consistent with uniformity.
Caption \textbf{Population PP plot.} Empirical distribution of the injected truth's posterior quantile across the 100 seeds, for each parameter, in the WDM domain (solid, lower opacity) and frequency domain (dashed). Grey shading shows the nested $1/2/3\sigma$ pointwise confidence bands expected under the uniform null. The two domains track each other closely and every parameter remains within the $3\sigma$ band. The smallest per-parameter Kolmogorov--Smirnov $p$-value across both domains is $\approx0.25$ (for $\phi_0$), consistent with uniformity.
References
  • [1] A. Królak and P. Trzaskoma, Classical and Quantum Gravity 13, 813 (1996).
  • [2] A. Virtuoso and E. Milotti, Phys. Rev. D 109, 102010 (2024).
  • [3] F. Robinet, N. Arnaud, N. Leroy, A. Lundgren, D. Macleod, and J. McIver, SoftwareX 12, 100620 (2020).
  • [4] N. J. Cornish and T. B. Littenberg, Classical and Quantum Gravity 32, 135012 (2015).
  • [5] S. Chatterji, L. Blackburn, G. Martin, and E. Katsavounidis, Class. Quant. Grav. 21, S1809 (2004), arXiv:gr-qc/0412119.
  • [6] E. Chassande-Mottin and A. Pai, Phys. Rev. D 73, 042003 (2006), arXiv:gr-qc/0512137.
  • [7] J. Gair and L. Wen, Classical and Quantum Gravity 22, S1359–S1371 (2005).
  • [8] J. R. Gair, I. Mandel, and L. Wen, Class. Quant. Grav. 25, 184031 (2008), arXiv:0804.1084 [gr-qc].
  • [9] L. Speri, R. Tenorio, C. Chapman-Bird, and D. Gerosa, Physical Review D 113, 10.1103/dh3j-ksfl (2026).
  • [10] D. Bandopadhyay, C. E. A. Chapman-Bird, and A. Vecchio, Global time-frequency search for stellar-mass binary black holes in LISA (2026), arXiv:2510.19047 [gr-qc].
  • [11] M. Colpi et al., arXiv e-prints , arXiv:2402.07571 (2024), arXiv:2402.07571 [astro-ph.CO].
  • [11] M. Colpi et al., arXiv e-prints , arXiv:2402.07571 (2024), arXiv:2402.07571 [astro-ph.CO].
  • [12] J. Luo et al., Class. Quant. Grav. 33, 035010 (2016), arXiv:1512.02076 [astro-ph.IM].
  • [13] N. J. Cornish, T. B. Littenberg, B. Bécsy, K. Chatziioannou, J. A. Clark, S. Ghonge, and M. Millhouse, Phys. Rev. D 103, 044006 (2021), arXiv:2011.09494 [gr-qc].
  • [14] V. Necula, S. Klimenko, and G. Mitselmakher, Journal of Physics: Conference Series 363, 012032 (2012).
  • [15] M. J. Szczepańczyk, F. Salemi, S. Bini, T. Mishra, G. Vedovato, V. Gayathri, I. Bartos, S. Bhaumik, M. Drago, O. Halim, C. Lazzaro, A. Miani, E. Milotti, G. A. Prodi, S. Tiwari, and S. Klimenko, Phys. Rev. D 107, 062002 (2023), arXiv:2210.01754 [gr-qc].
  • [16] M. Drago, S. Klimenko, C. Lazzaro, E. Milotti, G. Mitselmakher, V. Necula, B. O’Brian, G. A. Prodi, F. Salemi, M. Szczepanczyk, S. Tiwari, V. Tiwari, V. Gayathri, G. Vedovato, and I. Yakushin, SoftwareX 14, 100678 (2021), arXiv:2006.12604 [gr-qc].
  • [17] W. G. Anderson, P. R. Brady, J. D. E. Creighton, and E. E. Flanagan, Phys. Rev. D 63, 042003 (2001), arXiv:grqc/0008066.
  • [18] S. Klimenko and G. Mitselmakher, Class. Quant. Grav. 21, S1819 (2004).
  • [19] M. C. Digman and N. J. Cornish, WDMWaveletTransforms: Fast forward and inverse WDM wavelet transforms, Astrophysics Source Code Library, record ascl:2307.037 (2023), ascl:2307.037.
  • [20] M. C. Digman and N. J. Cornish, Phys. Rev. D 108, 023022 (2023), arXiv:2212.04600 [gr-qc].
  • [21] M. C. Digman and N. J. Cornish, Astrophys. J. 940, 10 (2022), arXiv:2206.14813 [astro-ph.IM].
  • [22] N. Pearson and N. J. Cornish, Phys. Rev. D 113, 064033 (2026), arXiv:2509.05479 [gr-qc].
  • [23] N. J. Cornish, Phys. Rev. D 102, 124038 (2020), arXiv:2009.00043 [gr-qc].
  • [24] N. J. Cornish, arXiv e-prints , arXiv:2511.10632 (2025), arXiv:2511.10632 [gr-qc].
  • [24] N. J. Cornish, arXiv e-prints , arXiv:2511.10632 (2025), arXiv:2511.10632 [gr-qc].
  • [25] N. J. Cornish, WDM Transform: Codes to compute the WDM wavelet transform, https://github.com/ eXtremeGravityInstitute/WDM_Transform (2020), eXtreme Gravity Institute, Montana State University. Implements fast TaylorT, TaylorF, and sparse WDM transforms for binary chirp signals in C. Accessed: May 2026.
  • [26] M. C. Digman, WDMWaveletTransforms: Fast forward and inverse WDM wavelet transforms in Python, https:// github.com/XGI-MSU/WDMWaveletTransforms (2022), eXtreme Gravity Institute, Montana State University. Produced under NASA LISA Preparatory Science Grant 80NSSC19K0320. Released v0.0.1, April 2025; GPLv2+ licence. Accessed: May 2026.
  • [26] M. C. Digman, WDMWaveletTransforms: Fast forward and inverse WDM wavelet transforms in Python, https:// github.com/XGI-MSU/WDMWaveletTransforms (2022), eXtreme Gravity Institute, Montana State University. Produced under NASA LISA Preparatory Science Grant 80NSSC19K0320. Released v0.0.1, April 2025; GPLv2+ licence. Accessed: May 2026.
  • [27] C. J. Moore, WDM GW wavelets: A fast, JAX-based Python implementation of the Wilson–Daubechies–Meyer wavelet transform for gravitational wave data, https://cjm96.github.io/WDM_GW_wavelets/ (2025), gitHub repository: https: //github.com/cjm96/WDM_GW_wavelets. Includes time-delay filter routines for space-based detector responses. Accessed: May 2026.
  • [28] cWB Team, coherent WaveBurst (cWB), version cWB-6.4.6.0, https://gwburst.gitlab.io/documentation/latest/ html/ (2024), public release used for the LVK O4b analysis. GitLab: https://gitlab.com/gwburst/public/library. GPLv3 licence. Accessed: May 2026.
  • [28] cWB Team, coherent WaveBurst (cWB), version cWB-6.4.6.0, https://gwburst.gitlab.io/documentation/latest/ html/ (2024), public release used for the LVK O4b analysis. GitLab: https://gitlab.com/gwburst/public/library. GPLv3 licence. Accessed: May 2026.
  • [29] W. M. Farr, WDMWavelets.jl: WDM wavelets in Julia, https://github.com/farr/WDMWavelets.jl (2025), gitHub repository.
  • [30] B. Krishnan, A. M. Sintes, M. A. Papa, B. F. Schutz, S. Frasca, and C. Palomba, Phys. Rev. D 70, 082001 (2004), arXiv:gr-qc/0407001.
  • [31] C. Palomba, P. Astone, and S. Frasca, Classical and Quantum Gravity 22, S1255 (2005).
  • [32] E. Savalle, J. Gair, L. Speri, and S. Babak, Phys. Rev. D 106, 022003 (2022).
  • [33] I. Daubechies, S. Jaffard, and J. L. Journe, SIAM J. Math. Anal. 22, 554 (1991).
  • [34] O. Burke, S. Marsat, J. R. Gair, and M. L. Katz, Phys. Rev. D 111, 124053 (2025), arXiv:2502.17426 [gr-qc].
  • [35] N. Bartolo et al., J. Cosmol. Astropart. Phys. 2022, 009 (2022), arXiv:2201.08782 [astro-ph.CO].
  • [36] J.-B. Bayle, M. Le Jeune, and J. Menu, jaxgb: Fast LISA response for Galactic binaries using JAX, https://pypi.org/ project/jaxgb/ (2025), version 0.2.1, BSD-3-Clause.
  • [37] D. Phan, N. Pradhan, and M. Jankowiak, arXiv e-prints , arXiv:1912.11554 (2019), arXiv:1912.11554 [stat.ML].
  • [37] D. Phan, N. Pradhan, and M. Jankowiak, arXiv e-prints , arXiv:1912.11554 (2019), arXiv:1912.11554 [stat.ML].
  • [38] S. Klimenko, S. Mohanty, M. Rakhmanov, and G. Mitselmakher, Phys. Rev. D 72, 122002 (2005), arXiv:gr-qc/0508068.
  • [39] S. Klimenko et al., Phys. Rev. D 93, 042004 (2016), arXiv:1511.05999 [gr-qc].
  • [40] A. Vajpeyi, G. Mentasti, Q. Baghi, O. Burke, and L. Speri, pywavelet/wdm transform: v0.05 (2026).