betaFeedback

WorksComputer Science

Spoof Localization as Boundary Regression

Abstract

Partially spoofed audio embeds spoofed segments in a bonafide utterance, and spoof localization is the task of locating them. Most countermeasures (CMs) operate at the frame level. Typically, they include a front-end representing the audio as frames and a back-end classifying each frame as bonafide or spoof. Such frame-level detection ties the reference, the predictions and the evaluation to a pre-defined temporal resolution: a frame containing a transition receives a single label, a boundary cannot lie inside a frame, and the evaluation also depends on the resolution. To tackle these issues, we treat spoof localization as regression. We propose a single-stage boundary regressor that outputs (start-time, end-time, score) tuples with continuous-valued time stamps, trained on the exact reference intervals. Results show that the proposed CM outperforms previous frame-level and boundary-based CMs, and generalizes better.

Introduction

In the Partial Spoof (PS) scenario, an attacker does not synthesize a whole utterance but replaces a few words of a bonafide utterance with spoofed speech, so that the meaning changes while most of the audio stays bonafide [1, 2, 3]. For such audio, an utterance-level decision is not always sufficient. In applications such as forensic analysis one might need to know which part of the utterance was edited. The task of locating the spoofed regions inside partially spoofed audio is known as spoof localization.

Most countermeasures (CMs) for spoof localization treat the task as classification. A typical CM utilizes a self-supervised learning (SSL) model as the front-end [4], represents the audio as a sequence of feature vectors, called frames, and uses a back-end that classifies each frame as bonafide or spoof. Note that the number of frames is set by the stride of the SSL convolutional layers; in wav2vec2-style front-ends [5, 6, 7, 8], consecutive frames are 20 ms apart, and we call this distance the frame resolution.

However, the start and end times of a spoofed word are not necessarily multiples of 20 ms, whereas a frame-level CM can only see and predict on the 20 ms frame. This mismatch leads to three specific issues. First, the reference labels must be quantized to the frame resolution, which introduces an unavoidable quantization error into training. More specifically, when partially spoofed audio is created, the spoofed interval [ts,te][t_s,t_e] is known exactly and is independent of the CM’s temporal resolution. But to assign one label to each frame, a frame that is entirely spoofed and a frame of which only a small part is spoofed are assigned the same label “spoof”, even though they have different levels of “spoofness”. Second, the precision of the model output is limited by the resolution, since a frame-level CM cannot predict a boundary inside a frame. Third, the evaluation is also tied to the resolution: point-based EER changes markedly with the resolution at which frames are scored, so results are often reported at various resolutions, which makes comparison less straightforward. Although the evaluation issue can be alleviated by using the range-based EER [9], its theoretical foundation is not yet fully justified. More importantly, it does not solve the first two issues.

To tackle the above problems, we treat spoof localization as regression via relative boundary modeling. Inspired by TriDet [10], we proposed a CM that takes an utterance as input and outputs a list of tuples (s,e,c)(s,e,c) with s,e,c∈Rs,e,c \in\mathbb{R}, where ss and ee define a time range of a hypothesized spoof interval and cc is its spoof score. Our contributions1 are: (1) a single-stage CM that regresses exact spoof boundaries, with no quantized label in training, prediction or evaluation. (2) On PartialSpoof the CM has the lowest point-based and range-based EER, and it generalizes better to LlamaPartialSpoof compared to other state-of-the-art methods. (3) The CM reveals a time misalignment problem in the released PartialEdit reference, and we released a corrected version using cross-correlation.

Methods

The proposed CM keeps the SSL front-end of a frame-level CM: a 300M XLS-R front-end represents the utterance as a sequence of 1024-dimensional frames. Its transformer blocks are fine-tuned while the convolutional feature extractor is frozen. What is predicted from these features changes in three aspects, as shown in Figure 2: (1) the frame sequence is expanded into a feature pyramid so that every position sees a different span of the input (2.1); (2) instead of one label per frame, it regresses the exact start time and end time of the spoofed interval around each position at each level and predicts a spoof score of the interval (2.2); (3) an utterance-level head acts as a gate to decide whether any spoofed interval should be output at all for an utterance (2.2).

Figure 2. Architecture overview.

We refer to one position of the resulting frame sequence at pyramid level ll as an instant t∈{0,1,…,Tl−1}t \in\{0,1,\ldots,T_l-1\}, where TlT_l is the number of instants at that level. For every instant tt at every pyramid level ll, the CM produces one proposal (s^t,e^t,c^t)(\hat{s}_t,\hat{e}_t,\hat{c}_t). c^\hat{c} is the spoof score of the interval defined by starting time s^t\hat{s}_t and end time e^t\hat{e}_t:

s^t=Δ[(t−ds+rs)ql]+δ,e^t=Δ[(t+de+re)ql]+δ,(1)\begin{aligned} \hat{s}_t &= \Delta\left[(t-d_s+r_s)q_l\right]+\delta,\\ \hat{e}_t &= \Delta\left[(t+d_e+r_e)q_l\right]+\delta, \tag*{(1)} \end{aligned}

where Δ\Delta is the frame resolution and qlq_l is the stride at level $l} (§ 2.1). Although the values of s^t\hat{s}_t and e^t\hat{e}_t are largely decided by Δtql\Delta t q_l, the additional shifting terms ds,de∈R+d_s,d_e \in\mathbb{R}_+ and rs,re∈Rr_s,r_e \in\mathbb{R} help to predict the start time and end time more precisely. Among them, ds,ded_s,d_e are the distances from time Δtql\Delta t q_l to the actual start time or end time via probabilistic modeling (§ 2.2); rs,re∈(−0.5,0.5)r_s,r_e \in(-0.5,0.5) are bounded residuals used to further refine each boundary by up to half a stride (§ 2.2). Finally, δ\delta is a constant, an implementation detail similar to the left padding in STFT.

Multi-granular Modeling

This part follows the conventional frame-level CMs that build on XLS-R features: two 1-D convolutional modules with kernel size 3 are used to project the front-end output to C=256C=256 channels, and the sequence is then converted into a feature pyramid as in the multi-resolution CM [2] which can capture fine-to-coarse features. As shown in Figure 2, the pyramid has six levels at 20 to 640 ms, each built from the previous one by max-pooling with stride 2, so that level ll has stride ql=2l−1q_l=2^{l-1} frames.

Each level is then processed by one SGP block proposed in [10]. The core function is defined as follows:

FSGP(X)=ϕ(xˉ)⊙FC(X)+ψ(X)⊙(Conv⁡w(X)+Conv⁡kw(X))+X,(2)F_{\mathrm{SGP}}(\mathbf{X})=\phi(\bar{\mathbf{x}})\odot\mathrm{FC}(\mathbf{X}) +\psi(\mathbf{X})\odot\left(\operatorname{Conv}_{w}(\mathbf{X})+\operatorname{Conv}_{kw}(\mathbf{X})\right)+\mathbf{X}, \tag*{(2)}

where X∈RC×Tl\mathbf{X}\in\mathbb{R}^{C\times T_l} is the feature sequence of the level with TlT_l instants, and xˉ∈RC\bar{\mathbf{x}}\in\mathbb{R}^{C} is its mean over the instants. ϕ(xˉ)\phi(\bar{\mathbf{x}}) is computed once from the mean and applied to every instant, so each instant is weighted by the utterance-level context. ψ\psi, Conv⁡w\operatorname{Conv}_w and Conv⁡kw\operatorname{Conv}_{kw} are depth-wise convolutions with two window sizes w=1w=1 and kw=3kw=3, which model the local context of each instant. In each SGP block, the input is layer-normalized, and the output of Eq. (2) is followed by group normalization, a feed-forward network with a second residual connection, as in TriDet [10]. The resulting features are then fed into different heads to perform different tasks.

Prediction tasks

Let the reference of an utterance be a set of spoofed intervals G={(sg,eg)}G=\{(s_g,e_g)\} in seconds, exact as released. A bonafide utterance has ∣G∣=0|G|=0. The three tasks of the proposed CM below are trained against these exact intervals; no reference is quantized. An auxiliary task, frame-level prediction, is added only for comparison with other frame-level CMs. It is the only task where quantized labels are used, and the gradient is stopped at the prediction head, so the potential quantization error never reaches the proposed CM.

Instant classification with center sampling. This task detects whether an instant is near the center of a reference spoofed interval. The head of this task is a three-layer convolutional module: the first two layers have kernel size 3, C=256C=256 channels and ReLU, and the last layer projects to one score.

