{"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/translation-equivariant-image-quantizer-for","title":"Exploration into Translation-Equivariant Image Quantization","arxiv_id":"2112.00384","date":"2021-12-01","proceeding":null,"authors":["Woncheol Shin","Gyubok Lee","Jiyoung Lee","Eunyi Lyou","Joonseok Lee","Edward Choi"],"abstract":"This is an exploratory study that discovers the current image quantization (vector quantization) do not satisfy translation equivariance in the quantized space due to aliasing. Instead of focusing on anti-aliasing, we propose a simple yet effective way to achieve translation-equivariant image quantization by enforcing orthogonality among the codebook embeddings. To explore the advantages of translation-equivariant image quantization, we conduct three proof-of-concept experiments with a carefully controlled dataset: (1) text-to-image generation, where the quantized image indices are the target to predict, (2) image-to-text generation, where the quantized image indices are given as a condition, (3) using a smaller training set to analyze sample efficiency. From the strictly controlled experiments, we empirically verify that the translation-equivariant image quantizer improves not only sample efficiency but also the accuracy over VQGAN up to +11.9% in text-to-image generation and +3.9% in image-to-text generation.","url_abs":"https://arxiv.org/abs/2112.00384v3","url_pdf":"https://arxiv.org/pdf/2112.00384v3.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":"translation-equivariant-image-quantizer-for","repo_url":"https://github.com/wcshin-git/te-vqgan","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"translation-equivariant-image-quantizer-for","repo_url":"https://github.com/lucidrains/vector-quantize-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"image-to-text","task_name":"Image to text"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2112.00384","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.00384"}},"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/wcshin-git/te-vqgan","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/vector-quantize-pytorch","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":4,"ran_draft_wrong":7,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":14,"ran":13,"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":"7439a9d4c6be04b0","entry":"adopt_weight","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/losses/vqperceptual.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/losses/vqperceptual.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":"7439a9d4c6be04b0"}},{"code_sha256_prefix":"5ef87f1a172f152b","entry":"count_params","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/util.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/util.py","link_basis":"harvester_set","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":"5ef87f1a172f152b"}},{"code_sha256_prefix":"e70eb36cf08faee4","entry":"get_ckpt_path","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/util.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/util.py","link_basis":"harvester_set","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":"e70eb36cf08faee4"}},{"code_sha256_prefix":"221b2d116fdf1032","entry":"get_obj_from_str","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/models/vqgan.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/models/vqgan.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":"221b2d116fdf1032"}},{"code_sha256_prefix":"50aa4a59fe718c61","entry":"get_pad_layer","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/diffusionmodules/model.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/diffusionmodules/model.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":"50aa4a59fe718c61"}},{"code_sha256_prefix":"cb49209c125de1b4","entry":"get_timestep_embedding","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/diffusionmodules/model.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/diffusionmodules/model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb49209c125de1b4"}},{"code_sha256_prefix":"22a83df891d750c6","entry":"hinge_d_loss","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/losses/vqperceptual.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/losses/vqperceptual.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"22a83df891d750c6"}},{"code_sha256_prefix":"07d90bd6ae1be7db","entry":"md5_hash","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/util.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/util.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07d90bd6ae1be7db"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/diffusionmodules/model.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/diffusionmodules/model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3137073275f8c21a"}},{"code_sha256_prefix":"7257fdf155f5ef45","entry":"normalize_tensor","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/losses/lpips.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/losses/lpips.py","link_basis":"harvester_set","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":"7257fdf155f5ef45"}},{"code_sha256_prefix":"31543f3e2c18272e","entry":"retrieve","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/util.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/util.py","link_basis":"harvester_set","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":"31543f3e2c18272e"}},{"code_sha256_prefix":"e268053216b1dd62","entry":"spatial_average","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/losses/lpips.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/losses/lpips.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e268053216b1dd62"}},{"code_sha256_prefix":"263c54290c553ddd","entry":"vanilla_d_loss","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/modules/losses/vqperceptual.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/modules/losses/vqperceptual.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"263c54290c553ddd"}},{"code_sha256_prefix":"f0ac78b4e05be194","entry":"instantiate_from_config","repo":"wcshin-git/te-vqgan","repo_kind":"official","path":"taming/models/vqgan.py","file_url":"https://github.com/wcshin-git/te-vqgan/blob/HEAD/taming/models/vqgan.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":"f0ac78b4e05be194"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}