{"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/how-to-trace-latent-generative-model","title":"How to Trace Latent Generative Model Generated Images without Artificial Watermark?","arxiv_id":"2405.13360","date":"2024-05-22","proceeding":null,"authors":["Zhenting Wang","Vikash Sehwag","Chen Chen","Lingjuan Lyu","Dimitris N. Metaxas","Shiqing Ma"],"abstract":"Latent generative models (e.g., Stable Diffusion) have become more and more popular, but concerns have arisen regarding potential misuse related to images generated by these models. It is, therefore, necessary to analyze the origin of images by inferring if a particular image was generated by a specific latent generative model. Most existing methods (e.g., image watermark and model fingerprinting) require extra steps during training or generation. These requirements restrict their usage on the generated images without such extra operations, and the extra required operations might compromise the quality of the generated images. In this work, we ask whether it is possible to effectively and efficiently trace the images generated by a specific latent generative model without the aforementioned requirements. To study this problem, we design a latent inversion based method called LatentTracer to trace the generated images of the inspected model by checking if the examined images can be well-reconstructed with an inverted latent input. We leverage gradient based latent inversion and identify a encoder-based initialization critical to the success of our approach. Our experiments on the state-of-the-art latent generative models, such as Stable Diffusion, show that our method can distinguish the images generated by the inspected model and other images with a high accuracy and efficiency. Our findings suggest the intriguing possibility that today's latent generative generated images are naturally watermarked by the decoder used in the source models. Code: https://github.com/ZhentingWang/LatentTracer.","url_abs":"https://arxiv.org/abs/2405.13360v1","url_pdf":"https://arxiv.org/pdf/2405.13360v1.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":"how-to-trace-latent-generative-model","repo_url":"https://github.com/zhentingwang/latenttracer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.13360","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.13360"}},"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/ZhentingWang/LatentTracer","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhentingwang/latenttracer","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"official":{"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":7,"samples":[{"code_sha256_prefix":"b4da07acf34dcea9","entry":"calcEntropy2dSpeedUp","repo":"zhentingwang/latenttracer","repo_kind":"official","path":"latenttracer.py","file_url":"https://github.com/zhentingwang/latenttracer/blob/HEAD/latenttracer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b4da07acf34dcea9"}},{"code_sha256_prefix":"e1dc7a1de20aa5bf","entry":"calcIJ","repo":"zhentingwang/latenttracer","repo_kind":"official","path":"latenttracer.py","file_url":"https://github.com/zhentingwang/latenttracer/blob/HEAD/latenttracer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e1dc7a1de20aa5bf"}},{"code_sha256_prefix":"a2b34ca3b238663f","entry":"psnr","repo":"ZhentingWang/LatentTracer","repo_kind":"official","path":"inference_utils.py","file_url":"https://github.com/ZhentingWang/LatentTracer/blob/HEAD/inference_utils.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":"a2b34ca3b238663f"}},{"code_sha256_prefix":"f4ac91315a94774b","entry":"text_encoder_attn_modules","repo":"ZhentingWang/LatentTracer","repo_kind":"official","path":"diffusers/loaders.py","file_url":"https://github.com/ZhentingWang/LatentTracer/blob/HEAD/diffusers/loaders.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":"f4ac91315a94774b"}},{"code_sha256_prefix":"2c476d130bd89887","entry":"text_encoder_lora_state_dict","repo":"ZhentingWang/LatentTracer","repo_kind":"official","path":"diffusers/loaders.py","file_url":"https://github.com/ZhentingWang/LatentTracer/blob/HEAD/diffusers/loaders.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":"2c476d130bd89887"}},{"code_sha256_prefix":"ccca296c90beae91","entry":"text_encoder_mlp_modules","repo":"ZhentingWang/LatentTracer","repo_kind":"official","path":"diffusers/loaders.py","file_url":"https://github.com/ZhentingWang/LatentTracer/blob/HEAD/diffusers/loaders.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":"ccca296c90beae91"}},{"code_sha256_prefix":"4d3991a864d01acb","entry":"vq_image2latent","repo":"ZhentingWang/LatentTracer","repo_kind":"official","path":"inference_models_multilatent.py","file_url":"https://github.com/ZhentingWang/LatentTracer/blob/HEAD/inference_models_multilatent.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":"4d3991a864d01acb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}