Let Hl∈RC×Tl\mathbf{H}^{l}\in\mathbb{R}^{C\times T_l} denote the SGP block’s output at level ll, then for six levels there are six outputs H1,…,H6\mathbf{H}^{1},\ldots,\mathbf{H}^{6}. The head takes each Hl\mathbf{H}^{l} separately, and the same head is applied to all six levels. Its output has the same length TlT_l as its input, which gives one spoof score c^t\hat{c}_t per instant. The same c^t\hat{c}_t is used as the spoof score of the interval predicted at tt. Each instant tt is labeled as positive (near the center) or negative (not near the center) by center sampling [11], a method also used in [12, 10]; i.e., center sampling assigns each positive instant to one reference spoofed interval gg. The head is trained with the binary focal loss Ft\mathcal{F}_t [13] as follows:

Lcls=1∣P∣∑t∈PIoU⁡tFt+1∣N∣∑t∈NFt,(3)\mathcal{L}_{\mathrm{cls}}=\frac{1}{|\mathcal{P}|}\sum_{t\in\mathcal{P}}\operatorname{IoU}_t\mathcal{F}_t+\frac{1}{|\mathcal{N}|}\sum_{t\in\mathcal{N}}\mathcal{F}_t, \tag*{(3)}

where P\mathcal{P} and N\mathcal{N} are the sets of positive and negative instants of a batch. IoU⁡t\operatorname{IoU}_t is the IoU between the interval predicted at tt and the reference spoofed interval assigned to tt. It weights the positives, so that c^t\hat{c}_t reflects how well the interval is localized [10].

Boundary regression. This task predicts the exact start and end of the spoofed interval for every positive instant tt. According to Eq. (1), this requires the distances ds,ded_s,d_e and the residuals rs,rer_s,r_e. As shown in Figure 1, they are predicted by four heads: a start head, an end head, and an offset head together give the two distances, and a residual head give the two residuals. Each head has the same three-layer convolutional structure and receives the same SGP block’s output as the instant classification head.

Figure 1. Boundary decoding at one instant tt of one level. Start and end scores are predicted for all instants of that level; instant tt adds its own offset to the BB nearest scores on each side, converts them to a probability, and takes the expected distance plus a small residual as the boundary. The interval is trained with an IoU loss and each boundary with a Huber loss on its gap to the reference.

The input of the start and end heads is the same as the instant classification head: each head takes HlH^{l} as input, and the head is shared by all six levels. Distance prediction follows TriDet [10]. A start head and an end head output one score per instant, Fs∈RTlF_s \in\mathbb{R}^{T_l} and Fe∈RTlF_e \in\mathbb{R}^{T_l}, which indicate how likely an instant is a start or an end.

The input of an offset head is also the same as the instant classification head. The offset head outputs Fc∈RTl×2×(B+1)F_c \in\mathbb{R}^{T_l \times2 \times(B+1)}. For instant tt, it adjusts the scores of tt and of its B=16B = 16 neighbours on each side. Take the start time prediction for example: for tt, the probability of it or its neighbours being the start P~s(b)\widetilde{P}_s(b) is softmax⁡b(Fs[t−b]+Fc[t,0,b])\operatorname{softmax}_b(F_s[t-b] + F_c[t,0,b]), and the distance to start dsd_s is the expectation ∑b=0BbP~s(b)\sum_{b=0}^{B} b\widetilde{P}_s(b).

A residual is slightly different from the other heads in this task: it has the same inputs, but only shares its first two layers. The residual corrects the error left by the distances, which differs between levels, so the last layer is separate for each level. About the error, more specifically, ds,de≥0d_s,d_e \ge0 force the predicted interval to contain tt, while a spoofed interval shorter than the stride qlq_l may start after tt or end before it. We therefore proposed a residual head to output Fr∈RTl×2F_r \in\mathbb{R}^{T_l \times2}. The residuals r=0.5tanh⁡(Fr[t])r = 0.5\tanh(F_r[t]) can push the start past tt to the right, or the end past tt to the left, by up to half a stride.

With the distances and residuals, Eq. (1) gives the predicted interval (s^t,e^t)(\hat{s}_t,\hat{e}_t). Then we can train the heads by comparing the interval predicted at tt and the reference spoofed interval gg assigned to tt. As shown in Figure 1, Huber loss Lhub\mathcal{L}_{\mathrm{hub}} and IoU loss LIoU\mathcal{L}_{\mathrm{IoU}} are adopted:

Lhub=1∣P∣∑t∈P[h(∣s^t−sg∣τb)+h(∣e^t−eg∣τb)](4)\mathcal{L}_{\mathrm{hub}}=\frac{1}{|\mathcal{P}|}\sum_{t\in\mathcal{P}}\left[h\left(\frac{|\hat{s}_t-s_g|}{\tau_b}\right)+h\left(\frac{|\hat{e}_t-e_g|}{\tau_b}\right)\right] \tag*{(4)}
LIoU=1∣P∣∑t∈P(1−IoU⁡t),(5)\mathcal{L}_{\mathrm{IoU}}=\frac{1}{|\mathcal{P}|}\sum_{t\in\mathcal{P}}(1-\operatorname{IoU}_t), \tag*{(5)}

where h(u)=u2/2h(u)=u^2/2 for u<1u<1 and u−12u-\frac{1}{2} otherwise is the Huber function [14], τb=20\tau_b=20 ms is the frame resolution, and IoU⁡t\operatorname{IoU}_t is the IoU between (s^t,e^t)(\hat{s}_t,\hat{e}_t) and gg. The two losses complement each other: LIoU\mathcal{L}_{\mathrm{IoU}} measures how well (s^t,e^t)(\hat{s}_t,\hat{e}_t) overlaps gg, but an error of a few milliseconds barely changes it on a long interval. To make the prediction more precise, Lhub\mathcal{L}_{\mathrm{hub}} penalizes the error at each boundary in absolute time, regardless of the interval length.

Utterance-level Prediction. This task predicts whether an utterance contains any spoofed intervals. So far, Lhub\mathcal{L}_{\mathrm{hub}}, LIoU\mathcal{L}_{\mathrm{IoU}} and the first term of Lcls\mathcal{L}_{\mathrm{cls}} are computed on positive instants only. A bonafide utterance has no positive instants; on bonafide data, the CM is only trained by the second term of Lcls\mathcal{L}_{\mathrm{cls}}, where the focal loss at each instant becomes very small as soon as the score is moderately low.

As a result, no loss tells the CM an utterance as a whole is bonafide and the CM still outputs proposals for bonafide inputs. We therefore add an utterance-level head. The outputs of the six SGP blocks are concatenated along time and pooled by attentive statistics pooling [15] into a weighted mean and a weighted standard deviation. A two-layer MLP with a hidden dimension of 256 and ReLU, followed by a sigmoid, maps the pooled vector to a probability pup_u. The head is trained with class-balanced binary cross-entropy loss Lutt\mathcal{L}_{\mathrm{utt}}. During inference, an utterance judged bonafide by this head has no proposals.

Frame-level prediction. This auxiliary task predicts one spoof score per frame; it is used to compare with frame-level counter-parts. The head of this task takes the level 1’s output of the SGP block, where one instant corresponds to one frame. It has the same structure as the instant classification head. It is trained with binary cross-entropy Lfr\mathcal{L}_{\mathrm{fr}} against the quantized frame labels. The gradient is stopped at the input of the head, so the quantized labels do not affect the SGP blocks or the other heads.

Finally, the total loss is L=Lcls+λhLhub+LIoU+Lutt+Lfr\mathcal{L}=\mathcal{L}_{\mathrm{cls}}+\lambda_h\mathcal{L}_{\mathrm{hub}}+\mathcal{L}_{\mathrm{IoU}}+\mathcal{L}_{\mathrm{utt}}+\mathcal{L}_{\mathrm{fr}}, where λh=0.05\lambda_h=0.05 brings Lhub\mathcal{L}_{\mathrm{hub}} to the scale of LIoU\mathcal{L}_{\mathrm{IoU}} at the start of training. Similar to other temporal action detection tasks [12, 16, 10], we adopt Soft-NMS [17] to merge near-duplicate proposals to a list of 100 proposals.

Experimental settings

Training configuration. All CMs are trained with the same recipe on PartialSpoof [2], LlamaPartialSpoof [3] and PartialEdit E1 [1]: AdamW with learning rate 10−410^{-4} for XLS-R, 10−410^{-4} and weight decay 0.05 for the others, linear warm-up over 5 epochs and cosine decay over 30 epochs, batches of 8 whole utterances, early stopping with patience 3, and fp16 autocast for the front-end on one 48 GB RTX A6000. The hyper-parameters are fixed on the PartialSpoof development set and not tuned per dataset: λh=0.05\lambda_h=0.05, and a gated threshold of 0.2 on pup_u.

