{"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/multi-attentional-deepfake-detection","title":"Multi-attentional Deepfake Detection","arxiv_id":"2103.02406","date":"2021-03-03","proceeding":"CVPR 2021 1","authors":["Hanqing Zhao","Wenbo Zhou","Dongdong Chen","Tianyi Wei","Weiming Zhang","Nenghai Yu"],"abstract":"Face forgery by deepfake is widely spread over the internet and has raised severe societal concerns. Recently, how to detect such forgery contents has become a hot research topic and many deepfake detection methods have been proposed. Most of them model deepfake detection as a vanilla binary classification problem, i.e, first use a backbone network to extract a global feature and then feed it into a binary classifier (real/fake). But since the difference between the real and fake images in this task is often subtle and local, we argue this vanilla solution is not optimal. In this paper, we instead formulate deepfake detection as a fine-grained classification problem and propose a new multi-attentional deepfake detection network. Specifically, it consists of three key components: 1) multiple spatial attention heads to make the network attend to different local parts; 2) textural feature enhancement block to zoom in the subtle artifacts in shallow features; 3) aggregate the low-level textural feature and high-level semantic features guided by the attention maps. Moreover, to address the learning difficulty of this network, we further introduce a new regional independence loss and an attention guided data augmentation strategy. Through extensive experiments on different datasets, we demonstrate the superiority of our method over the vanilla binary classifier counterparts, and achieve state-of-the-art performance.","url_abs":"https://arxiv.org/abs/2103.02406v3","url_pdf":"https://arxiv.org/pdf/2103.02406v3.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":"multi-attentional-deepfake-detection","repo_url":"https://github.com/yoctta/multiple-attention","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"binary-classification","task_name":"Binary Classification"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"deepfake-detection","task_name":"DeepFake Detection"},{"task_slug":"face-swapping","task_name":"Face Swapping"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.02406","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.02406"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yoctta/multiple-attention","reach":null}],"summary":{"ran":14,"ran_fixture":1,"ran_draft_wrong":2,"ran_honours":3,"unverified":5},"by_repo_kind":{"official":{"samples":25,"ran":20,"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":25,"samples":[{"code_sha256_prefix":"43d9801d323877e5","entry":"AttentionMap","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"43d9801d323877e5"}},{"code_sha256_prefix":"020e1d7ced206b80","entry":"AttentionPooling","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"020e1d7ced206b80"}},{"code_sha256_prefix":"ee64f50e0c084ee1","entry":"Auxiliary_Loss_v2","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"ee64f50e0c084ee1"}},{"code_sha256_prefix":"9bf22d4f451ed68d","entry":"Block","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9bf22d4f451ed68d"}},{"code_sha256_prefix":"fac9df854d8f28ec","entry":"Conv2dDynamicSamePadding","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac9df854d8f28ec"}},{"code_sha256_prefix":"1d6d41efbaa4e76e","entry":"Conv2dStaticSamePadding","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d6d41efbaa4e76e"}},{"code_sha256_prefix":"552d3aca78645318","entry":"Identity","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"552d3aca78645318"}},{"code_sha256_prefix":"12770455a6977457","entry":"MBConvBlock","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"12770455a6977457"}},{"code_sha256_prefix":"216a33b331a90731","entry":"MemoryEfficientSwish","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"216a33b331a90731"}},{"code_sha256_prefix":"e62c4554809ce2bc","entry":"SeparableConv2d","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e62c4554809ce2bc"}},{"code_sha256_prefix":"0fb7ab180e596005","entry":"Swish","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0fb7ab180e596005"}},{"code_sha256_prefix":"6fca2143a077d04e","entry":"SwishImplementation","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6fca2143a077d04e"}},{"code_sha256_prefix":"8e7280a7aaf78ae0","entry":"Texture_Enhance_v2","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e7280a7aaf78ae0"}},{"code_sha256_prefix":"2dd5dfa94542911e","entry":"drop_connect","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2dd5dfa94542911e"}},{"code_sha256_prefix":"257c1c1e61218873","entry":"efficientnet","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"257c1c1e61218873"}},{"code_sha256_prefix":"0d2081257b75b978","entry":"efficientnet_params","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d2081257b75b978"}},{"code_sha256_prefix":"4c8a17dc9214affe","entry":"get_same_padding_conv2d","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4c8a17dc9214affe"}},{"code_sha256_prefix":"826e2e91d6a9ec09","entry":"round_filters","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"826e2e91d6a9ec09"}},{"code_sha256_prefix":"4d8e794b593d34a0","entry":"round_repeats","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d8e794b593d34a0"}},{"code_sha256_prefix":"a4916d92d14f412b","entry":"xception","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4916d92d14f412b"}},{"code_sha256_prefix":"43fa0c458613b03f","entry":"BlockDecoder","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"43fa0c458613b03f"}},{"code_sha256_prefix":"1bf7777ed9460905","entry":"EfficientNet","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"1bf7777ed9460905"}},{"code_sha256_prefix":"ed884b31a2f023a3","entry":"MAT","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"ed884b31a2f023a3"}},{"code_sha256_prefix":"3872570123f9e3ae","entry":"get_model_params","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"3872570123f9e3ae"}},{"code_sha256_prefix":"5545a1c79e2818b2","entry":"load_pretrained_weights","repo":"yoctta/multiple-attention","repo_kind":"official","path":"models/MAT.py","file_url":"https://github.com/yoctta/multiple-attention/blob/HEAD/models/MAT.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":"5545a1c79e2818b2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}