Stop Memorising Every Spoof: DINOFAS Anchors on the Live Face Instead
The hard part of face anti-spoofing is not scoring well on the devices it trained on, but holding up under a new camera or an unseen impersonation trick; DINOFAS targets that generalisation gap by shifting the learning target from memorising every spoof to anchoring on what a live face looks like.
On this page
You have a face anti-spoofing scorecard in front of you: on the data your own team collected, the software separates live faces from printed photos and replayed videos with an impressive hit rate. The hard question is a different one, does that judgment still hold under a different camera or a spoof type never seen in training? Assuming a high lab score carries over to the wildly different devices in customers' hands is a common but untested leap: the devices and fakes seen in training are usually not the ones the system meets after launch. Paper [1] treats exactly that drop-off as the main opponent, not a side note.
The Default Judgment: A Lab Score That Should Travel
Name the gate first. Face anti-spoofing, usually shortened to FAS, is the check that decides whether the face in front of a camera belongs to a living person or to someone holding up a substitute; those substitutes are called presentation attacks, or PAs, and in plain terms they are printed photographs, replayed videos and three-dimensional masks. Face unlock, payments and border control all rely on this layer. The paper states an old problem up front: when training and testing data come from the same distribution, deep-learning methods score very well, but under cross-dataset evaluation, with different capture devices, illumination, image quality, attack instruments and environments, performance degrades considerably [1].
Several things drive the cross-dataset drop, and the paper foregrounds one of them: many methods pick up dataset-specific spoof artefacts rather than intrinsic liveness characteristics, the stable cues that make a real live face a real live face. One camera has its fixed sensor noise, one batch of printed photos has its fixed glare, and the model treats those as the decision rule, so the whole thing collapses in a new setting [1]. It is not the only explanation. Collecting diverse real FAS data is expensive and constrained by privacy, which keeps the available training distribution narrow and makes such shortcuts harder to spot; and in its related work the paper notes that existing domain-alignment, adversarial and meta-learning approaches often need multiple source domains, target-domain samples or costly optimisation, so generalisation is bounded by data and compute as well [1]. Blaming the drop entirely on models being too small, or entirely on learning the wrong thing, flattens a multi-cause problem into one. The field has moved from handcrafted texture, frequency and motion descriptors to convolutional networks and then to vision transformers, a family of models that process images with attention, and intra-dataset scores keep climbing while cross-dataset results stay fragile [1].
So the default judgment cannot stand. Inferring from a high score on one set of in-house devices and in-house fakes that the model will also be steady across the wildly different cameras and unseen attacks in customers' hands leaves an entire stretch of distribution shift untested. The paper makes that cross-condition degradation the main opponent, and every design choice that follows is built around it [1].
Change the Anchor: Learn the Live Face, Not Every Spoof
DINOFAS changes the learning target. It reformulates face anti-spoofing as bonafide-centric representation learning: representation learning means getting the model to learn a useful internal description rather than memorising each training image, and bonafide-centric means spending the effort on modelling the distribution of live faces instead of treating every attack as a category to be memorised. The backbone is DINOv3, a vision backbone network pretrained on large amounts of imagery, used here as the base for extracting features [1].
The motivation is practical. Attack types keep appearing: a system trained today on print and replay may meet an unseen mask tomorrow, yet what a live face looks like is comparatively stable. If the model sets its standard on the live side, an unfamiliar attack still has a chance of being rejected simply for not looking live; if the standard is set on each known attack, an unseen class slips straight through. The paper devotes an appendix section to domain-invariant representation learning, meaning keeping device, lighting and image-quality appearance differences out of the decision rule, where a domain is the shared capture condition of a batch of data, so a different device or a different lighting setup counts as a different domain [1].
One clarification: changing the anchor does not mean discarding attack information. The paper does not cut the attack side away; it places that side apart from the liveness side, and the next section explains exactly how [1].
Three Moving Parts: LoRA, Style-Content Split, Two Branches
The framework stacks three parts. The first is low-rank adaptation, LoRA, a cheap fine-tuning method that adds only a small set of trainable parameters to a pretrained model while leaving the main weights untouched; the paper uses it for parameter-efficient adaptation of DINOv3 instead of retraining the whole backbone. The second is attention style-content disentanglement, ASCD, which tries to pull apart how a sample looks, the style, meaning appearance differences from device, lighting and image quality, from whether it is a live face, the content, specifically to reduce domain-specific appearance variation [1].
The third is a dual-branch architecture, meaning two parallel learning paths that each handle one job. The liveness branch uses no conventional linear classifier; instead it uses a learnable prototype, a vector standing for a reference live face, and the binary score is the Euclidean distance between the normalised feature and the normalised liveness prototype, so the farther a sample sits from the reference live face, the more it is judged a spoof. The attack branch is supervised only on spoof samples, using cross-entropy to sort fakes into predefined attack semantics such as print, replay and mask, where attack semantics is simply this branch's answer to which kind of fake it is. The paper also records a detail: attack labels are shifted by one before the loss, because this branch predicts spoof categories only and does not handle live faces [1].
The two sides are not simply trained independently. The model is jointly optimised with three items: a bonafide-centric prototype objective, an attack-semantic classification loss applied to detached features, and orthogonality regularisation. Detached features means the gradient is cut so the attack branch cannot rewrite the shared backbone, and orthogonality regularisation is a constraint pushing what the two branches learn to overlap as little as possible [1]. The paper also reports ablations for each part (Sec. IV-E), so there is no need to merely note that sections exist: a frozen DINOv3 backbone gives 24.62% average HTER, falling to 10.85% with LoRA adaptation; among ViT-S/16, ViT-B/16 and ViT-L/16 the mid-sized ViT-B/16 is best (9.09%), so bigger is not automatically better; swapping class-aware style borrowing for class-agnostic mixing raises average HTER from 9.09% to 13.36%, and removing the gate raises it to 12.14%; an orthogonality weight of 0.2 is optimal, and raising it further degrades results on CASIA-FASD and OULU-NPU. These figures let you judge which component actually earns its keep [1].
- Low-rank adaptation, LoRA: adds only a small set of trainable parameters to adapt DINOv3 efficiently;
- Attention style-content disentanglement, ASCD: separates domain-specific appearance from liveness content;
- Dual branch: one prototype-based liveness path and one attack-semantic supervision path, constrained by orthogonality regularisation.
Two Protocols, Per-Domain Numbers: Do Not Read Only the Average
See how the two evaluations are set up first. The first is the standard OCIM leave-one-domain-out protocol, where one dataset unseen in training is held out as the exam and the rest serve as the textbook; the paper states that training uses three source datasets and evaluation runs on the held-out unseen domain. The second is synthetic-to-real generalisation, meaning train only on synthetic data and test directly on real data: training uses SynthASpoof exclusively, a synthetically generated spoof training set, and testing runs on four unseen real-world datasets. Both deliberately keep the model from ever training on the domain it is tested on [1].
The numbers only make sense alongside their protocols. HTER is an error rate that folds both kinds of mistake together, lower is better; AUC is an area score obtained by sweeping the decision threshold from loose to tight, a measure of overall separability where higher is better. Under the OCIM leave-one-domain-out protocol, DINOFAS reaches an average HTER of 9.09%. In the setting trained only on synthetic data and tested on four unseen real-world datasets, it achieves the lowest average HTER of 21.41% and the highest average AUC of 86.14% among the compared methods. Note that 9.09% and 21.41% come from two different exams and should not be compared as if one were better than the other [1].
| Evaluation | Target domain / protocol | DINOFAS HTER(%) | DINOFAS AUC(%) |
|---|---|---|---|
| Synthetic-to-real (SynthASpoof train) | MSU-MFSD (M) | 25.83 | 83.06 |
| Synthetic-to-real | CASIA-FASD (C) | 31.30 | 75.54 |
| Synthetic-to-real | Idiap Replay-Attack (I) | 9.12 | 96.57 |
| Synthetic-to-real | OULU-NPU (O) | 19.40 | 89.39 |
| Synthetic-to-real average | Four unseen real sets | 21.41 | 86.14 |
| OCIM leave-one-out | OCI->M | 3.75 | 98.39 |
| OCIM leave-one-out | OMI->C | 7.59 | 95.99 |
| OCIM leave-one-out | OCM->I | 17.25 | 86.05 |
| OCIM leave-one-out | ICM->O | 7.77 | 97.16 |
| OCIM average | Four protocols | 9.09 | 94.40 |
The per-domain figures in that table are all in the paper (Tables I and II), not just the averages. Two points belong alongside them [1]. First, averages hide weak spots: in synthetic-to-real, target C reaches 31.30% HTER against 9.12% on I; in OCIM, OCM->I reaches 17.25%, well above the other three protocols. Second, the lowest average HTER does not mean winning every domain: the paper states DINOFAS beats DTDA on OCI->M and ICM->O but is worse on OMI->C and OCM->I, and its average AUC is 94.40% against DTDA's 95.45%, the authors' own wording being that it improves aggregate HTER without consistently outperforming competing methods on every target domain. So 9.09% and 21.41% still have to be read with their protocols and cannot be merged into one total score [1].
OULU-NPU and SiW-Mv2: What the Robustness Numbers Cover
Beyond the two protocol evaluations, the paper reports numbered robustness results on OULU-NPU and SiW-Mv2 (Tables III and IV) [1]. OULU-NPU's four protocols target unseen environments, unseen attack instruments, unseen capture devices and all three at once; the largest gain is on Protocol 3 (leave-one-camera-out), where DINOFAS cuts ACER from the previous best of 2.61+/-0.66% to 0.17+/-0.20% with a zero BPCER; on the hardest Protocol 4 it reaches ACER 2.92+/-2.33% and BPCER 0.83+/-2.04% while its APCER is comparatively higher. On the SiW-Mv2 leave-one-attack-type protocol, DINOFAS reaches an average HTER of 4.31%, best on Impersonation, Cosmetic, Half Mask and Silicone, and comparatively weaker on FunE., TransM. and Print. So robustness to unseen attacks is neither an empty claim nor a blanket one [1].
What matters here is which number supports which claim [1]. When the paper says robustness is demonstrated on these two datasets, the backing is the per-protocol figures above; but it gives no pass rate for every device and every attack type, SiW-Mv2 remains weaker on FunE., TransM. and Print, and OULU-NPU Protocol 4 has a comparatively higher APCER. Reading robustness is demonstrated as steady against every unseen attack is something the reader adds, not something the paper writes; what belongs in an acceptance sheet is the numeric conclusion for each specific protocol [1].
Put differently, DINOFAS's evidence is not split into a layer with numbers and a layer without; both carry numbers, at different granularity [1]: synthetic-to-real and OCIM report per-target-domain HTER/AUC, while OULU-NPU and SiW-Mv2 report per-protocol ACER/APCER/BPCER or per-attack-type HTER. What a report must actually guard against is treating one average, or a qualitative claim of robustness, as a quantitative promise for every domain and every attack [1].
Where DINOFAS Stops: What It Can and Cannot Answer
Stating the boundary keeps a representation-learning paper from being read as a licence to ship. Paper [1] claims something specific: recasting anti-spoofing as bonafide-centric representation learning, with LoRA, ASCD and a dual-branch design, yields better average results on two kinds of cross-distribution evaluation, leave-one-domain-out and synthetic-to-real. It does not claim the following.
- 1. It does not promise every unseen attack: the paper reports per-protocol and per-attack-type figures, and SiW-Mv2 stays weaker on FunE., TransM. and Print, with no blanket per-class pass rate;
- 2. It does not win every domain: the per-domain numbers are in Tables I and II, and although average HTER is lowest, average AUC of 94.40% trails DTDA's 95.45% and it is worse on OMI->C and OCM->I;
- 3. It does not replace real captured data: the synthetic-to-real setting shows that training on SynthASpoof alone still leaves 21.41% average HTER, reaching 31.30% on C, so the synthetic-to-real gap is not closed;
- 4. It is not deployment safety: the paper measures protocol scores on public datasets, not the actual attack success rate in front of a specific phone camera;
- 5. It does not compare compute or latency: the inference cost of a DINOv3 backbone with LoRA and two branches has no number in the paper, so it cannot settle whether the model fits on-device.
In one sentence: this approach fits when you already work on face anti-spoofing and have explicitly decided to treat a changed device or an unseen attack as the main acceptance enemy. If the real question is whether a specific shipped device resists physical attacks, or whether to drop one branch to save compute, it cannot answer that, and adding real-world attack testing and on-device measurement is more practical than arguing over one average HTER [1].
