{"notes":[{"id":"face-antispoofing/stdn","category":"face-antispoofing","legacyPath":"face-antispoofing/2007-stdn","legacySlug":"2007-stdn","legacyPaths":[],"title":"STDN","subtitle":"Traces of Disguise","author":"Z. Yuan","paperDate":"2020-07-17","publishedOn":"2025-05-19","paperTitle":"On Disentangling Spoof Trace for Generic Face Anti-Spoofing","paperUrl":"https://arxiv.org/abs/2007.09273","bibliography":{"title":"On Disentangling Spoof Trace for Generic Face Anti-Spoofing","authors":["Yaojie Liu","Joel Stehouwer","Xiaoming Liu"],"url":"https://arxiv.org/abs/2007.09273","pdfUrl":"https://arxiv.org/pdf/2007.09273","codeUrl":null,"preprint":{"id":"2007.09273","submittedOn":"2020-07-17","url":"https://arxiv.org/abs/2007.09273"},"publication":{"venue":"ECCV","year":2020,"kind":"conference","url":"https://arxiv.org/abs/2007.09273"},"citation":"@misc{faceantispoofingstdn2020,\n  title = {{On Disentangling Spoof Trace for Generic Face Anti-Spoofing}},\n  author = {Yaojie Liu and Joel Stehouwer and Xiaoming Liu},\n  year = {2020},\n  eprint = {2007.09273},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2007.09273}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/stdn.77056d61f1d5.bib"},"thumbnail":{"src":"/content/papers/assets/508d6396d37f8dad7559f9ba5ece9c34bfa53e2c3bb88085b7759ae5b45fdc87.jpg","width":1948,"height":480},"locale":"en","path":"/content/papers/en/face-antispoofing/stdn.521108fe2283.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"spoof-trace","text":"Spoof Trace","depth":3},{"id":"disentangled-generation","text":"Disentangled Generation","depth":3},{"id":"dual-domain-input-strategy","text":"Dual-Domain Input Strategy","depth":3},{"id":"early-spoof-regressor","text":"Early Spoof Regressor","depth":3},{"id":"classification-strategy-at-test-time","text":"Classification Strategy at Test Time","depth":3},{"id":"reconstruction-and-synthesis","text":"Reconstruction and Synthesis","depth":3},{"id":"geometric-warping-layer","text":"Geometric Warping Layer","depth":3},{"id":"manipulating-the-spoof-trace","text":"Manipulating the Spoof Trace","depth":3},{"id":"multi-scale-discriminators","text":"Multi-scale Discriminators","depth":3},{"id":"discriminator-architecture-details","text":"Discriminator Architecture Details","depth":4},{"id":"loss-functions","text":"Loss Functions","depth":3},{"id":"training-procedure-design","text":"Training Procedure Design","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"known-attack-detection","text":"Known Attack Detection","depth":3},{"id":"unknown-attack-detection","text":"Unknown Attack Detection","depth":3},{"id":"spoof-trace-visualization-and-evaluation","text":"Spoof Trace Visualization and Evaluation","depth":3},{"id":"module-contributions-and-ablation-studies","text":"Module Contributions and Ablation Studies","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["face-antispoofing","feature-disentanglement","training-data","interpretability"],"relatedReading":[{"id":"face-antispoofing/disentangle-fas","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dualstage","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dsdg","relation":"comparison","topic":"Separating spoof traces from facial content"}]},{"id":"face-antispoofing/disentangle-fas","category":"face-antispoofing","legacyPath":"face-antispoofing/2008-disentangle-fas","legacySlug":"2008-disentangle-fas","legacyPaths":[],"title":"Disentangle-FAS","subtitle":"Untangling the Soul Knot","author":"Z. Yuan","paperDate":"2020-08-19","publishedOn":"2025-05-20","paperTitle":"Face Anti-Spoofing Via Disentangled Representation Learning","paperUrl":"https://arxiv.org/abs/2008.08250","bibliography":{"title":"Face Anti-Spoofing Via Disentangled Representation Learning","authors":["Ke-Yue Zhang","Taiping Yao","Jian Zhang","Ying Tai","Shouhong Ding","Jilin Li","Feiyue Huang","Haichuan Song","Lizhuang Ma"],"url":"https://arxiv.org/abs/2008.08250","pdfUrl":"https://arxiv.org/pdf/2008.08250","codeUrl":null,"preprint":{"id":"2008.08250","submittedOn":"2020-08-19","url":"https://arxiv.org/abs/2008.08250"},"publication":{"venue":"ECCV","year":2020,"kind":"conference","url":"https://arxiv.org/abs/2008.08250"},"citation":"@misc{faceantispoofingdisentanglefas2020,\n  title = {{Face Anti-Spoofing Via Disentangled Representation Learning}},\n  author = {Ke-Yue Zhang and Taiping Yao and Jian Zhang and Ying Tai and Shouhong Ding and Jilin Li and Feiyue Huang and Haichuan Song and Lizhuang Ma},\n  year = {2020},\n  eprint = {2008.08250},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2008.08250}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/disentangle-fas.7945fc42459e.bib"},"thumbnail":{"src":"/content/papers/assets/46761af8667149c3be7509f6741523b04a80badeeba351a7cfe25812cfb8b697.jpg","width":1444,"height":584},"locale":"en","path":"/content/papers/en/face-antispoofing/disentangle-fas.239348d84f80.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"disentanglement-process","text":"Disentanglement Process","depth":3},{"id":"reconstruction-loss-image--latent","text":"Reconstruction Loss: Image & Latent","depth":3},{"id":"auxiliary-supervision","text":"Auxiliary Supervision","depth":3},{"id":"final-objective-function","text":"Final Objective Function","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"intra-testing-oulu-npu","text":"Intra-testing: Oulu-NPU","depth":3},{"id":"cross-testing-casia-mfsd--replay-attack","text":"Cross-testing: CASIA-MFSD ↔ Replay-Attack","depth":3},{"id":"translation-results-and-visualization","text":"Translation Results and Visualization","depth":3},{"id":"ablation-study","text":"Ablation Study","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["face-antispoofing","feature-disentanglement","ecnu","tencent"],"relatedReading":[{"id":"face-antispoofing/stdn","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dualstage","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dsdg","relation":"comparison","topic":"Separating spoof traces from facial content"}]},{"id":"face-antispoofing/dualstage","category":"face-antispoofing","legacyPath":"face-antispoofing/2110-dualstage","legacySlug":"2110-dualstage","legacyPaths":[],"title":"DualStage","subtitle":"The Technique of Dual Disentanglement","author":"Z. Yuan","paperDate":"2021-10-18","publishedOn":"2025-05-22","paperTitle":"Disentangled Representation with Dual-stage Feature Learning for Face Anti-spoofing","paperUrl":"https://arxiv.org/abs/2110.09157","bibliography":{"title":"Disentangled Representation with Dual-stage Feature Learning for Face Anti-spoofing","authors":["Yu-Chun Wang","Chien-Yi Wang","Shang-Hong Lai"],"url":"https://arxiv.org/abs/2110.09157","pdfUrl":"https://arxiv.org/pdf/2110.09157","codeUrl":null,"preprint":{"id":"2110.09157","submittedOn":"2021-10-18","url":"https://arxiv.org/abs/2110.09157"},"publication":{"venue":"WACV","year":2022,"kind":"conference","url":"https://arxiv.org/abs/2110.09157"},"citation":"@misc{faceantispoofingdualstage2021,\n  title = {{Disentangled Representation with Dual-stage Feature Learning for Face Anti-spoofing}},\n  author = {Yu-Chun Wang and Chien-Yi Wang and Shang-Hong Lai},\n  year = {2021},\n  eprint = {2110.09157},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2110.09157}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/dualstage.b66e662e930f.bib"},"thumbnail":{"src":"/content/papers/assets/895731b1c55331aeaa8303b4b21c0a4beb792b1e724f55be40e19c7558b07ff6.jpg","width":1224,"height":924},"locale":"en","path":"/content/papers/en/face-antispoofing/dualstage.60fb6624b73b.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"learn-liveness-information-first","text":"Learn Liveness Information First","depth":3},{"id":"dual-stream-parallel-reconstruction","text":"Dual-Stream Parallel Reconstruction","depth":3},{"id":"extracting-spoof-clues","text":"Extracting Spoof Clues","depth":3},{"id":"training-and-inference","text":"Training and Inference","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"cross-type-experimental-performance","text":"Cross-type Experimental Performance","depth":3},{"id":"same-type-experimental-performance","text":"Same-type Experimental Performance","depth":3},{"id":"visualization-of-disentangled-features","text":"Visualization of Disentangled Features","depth":3},{"id":"spoof-map-analysis","text":"Spoof Map Analysis","depth":3},{"id":"ablation-study","text":"Ablation Study","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["face-antispoofing","feature-disentanglement","nthu"],"relatedReading":[{"id":"face-antispoofing/stdn","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/disentangle-fas","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dsdg","relation":"comparison","topic":"Separating spoof traces from facial content"}]},{"id":"face-antispoofing/dsdg","category":"face-antispoofing","legacyPath":"face-antispoofing/2112-dsdg","legacySlug":"2112-dsdg","legacyPaths":[],"title":"DSDG","subtitle":"The Eve of Illusion Recombination","author":"Z. Yuan","paperDate":"2021-12-01","publishedOn":"2025-05-22","paperTitle":"Dual Spoof Disentanglement Generation for Face Anti-spoofing with Depth Uncertainty Learning","paperUrl":"https://arxiv.org/abs/2112.00568","bibliography":{"title":"Dual Spoof Disentanglement Generation for Face Anti-spoofing with Depth Uncertainty Learning","authors":["Hangtong Wu","Dan Zen","Yibo Hu","Hailin Shi","Tao Mei"],"url":"https://arxiv.org/abs/2112.00568","pdfUrl":"https://arxiv.org/pdf/2112.00568","codeUrl":null,"preprint":{"id":"2112.00568","submittedOn":"2021-12-01","url":"https://arxiv.org/abs/2112.00568"},"publication":{"venue":"IEEE Transactions on Circuits and Systems for Video Technology","shortVenue":"IEEE TCSVT","year":2022,"kind":"journal","url":"https://doi.org/10.1109/tcsvt.2021.3133620"},"citation":"@misc{faceantispoofingdsdg2021,\n  title = {{Dual Spoof Disentanglement Generation for Face Anti-spoofing with Depth Uncertainty Learning}},\n  author = {Hangtong Wu and Dan Zen and Yibo Hu and Hailin Shi and Tao Mei},\n  year = {2021},\n  eprint = {2112.00568},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2112.00568}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/dsdg.a94fa2a84172.bib"},"thumbnail":{"src":"/content/papers/assets/7e2e940be65abda804a0afaed42ebba9bbbf62abc1a775d0aaef3b861eaffb52.jpg","width":1472,"height":556},"locale":"en","path":"/content/papers/en/face-antispoofing/dsdg.5c7fd8577ccd.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"dual-spoof-disentanglement-generation-dsdg","text":"Dual Spoof Disentanglement Generation (DSDG)","depth":3},{"id":"depth-uncertainty-learning-dul","text":"Depth Uncertainty Learning (DUL)","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"ablation-studies","text":"Ablation Studies","depth":3},{"id":"intra-dataset-testing","text":"Intra-Dataset Testing","depth":3},{"id":"model-analysis-and-visualization","text":"Model Analysis and Visualization","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["face-antispoofing","feature-disentanglement","training-data","shu","jd"],"relatedReading":[{"id":"face-antispoofing/stdn","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/disentangle-fas","relation":"comparison","topic":"Separating spoof traces from facial content"},{"id":"face-antispoofing/dualstage","relation":"comparison","topic":"Separating spoof traces from facial content"}]}],"text":"The model tells us this is fake. But it cannot say why.\n\nWould you trust a model like this?\n\n## Problem Definition\n\nFace Anti-Spoofing (FAS), as the first line of defense in biometric systems, has a research history spanning over a decade.\n\nFrom early eye movement detection and subtle head motions to recent CNN discriminators and deep supervised learning, model accuracy seems to improve steadily. However, when facing unknown attack methods, different devices, and lighting conditions, generalization remains a hard-to-cross barrier.\n\nThe problem is not whether the model can \"learn to distinguish real from fake,\" but what exactly it has learned.\n\nHas it truly seen the traces of the spoof itself?\n\nOr has it merely learned to differentiate resolution, color saturation, or cropping positions within certain datasets?\n\nEspecially when we treat various attack types—photos, screens, masks, makeup—equally and try to build a universal FAS system, we realize that **most existing methods rely on a \"black-box decision\": given a face, output a score.**\n\nBut such a score cannot explain on what basis the model made its decision. In fact, we cannot even make the model explain _why_ it says \"this is fake.\"\n\nThis makes it hard to trust the model's decisions or improve its training strategy. If we cannot see what the model relies on, we cannot really understand where it draws the line between a live face and a spoof.\n\nThe authors of this paper say: instead of asking whether the model thinks it's real or fake, we should ask:\n\n> **What did you see on this face that made you think it is not alive?**\n\n## Solution\n\n\n\n![model_arch](/content/papers/assets/508d6396d37f8dad7559f9ba5ece9c34bfa53e2c3bb88085b7759ae5b45fdc87.jpg)\n\n\n\nIn traditional binary classification tasks, the model outputs a \"real or fake\" score, but it cannot answer: **What exactly did you see?**\n\nHere, the authors propose a different approach, called the **Spoof Trace Disentanglement Network (STDN).**\n\nAs shown in the figure above, the model first extracts the latent \"spoof trace\" from an input face, then proceeds to:\n\n- **Reconstructed Live**: subtract the estimated trace to generate a live-looking counterpart.\n- **Synthesized Spoof**: transfer the spoof trace onto another live face to generate new attack samples.\n\nThis approach turns the spoof trace from a hidden judgment basis into an explicit, controllable visible variable, becoming the core signal of the entire system.\n\n\n> [!TIP]\n> \n> The methodology in this paper is somewhat complex, involving multiple modules and steps. Readers may need some patience to fully grasp the authors’ design logic.\n\n\n### Spoof Trace\n\nLet the input image be $I \\in \\mathbb{R}^{N \\times N \\times 3}$, which belongs either to the spoof domain $\\mathcal{S}$ or the live domain $\\mathcal{L}$.\n\nThe goal is to find a corresponding live-domain image $\\hat{I} \\in \\mathcal{L}$ that minimizes the difference:\n\n$$\n\\hat{I} = \\arg\\min_{\\hat{I} \\in \\mathcal{L}} \\| I - \\hat{I} \\|_F\n$$\n\nwhere $\\| \\cdot \\|_F$ denotes the Frobenius norm.\n\nBy definition, the spoof trace is represented as:\n\n$$\nG(I) = I - \\hat{I}\n$$\n\nIf $I$ originally comes from the live domain, then ideally $G(I)$ should be zero; for spoof images, $G(I)$ corresponds to the visual forgery residual.\n\nTo enhance the interpretability and synthesis capability of the spoof trace, the authors further decompose it into four hierarchical components based on prior research:\n\n- **Color range bias**: $s \\in \\mathbb{R}^{1 \\times 1 \\times 3}$, controlling pixel intensity adjustment;\n- **Color balance bias**: $b \\in \\mathbb{R}^{1 \\times 1 \\times 3}$, adjusting color balance across channels;\n- **Smooth content pattern**: $C \\in \\mathbb{R}^{L \\times L \\times 3}$, representing smooth textures, requiring upsampling;\n- **High-frequency texture**: $T \\in \\mathbb{R}^{N \\times N \\times 3}$, containing details such as moiré patterns and edge contours.\n\nThese elements jointly form the spoof trace construction function:\n\n$$\nG(I) = sI + b + \\lfloor C \\rceil_N + T\n$$\n\nwhere $\\lfloor C \\rceil$ denotes upsampling $C$ to match the spatial resolution of $I$.\n\nThrough this definition, STDN turns the spoof trace from an implicit basis for classification into an explicit intermediate variable. The model can distinguish real from fake while also showing where it sees the spoof. These are estimated traces, however, not uniquely verified physical causes.\n\nThis modeling brings three core advantages:\n\n1. **Visualization and interpretability**: The model outputs the spoof trace as visible evidence supporting its decision;\n2. **Synthesis and data augmentation**: The trace can be applied to other images to generate spoof examples;\n3. **Improved generalization**: modeling traces aims to reduce reliance on cues unrelated to an attack; whether it fully excludes lighting and background effects still needs experimental testing.\n\n\n> [!TIP]\n> \n> The authors also use the disentangled spoof trace for classification, live reconstruction, and spoof synthesis and training after geometric alignment.\n\n\n### Disentangled Generation\n\n\n\n![stdn_arch](/content/papers/assets/e1de55a14b465cd7272f785b9b2083c8e31fb83b36a581fb5436c97eb6e943a2.jpg)\n\n\n\nThe spoof trace disentanglement in STDN is realized via an Encoder–Decoder based generator tasked with progressively extracting the spoof trace components $\\{s, b, C, T\\}$ from the input image.\n\nAs shown above, the input image $I \\in \\mathbb{R}^{256 \\times 256 \\times 3}$ is first processed by the Encoder, which applies a series of convolutional layers for downsampling, producing a latent feature tensor:\n\n$$\nF \\in \\mathbb{R}^{32 \\times 32 \\times 96}\n$$\n\nThis latent representation forms the basis for the Decoder to disentangle the spoof trace.\n\nThe Decoder then uses transpose convolution layers to progressively upsample and generate spoof trace elements at different spatial resolutions:\n\n- **Color shift terms $s, b$**: each has one global value per color channel (three values), so they are predicted early in the decoder.\n- **Low-frequency texture $C$**: produced at intermediate decoding stage with resolution around $64 \\times 64$, then upsampled for synthesis;\n- **High-frequency texture $T$**: output at the final decoder layer, maintaining the original image resolution $256 \\times 256$.\n\nThis coarse-to-fine design matches the spatial properties of the trace components and is intended to make their roles in the generated trace clearer.\n\nFurthermore, to preserve high-frequency details and improve synthesis quality, the generator adopts a U-Net style skip connection between corresponding Encoder and Decoder layers, allowing direct transfer of local texture information.\n\n### Dual-Domain Input Strategy\n\nUnlike typical GANs trained only on the source domain (e.g., spoof), this method feeds the generator images from both domains:\n\n- spoof domain: providing positive trace samples;\n- live domain: serving as reference, expecting spoof trace near zero.\n\nThis encourages the model to learn discriminative and semantically meaningful spoof traces from both live and spoof images, preventing the trace itself from causing classification bias.\n\nHowever, since spoof trace strength and patterns vary across spoof types (photos, masks, makeup), the trace alone is not a perfect classification cue. Therefore, the authors introduce an Early Spoof Regressor (ESR) to strengthen latent space discrimination.\n\n### Early Spoof Regressor\n\nThe ESR module is designed as follows:\n\n- Input: bottleneck feature tensor $F \\in \\mathbb{R}^{32 \\times 32 \\times 96}$;\n- Output: a continuous spoof score map $M \\in \\mathbb{R}^{16 \\times 16}$. Its training targets are all-zero live maps and all-one spoof maps. Binary targets do not make the predictions binary or calibrated probabilities.\n\nThis spoof map represents a spatial judgment of the input image, enabling the generator not only to produce the trace but also to perform preliminary classification.\n\nTo support this design, the overall generator architecture uses a \"heavy encoder, light decoder\" approach, with the encoder having more channels and deeper blocks, allowing the ESR to fully leverage encoded spoof representations.\n\n### Classification Strategy at Test Time\n\nDuring testing, the final spoof score is composed of two parts:\n\n1. The L1 average intensity of the ESR output spoof map $M$;\n2. The L1 average intensity of the spoof trace $G(I)$;\n\ncomputed by\n\n$$\n\\text{score} = \\frac{1}{2K^2} \\| M \\|_1 + \\frac{\\alpha_0}{2N^2} \\| G(I) \\|_1\n$$\n\nwhere\n\n- $K = 16$: spatial resolution of the ESR spoof map;\n- $N = 256$: spatial resolution of the input image;\n- $\\alpha_0$: hyperparameter controlling the influence of the spoof trace on the final score.\n\nThis dual-metric fusion strategy improves sensitivity to spoof strength and provides a buffer when spoof trace and ESR judgments differ.\n\n### Reconstruction and Synthesis\n\nAfter disentangling the spoof trace, STDN can be applied not only for classification but also as structured signals for two tasks:\n\n1. **Reconstruction**: removing the trace from a spoof image to restore the corresponding live image.\n2. **Synthesis**: transferring the spoof trace extracted from one spoof image onto any live face to generate synthetic spoof attack samples.\n\nStarting with the live image reconstruction task:\n\nGiven an input image $I \\in \\mathcal{S} \\cup \\mathcal{L}$ and its corresponding spoof trace $G(I)$, STDN restores the live image by\n\n$$\n\\hat{I} = I - G(I)\n$$\n\nHere $\\hat{I}$ is the estimated live-domain counterpart. The minimum-change formulation defines the training objective.\n\nThe reconstruction can be inspected visually and used during training to encourage a trace that can be removed coherently.\n\nNext, for spoof image synthesis:\n\nTo enable data augmentation and spoof diversity simulation, STDN allows transferring the spoof trace to another live face. Given two images:\n\n- $I_i$: source spoof image with trace $G(I_i)$,\n- $I_j$: target live image,\n\nthe synthesized spoof image is expressed as\n\n$$\n\\tilde{I}_{i \\rightarrow j} = I_j + G(I_i)\n$$\n\n\n> [!TIP]\n> \n> This reminds us of Model Merging in the LLM field: there, different functions added to a base model can be treated as vectors of parameters and added or subtracted to extend the model. Here the vectors are spoof traces in image space, rather than model weights, so the analogy has its limits.\n> \n> If we similarly treat specific types of attacks’ “spoof traces” as vector parameters and perform addition or subtraction, we might enable the model to learn to handle various attack types by combining these vectors.\n\n\nHowever, a challenge exists: spoof traces may contain regionally localized textures highly correlated with the original face geometry (e.g., mask edges, wrinkles). Directly applying these traces onto different face shapes or poses leads to noticeable geometric distortion and visual inconsistency.\n\nTo address this, the authors propose a differentiable **Online 3D Warping Layer** to align spoof traces spatially.\n\n### Geometric Warping Layer\n\n\n\n![3d_warp](/content/papers/assets/e8610bee1b2d2f966ef53247f596eb63e37fa889a795f24d417cada1175373f8.jpg)\n\n\n\nThis module builds facial correspondence points based on a 3D Morphable Model (3DMM) and performs geometric transformation from sparse to dense fields via Delaunay triangulation.\n\n**Steps:**\n\n1. **Spoof trace evaluation**\n   For source image $I_i$, its spoof trace is defined as\n\n   $$\n   G_i = G(I_i)[p_0]\n   $$\n\n   where $p_0 = \\{(x,y) \\mid 0 \\leq x,y < 256 \\} \\in \\mathbb{R}^{256 \\times 256 \\times 2}$ represents the original pixel coordinate grid.\n\n2. **Compute dense offset**\n   To apply the spoof trace onto $I_j$, compute the dense field offset $\\Delta p_{i \\rightarrow j} \\in \\mathbb{R}^{256 \\times 256 \\times 2}$. The warped trace is\n\n   $$\n   G_{i \\rightarrow j} = G(I_i)[p_0 + \\Delta p_{i \\rightarrow j}]\n   $$\n\n   Since offsets may be fractional, bilinear interpolation is used for coordinate mapping.\n\n3. **Sparse-to-dense conversion**\n   Fit a 3DMM to each face and extract $Q=140$ representative vertex 2D projections:\n\n   $$\n   s = \\{ (x_0, y_0), (x_1, y_1), \\dots, (x_{Q-1}, y_{Q-1}) \\} \\in \\mathbb{R}^{Q \\times 2}\n   $$\n\n   Then calculate sparse offset between source and target:\n\n   $$\n   \\Delta s_{i \\rightarrow j} = s_j - s_i\n   $$\n\n4. **Triangle interpolation to dense offset**\n   Apply Delaunay triangulation interpolation:\n\n   $$\n   \\Delta p_{i \\rightarrow j} = \\mathrm{Tri}(p_0, s_i, \\Delta s_{i \\rightarrow j})\n   $$\n\n   For fixed triangulation and coordinates, interpolation and sampling propagate gradients into trace synthesis. The 3DMM fitting and vertex extraction happen during data preparation; not every geometric parameter is learned end to end. The equations retain the paper’s offset notation. An implementation using backward sampling must explicitly check source-to-target versus target-to-source direction.\n\n### Manipulating the Spoof Trace\n\nThe structural nature of the spoof trace makes it operable.\n\nThe authors propose a data augmentation strategy during training:\n\n**When synthesizing spoof images, randomly remove one of the spoof trace elements $s, b, C, T$ to simulate samples with weaker spoof intensity, serving as harder examples for training.**\n\nSome spoof features may be faint. Randomly removing a trace element creates a harder sample and encourages the model to use the remaining cues.\n\nCompared to traditional brightness/blur or artificial distortions, this approach manipulates semantically meaningful spoof elements directly, generating more realistic and structurally coherent synthetic data. Experiments demonstrate superior gains over conventional augmentation.\n\n### Multi-scale Discriminators\n\nIn STDN, the generator’s goal is not only to produce plausible spoof traces but also to ensure that the synthesized samples (reconstructed live or synthesized spoof) are visually and semantically credible.\n\nTo this end, the authors design **three PatchGAN discriminators at different resolutions**, covering information from high-frequency textures to global structure.\n\nThe three discriminators are:\n\n- $D_1$: processes images at original resolution $256 \\times 256$, focusing on high-frequency textures corresponding to spoof trace $T$.\n- $D_2$: processes images downsampled by half $128 \\times 128$, emphasizing mid-frequency structures and smooth textures corresponding to $C$.\n- $D_3$: processes images downsampled by quarter $64 \\times 64$, focusing on low-frequency global shifts and color balance corresponding to $s, b$.\n\nAt three resolutions, the discriminators inspect the reconstructed and synthesized images. The paper does not separately measure any \"cross-validation\" effect among the four trace components.\n\n#### Discriminator Architecture Details\n\nEach discriminator $D_k$ uses a **PatchGAN** architecture—a fully convolutional network stacking convolutional layers proven effective in image generation and FAS tasks.\n\nSpecifics include:\n\n- Each discriminator consists of:\n\n  - **10 convolutional layers** in total, with nonlinear activations and BatchNorm;\n  - **3 downsampling operations** among those layers (stride = 2);\n\n- Output is a **2-channel response map** sized $H' \\times W' \\times 2$, where each position corresponds to a patch prediction and the 2 channels indicate confidence scores for each domain.\n\nThe 2-channel design means:\n\n- **Channel 1**: compares reconstructed live images with real live images, verifying the realism after spoof trace removal;\n- **Channel 2**: compares synthesized spoof images with real spoof images, assessing credibility and attack effectiveness after adding spoof trace.\n\nThis bidirectional supervision simultaneously improves generation quality on both restoration and forgery ends, strengthening semantic consistency and invertibility of the spoof trace.\n\n### Loss Functions\n\nSTDN training employs a multi-task learning framework, consisting of **five loss types** and **three training steps** to collaboratively guide the generator and multi-scale discriminators in learning spoof trace separation, invertibility, and visibility.\n\n- **1. ESR Loss (Early Spoof Regressor Loss)**\n\n  For the ESR output spoof map $M \\in \\mathbb{R}^{16 \\times 16}$, it should output all zeros for live images and all ones for spoof images (including synthesized spoofs). An L1 loss is used:\n\n  $$\n  \\mathcal{L}_{\\text{ESR}} = \\frac{1}{K^2} \\left( \\mathbb{E}_{i \\sim \\mathcal{L}} \\left[ \\| M_i \\|_1 \\right] + \\mathbb{E}_{i \\sim \\mathcal{S} \\cup \\hat{\\mathcal{S}}} \\left[ \\| M_i - \\mathbf{1} \\|_1 \\right] \\right)\n  $$\n\n  where:\n\n  - $K = 16$: spoof map resolution;\n  - $\\hat{\\mathcal{S}}$: spoof domain synthesized by the generator;\n  - $\\| \\cdot \\|_1$: L1 norm.\n\n---\n\n- **2. Generator Adversarial Loss**\n\n  To train the generator so that reconstructed live and synthesized spoof images approach their real domains, Least Squares GAN (LSGAN) loss is adopted over three discriminators $D_n$:\n\n  $$\n  \\mathcal{L}_G = \\sum_{n=1}^3 \\left\\{\n  \\mathbb{E}_{i \\sim \\mathcal{S}} \\left[ \\left( D_n^{(1)}(I_i - G_i) - 1 \\right)^2 \\right] +\n  \\mathbb{E}_{i \\sim \\mathcal{L}, j \\sim \\mathcal{S}} \\left[ \\left( D_n^{(2)}(I_i + G_{j \\rightarrow i}) - 1 \\right)^2 \\right]\n  \\right\\}\n  $$\n\n  where:\n\n  - $D_n^{(1)}$: live domain output channel of discriminator $n$;\n  - $D_n^{(2)}$: spoof domain output channel of discriminator $n$.\n\n---\n\n- **3. Discriminator Adversarial Loss**\n\n  The discriminator must correctly distinguish real and generated samples:\n\n  $$\n  \\begin{aligned}\n  \\mathcal{L}_D = \\sum_{n=1}^3 \\Big\\{&\n  \\mathbb{E}_{i \\sim \\mathcal{L}} \\left[ \\left( D_n^{(1)}(I_i) - 1 \\right)^2 \\right] \\\\\n  &+ \\mathbb{E}_{i \\sim \\mathcal{S}} \\left[ \\left( D_n^{(2)}(I_i) - 1 \\right)^2 \\right] \\\\\n  &+ \\mathbb{E}_{i \\sim \\mathcal{S}} \\left[ \\left( D_n^{(1)}(I_i - G_i) \\right)^2 \\right] \\\\\n  &+ \\mathbb{E}_{i \\sim \\mathcal{L}, j \\sim \\mathcal{S}} \\left[ \\left( D_n^{(2)}(I_i + G_{j \\rightarrow i}) \\right)^2 \\right]\n  \\Big\\}\n  \\end{aligned}\n  $$\n\n- **4. Trace Regularizer Loss**\n\n  To enhance spoof trace semantics and suppress meaningless residuals in live samples, an L2 regularization term is added:\n\n  $$\n  \\mathcal{L}_R = \\beta \\cdot \\mathbb{E}_{i \\sim \\mathcal{L}} \\left[ \\| G(I_i) \\|_2^2 \\right] + \\mathbb{E}_{i \\sim \\mathcal{S}} \\left[ \\| G(I_i) \\|_2^2 \\right]\n  $$\n\n  where $\\beta > 1$ controls live trace compression strength.\n\n- **5. Supervised Pixel Loss**\n\n  The trace used to synthesize a spoof is known, so it can serve as a pixel-level supervision target. It is a trace generated and warped by the model, not an annotation of the real attack image. A stop-gradient operation fixes this reference trace:\n\n  $$\n  \\mathcal{L}_P = \\mathbb{E}_{i \\sim \\mathcal{L}, j \\sim \\mathcal{S}} \\left[ \\left\\| G\\left( I_i + \\text{stop\\_grad}(G_{j \\rightarrow i}) \\right) - \\text{stop\\_grad}(G_{j \\rightarrow i}) \\right\\|_1 \\right]\n  $$\n\n  This loss forces the generator to learn correct spoof trace extraction structures instead of duplicating input content.\n\n### Training Procedure Design\n\n\n\n![stdn_training](/content/papers/assets/d66ee7101c11f72d84070025733a427d1c5401d688f8a5f44b7875f5bb03ede4.jpg)\n\n\n\nAs illustrated above, STDN training adopts a multi-task collaborative optimization mechanism. Each mini-batch includes three complementary sub-steps, updating parameters for the generator, discriminators, and trace disentanglement supervision respectively.\n\nThe detailed descriptions of each stage are as follows:\n\n- **1. Generator Step**\n\n  In this step, live face $I_{\\text{live}}$ and spoof attack sample $I_{\\text{spoof}}$ are fed into the generator for spoof trace disentanglement. The model performs two generation tasks:\n\n  - **Reconstructing live image**: Using $G(I_{\\text{spoof}})$ to restore the corresponding live version\n\n    $$\n    \\hat{I}_{\\text{live}} = I_{\\text{spoof}} - G(I_{\\text{spoof}})\n    $$\n\n  - **Synthesizing spoof image**: Applying spoof trace $G(I_{\\text{spoof}})$ to another live face $I_{\\text{live}}$ to obtain synthesized spoof\n\n    $$\n    \\hat{I}_{\\text{spoof}} = I_{\\text{live}} + G_{i \\rightarrow j}\n    $$\n\n  The generator update objective is composed of three losses:\n\n  - $\\mathcal{L}_G$: adversarial loss (to push synthesized samples closer to real domains);\n  - $\\mathcal{L}_{\\text{ESR}}$: early spoof regressor supervision;\n  - $\\mathcal{L}_R$: trace intensity regularization.\n\n  The total loss is:\n\n  $$\n  \\mathcal{L}_{\\text{G-step}} = \\alpha_1 \\mathcal{L}_G + \\alpha_2 \\mathcal{L}_{\\text{ESR}} + \\alpha_3 \\mathcal{L}_R\n  $$\n\n- **2. Discriminator Step**\n\n  Using the same batch, the following images are passed into the three multi-scale discriminators $D_n$ to learn to distinguish real from synthesized domains:\n\n  - Original live samples $I_{\\text{live}}$\n  - Original spoof samples $I_{\\text{spoof}}$\n  - Reconstructed samples $\\hat{I}_{\\text{live}}$\n  - Synthesized spoof $\\hat{I}_{\\text{spoof}}$\n\n  Each scale discriminator learns to:\n\n  - Differentiate real live vs. reconstructed live on channel $D_n^{(1)}$;\n  - Differentiate real spoof vs. synthesized spoof on channel $D_n^{(2)}$.\n\n  The discriminator adversarial loss is defined as:\n\n  $$\n  \\mathcal{L}_{\\text{D-step}} = \\mathcal{L}_D\n  $$\n\n  Due to adversarial training instability, the learning rate for this step is set to half that of the other steps to balance gradient magnitude and maintain training stability.\n\n- **3. Extra Supervision Step**\n\n  This step introduces \"supervised spoof trace synthesis\" to strengthen the generator’s ability to correctly recognize and disentangle spoof trace structures.\n\n  Inputs include:\n\n  - Original live face $I_{\\text{live}}$\n  - Corresponding synthesized spoof $\\hat{I}_{\\text{spoof}}$\n  - The model-generated reference trace $G_{j \\rightarrow i}$ used for synthesis, held fixed by stop-gradient.\n\n  Only the generator parameters are updated here, with target losses:\n\n  - $\\mathcal{L}_{\\text{ESR}}$: further spoof classification supervision;\n  - $\\mathcal{L}_P$: pixel-level spoof trace disentanglement error (with stop-gradient to fix target trace).\n\n  The combined loss is:\n\n  $$\n  \\mathcal{L}_{\\text{sup-step}} = \\alpha_4 \\mathcal{L}_{\\text{ESR}} + \\alpha_5 \\mathcal{L}_P\n  $$\n\n\n> [!TIP]\n> \n> To maintain the statistical stability of Batch Normalization, this step inputs $I_{\\text{live}}$ and $\\hat{I}_{\\text{spoof}}$ in pairs, ensuring balanced batch data distribution.\n\n\n## Discussion\n\nSince the methodology section has occupied a large portion, we conclude with several key points for discussion.\n\n### Known Attack Detection\n\n![stdn_known_spoof](/content/papers/assets/0f46e345b5c335a6ff4f477fe1a33c45f5bb76d19b507b4c81467a4fc9e54f01.jpg)\n\nIn the table's known-attack setting, STDN has lower mean ACER than the listed previous methods on three OULU-NPU protocols, while Protocol 3 ties STASN at 2.8%. Protocol 1 falls from 1.5% to 1.1% (about a 27% relative reduction), and Protocol 4 from 5.6% to 3.8% (about 32%). SiW Protocols 1 and 2 reach 0%, while Protocol 3 is 7.9%, slightly above the listed Meta-FAS-DR result of 7.7%.\n\nAcross the 13 known attack types in SiW-M, overall ACER is 4.1%, below the listed Auxiliary result of 6.3%. Some individual types remain harder: cosmetic makeup has 24.5% ACER. These results support performance under the table's known-attack setting; they do not by themselves show equally stable detection of unknown attacks.\n\n### Unknown Attack Detection\n\n![stdn_unknown_spoof](/content/papers/assets/88bafb9a6bc2cd084eaf0c1db586caf9e35c9dd08b7035815fe7e79eca8b61c2.jpg)\n\nIn the SiW-M unknown-attack test, STDN's mean EER is 12.0% and ACER is 14.2%, below DTL's 16.1% and 16.8% in the table. Its BPCER, however, is 16.2%, above Auxiliary's 8.9%; it does not lead on every metric.\n\nAPCER reaches 9.7% for transparent masks and 96.1% for obfuscation makeup. When the latter attack type is included in known-attack training, its ACER falls to 3.0%. The paper does not control the number of examples in a separate few-shot experiment.\n\nAt a fixed false detection rate (FDR) of 0.5%, the overall true detection rate (TDR) is only 35.7%. The authors also see a gap before unknown-attack detection is ready for practical use.\n\n### Spoof Trace Visualization and Evaluation\n\n1. **Spoof Medium Classification**\n\n   ![stdn_spoof_medium](/content/papers/assets/f08e3a0b5ab15a332994ab512d122a9d0b31a17d9ff210e2ad44fc1d9e519f64.jpg)\n\n   After freezing STDN, the authors train a simple CNN to classify spoof media. With the estimated traces, three-class and five-class accuracy reaches 92.0% and 83.3%, above 86.3% and 80.6% when the same CNN uses the original images. The table also marks differences from an earlier method. These results show that the traces retain information useful for distinguishing media in this setting.\n\n2. **Visual Decomposition**\n\n   ![stdn_trace_visualization](/content/papers/assets/14506b64dcea19714e47e09ef3c0b88fa5edd16f9ce007988caa8013b1146598.jpg)\n\n   The figure shows that different attacks—prints, makeup, 3D masks, paper attacks, and others—leave different amounts of distortion or texture residue in $s, b, C, T$. It illustrates decomposition and reconstruction. Cross-face synthesis appears separately in the paper's Figure 8; this figure alone cannot quantify the effect of the 3D geometric warping layer.\n\n### Module Contributions and Ablation Studies\n\n\n\n![stdn_ablation](/content/papers/assets/91cf410aa95aa2563cf3350677934e09589e848e74345fa499c52df65579ce3f.jpg)\n\n\n\nThe ablation uses OULU-NPU Protocol 1: ESR alone has 2.6% ACER, single-layer-trace GAN training reaches 2.1%, and the four-component D-GAN reaches 1.6%. D-GAN denotes disentangled trace generation; this change cannot be attributed solely to multiscale discriminators.\n\nAdding pixel supervision $L_P$ brings the full model to 1.1% ACER. For the single-layer ESR + GAN, however, the same supervision worsens ACER from 2.1% to 4.5%. Synthetic-sample quality matters. These are reported results for this setting.\n\n## Conclusion\n\nInstead of asking whether a face is real or fake, perhaps we should first ask: **where does the disguise show through?**\n\nSTDN recasts liveness detection from \"black-box classification\" as a cycle of trace decomposition, reconstruction, and synthesis. Extending earlier _de-spoofing_ and saliency-map methods, it makes the visible trace a primary model output. The trace is still an estimate learned from training objectives, not a uniquely verified physical cause.\n\nThis is more than a change in network structure. It shifts how we approach the question: first understand the disguise, then decide whether the face is real.\n\nOf course, STDN has weaknesses:\n\n- Its trace is defined in image space. The paper evaluates several 3D mask types, but high-fidelity masks beyond those tests and cross-modal attacks remain to be checked.\n- The geometric and texture consistency of synthesized samples depends on the generator and its supervision.\n- How to extend traces to other sensing dimensions—sound, depth, or blood-flow signals—remains open.\n\nEven so, STDN points toward a path we can follow:\n\n> **If a disguise can be marked explicitly, it can be synthesized; if it can be synthesized, we have a chance to counter it.**\n\nIn a world where real and fake are increasingly hard to tell apart, a score alone is less useful than understanding the structure of the disguise.\n\nThis path is more winding than classification, but STDN is an early milestone for disentangling traces across attack types. The ablation also reminds us that synthesis only helps when its examples are good enough: the same pixel-level supervision can make results worse.\n","imageSizes":{"/content/papers/assets/508d6396d37f8dad7559f9ba5ece9c34bfa53e2c3bb88085b7759ae5b45fdc87.jpg":{"width":1948,"height":480},"/content/papers/assets/e1de55a14b465cd7272f785b9b2083c8e31fb83b36a581fb5436c97eb6e943a2.jpg":{"width":1760,"height":682},"/content/papers/assets/e8610bee1b2d2f966ef53247f596eb63e37fa889a795f24d417cada1175373f8.jpg":{"width":1812,"height":904},"/content/papers/assets/d66ee7101c11f72d84070025733a427d1c5401d688f8a5f44b7875f5bb03ede4.jpg":{"width":2280,"height":718},"/content/papers/assets/0f46e345b5c335a6ff4f477fe1a33c45f5bb76d19b507b4c81467a4fc9e54f01.jpg":{"width":1704,"height":1226},"/content/papers/assets/88bafb9a6bc2cd084eaf0c1db586caf9e35c9dd08b7035815fe7e79eca8b61c2.jpg":{"width":1738,"height":1112},"/content/papers/assets/f08e3a0b5ab15a332994ab512d122a9d0b31a17d9ff210e2ad44fc1d9e519f64.jpg":{"width":1986,"height":368},"/content/papers/assets/14506b64dcea19714e47e09ef3c0b88fa5edd16f9ce007988caa8013b1146598.jpg":{"width":1918,"height":1080},"/content/papers/assets/91cf410aa95aa2563cf3350677934e09589e848e74345fa499c52df65579ce3f.jpg":{"width":1492,"height":576}}}
