{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/rethinking-domain-generalization-for-face","title":"Rethinking Domain Generalization for Face Anti-spoofing: Separability and Alignment","arxiv_id":"2303.13662","date":"2023-03-23","proceeding":"CVPR 2023 1","authors":["Yiyou Sun","Yaojie Liu","Xiaoming Liu","Yixuan Li","Wen-Sheng Chu"],"abstract":"This work studies the generalization issue of face anti-spoofing (FAS) models on domain gaps, such as image resolution, blurriness and sensor variations. Most prior works regard domain-specific signals as a negative impact, and apply metric learning or adversarial losses to remove them from feature representation. Though learning a domain-invariant feature space is viable for the training data, we show that the feature shift still exists in an unseen test domain, which backfires on the generalizability of the classifier. In this work, instead of constructing a domain-invariant feature space, we encourage domain separability while aligning the live-to-spoof transition (i.e., the trajectory from live to spoof) to be the same for all domains. We formulate this FAS strategy of separability and alignment (SA-FAS) as a problem of invariant risk minimization (IRM), and learn domain-variant feature representation but domain-invariant classifier. We demonstrate the effectiveness of SA-FAS on challenging cross-domain FAS datasets and establish state-of-the-art performance.","url_abs":"https://arxiv.org/abs/2303.13662v1","url_pdf":"https://arxiv.org/pdf/2303.13662v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"rethinking-domain-generalization-for-face","repo_url":"https://github.com/sunyiyou/safas","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"face-anti-spoofing","task_name":"Face Anti-Spoofing"},{"task_slug":"metric-learning","task_name":"Metric Learning"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.13662","atlas_url":"https://app.syntology.ai/?focus=2303.13662","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.13662"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/sunyiyou/SAFAS","reach":null}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"f73fe71b2b4fef70","entry":"AbstractResNet","repo":"sunyiyou/SAFAS","repo_kind":"official","path":"networks/resnet_lgt.py","file_url":"https://github.com/sunyiyou/SAFAS/blob/HEAD/networks/resnet_lgt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f73fe71b2b4fef70"}},{"code_sha256_prefix":"97020aa2fe92d7ef","entry":"LogisticRegression","repo":"sunyiyou/SAFAS","repo_kind":"official","path":"networks/resnet_lgt.py","file_url":"https://github.com/sunyiyou/SAFAS/blob/HEAD/networks/resnet_lgt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"97020aa2fe92d7ef"}},{"code_sha256_prefix":"cb519e01e830dcb8","entry":"NormedLogisticRegression","repo":"sunyiyou/SAFAS","repo_kind":"official","path":"networks/resnet_lgt.py","file_url":"https://github.com/sunyiyou/SAFAS/blob/HEAD/networks/resnet_lgt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb519e01e830dcb8"}},{"code_sha256_prefix":"4ed0149bdb14ac6c","entry":"ResNet","repo":"sunyiyou/SAFAS","repo_kind":"official","path":"networks/resnet_lgt.py","file_url":"https://github.com/sunyiyou/SAFAS/blob/HEAD/networks/resnet_lgt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4ed0149bdb14ac6c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}