{"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/variable-bitrate-neural-compression-via","title":"Variational Bayesian Quantization","arxiv_id":"2002.08158","date":"2020-02-18","proceeding":"ICML 2020 1","authors":["Yibo Yang","Robert Bamler","Stephan Mandt"],"abstract":"We propose a novel algorithm for quantizing continuous latent representations in trained models. Our approach applies to deep probabilistic models, such as variational autoencoders (VAEs), and enables both data and model compression. Unlike current end-to-end neural compression methods that cater the model to a fixed quantization scheme, our algorithm separates model design and training from quantization. Consequently, our algorithm enables \"plug-and-play\" compression with variable rate-distortion trade-off, using a single trained model. Our algorithm can be seen as a novel extension of arithmetic coding to the continuous domain, and uses adaptive quantization accuracy based on estimates of posterior uncertainty. Our experimental results demonstrate the importance of taking into account posterior uncertainties, and show that image compression with the proposed algorithm outperforms JPEG over a wide range of bit rates using only a single standard VAE. Further experiments on Bayesian neural word embeddings demonstrate the versatility of the proposed method.","url_abs":"https://arxiv.org/abs/2002.08158v2","url_pdf":"https://arxiv.org/pdf/2002.08158v2.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":"variable-bitrate-neural-compression-via","repo_url":"https://github.com/mandt-lab/bayesian-ac","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"variable-bitrate-neural-compression-via","repo_url":"https://github.com/mandt-lab/vbq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"image-compression","task_name":"Image Compression"},{"task_slug":"model-compression","task_name":"Model Compression"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"word-embeddings","task_name":"Word Embeddings"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.08158","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.08158"}},"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/mandt-lab/vbq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mandt-lab/bayesian-ac","reach":null}],"summary":{"ran":1,"ran_draft_wrong":1,"ran_fixture":2,"ran_honours":1},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":2}},"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":"a9bae2618b825de4","entry":"ChannelwisePriorCDFQuantizer","repo":"mandt-lab/bayesian-ac","repo_kind":"official","path":"img-compression/quantizer.py","file_url":"https://github.com/mandt-lab/bayesian-ac/blob/HEAD/img-compression/quantizer.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":"a9bae2618b825de4"}},{"code_sha256_prefix":"c367c2879a750564","entry":"add_cli_args","repo":"mandt-lab/vbq","repo_kind":"official","path":"word-embeddings/bayesian-skip-gram/models/single-timestep.py","file_url":"https://github.com/mandt-lab/vbq/blob/HEAD/word-embeddings/bayesian-skip-gram/models/single-timestep.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c367c2879a750564"}},{"code_sha256_prefix":"0072df20810f5343","entry":"batch_quantize_indep_dims","repo":"mandt-lab/bayesian-ac","repo_kind":"official","path":"img-compression/quantizer.py","file_url":"https://github.com/mandt-lab/bayesian-ac/blob/HEAD/img-compression/quantizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0072df20810f5343"}},{"code_sha256_prefix":"96b6cf8f92d89bfe","entry":"curry_normal_logpdf","repo":"mandt-lab/bayesian-ac","repo_kind":"official","path":"img-compression/quantizer.py","file_url":"https://github.com/mandt-lab/bayesian-ac/blob/HEAD/img-compression/quantizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96b6cf8f92d89bfe"}},{"code_sha256_prefix":"28883132ac80d2fc","entry":"n_bit_binary_floats","repo":"mandt-lab/bayesian-ac","repo_kind":"official","path":"img-compression/quantizer.py","file_url":"https://github.com/mandt-lab/bayesian-ac/blob/HEAD/img-compression/quantizer.py","link_basis":"first_harvest_node","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":"28883132ac80d2fc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}