AI Logic

Evaluation Metrics

SI-SDR

Updated:

Computing SI-SDR. Left: the flow of finding the scale α from the target signal s and the estimate ŝ, splitting the estimate into the target component e_target and the residual e_res, and taking the energy ratio in dB (in the example α = 0.60 and SI-SDR is 6.02 dB). Right: a 2-D vector diagram showing e_target, the projection of the estimate onto the direction of s, the orthogonal e_res, and s − ŝ, which SNR treats as the error, plus a table showing that scaling the estimate by 0.5, 1, and 2 changes SNR to 2.90, 6.02, and 3.98 dB while SI-SDR stays at 6.02 dB

Background and overview

SI-SDR (scale-invariant signal-to-distortion ratio) is an evaluation metric that expresses, in dB, how many times more energy the component of an estimated waveform from speech separation or denoising aligned with the target signal (the reference) has than the remaining component. Higher values mean less noise and distortion left in the estimate.

SI-SDR=10log⁡10∥etarget∥2∥eres∥2,etarget=s^⊤s∥s∥2s,eres=s^−etarget\mathrm{SI\text{-}SDR} = 10 \log_{10} \frac{\lVert e_{\mathrm{target}} \rVert^2}{\lVert e_{\mathrm{res}} \rVert^2}, \qquad e_{\mathrm{target}} = \frac{\hat{s}^\top s}{\lVert s \rVert^2} s, \qquad e_{\mathrm{res}} = \hat{s} - e_{\mathrm{target}}

ss is the target signal (clean speech without noise) and s^\hat{s} is the model's estimate; both are waveform vectors of length LL. etargete_{\mathrm{target}} is the projection of the estimate onto the direction of the target signal, and erese_{\mathrm{res}} is everything else.

SI-SDR was proposed by Le Roux et al. in 2019 in "SDR – half-baked or well done?". Until then, the standard in speech separation papers was the SDR from the BSS eval toolkit, but that SDR first reshapes the reference with a filter of up to 512 taps to fit the estimate and then compares them, so it could give high values even to estimates with most of their frequencies removed. SI-SDR avoids this problem by restricting the allowed transformation to "a constant multiple of the reference".

The header figure shows the computation flow (left) and an example with 2-D vectors (right). The estimate s^\hat{s} is split into the component etargete_{\mathrm{target}} in the direction of the target signal ss and the orthogonal residual erese_{\mathrm{res}}, and the ratio of their energies is taken.

Definition and procedure

SI-SDR is computed as follows.

  1. Prepare the target signal ss and the estimate s^\hat{s} as waveforms of the same length and sampling rate, aligned in time.
  2. Find, by least squares, the factor by which the target signal must be multiplied to be closest to the estimate. The solution of α=arg⁡min⁡α∥αs−s^∥2\alpha = \arg\min_\alpha \lVert \alpha s - \hat{s} \rVert^2 is α=s^⊤s/∥s∥2\alpha = \hat{s}^\top s / \lVert s \rVert^2.
  3. Split the estimate into two components: the target component etarget=αse_{\mathrm{target}} = \alpha s and the residual eres=s^−etargete_{\mathrm{res}} = \hat{s} - e_{\mathrm{target}}. erese_{\mathrm{res}} is orthogonal to ss.
  4. Express the energy ratio of the two components in dB: SI-SDR=10log⁡10(∥etarget∥2/∥eres∥2)\mathrm{SI\text{-}SDR} = 10 \log_{10} \left( \lVert e_{\mathrm{target}} \rVert^2 / \lVert e_{\mathrm{res}} \rVert^2 \right).
  5. For a whole test set, the usual practice is to report the mean of the per-utterance SI-SDR. To show the effect of separation or enhancement, also report the improvement (dB) over the SI-SDR of the unprocessed mixture.

