Face BenchmarkHow face recognition and deepfake detection are measured, from the papers.

ROC AUC: how the curve is drawn and why detectors report it

The Face Benchmark editorsPublishedFigures checked

An ROC curve is drawn by sorting a detector's scores from highest to lowest, lowering the threshold one sample at a time and plotting the false positive rate against the true positive rate after each step (Fawcett, Pattern Recognition Letters, 2006). The area under the resulting steps is the AUC. DeepfakeBench (NeurIPS 2023) reports that area per frame because it does not depend on any one threshold.

This page is the drawing and reading companion to the AUC score explained page in the deepfake detection hub. That page defines the area and its 0.5 and 1.0 reference points; this one stays on the curve itself: how it is built, where the useful points on it are, and why detection benchmarks moved from accuracy to this curve.

01How is an ROC curve drawn?

A deepfake detector outputs a score for each input, higher meaning more likely fake, and a curve needs every one of those scores. Fawcett's procedure is a single sort followed by a scan: "we can simply sort the test instances decreasing by f scores and move down the list, processing one instance at a time and updating TP and FP" (Fawcett, 2006). Before any instance is processed the threshold is effectively infinite, nothing is called fake, and the curve starts at (0, 0). Each time the next instance in the sorted list is a fake, the true positive rate rises by one over the number of fakes; each time it is a real sample, the false positive rate rises by one over the number of reals. After the last instance everything is called fake and the curve ends at (1, 1).

The result is not a smooth line. "Any ROC curve generated from a finite set of instances is actually a step function, which approaches a true curve as the number of instances approaches infinity." In the paper's worked example of 20 instances, each step is labelled with the score threshold that produces it, and "lowering this threshold corresponds to moving from the 'conservative' to the 'liberal' areas of the graph".

In DeepfakeBench the instances are frames: "we sample 32 frames for each video for training and testing", every frame is scored on its own, and the curve is drawn over all frames in the test split with the fake class as the positive (Yan et al., 2023). A video-level curve would instead treat each clip as one instance with one combined score, which changes both the number of points and the shape.

02What do the points on the curve mean?

Each point is one possible detector, the one you would get by fixing the threshold at that score. Fawcett's description of the geography is the most useful guide to reading it. The point (0, 0) "represents the strategy of never issuing a positive classification"; (1, 1) is its opposite, calling everything fake; and "the point (0, 1) represents perfect classification". Between them, "one point in ROC space is better than another if it is to the northwest (tp rate is higher, fp rate is lower, or both)".

The two ends of a curve have names. Points near the left axis belong to detectors that are "conservative: they make positive classifications only with strong evidence so they make few false positive errors", at the cost of missing fakes. Points toward the upper right are "liberal: they make positive classifications with weak evidence", catching most fakes and flagging many real videos with them. Fawcett adds that because "many real world domains are dominated by large numbers of negative instances", the far left of the graph is usually the interesting part. For a detector screening a platform where almost every video is real, the operating region that matters is a narrow strip near zero false positive rate, and the metrics page treats a 1 percent false positive rate as the practical bar.

How an ROC curve is drawn from a detector's scoresA column of six boxes joined by arrows. One: score every test frame; DeepfakeBench samples 32 frames per video. Two: sort the scores from highest to lowest, Fawcett 2006 section 5. Three: lower the threshold one instance at a time, starting at plus infinity, which gives the point (0, 0). Four: after each instance record the pair false positive rate and true positive rate. Five: plot the points, a step function climbing from (0, 0) to (1, 1); the diagonal is random guessing. Six: the area under the steps is the AUC. Red tags mark the start point (0, 0) after the sort and the chance diagonal after the plot.01Score every test frameDeepfakeBench samples 32 frames per video02Sort scores from highest to lowestone sort, O(n log n), Fawcett section 503Lower the threshold one instance at a timestart at plus infinity: nothing is called fakefirst point is (0, 0)04Record (fp rate, tp rate) after each instancea fake raises tp rate, a real raises fp rate05Plot the pointsa step function from (0, 0) to (1, 1)the diagonal is chance06Measure the area under the stepsthat number is the AUC
Figure 1The procedure Fawcett (2006, sections 4 and 5) describes for a scoring classifier, with the deepfake-specific detail from DeepfakeBench (arXiv 2307.01426): frames are the instances and the fake class is the positive. Both read 9 November 2026.

03Where is chance on the curve, and where is the equal error rate?

"The diagonal line y = x represents the strategy of randomly guessing a class." A detector that labels a random 70 percent of inputs as fake catches 70 percent of fakes and flags 70 percent of reals, which is the point (0.7, 0.7); vary the proportion and the point slides along the diagonal. A curve that hugs the diagonal carries no information, and "any classifier that appears in the lower right triangle performs worse than random guessing", which Fawcett notes can be fixed by negating its decisions. In DF40's one-versus-all heatmaps the authors colour 0.5 AUC white for exactly this reason: "white means 0.5 AUC (by chance)" (Yan et al., 2024).

The equal error rate is the one point on the curve where the two error rates match: the false positive rate equals the false negative rate, which is one minus the true positive rate. Geometrically it is where the curve crosses the line from (0, 1) to (1, 0), and it is reported as that shared error, so a lower number is better. DeepfakeBench records EER alongside AUC, AP and accuracy and uses it in its appendix to compare 13 detectors across datasets. EER is a single operating point chosen by a rule rather than by cost, which makes it comparable across papers but rarely the point anyone would deploy at; the cross-dataset generalisation page shows how the same models rank differently once the test set moves, whichever point is read.