Evaluation configuration. Every model is trained with three seeds and the mean is reported. We evaluate the CMs with four metrics: point-based EER, range-based EER [9], boundary errors (MAE s/eMAE\ s/e) and matched fraction (Matched). Point-based EER is computed at 20 ms resolution. For interval-based CMs, a frame takes the highest score among the proposals that cover it, and 0 if no proposal covers it. MAE s/eMAE\ s/e is the mean absolute error of the predicted start and end times, in ms. MatchedMatched is the percentage of reference spoofed intervals that a CM finds. A reference interval is matched if its best predicted interval has IoU⁡≥0.5\operatorname{IoU}\ge0.5, and the MAE is computed between the reference and the highest-IoU prediction. Frame-level CMs output no intervals, so consecutive frames with a normalized spoof score above 0.5 are stitched into one predicted interval.

Results

Compared CMs. Most published CMs for this task are frame-level classifiers, so we compare with several of them: BAM (boundary-aware attention over WavLM features) [7], Split and Conquer (boundary detection followed by segment classification)[6], and MRM (multi-resolution CM, the only CM reported with range-based EER)[2, 9]. The proposal-based CM closest to ours is CPRRF (coarse-to-fine proposal refinement on XLS-R) [5].

Our settings. 1) ungated, all proposals are included. 2) gated, utterances judged bonafide by the utterance-level head get no proposals. 3) frame head, use the frame-level head alone for inference. 4) max fusion, the per-frame maximum of the gated proposal score and the frame head score.

Comparison with published CMs on PartialSpoof

Table 1 shows the results on PartialSpoof. The row w/o utt is the localizer trained without the utterance-level head; it measures the impact of adding this head. Without the head, both point-based and range-based EERs rise, so the joint training itself helps localization. Gating during inference does not change the performance, but it has a practical value: it can filter out bonafide data and reduce post-processing time.

ModelPoint EERRange EERMAE s / eMatched
MRM[2, 9]12.8430.40––
MRM, re-impl.†15.5716.0713.9 / 15.269.0
CFPRF[18]7.61–––
SaC[6]6.55–––
BAM[7]5.20–––
Ours, w/o utt6.016.899.8 / 9.395.8
Ours, ungated5.005.558.7 / 9.394.5
Ours, gated5.005.568.7 / 9.394.3
Ours, frame head5.896.3614.2 / 17.978.9
Ours, max fusion4.925.3413.0 / 14.380.6

Table 1. Results on PartialSpoof. †: Our re-implementation.

ModelZero-shot fullZero-shot partialZero-shot bothFine-tuned fullFine-tuned partialFine-tuned both
MRM[2, 18]40.9832.7644.546.0410.318.20
CFPRF[5, 18]36.2235.0141.472.898.725.96
Ours, ungated30.0126.1834.393.231.762.85
Ours, gated30.4326.1034.633.041.712.78
Ours, frame head28.7524.4733.840.832.001.31
Ours, max fusion29.5724.6033.790.871.771.33
Ours, utterance head37.03––0.61––

Table 2. Point-based EER on LlamaPartialSpoof

Range-based EER is higher than point-based EER in every row, because the former also counts the boundary errors within a frame. Compared to baselines, our CMs have lower point-based and range-based EERs in almost all settings. Max fusion is the best; it beats using proposals alone and frame-level outputs alone, so the two outputs complement each other. We then compare MAE s/e and Matched. The regression localizers (ungated, gated) place both boundaries within 10 ms and match about 95% of the reference intervals, whereas the frame-level CMs (frame head, max fusion) match only 78–80% with errors above 13 ms. We attribute the difference to the training signal: the localizer learns from the exact reference, without quantization error.

Generalization to LlamaPartialSpoof

LlamaPartialSpoof (LPS) is used as an out-of-domain test: CMs trained on PartialSpoof are evaluated on it (zero-shot), or after fine-tuning on an LPS training subset (fine-tuned). Following the same setting of [18], we report point-based EER on its three groups of the test subset: full, bonafide plus fully spoofed utterances; partial, bonafide plus partially spoofed utterances; and both, all utterances.

Table 2 shows two trends that hold for all CMs used in these experiments. First, zero-shot evaluation does not work well: the point-based EER is between 24.47% and 44.54%, so a CM trained on PartialSpoof alone cannot be applied to LPS directly. Second, fine-tuning reduces the error largely. On both, CFPRF drops from 41.47% to 5.96%, and our frame head drops from 33.84% to 1.31%. Within these two trends, our CMs have the lower error in both zero-shot and fine-tuned conditions. In zero-shot, our settings have better results on every group, by 5.79–12.23%, so training on exact boundaries generalizes better. After fine-tuning, ours achieve the best results: 1.71–2.00% on partial and 1.31–2.85% on both.

ModelPoint EERRange EERMAE s / eMatched
Trained on the released labels
BAM†[7, 1]3.80–––
MRM, re-impl.7.437.5110.7 / 127.389.4
Ours, ungated7.237.6525.2 / 82.799.0
Trained on the realigned labels
MRM, re-impl.0.530.5410.0 / 8.499.0
Ours, ungated1.050.787.2 / 5.899.5
Ours, gated1.050.797.2 / 5.899.4
Ours, frame head0.410.448.4 / 6.899.1
Ours, max fusion0.440.439.6 / 7.499.3

Table 3. Results on the PartialEdit E1 evaluation set, scored against the realigned reference. †: as reported in [1], on the released labels and the authors’ own evaluation set.

One exception: ungated performs worse than CFPRF on full. After investigation, we found it is because the proposals do not always cover the whole spoofed utterance, indicating a task mismatch (utterance-level detection vs. partial spoof localization). Using the utterance-level head alone (row utterance head) can reach 0.61%, showing the robustness of the learned features.

Revealing label misalignment issues

Table 3 shows the results on PartialEdit E1. Trained on the released labels, our CM has a higher point-based EER than BAM†. For a second reference, we include a re-implementation of MRM. The two CMs have one thing in common: the end error is several times the start error. To check the labels, we compare each file that has a single spoofed interval with its VCTK source [19] by normalized cross-correlation (NCC), as shown in Figure 3. In terms of the starting point, the released time labels are quite accurate, and the edited and source files match (NCC > 0.99) for 92% of the files. As for the ending time label, however, the ratio of matched files is only 37%.

Figure 3. Comparing the boundaries using cross-correlation.

Therefore, we realigned all single-interval files and created a ‘realigned’ subset from PartialEdit E15. Trained on this subset, both CMs drop from above 7% to about 1% point-based EER or below, and our CMs have the best MAE s/e and Matched. The reference MRM model also benefits from using the realigned training data.

Conclusion

We proposed a single-stage CM that treats spoof localization as boundary regression, predicting the start time and end time from the exact reference without quantization. It achieves the lowest point-based and range-based EER on PartialSpoof, and generalizes better to LlamaPartialSpoof. Boundary error analysis led us to realign PartialEdit.

Compliance with Ethical Standards

This study was conducted using speech corpora made available in open access (PartialSpoof, LlamaPartialSpoof, PartialEdit and VCTK). Ethical approval was not required as confirmed by the licenses attached to the open-access data.

References

Interpreting the evaluation metrics of partial spoof localization

This appendix recaps the computation of equal error rates (EERs) for conventional binary classification and extends it to the evaluation metrics for partial-spoof detection & localization. The contents are listed below:

  1. On binary classification task (§ A.1): as pointed out by [20], EER is the maximum of the Bayes decision cost w.r.t the prior, given that the scores are perfectly calibrated.

  1. On partial spoofing (§ A.2):

  • Segment-EER (§ A.2.3) can be interpreted in the same manner as the EER for conventional binary classification, assuming that the segment scores are independently identically distributed.

  • Range EER (§ A.2.4) assumes that the score r(t)r(t) as a function of time. Interpretation of range EER in a similar manner to the conventional EER requires strong assumptions about the score distribution.

Binary classification

Optimal decision

The user of a binary classifier needs to guess or make a decision whether the input waveform x∈Xx \in\mathcal{X} is real or fake. The decision is binary, and the target label can be Y={HY,HN}\mathcal{Y} = \{H_Y, H_N\}, where

HY:x is REAL,H_Y : x \text{ is REAL},
HN:x is FAKE.H_N : x \text{ is FAKE}.

The user action aa can be from A={ACCEPT,REJECT}\mathcal{A} = \{\mathrm{ACCEPT}, \mathrm{REJECT}\}:

ACCEPT:user claims that x is REAL,\mathrm{ACCEPT} : \text{user claims that } x \text{ is REAL},
REJECT:user claims that x is FAKE.\mathrm{REJECT} : \text{user claims that } x \text{ is FAKE}.

The user uses a detection system when making the decision, the xx is consumed and converted into a score s∈Rs \in\mathbb{R}, where the value indicates how likely that xx is REAL. Intuitively, the user should take a=ACCEPTa = \mathrm{ACCEPT} if ss is high enough, indicating a higher chance of being real.

