{"notes":[{"id":"face-antispoofing/hpdr","category":"face-antispoofing","legacyPath":"face-antispoofing/2406-hpdr","legacySlug":"2406-hpdr","legacyPaths":[],"title":"HPDR","subtitle":"The Hyperbolic World Tree","author":"Z. Yuan","paperDate":"2024","publishedOn":"2025-06-18","paperTitle":"Rethinking Generalizable Face Anti-spoofing via Hierarchical Prototype-guided Distribution Refinement in Hyperbolic Space","paperUrl":"https://openaccess.thecvf.com/content/CVPR2024/html/Hu_Rethinking_Generalizable_Face_Anti-spoofing_via_Hierarchical_Prototype-guided_Distribution_Refinement_in_CVPR_2024_paper.html","bibliography":{"title":"Rethinking Generalizable Face Anti-spoofing via Hierarchical Prototype-guided Distribution Refinement in Hyperbolic Space","authors":["Chengyang Hu","Ke-Yue Zhang","Taiping Yao","Shouhong Ding","Lizhuang Ma"],"url":"https://openaccess.thecvf.com/content/CVPR2024/html/Hu_Rethinking_Generalizable_Face_Anti-spoofing_via_Hierarchical_Prototype-guided_Distribution_Refinement_in_CVPR_2024_paper.html","pdfUrl":"https://openaccess.thecvf.com/content/CVPR2024/papers/Hu_Rethinking_Generalizable_Face_Anti-spoofing_via_Hierarchical_Prototype-guided_Distribution_Refinement_in_CVPR_2024_paper.pdf","codeUrl":null,"preprint":null,"publication":{"venue":"CVPR","year":2024,"kind":"conference","url":"https://openaccess.thecvf.com/content/CVPR2024/html/Hu_Rethinking_Generalizable_Face_Anti-spoofing_via_Hierarchical_Prototype-guided_Distribution_Refinement_in_CVPR_2024_paper.html"},"citation":"@inproceedings{faceantispoofinghpdr2024,\n  title = {{Rethinking Generalizable Face Anti-spoofing via Hierarchical Prototype-guided Distribution Refinement in Hyperbolic Space}},\n  author = {Chengyang Hu and Ke-Yue Zhang and Taiping Yao and Shouhong Ding and Lizhuang Ma},\n  year = {2024},\n  booktitle = {CVPR},\n  url = {https://openaccess.thecvf.com/content/CVPR2024/html/Hu_Rethinking_Generalizable_Face_Anti-spoofing_via_Hierarchical_Prototype-guided_Distribution_Refinement_in_CVPR_2024_paper.html}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/hpdr.4ae6de2c091d.bib"},"thumbnail":{"src":"/content/papers/assets/b76b75be991560dd76a4f660ea9fd7ead4a6f1ad6ad0223c71e8ef1f2fa2883d.jpg","width":1660,"height":718},"locale":"en","path":"/content/papers/en/face-antispoofing/hpdr.a177925d328a.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"hyperbolic-space","text":"Hyperbolic Space","depth":3},{"id":"semantic-anchors","text":"Semantic Anchors","depth":3},{"id":"semantic-three-level-alignment","text":"Semantic Three-Level Alignment","depth":3},{"id":"training-procedure","text":"Training Procedure","depth":3},{"id":"experimental-setup","text":"Experimental Setup","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"ocim-benchmark","text":"OCIM Benchmark","depth":3},{"id":"limited-source-domain","text":"Limited Source Domain","depth":3},{"id":"cross-attack","text":"Cross-Attack","depth":3},{"id":"what-is-key-in-semantic-space","text":"What Is Key in Semantic Space?","depth":3},{"id":"how-many-branches-should-the-semantic-tree-have","text":"How Many Branches Should the Semantic Tree Have?","depth":3},{"id":"how-curved-should-the-semantic-space-be","text":"How Curved Should the Semantic Space Be?","depth":3},{"id":"visualization-results","text":"Visualization Results","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{"prototype-oriented-classifier":"semantic-three-level-alignment","experimental-results-and-discussion":"discussion"},"guide":null,"relatedReading":[{"id":"face-antispoofing/ssdg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/ssan","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/sa-fas","relation":"comparison","topic":"Domain generalization for face anti-spoofing"}]},{"id":"face-antispoofing/ssdg","category":"face-antispoofing","legacyPath":"face-antispoofing/2004-ssdg","legacySlug":"2004-ssdg","legacyPaths":[],"title":"SSDG","subtitle":"Stable Realness","author":"Z. Yuan","paperDate":"2020-04-29","publishedOn":"2025-04-18","paperTitle":"Single-Side Domain Generalization for Face Anti-Spoofing","paperUrl":"https://arxiv.org/abs/2004.14043","bibliography":{"title":"Single-Side Domain Generalization for Face Anti-Spoofing","authors":["Yunpei Jia","Jie Zhang","Shiguang Shan","Xilin Chen"],"url":"https://arxiv.org/abs/2004.14043","pdfUrl":"https://arxiv.org/pdf/2004.14043","codeUrl":null,"preprint":{"id":"2004.14043","submittedOn":"2020-04-29","url":"https://arxiv.org/abs/2004.14043"},"publication":{"venue":"CVPR","year":2020,"kind":"conference","url":"https://doi.org/10.1109/cvpr42600.2020.00851"},"citation":"@misc{faceantispoofingssdg2020,\n  title = {{Single-Side Domain Generalization for Face Anti-Spoofing}},\n  author = {Yunpei Jia and Jie Zhang and Shiguang Shan and Xilin Chen},\n  year = {2020},\n  eprint = {2004.14043},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2004.14043}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/ssdg.18ad604217a9.bib"},"thumbnail":{"src":"/content/papers/assets/3ec4bd961265b910a76f4573bbeb850168d7c706501e6f4a51e8c02a71c72b26.jpg","width":1490,"height":756},"locale":"en","path":"/content/papers/en/face-antispoofing/ssdg.03326184e995.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"single-side-adversarial-learning","text":"Single-Side Adversarial Learning","depth":3},{"id":"asymmetric-triplet-loss","text":"Asymmetric Triplet Loss","depth":3},{"id":"feature-and-weight-normalization","text":"Feature and Weight Normalization","depth":3},{"id":"additional-supplement","text":"Additional Supplement","depth":2},{"id":"discussion","text":"Discussion","depth":2},{"id":"dataset-testing-setup","text":"Dataset Testing Setup","depth":3},{"id":"comparison-with-other-methods","text":"Comparison with Other Methods","depth":3},{"id":"ablation-experiment","text":"Ablation Experiment","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"face-antispoofing/ssan","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/sa-fas","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/iadg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"}]},{"id":"face-antispoofing/ssan","category":"face-antispoofing","legacyPath":"face-antispoofing/2203-ssan","legacySlug":"2203-ssan","legacyPaths":[],"title":"SSAN","subtitle":"The Shadow of Style","author":"Z. Yuan","paperDate":"2022-03-10","publishedOn":"2025-04-30","paperTitle":"Domain Generalization via Shuffled Style Assembly for Face Anti-Spoofing","paperUrl":"https://arxiv.org/abs/2203.05340","bibliography":{"title":"Domain Generalization via Shuffled Style Assembly for Face Anti-Spoofing","authors":["Zhuo Wang","Zezheng Wang","Zitong Yu","Weihong Deng","Jiahong Li","Tingting Gao","Zhongyuan Wang"],"url":"https://arxiv.org/abs/2203.05340","pdfUrl":"https://arxiv.org/pdf/2203.05340","codeUrl":null,"preprint":{"id":"2203.05340","submittedOn":"2022-03-10","url":"https://arxiv.org/abs/2203.05340"},"publication":{"venue":"CVPR","year":2022,"kind":"conference","url":"https://arxiv.org/abs/2203.05340"},"citation":"@misc{faceantispoofingssan2022,\n  title = {{Domain Generalization via Shuffled Style Assembly for Face Anti-Spoofing}},\n  author = {Zhuo Wang and Zezheng Wang and Zitong Yu and Weihong Deng and Jiahong Li and Tingting Gao and Zhongyuan Wang},\n  year = {2022},\n  eprint = {2203.05340},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2203.05340}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/ssan.65b52ab509cf.bib"},"thumbnail":{"src":"/content/papers/assets/31e7f21274d546d558932f8110ce87e7599aa0e046f3fecdea4927eab53dc1cb.jpg","width":1372,"height":786},"locale":"en","path":"/content/papers/en/face-antispoofing/ssan.2e557af140cf.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"dual-stream-disentangling-of-content-and-style","text":"Dual-Stream Disentangling of Content and Style","depth":3},{"id":"style-reassembly-and-shuffling","text":"Style Reassembly and Shuffling","depth":3},{"id":"contrastive-learning-in-style","text":"Contrastive Learning in Style","depth":3},{"id":"overall-loss","text":"Overall Loss","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"comparison-with-other-methods","text":"Comparison with Other Methods","depth":3},{"id":"large-scale-testing","text":"Large-Scale Testing","depth":3},{"id":"feature-visualization","text":"Feature Visualization","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"face-antispoofing/ssdg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/sa-fas","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/iadg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"}]},{"id":"face-antispoofing/sa-fas","category":"face-antispoofing","legacyPath":"face-antispoofing/2303-sa-fas","legacySlug":"2303-sa-fas","legacyPaths":[],"title":"SA-FAS","subtitle":"The Law of the Hyperplane","author":"Z. Yuan","paperDate":"2023-03-23","publishedOn":"2025-04-18","paperTitle":"Rethinking Domain Generalization for Face Anti-spoofing: Separability and Alignment","paperUrl":"https://arxiv.org/abs/2303.13662","bibliography":{"title":"Rethinking Domain Generalization for Face Anti-spoofing: Separability and Alignment","authors":["Yiyou Sun","Yaojie Liu","Xiaoming Liu","Yixuan Li","Wen-Sheng Chu"],"url":"https://arxiv.org/abs/2303.13662","pdfUrl":"https://arxiv.org/pdf/2303.13662","codeUrl":null,"preprint":{"id":"2303.13662","submittedOn":"2023-03-23","url":"https://arxiv.org/abs/2303.13662"},"publication":{"venue":"CVPR","year":2023,"kind":"conference","url":"https://arxiv.org/abs/2303.13662"},"citation":"@misc{faceantispoofingsafas2023,\n  title = {{Rethinking Domain Generalization for Face Anti-spoofing: Separability and Alignment}},\n  author = {Yiyou Sun and Yaojie Liu and Xiaoming Liu and Yixuan Li and Wen-Sheng Chu},\n  year = {2023},\n  eprint = {2303.13662},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2303.13662}\n}\n","citationPath":"/content/papers/citations/face-antispoofing/sa-fas.a0e5f70569ad.bib"},"thumbnail":{"src":"/content/papers/assets/c5d5b32f66a70c73d21f58ebcfc0fdc186c0dac32b554fd61aa098f945fa6536.jpg","width":1518,"height":394},"locale":"en","path":"/content/papers/en/face-antispoofing/sa-fas.77a3a739b355.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"separability","text":"Separability","depth":3},{"id":"alignment","text":"Alignment","depth":3},{"id":"projected-gradient-irm-pg-irm","text":"Projected Gradient IRM (PG-IRM)","depth":3},{"id":"α-adjacency-is-the-key","text":"α-adjacency is the Key","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"comparison-with-other-methods","text":"Comparison with Other Methods","depth":3},{"id":"evaluation-metric-analysis","text":"Evaluation Metric Analysis","depth":3},{"id":"feature-distribution","text":"Feature Distribution","depth":3},{"id":"comparison-with-dann-and-ssdg","text":"Comparison with DANN and SSDG","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"face-antispoofing/ssdg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/ssan","relation":"comparison","topic":"Domain generalization for face anti-spoofing"},{"id":"face-antispoofing/iadg","relation":"comparison","topic":"Domain generalization for face anti-spoofing"}]}],"text":"Let's look at a CVPR paper.\n\nThe authors attempt to approach the FAS problem from a different perspective, presenting a very novel concept.\n\n## Defining the Problem\n\nThe safeguard for face recognition systems is built upon Face Anti-Spoofing (FAS).\n\nWith the maturity of deep learning, research progress has been remarkable: from early handcrafted features, to deep binary classification architectures, and more recently, cross-domain learning techniques. FAS has gradually learned how to recognize risks amidst chaos.\n\nHowever, once the dataset changes or the scenario shifts, the model’s performance drastically deteriorates, repeatedly confirmed.\n\nLater, researchers tried to teach models to \"learn generalization\" by introducing adversarial, disentanglement, contrastive, meta-learning, and other training strategies, aiming to make features consistent across different scenarios.\n\nBut in this process, one thing is unknowingly sacrificed: **the semantic structure**.\n\nBy semantic structure, it is not the network architecture itself, but the \"semantic distance\" and \"hierarchical context\" between samples:\n\n- A photo printed by a color printer and a video replayed on a mobile phone may be close in pixel distribution, but the types of attacks and underlying mechanisms they represent are vastly different.\n- The generation conditions of an attack, including lighting, background, or material, essentially segment the semantic attributes of samples rather than noise.\n\nYet existing methods mostly force all samples into a single \"Euclidean\" feature space, prioritizing minimizing the domain gap, which leads to **over-alignment**.\n\nWe cram features that should be separate together, compressing the structure the model might have understood into a flat space without hierarchy.\n\nIsn't that strange?\n\nTherefore, the authors of this paper believe:\n\n> **Since the difficulty of generalization stems from semantic imbalance, can we change the space to let hierarchy speak for itself?**\n\n---\n\n## Solving the Problem\n\n\n> [!WARNING]\n> \n> Mathematical warning: the methodology in this paper is somewhat complex, so readers are advised to proceed with caution.\n\n\n![model_arch](/content/papers/assets/b76b75be991560dd76a4f660ea9fd7ead4a6f1ad6ad0223c71e8ef1f2fa2883d.jpg)\n\nTo repair the semantic structural fractures caused by compression, this paper proposes a novel methodology:\n\n- **Hierarchical Prototype-guided Distribution Refinement (HPDR).**\n\nOverall, HPDR is built upon three core components:\n\n1. Embedding features in **hyperbolic space** to capture their intrinsic hierarchical structure;\n2. Using prototype learning as a semantic coordinate system, associating samples with semantic cluster centers;\n3. Employing **multi-level alignment and optimization strategies** to gradually approach a generalizable semantic distribution.\n\nFirst, let’s start by examining this space itself.\n\n---\n\n### Hyperbolic Space\n\nIf semantics have a tree-like structure, then hyperbolic space is the precise geometric choice.\n\nWe can imagine a semantic tree, branching from the main trunk of “attack” and “real,” continuously subdividing according to material, presentation method, and source device. If we forcibly compress this tree into a flat Euclidean map, its branches become distorted, overlapped, and unable to spread out; but in hyperbolic space, it naturally extends, avoids overlap, and can infinitely proliferate near the boundary.\n\nHPDR adopts exactly such a spatial model: the **Poincaré Ball Model**.\n\nThe Poincaré Ball can be represented as:\n\n$$\n\\mathbb{D}_c^n = \\left\\{ \\mathbf{x} \\in \\mathbb{R}^n \\mid c\\|\\mathbf{x}\\|^2 < 1 \\right\\}\n$$\n\nFor curvature parameter $c$, all points lie in an open ball of radius $1/\\sqrt{c}$; the radius is 1 only when $c=1$.\n\nAt first glance, it looks like a closed boundary, but this sphere’s edge is not a limit — it is infinitely far away.\n\n**This means we can approach the boundary arbitrarily close, but never actually reach it.**\n\nThis design has a key property: the closer points are to the boundary, the distances between them **nonlinearly expand**. In other words, distance itself carries semantic hierarchical tension.\n\nTo make this space computationally viable, we cannot use the traditional Euclidean metric; instead, we introduce a curvature-controlled **Riemannian metric tensor**:\n\n$$\ng_{\\mathbb{D}} = \\lambda_c^2 \\cdot g_E, \\quad \\lambda_c = \\frac{2}{1 - c\\|\\mathbf{x}\\|^2}\n$$\n\n- $g_E$: the familiar Euclidean metric;\n- $\\lambda_c$: a location-dependent scaling factor (conformal factor).\n\nNear the center, $\\lambda_c$ approaches a constant and the geometry behaves almost flat. Near the boundary, as $c\\|\\mathbf{x}\\|^2 \\to 1$, $\\lambda_c$ diverges and small coordinate shifts are greatly amplified in distance.\n\nThis is the essence of hyperbolic space: **allowing hierarchical expansion to unfold naturally.**\n\nTo describe displacements in this geometry, we use **Möbius addition**:\n\n$$\n\\mathbf{u} \\oplus_c \\mathbf{v}\n= \\frac{(1 + 2c\\langle \\mathbf{u}, \\mathbf{v} \\rangle + c\\|\\mathbf{v}\\|^2)\\mathbf{u} + (1 - c\\|\\mathbf{u}\\|^2)\\mathbf{v}}{1 + 2c\\langle \\mathbf{u}, \\mathbf{v} \\rangle + c^2\\|\\mathbf{u}\\|^2\\|\\mathbf{v}\\|^2}\n$$\n\nThis is not familiar vector addition but a way to combine displacements in the hyperbolic ball; the result depends on the current position and the curvature parameter.\n\nThe distance between two points is given by the hyperbolic distance:\n\n$$\nd_H(\\mathbf{u}, \\mathbf{v}) = \\frac{2}{\\sqrt{c}} \\cdot \\mathrm{arctanh}\\left( \\sqrt{c} \\cdot \\| -\\mathbf{u} \\oplus_c \\mathbf{v} \\| \\right)\n$$\n\nThis distance formula geometrically interprets “semantic divergence,” measuring how much vectors bend or split, rather than their traditional “distance apart.”\n\nHaving hyperbolic space ready, the next question is:\n\n- **How do we map neural network outputs into it?**\n\nSince neural network outputs are still Euclidean vectors, we must find a proper way to map them into hyperbolic space.\n\nThis is done by the exponential map:\n\n$$\n\\exp_0^c(\\mathbf{v}) = \\tanh\\left(\\sqrt{c}\\|\\mathbf{v}\\|\\right) \\cdot \\frac{\\mathbf{v}}{\\sqrt{c}\\|\\mathbf{v}\\|}\n$$\n\nThis operation has two effects:\n\n- Short vectors map near the ball center;\n- Long vectors map closer to its boundary.\n\nWhether those positions correspond to a semantic hierarchy depends on the subsequent prototypes and losses; the map alone does not assign meaning.\n\n### Semantic Anchors\n\nWith hyperbolic space prepared, where do semantics grow?\n\nIn HPDR, the authors do not classify from the feature vector alone. Before the final decision, they add learnable relationships to reference points called **prototypes**; the system is still trained end to end.\n\nPrototypes are not mere points but **semantic aggregation units**.\n\n- Their coordinates determine how samples are categorized;\n- The distances between prototypes shape the distribution of the entire semantic space.\n\nFirst, define a basic set of prototypes called **Leaf Prototypes**, which correspond directly to semantic cluster centers of samples, with explicit label information.\n\nMathematically defined as:\n\n$$\n\\mathcal{P}_{\\text{leaf}} = \\{ p_{ij} \\mid i \\in \\{0,1\\}, j \\in \\{0, \\dots, K-1\\} \\}\n$$\n\n- $i$: binary class index distinguishing fake from live;\n- $j$: the $j$th prototype within class $i$, total $K$;\n- Thus, there are $2K$ leaf prototypes corresponding to semantic subgroups of the two classes.\n\nThis design assumes that **samples in one class may form multiple feature subgroups**, each represented by a different leaf prototype; the paper does not provide separate subgroup labels.\n\nIn theory, these prototypes should be initialized directly in hyperbolic space, but practically initializing in $\\mathbb{D}^n$ often causes gradient explosion or unstable optimization. Therefore, the authors' practical approach is:\n\n1. Randomly initialize prototype vectors $\\mathbf{p}_{\\text{Euc}}$ in Euclidean space $\\mathbb{R}^n$;\n2. Map them into hyperbolic space via the exponential map:\n\n$$\n\\mathbf{p} = \\exp_0^c(\\mathbf{p}_{\\text{Euc}}), \\quad \\mathbf{p}_{\\text{Euc}} \\in \\mathbb{R}^n\n$$\n\nThis avoids the optimization difficulty of initializing directly in hyperbolic space.\n\nThe most interesting part of the overall structure design follows: **None-leaf Prototypes**.\n\nThese prototypes do not correspond to any single sample but serve as candidate common ancestors and connecting nodes for leaf prototypes.\n\nDefined as:\n\n$$\n\\mathcal{P}_{\\text{none-leaf}} = \\{ p_k \\mid k \\in \\{0, \\dots, K'-1\\} \\}\n$$\n\n- These are also embedded in $\\mathbb{D}^n$ but carry no label information;\n- They exist to build **internal nodes of the semantic tree**, simulating transitions and convergences between semantic hierarchy levels.\n\nIn other words:\n\n- **Leaf Prototypes aggregate samples → establish semantic correspondence;**\n- **None-leaf Prototypes aggregate prototypes → establish hierarchical structure.**\n\nThe beauty of this design is that **it learns prototype relations without extra hierarchy labels inside a classifier that does use known real/fake labels.**\n\nWe do not explicitly label which subgroup belongs to whom; the model discovers by itself which prototypes are close, which share common ancestors, which ancestors should be near the boundary, and which remain near the center.\n\n### Semantic Three-Level Alignment\n\nWith hyperbolic space and prototypes established, the next step is to build a learnable system.\n\nThis design is called **Hyperbolic Prototype Learning (HPL)**, a learning framework crafted around three semantic-level relationships:\n\n- **Prototype ↔ Instance**: point-to-point semantic alignment\n- **Instance ↔ Instance**: internal consistency among samples\n- **Prototype ↔ Prototype**: hierarchical construction of semantic structure\n\nLet’s examine each in turn:\n\n1. **Prototype-based Feature Alignment**\n\n   Starting with the basic step: **letting each sample find its semantic anchor**.\n\n   For each sample feature vector $\\mathbf{z}$, according to its label $y$, find the closest leaf prototype in that class:\n\n   $$\n   p(\\mathbf{z}) = \\arg\\min_{p_{yj} \\in \\mathcal{P}_{\\text{leaf}}} d_H(\\mathbf{z}, p_{yj})\n   $$\n\n   This establishes a \"correct prototype\" for each sample.\n\n   Next, the model is encouraged to learn features that move closer to these prototypes while distancing from others, applying contrastive learning in hyperbolic space:\n\n   $$\n   \\mathcal{L}_{PI} = -\\sum_{n=1}^N \\log \\frac{e^{-d_H(\\mathbf{z}_n, p_{c_k})}}{\\sum_{i,j} e^{-d_H(\\mathbf{z}_n, p_{ij})}}\n   $$\n\n   This loss lets the model autonomously judge which samples should be close or far apart in semantic space.\n\n   To avoid collapse where all samples map to one prototype, the paper proposes balanced assignments within each mini-batch. Yet the paper's stated 20 leaf prototypes per class mean 40 leaves for a batch of 30 samples. The released code instead uses 20 leaves in total; these settings must not be conflated when reproducing the result.\n\n---\n\n2. **Instance-based Consistency**\n\n   Real-world samples are not static; they undergo perturbations from lighting, angle, occlusion, etc. The goal is for the model to learn signals truly related to semantics.\n\n   HPL introduces sample consistency learning:\n\n   Given a sample and its augmentation $(x, x_{\\text{aug}})$, extract features $\\mathbf{z}, \\mathbf{z}_{\\text{aug}}$, and encourage consistency by minimizing their distance in semantic space:\n\n   $$\n   \\mathcal{L}_{II\\text{-feat}} = d_H(\\mathrm{detach}(\\mathbf{z}), \\mathbf{z}_{\\text{aug}})\n   $$\n\n   where $\\mathrm{detach}(\\cdot)$ blocks gradients to only update $\\mathbf{z}_{\\text{aug}}$, stabilizing the anchor feature.\n\n   At the semantic distribution level, their distance profiles to all prototypes should be consistent:\n\n   $$\n   \\mathcal{L}_{II\\text{-dist}} = \\left\\| d_H(\\mathrm{detach}(\\mathbf{z}), \\mathcal{P}_{\\text{leaf}}) - d_H(\\mathbf{z}_{\\text{aug}}, \\mathcal{P}_{\\text{leaf}}) \\right\\|_2\n   $$\n\n   The total loss is:\n\n   $$\n   \\mathcal{L}_{II} = \\mathcal{L}_{II\\text{-feat}} + \\mathcal{L}_{II\\text{-dist}}\n   $$\n\n   This design encourages the feature's position in the semantic structure to stay stable as the sample's appearance changes.\n\n---\n\n3. **Hierarchical Structure Modeling**\n\n   The relationships among prototypes cannot be “evenly spread.” They should have proximity, hierarchy, and ancestor-descendant relations.\n\n   This is the most symbolic step in HPDR: **the semantic tree self-growth**.\n\n   To learn this structure, the authors borrow the **Dasgupta cost** concept from hierarchical clustering:\n\n   $$\n   \\mathcal{C} = \\sum_{i,j} w_{ij} \\cdot |\\mathrm{leaves}(p_i \\vee p_j)|\n   $$\n\n   where $p_i \\vee p_j$ denotes the lowest common ancestor (LCA) of $p_i$ and $p_j$, and $|\\mathrm{leaves}(\\cdot)|$ is the number of leaf nodes under that subtree. Essentially, this cost asks: **Can semantically close prototypes merge at a lower level?**\n\n   Because Dasgupta cost has a discrete form and there are no ground-truth similarity weights for these nodes, the authors use a triplet-based optimization strategy:\n\n   1. Positive pair: $p_i, p_j$ are mutual K-nearest neighbors;\n   2. Negative prototype: $p_k$ does not satisfy the above mutual-neighbor condition with $p_i$.\n\n   Then, for each $(p_i, p_j, p_k)$, select $\\rho_{ij}$ from the none-leaf prototypes as a candidate LCA of $p_i$ and $p_j$:\n\n   $$\n   \\pi_{ij}(\\rho) = \\exp\\left( - \\max(d_H(p_i, \\rho), d_H(p_j, \\rho)) \\right)\n   $$\n\n   $$\n   \\rho_{ij} = \\arg\\max_{\\rho} \\left( \\pi_{ij}(\\rho) + g_{ij} \\right)\n   $$\n\n   Here $g_{ij}$ is Gumbel noise used to perturb the candidate ancestor selection; argmax alone is not differentiable.\n\n   Then define $\\rho_{ijk}$ as the common ancestor of $\\rho_{ij}$ and $p_k$, and formulate the triplet loss:\n\n   $$\n   \\begin{aligned}\n   \\mathcal{L}_{PP\\text{-LCA}} = &\\left[d_H(p_i, \\rho_{ij}) - d_H(p_i, \\rho_{ijk}) + \\delta\\right] \\\\\n   + &\\left[d_H(p_j, \\rho_{ij}) - d_H(p_j, \\rho_{ijk}) + \\delta\\right] \\\\\n   + &\\left[d_H(p_k, \\rho_{ijk}) - d_H(p_k, \\rho_{ij}) + \\delta\\right]\n   \\end{aligned}\n   $$\n\n   Additionally, two structural constraints on leaf prototypes’ distribution are imposed:\n\n   - **Encourage prototypes to stay away from the origin** (to prevent collapse):\n\n   $$\n   \\mathcal{L}_{P\\text{-Origin}} = -\\log \\frac{1}{1 + \\sum_{p_i \\in \\mathcal{P}_{\\text{leaf}}} \\exp(-d_H(p_i, \\mathbf{O}))}\n   $$\n\n   - **Encourage prototypes to disperse from each other**:\n\n   $$\n   \\mathcal{L}_{PP\\text{-leaf}} = -\\log \\frac{1}{1 + \\sum_{p_i, p_j \\in \\mathcal{P}_{\\text{leaf}}} \\exp(-d_H(p_i, p_j))}\n   $$\n\n   The total semantic structure modeling loss is:\n\n   $$\n   \\mathcal{L}_{PP} = \\mathcal{L}_{PP\\text{-LCA}} + \\mathcal{L}_{P\\text{-Origin}} + \\mathcal{L}_{PP\\text{-leaf}}\n   $$\n\n---\n\nThe real challenge of semantic alignment lies in letting relationships among points grow into a tree structure.\n\nHPDR’s Hyperbolic Prototype Learning turns classification into a syntactic parsing process within a nonlinear space, rather than merely assigning labels.\n\nIn the figure, the **Prototype-oriented Classifier** uses each sample's hyperbolic distances to the leaf prototypes to predict live or fake. Thus the final decision uses prototype information, not only the feature vector. The paper's Equation (19) writes this with a sigmoid; the released code instead uses a linear layer to produce two class logits and trains it with cross-entropy.\n\n### Training Procedure\n\nThe training process is divided into three steps:\n\n- **Step 1: Prototype Initialization**\n\n  First, initialize randomly in Euclidean space, then map into hyperbolic space:\n\n  - All **Leaf Prototypes** (used to align samples)\n  - All **None-leaf Prototypes** (used to build hierarchy)\n\n  At this stage, prototypes are scattered without structure and have no explicit correspondence with samples. They quietly exist, awaiting to be claimed by samples and to grow semantics from distances.\n\n---\n\n- **Step 2: Prototype Assignment**\n\n  Samples are mapped into hyperbolic space and begin searching for their semantic anchors.\n\n  The authors assign each sample feature $\\mathbf{z}$ to the closest leaf prototype within the same class according to its label $y$.\n\n---\n\n- **Step 3: Prototype Optimization**\n\n  Once the relationships between samples and prototypes are established, the system jointly adjusts and aligns semantics.\n\n  The entire system is optimized via the combined loss:\n\n  $$\n  \\mathcal{L}_{\\text{all}} = \\mathcal{L}_{\\text{pred}} + \\mathcal{L}_{PI} + \\mathcal{L}_{II} + \\mathcal{L}_{PP}\n  $$\n\n  These four losses correspond respectively to:\n\n  - **Stability of semantic decision-making** ($\\mathcal{L}_{\\text{pred}}$)\n  - **Alignment degree between samples and prototypes** ($\\mathcal{L}_{PI}$)\n  - **Consistency of samples under augmentation** ($\\mathcal{L}_{II}$)\n  - **Hierarchical and structural relations among prototypes** ($\\mathcal{L}_{PP}$)\n\n  After this optimization round, both samples and prototypes in the space update: prototypes are fine-tuned, sample embeddings converge, and semantic tension redistributes.\n\n  The process then returns to Step 2, **repeating assignment and entering the next convergence cycle**.\n\n### Experimental Setup\n\nTo validate HPDR's generalization capability, the authors used the commonly adopted OCIM benchmark.\n\nTo ensure learnability and reproducibility of the overall architecture, key model implementation settings are as follows:\n\n- **Input image size**: 256×256 (cropped color face region)\n- **Leaf prototype count**: the paper's prose says $K=20$ per class, while Table 5 labels a total $|\\mathcal{P}_{\\text{leaf}}|=20$; the released code also uses 20 total, or 10 per class\n- **Number of none-leaf prototypes $K' = 256$**: backbone nodes for building semantic hierarchy\n- **Feature dimension**: 256-dimensional hyperbolic feature space\n- **Curvature parameter $c = 0.01$**: controls the degree of hyperbolic curvature\n- **Sample configuration**: 5 samples per class per domain, total batch size of 30\n- **Positive prototype pairs in triplets**: top 3 KNN selected as positives\n- **Structural margin $\\delta$ in loss function**: 0.1\n\nTraining was implemented with PyTorch framework using DepthNet as backbone, performed on NVIDIA 4090 GPU, with Adam optimizer and a learning rate of 0.001.\n\n## Discussion\n\n### OCIM Benchmark\n\n\n\n![ocim benchmark](/content/papers/assets/77f45e81bdfc093030b18b008e504e4c8307303a2647c8f8a0cb9858b29a0a23.jpg)\n\n\n\nThis benchmark has become a standard in recent years, where three datasets are chosen as training sources and one unseen domain is left as the test set.\n\nThe experimental goal is to simulate real-world challenges of “new devices, new lighting, new environments.”\n\nResults shown in the table:\n\n- DG methods generally perform better than traditional methods, but not every DG method beats every traditional one in each test;\n- HPDR has the lowest HTER in all four settings. Its AUC is highest in the C and O targets, but not in the I and M targets.\n\nNotably, **HPDR's HTER and AUC also beat the listed prototype and hyperbolic-embedding methods in these four tests**. The authors suggest this may be because HPDR does more than align samples: it also builds **a hierarchical semantic tree**.\n\nThe advantage comes from the model’s built-in syntactic structure. Other methods align point-to-point relations, whereas HPDR aligns **positions and hierarchies between semantic concepts**.\n\n---\n\n### Limited Source Domain\n\n\n\n![limit](/content/papers/assets/b792e0e834cf0486fe3db25a4e8f64d60229c0f419fbbb9297205f6af082f69d.jpg)\n\n\n\nIn this test, the authors use only two datasets—MSU and Idiap Replay-Attack—as training sources, then test on OULU and CASIA. This examines generalization with a limited number of source domains.\n\nCompared with AMEL, HPDR improves AUC by **3.42 percentage points** and reduces HTER by **2.30 percentage points** under M\\&I→C. Under M\\&I→O, HPDR has the higher AUC, but its 21.07% HTER remains above AMEL's 19.68%. It leads the listed hyperbolic and prototype methods in both settings.\n\nThis shows that **in these two limited-source tests, HPDR can still achieve comparatively low error rates on unseen datasets**.\n\nHPDR here acts like a map reader with clear vision, relying on built-in terrain knowledge rather than the immediate route.\n\n---\n\n### Cross-Attack\n\n![cross-attack](/content/papers/assets/9b101fbea60045acbc9df95caea4eb9f6b91beb779ee113d8ddc53a72aec349c.jpg)\n\nFinally, the authors conduct cross-attack testing on the HQ-WMCA dataset.\n\nThe challenge is: exclude a certain attack type during training and test exclusively on that type, testing **the robustness of semantic transfer**.\n\nHPDR has the lowest ACER for four of the eight attacks, and its overall mean and standard deviation, **14.6±8.5%**, are the lowest in the table. Yet its Replay ACER of 19.0% is higher than every compared method. It helps on some unseen attacks, with a clear exception.\n\nIn other words, the model tries to use prototype relationships to judge whether “the overall semantics of this face fit within a known semantic structure.”.\n\n---\n\n### What Is Key in Semantic Space?\n\n\n\n![ablation](/content/papers/assets/a64a2e0a4cac61d1f00b3f8fb62be8040a6acb38693d768c5744678e9d24ebb9.jpg)\n\n\n\nFrom experiments, several observations arise:\n\n- **Without the three HPL losses**, the model still has classification loss $\\mathcal{L}_{\\text{pred}}$, but performs worst (HTER 17.78%). Merely entering hyperbolic space is insufficient; it needs **structured supervisory signals**.\n- **Adding only $\\mathcal{L}_{PI}$** (prototype-instance alignment) significantly improves performance, showing that correspondence between samples and semantic prototypes is the primary factor for stable embeddings.\n- **Adding $\\mathcal{L}_{PP}$ on top of $\\mathcal{L}_{PI}$** lowers HTER from 15.56% to 12.78%, supporting the value of prototype-structure constraints in this test.\n- **Using the full loss yields the best results**, confirming HPDR’s design logic is synergistic, not a linear stack, but a three-dimensional semantic syntax puzzle.\n\nIn this ablation, alignment, consistency, and hierarchy perform best together.\n\n---\n\n### How Many Branches Should the Semantic Tree Have?\n\n\n\n![leaf](/content/papers/assets/97a5a3cf64b7ad62d1bff1fe17a1d5c9a79598e0af916ef38d8e1463907c3287.jpg)\n\n\n\nThe authors tested different numbers of leaf prototypes. As the count rose from 4 to 20, HTER declined, although AUC did not rise monotonically. Beyond 20, both HTER and AUC worsened in this test.\n\nThe authors suggest that too many prototypes may make mini-batch assignments uneven. Under this test setting, Table 5 labels **20 total leaf prototypes** as the best result, inconsistent with the paper's statement of 20 per class.\n\n---\n\n### How Curved Should the Semantic Space Be?\n\n\n\n![curve](/content/papers/assets/7bdab941d5482121b92fe8ae37f2fbbb2441baacb9ad112d55fcc75a04a6a1db.jpg)\n\n\n\nFrom the results:\n\n- **Euclidean space ($c=0$) performs worst**, since semantic hierarchies cannot unfold;\n- Performance improves as curvature increases up to 0.01, indicating clearer semantic hierarchies;\n- As $c$ increases further, performance worsens; the authors conjecture that this relates to the exponential-map approximation with $x=0$ as its base point.\n\nHence, hyperbolic space should be “just right” — curved enough to let semantic branches grow freely but not so much as to lose direction.\n\n---\n\n### Visualization Results\n\n![vis](/content/papers/assets/abd4eb3af7fbcdb330a1e70cc73d4d9588fa744ef2b65698935fc44cb821074c.jpg)\n\nFinally, the authors visualize the feature distributions learned by HPDR on Leave-One-Out and Cross-Attack tasks.\n\nIn the figures:\n\n- **Sample colors distinguish both live/spoof class and source/target domain**;\n- **Positions correspond to hyperbolic embeddings**;\n- **Leaf and none-leaf prototypes are marked as specific points or hierarchical nodes**.\n\nKey observations:\n\n1. In panels (a) and (c)–(h), live and spoof samples are broadly separated in the selected cross-dataset and cross-attack settings, forming branches with the prototypes;\n2. None-leaf prototypes connect several leaf prototypes in these panels, showing the hierarchy the authors designed;\n3. These visualizations offer distribution clues.\n\nIn figure (b), samples corresponding to each leaf prototype are visualized in groups, revealing:\n\n- In the selected examples, samples under the same prototype share some visible similarities;\n- Prototypes sharing lower-level LCAs exhibit higher semantic consistency among their samples, confirming hierarchy geometrically reflects semantic consistency rather than just classification.\n\nThe visualization shows prototype relationships learned without extra hierarchy labels; live/spoof labels and hierarchical losses still participate in training.\n\n## Conclusion\n\nThe core idea of this study is not to memorize more samples, but to build a spatial logic that accommodates semantic hierarchies.\n\nThe authors examine HPDR through experiments and visualization. Across unseen datasets, limited source domains, and new attack types, it improves several tested results, with the exceptions noted above. These findings support the value of structural modeling for cross-domain recognition in the tested settings.\n\nWith recent trends integrating natural language capabilities into FAS, combining the semantic tree concept with language models may reveal a fundamentally different kind of semantic tree in the future.\n","imageSizes":{"/content/papers/assets/b76b75be991560dd76a4f660ea9fd7ead4a6f1ad6ad0223c71e8ef1f2fa2883d.jpg":{"width":1660,"height":718},"/content/papers/assets/77f45e81bdfc093030b18b008e504e4c8307303a2647c8f8a0cb9858b29a0a23.jpg":{"width":1558,"height":766},"/content/papers/assets/b792e0e834cf0486fe3db25a4e8f64d60229c0f419fbbb9297205f6af082f69d.jpg":{"width":980,"height":848},"/content/papers/assets/9b101fbea60045acbc9df95caea4eb9f6b91beb779ee113d8ddc53a72aec349c.jpg":{"width":1924,"height":240},"/content/papers/assets/a64a2e0a4cac61d1f00b3f8fb62be8040a6acb38693d768c5744678e9d24ebb9.jpg":{"width":1024,"height":548},"/content/papers/assets/97a5a3cf64b7ad62d1bff1fe17a1d5c9a79598e0af916ef38d8e1463907c3287.jpg":{"width":1032,"height":460},"/content/papers/assets/7bdab941d5482121b92fe8ae37f2fbbb2441baacb9ad112d55fcc75a04a6a1db.jpg":{"width":1024,"height":400},"/content/papers/assets/abd4eb3af7fbcdb330a1e70cc73d4d9588fa744ef2b65698935fc44cb821074c.jpg":{"width":1706,"height":548}}}
