The threshold is the product

A liveness model outputs a score. The decision your users experience comes from a threshold someone chose, and that choice is rarely in the vendor's datasheet.

Every liveness check ends with a number. The model looks at a face, or a short video of one, and produces a score: how confident it is that a live person was in front of the camera. Then a single comparison turns that number into a yes or a no.

That comparison is where most of the security and most of the user experience of the system is decided. It is also the part that is least often written down.

Two error rates, one dial

ISO/IEC 30107-3 names the two ways a presentation attack detection (PAD) system can be wrong:

  • APCER, attack presentation classification error rate: the share of attacks that were accepted as live.
  • BPCER, bona fide presentation classification error rate: the share of real people who were rejected.

Move the threshold up and fewer attacks get through, but more real users fail. Move it down and the reverse happens. There is no setting where both go to zero, because the two score distributions overlap.

Liveness score distributions with an adjustable decision threshold
2.28%Attacks accepted APCER
6.68%Real users rejected BPCER
Synthetic scores. Move the threshold, then raise the attack quality: the same threshold that looked safe against print attacks lets most of a better attack through.

The chart above uses invented distributions, but the shape is honest. Try raising the attack quality. Nothing about the model changed, and nothing about the threshold changed, yet APCER went from negligible to embarrassing. This is what happens when a system tuned against paper printouts meets a well-made 3D mask or a replayed video on a high-resolution screen.

What a single number hides

A datasheet that says “APCER 0%” is answering a question you did not ask. To read it, you need at least:

Question Why it matters
At what BPCER? 0% APCER is trivial if you reject a quarter of your real users.
Against which attack instruments? The standard reports APCER per species. The worst species is the one an attacker will use.
How many attempts per instrument? Fifty attempts cannot support a claim of 0.1%.
Which capture devices and conditions? Scores shift with cameras, lighting and compression.
Whose threshold? The lab may have tested a stricter setting than the one shipped in the SDK.

The standard also defines a way to report both rates together: BPCER at a fixed APCER, such as BPCER20, the share of real users rejected when the threshold is set so that 5% of attacks get through. It is a more useful number than either rate alone, and it is rarely quoted in sales material.

Computing it yourself

If you have scores from your own test, you do not need the vendor to compute these for you. With bona fide and attack scores in two arrays:

import numpy as np

def apcer_bpcer(bona_fide, attacks, threshold):
    """Decision rule: accept as live when score >= threshold."""
    apcer = np.mean(np.asarray(attacks) >= threshold)
    bpcer = np.mean(np.asarray(bona_fide) < threshold)
    return apcer, bpcer

def bpcer_at_apcer(bona_fide, attacks, target_apcer=0.05):
    """BPCER at the threshold where APCER first drops to the target (BPCER20 for 5%)."""
    for th in np.unique(np.concatenate([bona_fide, attacks])):
        apcer, bpcer = apcer_bpcer(bona_fide, attacks, th)
        if apcer <= target_apcer:
            return th, bpcer
    return None, 1.0

Run it per attack instrument species, not on all attacks pooled. Pooling lets a large number of easy attacks hide a small number of hard ones.

What to ask for

When you evaluate a liveness product, ask for the score, not only the decision. Ask what threshold the SDK ships with and whether you can change it. Ask for error rates at that threshold, per attack type, with the number of attempts behind each one.

A vendor that can answer those questions has thought about the threshold. A vendor that cannot has left the most important decision in the system to a default.