As in Eqs. (2) and (3) of the paper, this is the energy ratio of signal to residual when "the reference is scaled by a constant so that the residual is orthogonal to the reference". The conventional SNR is 10log⁡10(∥s∥2/∥s−s^∥2)10 \log_{10} \left( \lVert s \rVert^2 / \lVert s - \hat{s} \rVert^2 \right), where the error s−s^s - \hat{s} is not necessarily orthogonal to ss.

In the header figure's example, s=(4,0)s = (4, 0) and s^=(2.4,1.2)\hat{s} = (2.4, 1.2). With α=0.6\alpha = 0.6, etarget=(2.4,0)e_{\mathrm{target}} = (2.4, 0) and eres=(0,1.2)e_{\mathrm{res}} = (0, 1.2), so SI-SDR is 10log⁡10(2.42/1.22)=6.0210 \log_{10}(2.4^2 / 1.2^2) = 6.02 dB. Scaling the estimate by 0.5 or 2 changes SNR to 2.90 dB or 3.98 dB, but SI-SDR stays at 6.02 dB.

SI-SDR does not change no matter how the estimate's level is scaled (scaling s^\hat{s} by cc scales both etargete_{\mathrm{target}} and erese_{\mathrm{res}} by cc, so the ratio is unchanged). With SNR, simply making the estimate quieter can raise the value. In the paper's example, shrinking a mixture xx (SNR 0 dB) in which orthogonal noise of the same power as the target is mixed in to x/2x/2 raises SNR by 3 dB. SI-SDR is designed so that such operations, which do not change how the signal sounds, do not move the value.

The paper also defines SI-SIR and SI-SAR by further splitting the residual erese_{\mathrm{res}} into its projection einterfe_{\mathrm{interf}} onto the space spanned by the target signal and the noise, and the remaining eartife_{\mathrm{artif}}. Because the split is orthogonal, the simple relation 10−SI-SDR/10=10−SI-SIR/10+10−SI-SAR/1010^{-\mathrm{SI\text{-}SDR}/10} = 10^{-\mathrm{SI\text{-}SIR}/10} + 10^{-\mathrm{SI\text{-}SAR}/10} holds.

What it measures and its limitations

SI-SDR measures, as an energy ratio, how far the estimated waveform deviates from a constant multiple of the target signal. It does not distinguish residual noise, other speakers' voices, or processing distortion; all of them count as "components not aligned with the target signal".

It has the following limitations.

  • Ignores human hearing: errors of the same energy count the same whether they fall in frequencies that are easy or hard to hear. Check perceived quality separately with PESQ or MOS, and intelligibility with STOI.
  • Does not penalize level errors: because any constant scaling is allowed, the value does not change even when the estimate's level is far off. The paper lists this as a drawback and also proposes SD-SDR (SD-SDR=SNR+10log⁡10α2\mathrm{SD\text{-}SDR} = \mathrm{SNR} + 10 \log_{10} \alpha^2), which counts level errors as errors.
  • Strict about time and phase offsets in the waveform: since it compares sample-wise inner products, the value drops if the estimate lags the reference slightly or its phase changes, even when it sounds almost the same. This is because the formula includes no time alignment.
  • Requires a clean reference: the target signal itself is needed, so it cannot be computed when no ground-truth speech exists, as with real recordings.

SI-SDR and the BSS eval SDR (the SDR of bss_eval_sources) are different metrics, and their values cannot be compared directly. In Table 1 of the paper, SDR comes out 0.3–0.6 dB higher than SI-SDR for the same speech separation systems. Moreover, as Section 3 of the paper shows, the BSS eval SDR can give high values to estimates with large parts of the spectrum removed. When comparing with prior work, check which metric was used and whether the mean was subtracted before computing (zero_mean, described below), and state the definition used in the paper.

Validation in the original paper