The user may take an incorrect action: a real sample (HYH_Y) may be falsely rejected (miss), while a fake sample (HNH_N) may be falsely accepted (false acceptance). Incorrect actions can be assigned decision costs. Given an action a∈Aa \in\mathcal{A} and the ground-truth label y∈Yy \in\mathcal{Y}, we use C(a,y)≥0C(a,y) \ge0 to denote the decision-cost function c:A×Y→R+c:\mathcal{A} \times\mathcal{Y} \to\mathbb{R}^{+}. An example is given in Table 4.

Action = ACCEPTAction = REJECT
True class = Y0CfrYC_{\mathrm{fr}}^{Y}
True class = NCfaNC_{\mathrm{fa}}^{N}0

Table 4. Values of decision cost C(a,y)C(a,y). Subscript fa and fr denote false ACCEPT and REJECT, respectively.

Following the practice of Bayes decision [21], the user’s conditional risk R(a∣s)R(a|s) when taking an action aa given the input ss is computed as

R(a∣s)=∑y∈YC(a,y)P(y∣s),(6)R(a|s) = \sum_{y \in\mathcal{Y}} C(a,y)P(y|s), \tag*{(6)}

where P(y∣s)P(y|s) is the posterior probability of class yy when observing ss. By plugging in the possible values of C(a,y)C(a,y) listed in Table 4, we can compute the conditional risks when taking the two possible actions

R(ACCEPT∣s)=CfaNP(HN∣s),(7)R(\mathrm{ACCEPT}|s) = C_{\mathrm{fa}}^{N}P(H_N|s), \tag*{(7)}
R(REJECT∣s)=CfrYP(HY∣s).(8)R(\mathrm{REJECT}|s) = C_{\mathrm{fr}}^{Y}P(H_Y|s). \tag*{(8)}

The Bayes decision rule tells the user to select the action aa with a smaller risk [21], i.e.,

