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 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 with , where and define a time range of a hypothesized spoof interval and 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 as an instant , where is the number of instants at that level. For every instant at every pyramid level , the CM produces one proposal . is the spoof score of the interval defined by starting time and end time :
where is the frame resolution and is the stride at level $l} (§ 2.1). Although the values of and are largely decided by , the additional shifting terms and help to predict the start time and end time more precisely. Among them, are the distances from time to the actual start time or end time via probabilistic modeling (§ 2.2); are bounded residuals used to further refine each boundary by up to half a stride (§ 2.2). Finally, 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 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 has stride frames.
Each level is then processed by one SGP block proposed in [10]. The core function is defined as follows:
where is the feature sequence of the level with instants, and is its mean over the instants. is computed once from the mean and applied to every instant, so each instant is weighted by the utterance-level context. , and are depth-wise convolutions with two window sizes and , 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 in seconds, exact as released. A bonafide utterance has . 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, channels and ReLU, and the last layer projects to one score.
Let denote the SGP block’s output at level , then for six levels there are six outputs . The head takes each separately, and the same head is applied to all six levels. Its output has the same length as its input, which gives one spoof score per instant. The same is used as the spoof score of the interval predicted at . Each instant 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 . The head is trained with the binary focal loss [13] as follows:
where and are the sets of positive and negative instants of a batch. is the IoU between the interval predicted at and the reference spoofed interval assigned to . It weights the positives, so that 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 . According to Eq. (1), this requires the distances and the residuals . 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 of one level. Start and end scores are predicted for all instants of that level; instant adds its own offset to the 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 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, and , 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 . For instant , it adjusts the scores of and of its neighbours on each side. Take the start time prediction for example: for , the probability of it or its neighbours being the start is , and the distance to start is the expectation .
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, force the predicted interval to contain , while a spoofed interval shorter than the stride may start after or end before it. We therefore proposed a residual head to output . The residuals can push the start past to the right, or the end past to the left, by up to half a stride.
With the distances and residuals, Eq. (1) gives the predicted interval . Then we can train the heads by comparing the interval predicted at and the reference spoofed interval assigned to . As shown in Figure 1, Huber loss and IoU loss are adopted:
where for and otherwise is the Huber function [14], ms is the frame resolution, and is the IoU between and . The two losses complement each other: measures how well overlaps , but an error of a few milliseconds barely changes it on a long interval. To make the prediction more precise, 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, , and the first term of 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 , 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 . The head is trained with class-balanced binary cross-entropy loss . 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 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 , where brings to the scale of 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 for XLS-R, 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: , and a gated threshold of 0.2 on .
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 () 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. is the mean absolute error of the predicted start and end times, in ms. is the percentage of reference spoofed intervals that a CM finds. A reference interval is matched if its best predicted interval has , 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.
| Model | Point EER | Range EER | MAE s / e | Matched |
| MRM[2, 9] | 12.84 | 30.40 | – | – |
| MRM, re-impl.† | 15.57 | 16.07 | 13.9 / 15.2 | 69.0 |
| CFPRF[18] | 7.61 | – | – | – |
| SaC[6] | 6.55 | – | – | – |
| BAM[7] | 5.20 | – | – | – |
| Ours, w/o utt | 6.01 | 6.89 | 9.8 / 9.3 | 95.8 |
| Ours, ungated | 5.00 | 5.55 | 8.7 / 9.3 | 94.5 |
| Ours, gated | 5.00 | 5.56 | 8.7 / 9.3 | 94.3 |
| Ours, frame head | 5.89 | 6.36 | 14.2 / 17.9 | 78.9 |
| Ours, max fusion | 4.92 | 5.34 | 13.0 / 14.3 | 80.6 |
Table 1. Results on PartialSpoof. †: Our re-implementation.
| Model | Zero-shot full | Zero-shot partial | Zero-shot both | Fine-tuned full | Fine-tuned partial | Fine-tuned both |
| MRM[2, 18] | 40.98 | 32.76 | 44.54 | 6.04 | 10.31 | 8.20 |
| CFPRF[5, 18] | 36.22 | 35.01 | 41.47 | 2.89 | 8.72 | 5.96 |
| Ours, ungated | 30.01 | 26.18 | 34.39 | 3.23 | 1.76 | 2.85 |
| Ours, gated | 30.43 | 26.10 | 34.63 | 3.04 | 1.71 | 2.78 |
| Ours, frame head | 28.75 | 24.47 | 33.84 | 0.83 | 2.00 | 1.31 |
| Ours, max fusion | 29.57 | 24.60 | 33.79 | 0.87 | 1.77 | 1.33 |
| Ours, utterance head | 37.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.
| Model | Point EER | Range EER | MAE s / e | Matched |
| Trained on the released labels | ||||
| BAM†[7, 1] | 3.80 | – | – | – |
| MRM, re-impl. | 7.43 | 7.51 | 10.7 / 127.3 | 89.4 |
| Ours, ungated | 7.23 | 7.65 | 25.2 / 82.7 | 99.0 |
| Trained on the realigned labels | ||||
| MRM, re-impl. | 0.53 | 0.54 | 10.0 / 8.4 | 99.0 |
| Ours, ungated | 1.05 | 0.78 | 7.2 / 5.8 | 99.5 |
| Ours, gated | 1.05 | 0.79 | 7.2 / 5.8 | 99.4 |
| Ours, frame head | 0.41 | 0.44 | 8.4 / 6.8 | 99.1 |
| Ours, max fusion | 0.44 | 0.43 | 9.6 / 7.4 | 99.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:
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.
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 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 is real or fake. The decision is binary, and the target label can be , where
The user action can be from :
The user uses a detection system when making the decision, the is consumed and converted into a score , where the value indicates how likely that is REAL. Intuitively, the user should take if is high enough, indicating a higher chance of being real.
The user may take an incorrect action: a real sample () may be falsely rejected (miss), while a fake sample () may be falsely accepted (false acceptance). Incorrect actions can be assigned decision costs. Given an action and the ground-truth label , we use to denote the decision-cost function . An example is given in Table 4.
| Action = ACCEPT | Action = REJECT | |
| True class = Y | 0 | |
| True class = N | 0 |
Table 4. Values of decision cost . Subscript fa and fr denote false ACCEPT and REJECT, respectively.
Following the practice of Bayes decision [21], the user’s conditional risk when taking an action given the input is computed as
where is the posterior probability of class when observing . By plugging in the possible values of listed in Table 4, we can compute the conditional risks when taking the two possible actions
The Bayes decision rule tells the user to select the action with a smaller risk [21], i.e.,
With Eqs. (7) and (8), the policy above can be re-written as
From the Bayes’ formula, the user knows that and , where is the prior probability of . The user can then further rewrite the policy in a log-ratio form as
The term on the left-hand side of Eq. (11) is the LLR of the observed , . This is the only term that depends on the input speech data (via ). The logit 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 , the detector produces , 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 be a short-hand notation of the LLR value corresponding to . With the decision costs plugged in, the overall risk when the user follows the optimal Bayes decision policy in Eq. (11) becomes:
where and correspond to the probabilities of false ACCEPT and REJECT, respectively,
and where is the optimal Bayes decision threshold decided by the user’s asserted prior and decision costs.6
The notion that the overall risk is a function of reflects the fact that, given the 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 and the corresponding overall risk are changed automatically.
It has been shown that [20 § 2], given , EER is the maximum overall risk when the user varies .
where the threshold is a function of . The that yields the maximum corresponds to the threshold , which also satisfies , hence the name equal error rate.
Here, we write down the proof again. Let be a shorthand of the decision risk. By taking the first-order derivative w.r.t. , we have
where the derivatives of the two error rates are
and where
Because of the property that the LLR of LLR is LLR [20], i.e., , at any decision threshold , we know that
With the above four equations, it can be shown that
Hence, the 2nd and 4th terms in Eq. (22) cancel out, and Eq. (22) becomes
Taking the 2nd order derivative, we have
Hence, has a global maximum when the variable satisfies that . In other words, the decision threshold makes the two error rates equal.
In short, EER is the maximum risk w.r.t the user’s asserted prior . The above interpretation requires that
The decision is based on perfect LLRs , rather than uncalibrated scores.
The decision is based on the Bayes decision policy (11).
The risk 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 and 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 and be the LLRs of the and samples in a test set. Let a general threshold be , which may be different from the optimal . The error rates are estimated by
where is an indicator function. Plugging in the estimated error rates, the user gets the estimated overall risk
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 , 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 , the property of EER holds. However, since and are not continuous functions of anymore, it may be infeasible to find a so that is exactly equal to . As an approximation, the threshold can be set to
and the EER can be approximated as
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.
Converting the ground-truth labels so that a ground-truth label can be assigned at the same uniform interval.
Converting the detector’s output scores to a score for each of the segment defined by the ground-truth label.
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.
Converting both the ground-truth labels and the model outputs by splitting both with an interval .
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 independent of the detector’s design. If 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 to of the input utterance , is real or fake. The decision is binary, and the target label can be , where
The user action can be from :
: user claims that is REAL,
: user claims that is FAKE.
Segment EER
Originally segment EER [9] assumes the first alignment strategy. Accordingly, the for each sample is defined by the detector’s time resolution: the time interval when the detector produces a score. The value of 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 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 —we need a detector can produce a score for , .8
Without loss of generality, let us assume that one utterance has only one fake segment . The number of (sub-) segments is .9 Let the score be a function of time . Let the decision threshold be and the LLR score of the -th sub-segment be ; we can then compute the false acceptance rate as
where is an indicator function. By taking the limit that , the integration is obtained based on the definition of Riemann sum.10 The visual intuition is that corresponds to the ratio of the interval wherein the score within the interval is above the threshold .
Intuitively, given an evaluation set, we can concatenate all the (ground-truth) fake segments as well as their score functions into a single . The definition of false acceptance is simply
where is the length of the concatenated fake segment. Similarly, we can define the false rejection rate as
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 and turns the summation into integration. Of course, in practice, we have to implement it via summation with a small .
Bayes decision? Range EER simply finds the threshold so that . This definition is not refutable. However, the question is whether this operation point corresponds to the maximum decision risk (w.r.t to the prior) when taking a Bayes decision.
Assuming uncalibrated scores and decision making for independently, we can follow the optimal Bayes decision in § A.1.1 write the policy as
where is the decision threshold defined by the prior and costs. Then we can let and write the decision risk (tentatively) as
The difference from the case of conventional binary classification (Eq.(16)) is that the score is time-variant, and can be treated as a random process.12
To simplify this double integration, we assume that is stationary: . Consequently, the integrals over is averaged out:
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 where:
The next step is to link above integration with the definitions of and . 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 is ergodic, as the total dataset duration grows large (), the empirical time-averaged false acceptance rate converges almost surely to the theoretical ensemble probability:
Similarly, we have
Hence, the threshold should satisfy that
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
Stationary assumption: .
Ergodic assumption: the time-average of a single realization of a stochastic process converges to the ensemble average across all possible realizations .
LLR is used for optimal Bayes decision making and decision costs .
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):
The computation recipe to compute the risk is:
Given a large evaluation set, we concatenate the ground-truth fake and real segments into two long utterances with duration and . We also concatenate the output of the models .
Given a threshold , we follow Eqs. (41)-(42) (or the recipe in Range-EER paper) and compute and .
We plug them into Eq. (60) and compute .
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]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]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]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]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]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]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]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]Yuchen Mao, Wen Huang, and Yanmin Qian, “Localizing speech deepfakes beyond transitions via segment-aware learning,” in Proc. ICASSP, 2026, pp. 16507–16511.
- [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]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]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]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]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]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]Koji Okabe, Takafumi Koshinaka, and Koichi Shinoda, “Attentive statistics pooling for deep speaker embedding,” in Proc. Interspeech, 2018, pp. 2252–2256.DOI
- [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]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]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]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]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]Richard O. Duda, Peter E. Hart, and David G. Stork, Pattern classification, Wiley, New York, 2nd ed edition, 2001.