The paper shows three examples where the BSS eval SDR makes wrong judgments and confirms that SI-SDR does not have these problems.

  • A filter that minimizes SI-SDR: when a time-invariant filter in the short-time Fourier transform domain was trained to minimize SI-SDR, it removed most speech frequencies and passed only about two narrow bands. SI-SDR was then −4.7 dB, but the BSS eval SDR stayed high at 11.6 dB, because SDR applies a similar filter to the reference before comparing.
  • Removing frequencies step by step: when an increasing fraction of frequency bands was removed from speech mixed with white noise at 15 dB SNR, SNR, SI-SDR, and SD-SDR decreased monotonically. SDR stayed at 10–15 dB until almost all frequencies were removed, and even rose when the removed fraction was 0.4. The paper points out that SDR cannot be used to evaluate bandwidth extension, which starts from a signal with silent high frequencies.
  • Varying the strength of a band-suppression filter: when noise was added in a 1600 Hz-wide band and the gain of that band was varied from 0 to 1, SNR and SI-SDR peaked at the theoretical optimum (around a gain of 0.5). SDR kept increasing as the gain was lowered.

The paper also lists the SI-SDR and SDR improvements (dB) of existing systems for speech separation on wsj0-2mix (two-speaker mixtures).

SystemSI-SDR improvementSDR improvement
Deep Clustering10.8-
Deep Attractor Networks10.410.8
TasNet10.210.5
Chimera++ Networks11.211.7
WA-MISI-512.613.1
Conv-TasNet-gLN14.615.0

For every system, SDR was 0.3–0.6 dB higher than SI-SDR. The paper notes that the gap is small only because all of these systems produce good-sounding signals, and could vary much more for poor-quality systems.

Where it is used

SI-SDR is mainly used in the following situations.

  • Comparing speech separation: it is the standard metric for comparing models that extract each speaker's voice from a multi-speaker mixture on data such as wsj0-2mix. It is reported as the improvement (dB) over the mixture.
  • Evaluating denoising (speech enhancement): it measures how close the denoised speech is to clean speech. It is commonly reported alongside PESQ for perceived quality and STOI for intelligibility.
  • As a training loss function: since the formula is differentiable, models that output waveforms directly can be trained to minimize the negative SI-SDR. According to the paper, SI-SDR is used in this way as a training objective in the time domain and gives better results than least squares (MSE) on some tasks (the TasNet paper calls it SI-SNR).

Maximizing SI-SDR alone as a loss leaves the level of the model's output undetermined (the loss is the same under any scaling). When the output is played back directly or passed to later stages where level matters, normalize the level separately or combine it with SD-SDR or SNR, which also penalize level errors.

Comparison with similar metrics

The table compares four metrics of speech quality and intelligibility from the same viewpoints.

MetricReference speechWhat it measuresRange and directionHow it is computed
SI-SDRRequired (full reference)Waveform distortion (energy ratio of the target component to everything else)dB, no upper bound; higher is betterInner products and energy
PESQRequired (full reference)Perceived quality (degradation as heard over a telephone)Raw value −0.5–4.5, about 1.0–4.6 when mapped to MOS-LQO; higher is betterCompared through an auditory model
STOIRequired (full reference)Intelligibility (whether words can be understood)−1–1 in theory, almost always 0–1 in practice; higher is betterCorrelation of envelopes in short segments
MOSNot required (for ACR, where listeners rate one sample at a time)Subjective quality (impression of human listeners)1–5; higher is betterMean of listeners' ratings

Within the family of "signal-to-error energy ratios" that SI-SDR belongs to, the metrics differ in how much transformation of the reference they allow.