a={ACCEPT,if R(REJECT∣s)>R(ACCEPT∣s)REJECT,if R(REJECT∣s)≤R(ACCEPT∣s)(9)a = \begin{cases} \mathrm{ACCEPT}, & \text{if } R(\mathrm{REJECT}|s) > R(\mathrm{ACCEPT}|s) \\ \mathrm{REJECT}, & \text{if } R(\mathrm{REJECT}|s) \le R(\mathrm{ACCEPT}|s) \end{cases} \tag*{(9)}

With Eqs. (7) and (8), the policy above can be re-written as

CfrYP(HY∣s)⋛ACCEPTREJECTCfaNP(HN∣s).(10)C_{\mathrm{fr}}^{Y}P(H_Y|s) \underset{\mathrm{REJECT}}{\overset{\mathrm{ACCEPT}}{\gtreqless}} C_{\mathrm{fa}}^{N}P(H_N|s). \tag*{(10)}

From the Bayes’ formula, the user knows that P(HY∣s)=p(s∣HY)πY/p(s)P(H_Y|s) = p(s|H_Y)\pi_Y/p(s) and P(HN∣s)=p(s∣HN)πN/p(s)P(H_N|s) = p(s|H_N)\pi_N/p(s), where πY≜P(HY)=1−πN\pi_Y \triangleq P(H_Y) = 1-\pi_N is the prior probability of HYH_Y. The user can then further rewrite the policy in a log-ratio form as

log⁡p(s∣HY)p(s∣HN)⋛ACCEPTREJECTlog⁡((1−πY)CfaNπYCfrY).(11)\log\frac{p(s|H_Y)}{p(s|H_N)} \underset{\mathrm{REJECT}}{\overset{\mathrm{ACCEPT}}{\gtreqless}} \log\left(\frac{(1-\pi_Y)C_{\mathrm{fa}}^{N}}{\pi_Y C_{\mathrm{fr}}^{Y}}\right). \tag*{(11)}

The term on the left-hand side of Eq. (11) is the LLR of the observed ss, LLR⁡(s)≜log⁡p(s∣HY)p(s∣HN)\operatorname{LLR}(s) \triangleq\log\frac{p(s|H_Y)}{p(s|H_N)}. This is the only term that depends on the input speech data (via ss). The logit log⁡πY(1−πY)\log\frac{\pi_Y}{(1-\pi_Y)} and the term for decision costs are set a prior by the user. In other words, when the user’s detection system is launched, the prior and decision costs are configured by the user. Given an input xx, the detector produces ss, based on which the user makes a decision following Eq. (11).

This is the optimal decision policy for the user.

Interpretation of EER

When user has ideal LLRs and their distributions. Let r≜LLR⁡(s)≜log⁡p(s∣HY)p(s∣HN)r \triangleq\operatorname{LLR}(s) \triangleq\log\frac{p(s|H_Y)}{p(s|H_N)} be a short-hand notation of the LLR value corresponding to ss. With the decision costs plugged in, the overall risk R(πY,CfaN,CfrY)R(\pi_Y,C_{\mathrm{fa}}^{N},C_{\mathrm{fr}}^{Y}) when the user follows the optimal Bayes decision policy in Eq. (11) becomes:

R(πY,CfaN,CfrY)=∑a∈A∫R(a∣r)p(r) dr(12)R(\pi_Y,C_{\mathrm{fa}}^{N},C_{\mathrm{fr}}^{Y}) = \sum_{a \in\mathcal{A}} \int R(a|r)p(r)\,dr \tag*{(12)}
=∫∑a∈A∑y∈YC(a,y)P(y∣r)p(r) dr(13)= \int\sum_{a \in\mathcal{A}}\sum_{y \in\mathcal{Y}} C(a,y)P(y|r)p(r)\,dr \tag*{(13)}
=∫τBayes+∞CfaNP(HN∣r)p(r) dr+∫−∞τBayesCfrYP(HY∣r)p(r) dr(14)= \int_{\tau_{\mathrm{Bayes}}}^{+\infty} C_{\mathrm{fa}}^{N}P(H_N|r)p(r)\,dr + \int_{-\infty}^{\tau_{\mathrm{Bayes}}} C_{\mathrm{fr}}^{Y}P(H_Y|r)p(r)\,dr \tag*{(14)}
=CfaN(1−πY)∫τBayes+∞p(r∣HN) dr+CfrYπY∫−∞τBayesp(r∣HY) dr(15)= C_{\mathrm{fa}}^{N}(1-\pi_Y)\int_{\tau_{\mathrm{Bayes}}}^{+\infty}p(r|H_N)\,dr + C_{\mathrm{fr}}^{Y}\pi_Y\int_{-\infty}^{\tau_{\mathrm{Bayes}}}p(r|H_Y)\,dr \tag*{(15)}
=CfaN(1−πY)pfa(τBayes)+CfrYπYpmiss(τBayes).(16)= C_{\mathrm{fa}}^{N}(1-\pi_Y)p_{\mathrm{fa}}(\tau_{\mathrm{Bayes}}) + C_{\mathrm{fr}}^{Y}\pi_Yp_{\mathrm{miss}}(\tau_{\mathrm{Bayes}}). \tag*{(16)}

where pfa(τBayes)p_{\mathrm{fa}}(\tau_{\mathrm{Bayes}}) and pmiss(τBayes)p_{\mathrm{miss}}(\tau_{\mathrm{Bayes}}) correspond to the probabilities of false ACCEPT and REJECT, respectively,

pfa(τBayes)≜∫τBayes+∞p(r∣HN) dr,(17)p_{\mathrm{fa}}(\tau_{\mathrm{Bayes}}) \triangleq\int_{\tau_{\mathrm{Bayes}}}^{+\infty} p(r\mid H_N)\,\mathrm{d}r, \tag*{(17)}
pmiss(τBayes)≜∫−∞τBayesp(r∣HY) dr,(18)p_{\mathrm{miss}}(\tau_{\mathrm{Bayes}}) \triangleq\int_{-\infty}^{\tau_{\mathrm{Bayes}}} p(r\mid H_Y)\,\mathrm{d}r, \tag*{(18)}

and where τBayes=log⁡((1−πY)CfaN/(πYCfrY))\tau_{\mathrm{Bayes}}=\log\left((1-\pi_Y)C_{\mathrm{fa}}^N/(\pi_Y C_{\mathrm{fr}}^Y)\right) is the optimal Bayes decision threshold decided by the user’s asserted prior and decision costs.6

The notion that the overall risk RR is a function of {πY,CfaN,CfrY}\{\pi_Y, C_{\mathrm{fa}}^N, C_{\mathrm{fr}}^Y\} reflects the fact that, given the rr and its distributions, the user’s decision risk is only affected by these three user-asserted parameters. If the user alters them, the decision threshold τBayes\tau_{\mathrm{Bayes}} and the corresponding overall risk are changed automatically.

It has been shown that [20 § 2], given CfaN=CfrY=1C_{\mathrm{fa}}^N=C_{\mathrm{fr}}^Y=1, EER is the maximum overall risk when the user varies πY\pi_Y.

EER=max⁡πYR(πY,CfaN=1,CfrY=1)(19)\mathrm{EER}=\max_{\pi_Y}R(\pi_Y,C_{\mathrm{fa}}^N=1,C_{\mathrm{fr}}^Y=1) \tag*{(19)}
=max⁡πY((1−πY)pfa(τ(πY))+πYpmiss(τ(πY))),(20)=\max_{\pi_Y}\left((1-\pi_Y)p_{\mathrm{fa}}(\tau(\pi_Y))+\pi_Yp_{\mathrm{miss}}(\tau(\pi_Y))\right), \tag*{(20)}

where the threshold τ(πY)=log⁡1−πYπY\tau(\pi_Y)=\log\frac{1-\pi_Y}{\pi_Y} is a function of πY\pi_Y. The πY∗\pi_Y^* that yields the maximum corresponds to the threshold τEER=log⁡1−πY∗πY∗\tau_{\mathrm{EER}}=\log\frac{1-\pi_Y^*}{\pi_Y^*}, which also satisfies pfa(τEER)=pmiss(τEER)p_{\mathrm{fa}}(\tau_{\mathrm{EER}})=p_{\mathrm{miss}}(\tau_{\mathrm{EER}}), hence the name equal error rate.

Here, we write down the proof again. Let R(πY)≜R(πY,CfaN=1,CfrY=1)R(\pi_Y)\triangleq R(\pi_Y,C_{\mathrm{fa}}^N=1,C_{\mathrm{fr}}^Y=1) be a shorthand of the decision risk. By taking the first-order derivative w.r.t. πY\pi_Y, we have

dR(πY)dπY=−pfa(τ(πY))+(1−πY)dpfa(τ(πY))dπY(21)\frac{\mathrm{d}R(\pi_Y)}{\mathrm{d}\pi_Y}=-p_{\mathrm{fa}}(\tau(\pi_Y))+(1-\pi_Y)\frac{\mathrm{d}p_{\mathrm{fa}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y} \tag*{(21)}
+pmiss(τ(πY))+πYdpmiss(τ(πY))dπY,(22)\qquad+p_{\mathrm{miss}}(\tau(\pi_Y))+\pi_Y\frac{\mathrm{d}p_{\mathrm{miss}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y}, \tag*{(22)}

where the derivatives of the two error rates are

dpfa(τ(πY))dπY=−p(τ(πY)∣HN)dτ(πY)dπY(23)\frac{\mathrm{d}p_{\mathrm{fa}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y}=-p(\tau(\pi_Y)\mid H_N)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y} \tag*{(23)}
dpmiss(τ(πY))dπY=p(τ(πY)∣HY)dτ(πY)dπY,(24)\frac{\mathrm{d}p_{\mathrm{miss}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y}=p(\tau(\pi_Y)\mid H_Y)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y}, \tag*{(24)}

and where

dτ(πY)dπY=−1(1−πY)πY.(25)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y}=-\frac{1}{(1-\pi_Y)\pi_Y}. \tag*{(25)}

Because of the property that the LLR of LLR is LLR [20], i.e., r=log⁡p(r∣HY)p(r∣HN)r=\log\frac{p(r\mid H_Y)}{p(r\mid H_N)}, at any decision threshold r=τ(πY)r=\tau(\pi_Y), we know that

p(τ(πY)∣HY)=exp⁡(τ(πY))p(τ(πY)∣HN)=1−πYπYp(τ(πY)∣HN).(26)p(\tau(\pi_Y)\mid H_Y)=\exp(\tau(\pi_Y))p(\tau(\pi_Y)\mid H_N)=\frac{1-\pi_Y}{\pi_Y}p(\tau(\pi_Y)\mid H_N). \tag*{(26)}

With the above four equations, it can be shown that

(1−πY)dpfa(τ(πY))dπY+πYdpmiss(τ(πY))dπY(27)(1-\pi_Y)\frac{\mathrm{d}p_{\mathrm{fa}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y}+\pi_Y\frac{\mathrm{d}p_{\mathrm{miss}}(\tau(\pi_Y))}{\mathrm{d}\pi_Y} \tag*{(27)}
=−(1−πY)p(τ(πY)∣HN)dτ(πY)dπY+πYp(τ(πY)∣HY)dτ(πY)dπY(28)=-(1-\pi_Y)p(\tau(\pi_Y)\mid H_N)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y}+\pi_Yp(\tau(\pi_Y)\mid H_Y)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y} \tag*{(28)}
=(−(1−πY)+πY1−πYπY)p(τ(πY)∣HN)dτ(πY)dπY(29)=\left(-(1-\pi_Y)+\pi_Y\frac{1-\pi_Y}{\pi_Y}\right)p(\tau(\pi_Y)\mid H_N)\frac{\mathrm{d}\tau(\pi_Y)}{\mathrm{d}\pi_Y} \tag*{(29)}
=0(30)=0 \tag*{(30)}

Hence, the 2nd and 4th terms in Eq. (22) cancel out, and Eq. (22) becomes

dR(πY)dπY=pmiss(τ(πY))−pfa(τ(πY)).(31)\frac{\mathrm{d}R(\pi_Y)}{\mathrm{d}\pi_Y}=p_{\mathrm{miss}}(\tau(\pi_Y))-p_{\mathrm{fa}}(\tau(\pi_Y)). \tag*{(31)}

Taking the 2nd order derivative, we have

d2R(πY)dπY2=(p(τ(πY)∣HY)+p(τ(πY)∣HN))−1(1−πY)πY<0.(32)\frac{\mathrm{d}^2R(\pi_Y)}{\mathrm{d}\pi_Y^2}=\left(p(\tau(\pi_Y)\mid H_Y)+p(\tau(\pi_Y)\mid H_N)\right)\frac{-1}{(1-\pi_Y)\pi_Y}<0. \tag*{(32)}

Hence, R(πY)R(\pi_Y) has a global maximum when the variable πY∗\pi_Y^* satisfies that dR(πY)dπY∣πY=πY∗=pmiss(τ(πY∗))−pfa(τ(πY∗))=0\left.\frac{\mathrm{d}R(\pi_Y)}{\mathrm{d}\pi_Y}\right|_{\pi_Y=\pi_Y^*}=p_{\mathrm{miss}}(\tau(\pi_Y^*))-p_{\mathrm{fa}}(\tau(\pi_Y^*))=0. In other words, the decision threshold τ(πY∗)=log⁡1−πY∗πY∗\tau(\pi_Y^*)=\log\frac{1-\pi_Y^*}{\pi_Y^*} makes the two error rates equal.

In short, EER is the maximum risk w.r.t the user’s asserted prior πY\pi_Y. The above interpretation requires that

  1. The decision is based on perfect LLRs rr, rather than uncalibrated scores.

  2. The decision is based on the Bayes decision policy (11).

  3. The risk RR assumes fixed and equal decision costs to the two types of decision errors.

When user has ideal LLRs but not their distributions.

In reality, the user does not know the true p(r∣HY)p(r\mid H_Y) and p(r∣HN)p(r\mid H_N) and cannot compute the probabilities of false ACCEPT and REJECT by integration. The user has to estimate the error probabilities on a test set by counting.

Let Dr,Y={ri∣HY}\mathcal{D}_{r,Y}=\{r_i\mid H_Y\} and Dr,N={ri∣HN}\mathcal{D}_{r,N}=\{r_i\mid H_N\} be the LLRs of the HYH_Y and HNH_N samples in a test set. Let a general threshold be τ\tau, which may be different from the optimal τBayes\tau_{\mathrm{Bayes}}. The error rates are estimated by

P^fa(τ)=1∣Dr,N∣∑ri∈Dr,N1(ri>τ),(33)\widehat{P}_{\mathrm{fa}}(\tau)=\frac{1}{|\mathcal{D}_{r,N}|}\sum_{r_i\in\mathcal{D}_{r,N}}\mathbf{1}(r_i>\tau), \tag*{(33)}
P^miss(τ)=1∣Dr,Y∣∑ri∈Dr,Y1(ri<τ),(34)\widehat{P}_{\mathrm{miss}}(\tau)=\frac{1}{|\mathcal{D}_{r,Y}|}\sum_{r_i\in\mathcal{D}_{r,Y}}\mathbf{1}(r_i<\tau), \tag*{(34)}

where 1(⋅)\mathbf{1}(\cdot) is an indicator function. Plugging in the estimated error rates, the user gets the estimated overall risk

R^(πY,CfaN,CfrY,τ)=CfaN(1−πY)P^fa(τ)+CfrYπYP^miss(τ).(35)\widehat{R}(\pi_Y,C_{\mathrm{fa}}^N,C_{\mathrm{fr}}^Y,\tau)=C_{\mathrm{fa}}^N(1-\pi_Y)\widehat{P}_{\mathrm{fa}}(\tau)+C_{\mathrm{fr}}^Y\pi_Y\widehat{P}_{\mathrm{miss}}(\tau). \tag*{(35)}

Note that this is the decision cost function (DCF), for example, used in NIST SRE [22, Eq. (2)]. If the threshold is set according to Bayes decision rule τBayes=log⁡((1−πY)CfaN/(πYCfrY))\tau_{\mathrm{Bayes}}=\log\left((1-\pi_Y)C_{\mathrm{fa}}^N/(\pi_YC_{\mathrm{fr}}^Y)\right), the resulting DCF is an approximation of Bayes risk in Eq. (16), where the two types of error rates area are approximated by counting rather than integration.

Hence, when CfaN=CfrY=1C_{\mathrm{fa}}^N=C_{\mathrm{fr}}^Y=1, the property of EER holds. However, since P^fa(τ)\widehat{P}_{\mathrm{fa}}(\tau) and P^miss(τ)\widehat{P}_{\mathrm{miss}}(\tau) are not continuous functions of τ\tau anymore, it may be infeasible to find a τEER\tau_{\mathrm{EER}} so that Pfa(τEER)P_{\mathrm{fa}}(\tau_{\mathrm{EER}}) is exactly equal to Pmiss(τEER)P_{\mathrm{miss}}(\tau_{\mathrm{EER}}). As an approximation, the threshold can be set to

τ^EER≈arg min⁡τ∣P^miss(τ)−P^fa(τ)∣,(36)\hat{\tau}_{\mathrm{EER}} \approx\underset{\tau}{\operatorname{arg\,min}}\left|\hat{P}_{\mathrm{miss}}(\tau)-\hat{P}_{\mathrm{fa}}(\tau)\right|, \tag*{(36)}

and the EER can be approximated as

EER^≈(P^miss(τ^EER)+P^fa(τ^EER))/2.(37)\widehat{\mathrm{EER}} \approx\left(\hat{P}_{\mathrm{miss}}(\hat{\tau}_{\mathrm{EER}})+\hat{P}_{\mathrm{fa}}(\hat{\tau}_{\mathrm{EER}})\right)/2. \tag*{(37)}

The same requirements in the previous subsection are satisfied (or assumed to be true). In the rest of the paper, we also assume that the detector produces perfect LLRs.

Detection for Partial Spoof

Alignment between ground-truth and detector output

In a partial spoof scenario, an utterance is a concatenation of at least one real and one fake segment. The first task is to make a decision on each segment.

The setup is different from the utterance-level binary classification in the previous section. A major reason is that segments have arbitrary length, while a detector may only produce a score at a uniform time interval. This leads to an alignment issue for evaluation.

Before discussing different ways of handling the alignment issue, we need to agree on the principle of evaluation: for evaluation that need both ground truth and model output, the ground truth should be the SAME regardless of model behavior.

There may be three ways (shown in Figure 4) to handle that:

Figure 4. Three ways of solving alignment issue between ground truth and model outputs for evaluation of partial spoofing detection.

  1. Converting the ground-truth labels so that a ground-truth label can be assigned at the same uniform interval.

  2. Converting the detector’s output scores to a score for each of the segment defined by the ground-truth label.

  3. Converting both the ground-truth labels and the model outputs so that a boundary is inserted whenever it hits the boundary of the ground truth OR that of a uniform segment.

  4. Converting both the ground-truth labels and the model outputs by splitting both with an interval Δ>0\Delta> 0.

We can argue that the first strategy is suboptimal because it violates the principle we agree on. A consequence of violating the principle is that we need additional ‘agreement’ on how to convert ground-truth labels when there is ambiguity across the fixed-length interval (e.g., the left- and right-most ‘N’ in middle left of Figure 4).7

Furthermore, the conversion of ground-truth label is affected by the detector’s capability, (which should NOT be). If two detectors predict a score per 8ms and 15ms, respectively, their ‘ground-truth’ labels are different by nature. Evaluation results using different ground truth are not comparable.

The 3rd strategy is also against the principle. The converted ground-truth depends on the behavior of the detector.

The 2nd strategy is better because the ground-truth never changes. What changes is the model’s output — if the detector produces a score every 8ms, it has to include a post-processing module so that a score can be obtained for each of the segment defined by the ground-truth label. It is the detector’s responsibility to produce a score in the format required by the evaluation metric.

The 4th strategy uses an interval Δ\Delta independent of the detector’s design. If Δ\Delta is small enough, we can get aligned ground-truth and model outputs.

Problem setup

Regardless of the choice, we can wrap the definition of the task as this: the user needs to guess or make a decision whether the input segment, which spans from time tst_s to tet_e of the input utterance x∈Xx \in\mathcal{X}, is real or fake. The decision is binary, and the target label can be Y={HY,HN}\mathcal{Y}=\{H_{\mathrm{Y}},H_{\mathrm{N}}\}, where

HY:x(ts,te) is REAL,H_{\mathrm{Y}}:x(t_s,t_e)\text{ is REAL},
HN:x(ts,te) is FAKE.H_{\mathrm{N}}:x(t_s,t_e)\text{ is FAKE}.

The user action aa can be from A={ACCEPT,REJECT}\mathcal{A}=\{\mathrm{ACCEPT},\mathrm{REJECT}\}:

ACCEPT\mathrm{ACCEPT}: user claims that x(ts,te)x(t_s,t_e) is REAL,

REJECT\mathrm{REJECT}: user claims that x(ts,te)x(t_s,t_e) is FAKE.

Segment EER

Originally segment EER [9] assumes the first alignment strategy. Accordingly, the (ts,te)(t_s,t_e) for each sample is defined by the detector’s time resolution: the time interval when the detector produces a score. The value of te−tst_e-t_s is equal to the ‘time resolution’. The Bayes decision, decision risk, and the EER can be derived in the same manner as the utterance-level classification in Section A.1. The time information (ts,te)(t_s,t_e) does not affect the error cost, and all the samples are assumed to be independent from each other.

Range EER

False rejection and false acceptance rate. The reason to switch to range EER is argued to be an ambiguity issue when converting the ground-truth labels [9]. The mitigating strategy is the range EER. Here is one detailed explanation of the idea.

Range-EER assumes that the 4th alignment strategy. The problem setup is similar to the segment EER, but the data to be scored becomes x(t,t+Δ)x(t,t+\Delta)—we need a detector can produce a score for x(t,t+Δ)x(t,t+\Delta), ∀t,∀Δ\forall t,\forall\Delta.8

Without loss of generality, let us assume that one utterance has only one fake segment (ts,te)(t_s,t_e). The number of (sub-) segments is te−tsΔ\frac{t_e-t_s}{\Delta}.9 Let the score r(t)r(t) be a function of time tt. Let the decision threshold be τ\tau and the LLR score of the ii-th sub-segment be r(ts+iΔ)r(t_s+i\Delta); we can then compute the false acceptance rate as

P^fa(τ)=lim⁡Δ→01(te−ts)/Δ∑i=1te−tsΔ1(r(ts+iΔ)>τ)(38)\widehat{P}_{\mathrm{fa}}(\tau)=\lim_{\Delta\to0}\frac{1}{(t_e-t_s)/\Delta}\sum_{i=1}^{\frac{t_e-t_s}{\Delta}}\mathbf{1}(r(t_s+i\Delta)>\tau) \tag*{(38)}
=lim⁡Δ→01te−ts∑i=1te−tsΔ1(r(ts+iΔ)>τ)Δ(39)=\lim_{\Delta\to0}\frac{1}{t_e-t_s}\sum_{i=1}^{\frac{t_e-t_s}{\Delta}}\mathbf{1}(r(t_s+i\Delta)>\tau)\Delta \tag*{(39)}
=1te−ts∫tste1(r(t)>τ) dt(40)=\frac{1}{t_e-t_s}\int_{t_s}^{t_e}\mathbf{1}(r(t)>\tau)\,dt \tag*{(40)}

where 1(⋅)\mathbf{1}(\cdot) is an indicator function. By taking the limit that Δ→0\Delta\to0, the integration is obtained based on the definition of Riemann sum.10 The visual intuition is that P^fa(τ)\widehat{P}_{\mathrm{fa}}(\tau) corresponds to the ratio of the interval wherein the score r(t)r(t) within the interval is above the threshold τ\tau.

Intuitively, given an evaluation set, we can concatenate all the (ground-truth) fake segments as well as their score functions into a single r(t)r(t). The definition of false acceptance is simply

P^fa(τ)=1TN∫0TN1(r(t)>τ) dt,(41)\widehat{P}_{\mathrm{fa}}(\tau)=\frac{1}{T_N}\int_0^{T_N}\mathbf{1}(r(t)>\tau)\,dt, \tag*{(41)}

where TNT_N is the length of the concatenated fake segment. Similarly, we can define the false rejection rate as

P^miss(τ)=1TY∫0TY1(r(t)<τ) dt(42)\widehat{P}_{\mathrm{miss}}(\tau)=\frac{1}{T_Y}\int_0^{T_Y}\mathbf{1}(r(t)<\tau)\,dt \tag*{(42)}

The above definitions are slightly different from those in the original paper in two aspects: 1) the fake (or real) segments are concatenated into a single trunk, which is to simplify the notation and does not affect the result11; 2) the definition takes the limit of Δ→0\Delta\to0 and turns the summation into integration. Of course, in practice, we have to implement it via summation with a small Δ\Delta.