04Why do benchmarks report AUC rather than accuracy?

Accuracy is the height of one point on the curve read at one threshold, and Fawcett's paper is partly an argument against relying on it. The "accuracy point" at a 0.5 threshold is, in his Figure 4, an operating point that is "suboptimal", and the best accuracy in his 20-instance example occurs at a threshold of about 0.54 rather than 0.5. Two detectors compared by accuracy are compared at whatever thresholds their authors happened to pick, which is why he recommends against "comparing model performance at a common threshold" when the scores are not calibrated.

The second reason is class balance. ROC curves "are insensitive to changes in class distribution", while accuracy moves with the ratio of fakes to reals, and Fawcett observes that class skews of ten to one and a hundred to one "are very common in real world applications". FaceForensics++ has four fakes for every real video, and its paper's Table 1 reports binary detection accuracy for its baselines: an accuracy of 99.26 percent for XceptionNet on raw video, 95.73 on the c23 release and 81.00 on c40 (Rössler et al., 2019). Those are honest numbers at one threshold on one class ratio. DeepfakeBench, four years later, states that "our benchmark currently adopts the frame level evaluation to build a fair basis for comparison among detectors" and reports AUC as the headline, so that detectors trained by different groups with different thresholds can be ranked on their ordering alone. The cross-dataset scores by model table on this site follows that choice and labels every row with its metric.

05How do two curves compare when they cross?

The area is one number, and two curves with the same area can have different shapes. Fawcett's section 6 gives the tool for choosing between them under a stated cost: an iso-performance line whose slope is set by the class and cost ratios, where "lines 'more northwest' (having a larger TP-intercept) are better". A detector is the best available for some cost and some class balance only if its point lies on the outer boundary of all the points, which the paper names "the ROC convex hull (ROCCH)".

For deepfake detection the practical version is simpler. Read the two curves in the strip that matches the deployment, usually the low false positive region, and prefer the one that is higher there even if its total area is lower. The AUC score explained page quotes Fawcett's warning that a high-AUC classifier can lose to a low-AUC one in a specific region; the curve is where that loss is visible and the area is where it is hidden.

06What should a reader check before trusting an ROC AUC?

Four things, each of which changes the curve without changing the detector. Whether the instances are frames or videos: DeepfakeBench and DF40 both report frame-level AUC as the primary metric, and DF40 reports video-level AUC only for its one video model. Which test set the curve was drawn on: the same Xception weights give 0.9637 on FaceForensics++ c23 and 0.7077 on DFDC in DeepfakeBench's Table 3. How the reported value was chosen: DeepfakeBench averages the top three AUCs recorded during training, while DF40 picks a checkpoint on a validation set, so the two are not the same statistic. And which class is positive: every page on this site treats the fake as the positive class, so a true positive is a caught fake and a false positive is a real video flagged.

The curve also says nothing about the cases on the documented deepfake incidents page, because no detector was run in any of them; it describes how a detector would behave on a test set of the same kind, not on the next clip. No single benchmark score predicts how a detector performs on unseen manipulations, and an ROC AUC is a single benchmark score drawn on one test set. The DF40 dataset page shows what happens to the same baseline when the forgery and the footage change: the area moves from 0.991 to 0.546.

SRCSources

  1. S1
    An introduction to ROC analysis(external)Fawcett, T. Pattern Recognition Letters 27(8), 861 to 874, 2006
    Checked
  2. S2
    DeepfakeBench: A Comprehensive Benchmark of Deepfake Detection(external)Yan, Zhang, Yuan, Lyu, Wu. NeurIPS 2023 Datasets and Benchmarks
    Checked
  3. S3
    FaceForensics++: Learning to Detect Manipulated Facial Images(external)Rössler, Cozzolino, Verdoliva, Riess, Thies, Nießner. ICCV 2019
    Checked
  4. S4
    DF40: Toward Next-Generation Deepfake Detection(external)Yan et al. NeurIPS 2024 Datasets and Benchmarks
    Checked

FAQQuestions

How is an ROC curve constructed?

Sort every test score from highest to lowest, then lower the threshold past one instance at a time, recording the false positive rate and true positive rate after each. The points form a step function from (0, 0) to (1, 1), and Fawcett 2006 gives the procedure as one sort and one scan.

What does the diagonal of an ROC curve mean?

Random guessing. A detector that calls a random fraction of inputs fake lands on the line y = x, so a curve along the diagonal has an AUC of 0.5 and no information; DF40 colours that value white in its heatmaps.

What is the equal error rate on an ROC curve?

The point where the false positive rate equals the false negative rate, found where the curve crosses the line from (0, 1) to (1, 0). DeepfakeBench reports EER beside AUC and compares 13 detectors on it in its appendix.

Why do deepfake papers report AUC instead of accuracy?

Because accuracy is read at one threshold and shifts with the ratio of fakes to reals, while the ROC curve is insensitive to class distribution. FaceForensics++ reported accuracy, an accuracy of 99.26 percent for XceptionNet on raw video; DeepfakeBench adopted frame-level AUC as its basis for fair comparison.

Is frame-level ROC AUC the same as video-level?

No. Frame-level treats each sampled frame as an instance, 32 per video in DeepfakeBench; video-level treats each clip as one instance with a combined score. The points, the shape and the area differ, so the two should not be compared.