
Face AI · Presentation Attack Detection · Security Engineering
1. Why Face Recognition Alone Is Not Enough
A face recognition network measures identity similarity. A high similarity score does not prove that the camera is observing a physically present person. A printed portrait or replayed screen may contain highly recognizable facial information.
This distinction motivates presentation attack detection (PAD), often called face liveness detection. PAD estimates whether the captured presentation exhibits characteristics of an attack. It cannot independently establish full identity, device integrity, or user authorization.
At AIPractix, liveness is one of the analysis capabilities considered in AttFace-based workflows. The engineering challenge is to combine it with recognition, quality, and application policy in a measurable way.
2. Start With a Threat Model
Different attackers require different defenses. A basic threat inventory may include printed photos, photographs displayed on a second screen, replayed videos, masks, camera feed injection, and a compromised client application.
These are not equivalent threats. A model evaluated on print and replay samples should not be marketed as proven against injection attacks or sophisticated 3D artifacts. A deployment should state which presentation attack instruments, sensors, lighting conditions, and capture paths it has actually tested.
The threat model also determines whether a suspicious attempt is rejected, retried, escalated for review, or supplemented with another authentication factor.
3. Passive and Active Liveness
Passive PAD analyzes captured visual information without explicitly requiring a user challenge. It can create a smoother interaction, but its robustness depends on training data, camera conditions, and attack diversity.
Active PAD asks for an action such as a head movement or a sequence of poses. This can add evidence of interaction, although a predictable challenge may be imitated by replay or injected media. Challenge-response design should consider randomness, timing, accessibility, and anti-automation controls.
A combined approach is possible. It should be justified by measured security benefit rather than assuming that more steps always yield a safer experience.
4. Evaluate With the Right Metrics
PAD evaluation commonly separates attack and bona fide errors. Two useful terms are:
- APCER: proportion of attack presentations incorrectly classified as bona fide for a defined attack set.
- BPCER: proportion of bona fide presentations incorrectly classified as attacks.
A third summary, ACER, is commonly computed as the average of APCER and BPCER in a defined evaluation protocol. A small ACER on one dataset does not establish performance on new attack types, devices, or environments.
In practice, teams should report the test protocol, class distribution, threshold, attack categories, sensor conditions, and confidence intervals where possible. Also measure the failure-to-acquire rate and user retries, because rejected genuine users create operational costs.
5. Put Liveness in the Correct Place
A conceptual enrollment or verification pipeline may be:
Avoid equating a liveness score with identity confidence. PAD and face matching solve different problems, may use different thresholds, and should provide different failure reasons.
6. Calibrate for Real Devices
A single threshold may behave differently across front-facing cameras, kiosk cameras, resolutions, compression levels, and lighting. Validation data should cover deployment devices and realistic operator behavior.
Quality gating matters: motion blur or dark images can degrade both recognition and PAD. However, a quality filter can also change the distribution of samples seen by the liveness model. Evaluate the complete pipeline after changing either component.
Do not tune a threshold on the final held-out test set. Separate development, calibration, and evaluation data to reduce optimistic estimates.
7. Defend the Capture Path
Even strong visual PAD can be bypassed if an attacker controls what frames reach the model. Applications should evaluate camera APIs, emulator and device-integrity signals where appropriate, protected communication to servers, replay controls, and suspicious-session logging.
These measures involve trade-offs. Device integrity checks can exclude legitimate devices; retaining full video can create substantial privacy exposure. Select controls proportionate to risk and preserve a workable fallback path for genuine users.
8. Design for User Experience
Users rarely understand terms such as BPCER. They understand actionable guidance: improve lighting, remove obstructions, hold the camera steady, or contact support after repeated failure.
A retry policy should avoid trapping genuine users in an endless loop. For high-stakes flows, a manual review or alternative authentication channel may be necessary. For low-stakes attendance, the acceptable friction may be different.
9. Practical Deployment Checklist
Before shipping, document attack coverage, capture requirements, threshold ownership, evaluation datasets, score interpretation, monitoring, and incident response. Revalidate after major changes to cameras, preprocessing, model versions, or capture UX.
10. Conclusion
Face liveness is best understood as one control within a broader identity security system. Reliable production deployment requires a clear threat model, defensible evaluation, careful threshold calibration, and a secure capture-to-decision pipeline—not just a convincing demo.