Bayes decision? Range EER simply finds the threshold τEER\tau_{\mathrm{EER}} so that P^miss(τEER)=P^fa(τEER)\widehat{P}_{\mathrm{miss}}(\tau_{\mathrm{EER}})=\widehat{P}_{\mathrm{fa}}(\tau_{\mathrm{EER}}). This definition is not refutable. However, the question is whether this operation point τEER\tau_{\mathrm{EER}} corresponds to the maximum decision risk (w.r.t to the prior) when taking a Bayes decision.

Assuming uncalibrated scores s(t)s(t) and decision making for tt independently, we can follow the optimal Bayes decision in § A.1.1 write the policy as

log⁡p(s(t)∣HY)p(s(t)∣HN)⋛ACCEPTREJECTlog⁡((1−πY)CfaNπYCfrY),(43)\log\frac{p(s(t)\mid H_Y)}{p(s(t)\mid H_N)} \underset{\mathrm{REJECT}}{\overset{\mathrm{ACCEPT}}{\gtreqless}} \log\left(\frac{(1-\pi_Y)C_{\mathrm{fa}}^N}{\pi_Y C_{\mathrm{fr}}^Y}\right), \tag*{(43)}

where τBayes≜log⁡((1−πY)CfaNπYCfrY)\tau_{\mathrm{Bayes}}\triangleq\log\left(\frac{(1-\pi_Y)C_{\mathrm{fa}}^N}{\pi_Y C_{\mathrm{fr}}^Y}\right) is the decision threshold defined by the prior and costs. Then we can let r(t)≜LLR⁡(s(t))≜log⁡p(s(t)∣HY)p(s(t)∣HN)r(t)\triangleq\operatorname{LLR}(s(t))\triangleq\log\frac{p(s(t)\mid H_Y)}{p(s(t)\mid H_N)} and write the decision risk (tentatively) as

