{"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/watermarking-autoregressive-image-generation","title":"Watermarking Autoregressive Image Generation","arxiv_id":"2506.16349","date":"2025-06-19","proceeding":null,"authors":["Nikola Jovanović","Ismail Labiad","Tomáš Souček","Martin Vechev","Pierre Fernandez"],"abstract":"Watermarking the outputs of generative models has emerged as a promising approach for tracking their provenance. Despite significant interest in autoregressive image generation models and their potential for misuse, no prior work has attempted to watermark their outputs at the token level. In this work, we present the first such approach by adapting language model watermarking techniques to this setting. We identify a key challenge: the lack of reverse cycle-consistency (RCC), wherein re-tokenizing generated image tokens significantly alters the token sequence, effectively erasing the watermark. To address this and to make our method robust to common image transformations, neural compression, and removal attacks, we introduce (i) a custom tokenizer-detokenizer finetuning procedure that improves RCC, and (ii) a complementary watermark synchronization layer. As our experiments demonstrate, our approach enables reliable and robust watermark detection with theoretically grounded p-values.","url_abs":"https://arxiv.org/abs/2506.16349v1","url_pdf":"https://arxiv.org/pdf/2506.16349v1.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":"watermarking-autoregressive-image-generation","repo_url":"https://github.com/facebookresearch/wmar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.16349","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.16349"}},"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/facebookresearch/wmar","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/GAIR-NLP/anole","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"ran_fixture":3,"ran_honours":2,"unverified":5},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1},"found_in_text":{"samples":7,"ran":2,"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":8,"samples":[{"code_sha256_prefix":"55d6d0ac8a0884b0","entry":"build_causal_mask","repo":"facebookresearch/wmar","repo_kind":"official","path":"deps/rar/modeling/rar.py","file_url":"https://github.com/facebookresearch/wmar/blob/HEAD/deps/rar/modeling/rar.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55d6d0ac8a0884b0"}},{"code_sha256_prefix":"6048521ddf44428e","entry":"chw_to_pillow","repo":"facebookresearch/wmar","repo_kind":"official","path":"wmar/utils/utils.py","file_url":"https://github.com/facebookresearch/wmar/blob/HEAD/wmar/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6048521ddf44428e"}},{"code_sha256_prefix":"62fcb3912a967a50","entry":"modulate","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"62fcb3912a967a50"}},{"code_sha256_prefix":"0b5df0bf88f838f9","entry":"simple_rescale","repo":"facebookresearch/wmar","repo_kind":"official","path":"wmar/utils/utils.py","file_url":"https://github.com/facebookresearch/wmar/blob/HEAD/wmar/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b5df0bf88f838f9"}},{"code_sha256_prefix":"f4a1d2fe79620d9e","entry":"split_token_sequence","repo":"gair-nlp/anole","repo_kind":"found_in_text","path":"interleaved_generation.py","file_url":"https://github.com/gair-nlp/anole/blob/HEAD/interleaved_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4a1d2fe79620d9e"}},{"code_sha256_prefix":"e8c5dcf9ed1f9f5d","entry":"split_token_sequence","repo":"gair-nlp/anole","repo_kind":"found_in_text","path":"inference.py","file_url":"https://github.com/gair-nlp/anole/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e8c5dcf9ed1f9f5d"}},{"code_sha256_prefix":"8ac9f3f8b2e393a5","entry":"add_padding","repo":"GAIR-NLP/anole","repo_kind":"found_in_text","path":"facilitating_image_generation/read_parquet.py","file_url":"https://github.com/GAIR-NLP/anole/blob/HEAD/facilitating_image_generation/read_parquet.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":"8ac9f3f8b2e393a5"}},{"code_sha256_prefix":"647a4e7ff1436e07","entry":"bin_to_pth","repo":"GAIR-NLP/anole","repo_kind":"found_in_text","path":"training/bin_to_pth.py","file_url":"https://github.com/GAIR-NLP/anole/blob/HEAD/training/bin_to_pth.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":"647a4e7ff1436e07"}},{"code_sha256_prefix":"abbbb29b34ebbb42","entry":"collate_fn","repo":"GAIR-NLP/anole","repo_kind":"found_in_text","path":"facilitating_image_generation/train_image_head.py","file_url":"https://github.com/GAIR-NLP/anole/blob/HEAD/facilitating_image_generation/train_image_head.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":"abbbb29b34ebbb42"}},{"code_sha256_prefix":"bb9a7dc1a33f20cf","entry":"get_mapped_key","repo":"GAIR-NLP/anole","repo_kind":"found_in_text","path":"training/bin_to_pth.py","file_url":"https://github.com/GAIR-NLP/anole/blob/HEAD/training/bin_to_pth.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":"bb9a7dc1a33f20cf"}},{"code_sha256_prefix":"ea6ed4f31d29224a","entry":"zero_out_gradient","repo":"GAIR-NLP/anole","repo_kind":"found_in_text","path":"facilitating_image_generation/train_image_head.py","file_url":"https://github.com/GAIR-NLP/anole/blob/HEAD/facilitating_image_generation/train_image_head.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":"ea6ed4f31d29224a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}