{"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/trap-mid-trapdoor-based-defense-against-model","title":"Trap-MID: Trapdoor-based Defense against Model Inversion Attacks","arxiv_id":"2411.08460","date":"2024-11-13","proceeding":null,"authors":["Zhen-Ting Liu","Shang-Tse Chen"],"abstract":"Model Inversion (MI) attacks pose a significant threat to the privacy of Deep Neural Networks by recovering training data distribution from well-trained models. While existing defenses often rely on regularization techniques to reduce information leakage, they remain vulnerable to recent attacks. In this paper, we propose the Trapdoor-based Model Inversion Defense (Trap-MID) to mislead MI attacks. A trapdoor is integrated into the model to predict a specific label when the input is injected with the corresponding trigger. Consequently, this trapdoor information serves as the \"shortcut\" for MI attacks, leading them to extract trapdoor triggers rather than private data. We provide theoretical insights into the impacts of trapdoor's effectiveness and naturalness on deceiving MI attacks. In addition, empirical experiments demonstrate the state-of-the-art defense performance of Trap-MID against various MI attacks without the requirements for extra data or large computational overhead. Our source code is publicly available at https://github.com/ntuaislab/Trap-MID.","url_abs":"https://arxiv.org/abs/2411.08460v2","url_pdf":"https://arxiv.org/pdf/2411.08460v2.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":"trap-mid-trapdoor-based-defense-against-model","repo_url":"https://github.com/ntuaislab/trap-mid","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2411.08460","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.08460"}},"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":"deterministic:regex_extraction","url":"https://github.com/ntuaislab/Trap-MID","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ntuaislab/trap-mid","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"ran_draft_wrong":8,"ran_honours":1,"unverified":13},"by_repo_kind":{"official":{"samples":25,"ran":12,"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":0,"samples":[{"code_sha256_prefix":"a884c93b164b0301","entry":"BiDOLoss","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a884c93b164b0301"}},{"code_sha256_prefix":"82b9f22fb0cee711","entry":"coco_normalized_cca","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"82b9f22fb0cee711"}},{"code_sha256_prefix":"c808ba0601a877e8","entry":"cross_entropy_loss","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"plgmi/losses.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/plgmi/losses.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c808ba0601a877e8"}},{"code_sha256_prefix":"e114974d0f761dd9","entry":"distmat","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e114974d0f761dd9"}},{"code_sha256_prefix":"ad5dbf57f3ea2633","entry":"get_block","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"evolve.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/evolve.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad5dbf57f3ea2633"}},{"code_sha256_prefix":"ea7941eb1ea8ffb2","entry":"get_blocks","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"evolve.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/evolve.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea7941eb1ea8ffb2"}},{"code_sha256_prefix":"7d2973af90a23c1f","entry":"hsic_normalized_cca","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d2973af90a23c1f"}},{"code_sha256_prefix":"92265a82f9af90ae","entry":"kernelmat","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"92265a82f9af90ae"}},{"code_sha256_prefix":"342f31bfe572d0c8","entry":"max_margin_loss","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"plgmi/losses.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/plgmi/losses.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"342f31bfe572d0c8"}},{"code_sha256_prefix":"b6e4cb9cdcdb7226","entry":"poincare_loss","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"plgmi/losses.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/plgmi/losses.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6e4cb9cdcdb7226"}},{"code_sha256_prefix":"93214d3b236b1185","entry":"sigma_estimation","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93214d3b236b1185"}},{"code_sha256_prefix":"af8945c5f03a178f","entry":"to_categorical","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af8945c5f03a178f"}},{"code_sha256_prefix":"83508305e20056c9","entry":"IR_50_64","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"evolve.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/evolve.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83508305e20056c9"}},{"code_sha256_prefix":"c6aa7f9bc9167818","entry":"blend","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"engine.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/engine.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c6aa7f9bc9167818"}},{"code_sha256_prefix":"35bbc328adf58afc","entry":"cifar10_ls_scheduler","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35bbc328adf58afc"}},{"code_sha256_prefix":"8ceea87fe22a6f64","entry":"completion_network_loss","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"lomma/losses.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/lomma/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ceea87fe22a6f64"}},{"code_sha256_prefix":"6a21e67f80fded5c","entry":"custom_crop","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a21e67f80fded5c"}},{"code_sha256_prefix":"4fb95eae17ae047f","entry":"init_optimizer","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"utils.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4fb95eae17ae047f"}},{"code_sha256_prefix":"36a55c008abe5c4b","entry":"load_attri","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"lomma/dataloader.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/lomma/dataloader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"36a55c008abe5c4b"}},{"code_sha256_prefix":"96bb2d7d804b9cad","entry":"ls_scheduler","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96bb2d7d804b9cad"}},{"code_sha256_prefix":"d8ff7dc2584b42c8","entry":"make_layers","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"classify.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/classify.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d8ff7dc2584b42c8"}},{"code_sha256_prefix":"2b7c170416d54959","entry":"mnist_ls_scheduler","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"loss.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2b7c170416d54959"}},{"code_sha256_prefix":"45a9b6bf1ce41469","entry":"noise_loss","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"lomma/losses.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/lomma/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"45a9b6bf1ce41469"}},{"code_sha256_prefix":"b1181f4abb871ade","entry":"prepare_results_dir","repo":"ntuaislab/trap-mid","repo_kind":"official","path":"plgmi/train_cgan.py","file_url":"https://github.com/ntuaislab/trap-mid/blob/HEAD/plgmi/train_cgan.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b1181f4abb871ade"}},{"code_sha256_prefix":"26ebe515279a4189","entry":"test","repo":"ntuaislab/Trap-MID","repo_kind":"official","path":"engine.py","file_url":"https://github.com/ntuaislab/Trap-MID/blob/HEAD/engine.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26ebe515279a4189"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}