MetricTransformation of the referenceLevel errorsMain problem
SNRNonePenalized (shrinking the estimate can even raise the value)Value moves with the estimate's level
BSS eval SDRAllows a filter of up to 512 tapsNot penalizedHigh values even for estimates with frequencies removed
SI-SDRAllows only a constant scalingNot penalizedMisses level errors
SD-SDRFinds the constant scaling but counts its error as errorPenalizedWeak penalty for making the output too loud (in the paper's example it drops only to −3 dB however loud)

Rough guidelines for choosing:

  • Comparing with prior work on speech separation or enhancement: use SI-SDR (and its improvement). When older papers report only the BSS eval SDR, do not compare values directly; recompute with the same definition.
  • Getting the output level right too: look at SD-SDR or SNR in addition to SI-SDR. The paper suggests using the smaller of SNR and SD-SDR where both too quiet and too loud outputs are a problem.
  • Knowing whether it sounds good to people: SI-SDR ignores hearing, so combine it with PESQ or MOS.
  • Knowing whether words can be understood: combine it with STOI.

PyTorch example

Show code
python
import torch


def si_sdr(est, ref, eps=1e-8):
  """Eqs. (3)-(5) of Le Roux et al. (2019). est and ref are waveforms of shape (..., time). The value is in dB (higher is better)."""
  alpha = (est * ref).sum(-1, keepdim=True) / (ref.pow(2).sum(-1, keepdim=True) + eps)
  e_target = alpha * ref            # component of the estimate in the direction of the target
  e_res = est - e_target            # residual (orthogonal to the target)
  return 10 * torch.log10(e_target.pow(2).sum(-1) / (e_res.pow(2).sum(-1) + eps) + eps)


def snr(est, ref, eps=1e-8):
  """Conventional SNR for comparison (Eq. (1)). Its value changes with the estimate's level."""
  return 10 * torch.log10(ref.pow(2).sum(-1) / ((ref - est).pow(2).sum(-1) + eps) + eps)


s = torch.tensor([4.0, 0.0])      # example from the header figure
s_hat = torch.tensor([2.4, 1.2])
for c in (0.5, 1.0, 2.0):
  print(c, snr(c * s_hat, s).item(), si_sdr(c * s_hat, s).item())  # SNR changes; SI-SDR stays at 6.02

# as a training loss: average the negative SI-SDR over the batch
model.train()
est = model(mixture)                 # waveform of shape (batch, time)
loss = -si_sdr(est, clean).mean()
loss.backward()

# evaluation: improvement (dB) over the unprocessed mixture
model.eval()
with torch.no_grad():
  est = model(mixture)
  improvement = (si_sdr(est, clean) - si_sdr(mixture, clean)).mean()

# With torchmetrics. Arguments are in the order (estimate, reference). The default zero_mean=False follows the paper's formula;
# zero_mean=True subtracts the mean (DC component) of both first. State which one was used when reporting
from torchmetrics.audio import ScaleInvariantSignalDistortionRatio

metric = ScaleInvariantSignalDistortionRatio(zero_mean=False)
print(metric(torch.tensor([2.5, 0.0, 2.0, 8.0]), torch.tensor([3.0, -0.5, 2.0, 7.0])))  # tensor(18.4030)

FAQ

Q. Are SI-SDR and SI-SNR different metrics?
A.

They are the same formula. According to the original paper, SI-SDR was called SI-SNR in the TasNet paper and simply SDR in another paper. Check the definition rather than the name, and do not confuse it with the BSS eval SDR (the one that reshapes the reference with a filter).

Q. What SI-SDR value counts as good?
A.

There is no fixed threshold, because the value depends heavily on the dataset and on the original SNR of the mixture. In speech separation, the usual practice is to compare the improvement over the unprocessed mixture; the table in the original paper lists improvements of about 10–15 dB on wsj0-2mix. Judge by comparing with existing models computed on the same data with the same definition.

Q. What should be kept in mind when using SI-SDR as a loss function?
A.

SI-SDR gives the same value however the estimate is scaled, so the level of the trained output is undetermined. When level matters for playback or later processing, normalize the output or combine it with SD-SDR or SNR, which also penalize level errors. Also, the value drops sharply if the estimate and reference are misaligned in time, so align the corresponding waveforms in the training data.

References

  1. Le Roux, J., Wisdom, S., Erdogan, H., & Hershey, J. R. (2019). SDR – half-baked or well done? ICASSP 2019. arXiv:1811.02508.
  2. Lightning AI. torchmetrics.audio.ScaleInvariantSignalDistortionRatio (API reference).