R(πY,CfaN,CfrY)(44)R(\pi_Y,C_{\mathrm{fa}}^N,C_{\mathrm{fr}}^Y) \tag*{(44)}
=CfaN(1−πY)1TN∫0TN∫τBayes+∞p(r(t)∣HN) dr dt(45)=C_{\mathrm{fa}}^N(1-\pi_Y)\frac{1}{T_N}\int_0^{T_N}\int_{\tau_{\mathrm{Bayes}}}^{+\infty}p(r(t)\mid H_N)\,dr\,dt \tag*{(45)}
+CfrYπY1TY∫0TY∫−∞τBayesp(r(t)∣HY) dr dt(46)+C_{\mathrm{fr}}^Y\pi_Y\frac{1}{T_Y}\int_0^{T_Y}\int_{-\infty}^{\tau_{\mathrm{Bayes}}}p(r(t)\mid H_Y)\,dr\,dt \tag*{(46)}

The difference from the case of conventional binary classification (Eq.(16)) is that the score is time-variant, and r(t)r(t) can be treated as a random process.12

To simplify this double integration, we assume that r(t)r(t) is stationary: p(r(t)∣H)=p(r∣H)p(r(t)\mid H)=p(r\mid H). Consequently, the integrals over tt is averaged out:

R(πY,CfaN,CfrY)=CfaN(1−πY)∫τBayes+∞p(r∣HN) dr+CfrYπY∫−∞τBayesp(r∣HY) dr.(47)\begin{aligned} R(\pi_Y,C_{\mathrm{fa}}^N,C_{\mathrm{fr}}^Y) \\ &=C_{\mathrm{fa}}^N(1-\pi_Y)\int_{\tau_{\mathrm{Bayes}}}^{+\infty}p(r\mid H_N)\,dr+C_{\mathrm{fr}}^Y\pi_Y\int_{-\infty}^{\tau_{\mathrm{Bayes}}}p(r\mid H_Y)\,dr. \tag*{(47)} \end{aligned}

Under the stationary assumption, the risk becomes in the same format as the case of conventional binary classification (Eq.(16)). Similar to the proof in the previous section, by setting the derivative to zero we can obtain the maximum decision risk at the Bayes threshold τEER=τ(πY∗)\tau_{\mathrm{EER}}=\tau(\pi_Y^*) where:

∫τEER+∞p(r∣HN) dr=∫−∞τEERp(r∣HY) dr.(48)\int_{\tau_{\mathrm{EER}}}^{+\infty}p(r\mid H_N)\,dr=\int_{-\infty}^{\tau_{\mathrm{EER}}}p(r\mid H_Y)\,dr. \tag*{(48)}

The next step is to link above integration with the definitions of P^fa(τ)\widehat{P}_{\mathrm{fa}}(\tau) and P^miss(τ)\widehat{P}_{\mathrm{miss}}(\tau). We must invoke the property of ergodicity: the time-average of a single realization of a stochastic process (over a sufficiently long period) converges to the ensemble average across all possible realizations. Assuming that r(t)r(t) is ergodic, as the total dataset duration grows large (TN→∞T_N\to\infty), the empirical time-averaged false acceptance rate converges almost surely to the theoretical ensemble probability:

lim⁡TN→∞P^fa(τ)=lim⁡TN→∞1TN∫0TN1(r(t)>τ) dt(49)\lim_{T_N\to\infty}\widehat{P}_{\mathrm{fa}}(\tau)=\lim_{T_N\to\infty}\frac{1}{T_N}\int_0^{T_N}\mathbf{1}(r(t)>\tau)\,dt \tag*{(49)}
=Er[1(r>τ)∣HN](50)=\mathbb{E}_r[\mathbf{1}(r>\tau)\mid H_N] \tag*{(50)}
=∫τ+∞p(r∣HN) dr.(51)=\int_{\tau}^{+\infty}p(r\mid H_N)\,dr. \tag*{(51)}

Similarly, we have

lim⁡TY→∞P^miss(τ)=lim⁡TY→∞1TY∫0TY1(r(t)<τ) dt(52)\lim_{T_Y\to\infty}\widehat{P}_{\mathrm{miss}}(\tau)=\lim_{T_Y\to\infty}\frac{1}{T_Y}\int_0^{T_Y}\mathbf{1}(r(t)<\tau)\,dt \tag*{(52)}
=Er[1(r<τ)∣HY](53)=\mathbb{E}_r[\mathbf{1}(r<\tau)\mid H_Y] \tag*{(53)}
=∫−∞τp(r∣HY) dr.(54)=\int_{-\infty}^{\tau}p(r\mid H_Y)\,dr. \tag*{(54)}

Hence, the threshold τEER\tau_{\mathrm{EER}} should satisfy that

lim⁡TY→∞P^miss(τEER)=∫τEER+∞p(r∣HN) dr=∫−∞τEERp(r∣HY) dr(55)\lim_{T_Y\to\infty}\widehat{P}_{\mathrm{miss}}(\tau_{\mathrm{EER}})=\int_{\tau_{\mathrm{EER}}}^{+\infty}p(r\mid H_N)\,dr=\int_{-\infty}^{\tau_{\mathrm{EER}}}p(r\mid H_Y)\,dr \tag*{(55)}
=lim⁡TN→∞P^fa(τEER).(56)=\lim_{T_N\to\infty}\widehat{P}_{\mathrm{fa}}(\tau_{\mathrm{EER}}). \tag*{(56)}

Hence, on a large evaluation set, finding the range-EER is likely to have the same interpretation as the conventional EER: the maximum risk w.r.t the Bayes decision threshold (or the prior).

