{"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/canife-crafting-canaries-for-empirical","title":"CANIFE: Crafting Canaries for Empirical Privacy Measurement in Federated Learning","arxiv_id":"2210.02912","date":"2022-10-06","proceeding":null,"authors":["Samuel Maddock","Alexandre Sablayrolles","Pierre Stock"],"abstract":"Federated Learning (FL) is a setting for training machine learning models in distributed environments where the clients do not share their raw data but instead send model updates to a server. However, model updates can be subject to attacks and leak private information. Differential Privacy (DP) is a leading mitigation strategy which involves adding noise to clipped model updates, trading off performance for strong theoretical privacy guarantees. Previous work has shown that the threat model of DP is conservative and that the obtained guarantees may be vacuous or may overestimate information leakage in practice. In this paper, we aim to achieve a tighter measurement of the model exposure by considering a realistic threat model. We propose a novel method, CANIFE, that uses canaries - carefully crafted samples by a strong adversary to evaluate the empirical privacy of a training round. We apply this attack to vision models trained on CIFAR-10 and CelebA and to language models trained on Sent140 and Shakespeare. In particular, in realistic FL scenarios, we demonstrate that the empirical per-round epsilon obtained with CANIFE is 4-5x lower than the theoretical bound.","url_abs":"https://arxiv.org/abs/2210.02912v2","url_pdf":"https://arxiv.org/pdf/2210.02912v2.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":"canife-crafting-canaries-for-empirical","repo_url":"https://github.com/facebookresearch/canife","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"federated-learning","task_name":"Federated Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2210.02912","atlas_url":"https://app.syntology.ai/?focus=2210.02912","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.02912"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/canife","reach":null}],"summary":{"ran":1,"ran_draft_wrong":3,"ran_honours":2,"unverified":3},"by_repo_kind":{"official":{"samples":9,"ran":6,"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":"efd48121fda654d5","entry":"Canary","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"efd48121fda654d5"}},{"code_sha256_prefix":"36d4d6b369158343","entry":"clip_grad","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.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":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"36d4d6b369158343"}},{"code_sha256_prefix":"05c54dfb2ad9fbf2","entry":"compute_batch_grad","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"05c54dfb2ad9fbf2"}},{"code_sha256_prefix":"164f09c0405b4f1d","entry":"compute_local_update","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"164f09c0405b4f1d"}},{"code_sha256_prefix":"dba1320ceee3fa62","entry":"count_params","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"dba1320ceee3fa62"}},{"code_sha256_prefix":"0abf6ba1505650e8","entry":"state_dict_to_cpu","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"0abf6ba1505650e8"}},{"code_sha256_prefix":"eb238c8369a08547","entry":"CanaryDesigner","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"eb238c8369a08547"}},{"code_sha256_prefix":"8e8a5c37c5473f34","entry":"compute_sample_grads","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"8e8a5c37c5473f34"}},{"code_sha256_prefix":"a45df143257b6101","entry":"display_gpu_mem","repo":"facebookresearch/canife","repo_kind":"official","path":"canife/canary_designer.py","file_url":"https://github.com/facebookresearch/canife/blob/HEAD/canife/canary_designer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a45df143257b6101"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}