2
$\begingroup$

I'm doing some feature extraction on audio signals.
$M$ being a mel filterbank matrix, and $S$ being the spectrogram (extracted from the Short Time Fourier Transform of my audio signal), we can compute:

  • The Log Mel Spectrogram: $X_P = \log(M \times|S|)$
  • The Log Mel Power Spectrogram: $X_{PS} = \log(M \times|S|^2)$

Question: Is there a reason to use one over the other?

Two things come to mind:

  • Using the Magnitude squared is computationally less expensive (no need for sqrt)
  • Using the Magnitude squared emphasizes the largest components, which might or might not be desirable to train a model.

Of course I could also compare the model performance when trained on either, but I’m mostly interested in some theoretical aspects, and if there’s anyone with experience using both.

Any insights?

$\endgroup$

1 Answer 1

1
$\begingroup$

Not familiar with melspectrogram, but points worth minding for when an intermediate step precedes a nonlinearity:

  1. Said step should be inspected in context of the transform's theory. For wavelet scattering (a strong alt to Mel features), squaring the scalogram breaks its interpretation as encoding amplitude modulations which affects higher-order transforms, and breaks the transform's non-expansiveness in Lipschitz sense which afflicts stability.
  2. If the transform isn't invertible, the step may affect loss of information - not at $|S| \rightarrow |S|^2$, but in what follows. It can also change the representation's SNR for different noise profiles. I recommend the measure described here.

These likely aren't worth compromising for sake of a small performance boost. Your second bullet, however, is a strong favoring argument, and I found one of these two to be sometimes favorable in scattering. For a brute force investigation, appropriate test signals might help.

$\endgroup$
1
  • 1
    $\begingroup$ This is great and very interesting. I’m very happy about the measure you mention, and I’ll be stealing that, thank you very much :D $\endgroup$
    – Jdip
    Aug 18, 2022 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.