However, the above derivation requires

  1. Stationary assumption: p(r(t)∣H)≡p(r∣H)p(r(t)|H) \equiv p(r|H).

  2. Ergodic assumption: the time-average of a single realization of a stochastic process (r(t))(r(t)) converges to the ensemble average across all possible realizations ER(t)E_R(t).

  3. LLR r(t)r(t) is used for optimal Bayes decision making and decision costs Cfa=Cfr=1C_{\mathrm{fa}} = C_{\mathrm{fr}} = 1.

Whether the assumptions are satisfied in practice is another question.

In implementation. Based on the ergodicity, we can implement the two error rates based on Eqs. (41)-(42):

R^(πY,CfaN,CfrY)(57)\widehat{R}(\pi_Y,C_{\mathrm{fa}}^N,C_{\mathrm{fr}}^Y) \tag*{(57)}
=CfaN(1−πY)P^fa(τ)+CfrYπYP^miss(τ)(58)=C_{\mathrm{fa}}^N(1-\pi_Y)\widehat{P}_{\mathrm{fa}}(\tau)+C_{\mathrm{fr}}^Y\pi_Y\widehat{P}_{\mathrm{miss}}(\tau) \tag*{(58)}
=CfaN(1−πY)TN∫0TN1(r(t)>τBayes) dt(59)=\frac{C_{\mathrm{fa}}^N(1-\pi_Y)}{T_N}\int_0^{T_N}1(r(t)>\tau_{\mathrm{Bayes}})\,\mathrm{d}t \tag*{(59)}
+CfrYπYTY∫0TY1(r(t)<τBayes) dt(60)+\frac{C_{\mathrm{fr}}^Y\pi_Y}{T_Y}\int_0^{T_Y}1(r(t)<\tau_{\mathrm{Bayes}})\,\mathrm{d}t \tag*{(60)}

The computation recipe to compute the risk is:

  1. Given a large evaluation set, we concatenate the ground-truth fake and real segments into two long utterances with duration TNT_N and TYT_Y. We also concatenate the output of the models r(t)r(t).

  2. Given a threshold τ\tau, we follow Eqs. (41)-(42) (or the recipe in Range-EER paper) and compute P^fa(τ)\widehat{P}_{\mathrm{fa}}(\tau) and P^miss(τ)\widehat{P}_{\mathrm{miss}}(\tau).

  3. We plug them into Eq. (60) and compute R^(πY,CfaN,CfrY)\widehat{R}(\pi_Y,C_{\mathrm{fa}}^N,C_{\mathrm{fr}}^Y).

Conclusion

Range EER is linked to conventional binary classification evaluation but measures detection performance continuously across time. Under assumptions of stationarity and ergodicity in the score process, Range EER retains the theoretical foundation of conventional EER and represents the maximum decision risk under a uniform loss function with respect to the Bayes decision threshold.

The assumptions on the score process, the decision cost, and so on are introduced to link range EER with conventional EER. Future work has to re-think whether those assumptions are necessary or solid.

References

  1. [1]Yu Zhang, Baotong Tian, Lin Zhang, and Zhiyao Duan, “PartialEdit: Identifying partial deepfakes in the era of neural speech editing,” in Proc. Interspeech, 2025, pp. 5353–5357.arxiv.org/abs/2506.02958
  2. [2]Lin Zhang, Xin Wang, Erica Cooper, Nicholas Evans, and Junichi Yamagishi, “The PartialSpoof database and countermeasures for the detection of short fake speech segments embedded in an utterance,” IEEE/ACM Trans. Audio, Speech, Lang. Process., vol. 31, pp. 813–825, 2023.DOI
  3. [3]Hieu-Thi Luong, Haoyang Li, Lin Zhang, Kong Aik Lee, and Eng Siong Chng, “LlamaPartialSpoof: An LLM-driven fake speech dataset simulating disinformation generation,” in Proc. ICASSP, 2025, pp. 1–5.arxiv.org/abs/2409.14743
  4. [4]Arun Babu, Changhan Wang, Andros Tjandra, Kushal Lakho-tia, Qiantong Xu, Naman Goyal, Kritika Singh, Patrick von Platen, Yatharth Saraf, Juan Pino, Alexei Baevski, Alexis Conneau, and Michael Auli, “XLS-R: Self-supervised cross-lingual speech representation learning at scale,” in Proc. Interspeech, 2022, pp. 2278–2282.arxiv.org/abs/2111.09296
  5. [5]Junyan Wu, Wei Lu, Xiangyang Luo, Rui Yang, Qian Wang, and Xiaochun Cao, “Coarse-to-fine proposal refinement framework for audio temporal forgery detection and localization,” in Proc. ACM Int. Conf. Multimedia (ACM MM), 2024, pp. 7395–7403.DOI
  6. [6]Inbal Rimon, Oren Gal, and Haim Permuter, “Split and conquer partial deepfake speech,” arXiv preprint arXiv:2604.02913, 2026.arxiv.org/abs/2604.02913
  7. [7]Jiafeng Zhong, Bin Li, and Jiangyan Yi, “Enhancing partially spoofed audio localization with boundary-aware attention mechanism,” in Proc. Interspeech, 2024, pp. 4838–4842.arxiv.org/abs/2407.21611
  8. [8]Yuchen Mao, Wen Huang, and Yanmin Qian, “Localizing speech deepfakes beyond transitions via segment-aware learning,” in Proc. ICASSP, 2026, pp. 16507–16511.
  9. [9]Lin Zhang, Xin Wang, Erica Cooper, Nicholas Evans, and Junichi Yamagishi, “Range-based equal error rate for spoof localization,” in Proc. Interspeech, 2023, pp. 3212–3216.arxiv.org/abs/2305.17739
  10. [10]Dinfeng Shi, Yujie Zhong, Qiong Cao, Lin Ma, Jia Li, and Dacheng Tao, “TriDet: Temporal action detection with relative boundary modeling,” in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition (CVPR), 2023, pp. 18857–18866.arxiv.org/abs/2303.07347
  11. [11]Zhi Tian, Chunhua Shen, Hao Chen, and Tong He, “FCOS: Fully convolutional one-stage object detection,” in Proc. IEEE/CVF Int. Conf. Computer Vision (ICCV), 2019, pp. 9626–9635.arxiv.org/abs/1904.01355
  12. [12]Chen-Lin Zhang, Jianxin Wu, and Yin Li, “ActionFormer: Localizing moments of actions with transformers,” in Proc. European Conf. Computer Vision (ECCV), 2022, pp. 492–510.arxiv.org/abs/2202.07925
  13. [13]Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár, “Focal loss for dense object detection,” in Proc. IEEE Int. Conf. Computer Vision (ICCV), 2017, pp. 2999–3007.
  14. [14]Gregory P Meyer, “An alternative probabilistic interpretation of the huber loss,” in Proc. CVPR. IEEE, 2021, pp. 5257–5265.arxiv.org/abs/1911.02088
  15. [15]Koji Okabe, Takafumi Koshinaka, and Koichi Shinoda, “Attentive statistics pooling for deep speaker embedding,” in Proc. Interspeech, 2018, pp. 2252–2256.DOI
  16. [16]Tianwei Lin, Xiao Liu, Xin Li, Errui Ding, and Shilei Wen, “BMN: Boundary-matching network for temporal action proposal generation,” in Proc. IEEE/CVF Int. Conf. Computer Vision (ICCV), 2019, pp. 3888–3897.arxiv.org/abs/1907.09702
  17. [17]Navaneeth Bodla, Bharat Singh, Rama Chellappa, and Larry S. Davis, “Soft-NMS: Improving object detection with one line of code,” in Proc. IEEE Int. Conf. Computer Vision (ICCV), 2017, pp. 5562–5570.arxiv.org/abs/1704.04503
  18. [18]Hieu-Thi Luong, Inbal Rimon, Haim Permuter, Kong Aik Lee, and Eng Siong Chng, “Robust localization of partially fake speech: Metrics and out-of-domain evaluation,” in Proc. APSIPA Annual Summit and Conference (APSIPA ASC), 2025, pp. 2205–2210.arxiv.org/abs/2507.03468
  19. [19]Junichi Yamagishi, Christophe Veaux, and Kirsten MacDonald, “CSTR VCTK corpus: English multi-speaker corpus for CSTR voice cloning toolkit (version 0.92),” University of Edinburgh, The Centre for Speech Technology Research, 2019.DOI
  20. [20]Niko Brümmer, Luciana Ferrer, and Albert Swart, “Out of a hundred trials, how many errors does your speaker verifier make?,” in Proc. Interspeech, 2021, pp. 1059–1063.arxiv.org/abs/2104.00732
  21. [21]Richard O. Duda, Peter E. Hart, and David G. Stork, Pattern classification, Wiley, New York, 2nd ed edition, 2001.

Paper details

vlnc:W_g523bwb2
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents