{"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/fast-lossless-neural-compression-with-integer","title":"Fast Lossless Neural Compression with Integer-Only Discrete Flows","arxiv_id":"2206.08869","date":"2022-06-17","proceeding":null,"authors":["Siyu Wang","Jianfei Chen","Chongxuan Li","Jun Zhu","Bo Zhang"],"abstract":"By applying entropy codecs with learned data distributions, neural compressors have significantly outperformed traditional codecs in terms of compression ratio. However, the high inference latency of neural networks hinders the deployment of neural compressors in practical applications. In this work, we propose Integer-only Discrete Flows (IODF), an efficient neural compressor with integer-only arithmetic. Our work is built upon integer discrete flows, which consists of invertible transformations between discrete random variables. We propose efficient invertible transformations with integer-only arithmetic based on 8-bit quantization. Our invertible transformation is equipped with learnable binary gates to remove redundant filters during inference. We deploy IODF with TensorRT on GPUs, achieving 10x inference speedup compared to the fastest existing neural compressors, while retaining the high compression rates on ImageNet32 and ImageNet64.","url_abs":"https://arxiv.org/abs/2206.08869v1","url_pdf":"https://arxiv.org/pdf/2206.08869v1.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":"fast-lossless-neural-compression-with-integer","repo_url":"https://github.com/thu-ml/iodf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2206.08869","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.08869"}},"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/thu-ml/iodf","reach":null}],"summary":{"ran":5,"ran_draft_wrong":1,"ran_fixture":5,"ran_honours":4,"unverified":7},"by_repo_kind":{"official":{"samples":22,"ran":15,"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":"46f46fe8b4420885","entry":"BackRound","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"46f46fe8b4420885"}},{"code_sha256_prefix":"4088cdf57d658b64","entry":"Base","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4088cdf57d658b64"}},{"code_sha256_prefix":"e53e1ce0d110e0d3","entry":"Permute","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e53e1ce0d110e0d3"}},{"code_sha256_prefix":"450b2b62c561b13b","entry":"Squeeze","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"450b2b62c561b13b"}},{"code_sha256_prefix":"b4bcd6e9de03c77b","entry":"StochasticRound","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b4bcd6e9de03c77b"}},{"code_sha256_prefix":"e888d3b7e8b35bde","entry":"_stacked_sigmoid","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e888d3b7e8b35bde"}},{"code_sha256_prefix":"5d24f20be4bf139b","entry":"depth_to_space","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d24f20be4bf139b"}},{"code_sha256_prefix":"39a407de5f677119","entry":"sample_discretized_logistic","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39a407de5f677119"}},{"code_sha256_prefix":"3b27078feb569655","entry":"sample_discretized_normal","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3b27078feb569655"}},{"code_sha256_prefix":"30d19875779857af","entry":"sample_logistic","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"30d19875779857af"}},{"code_sha256_prefix":"480e7b7bf0abeb03","entry":"sample_mixture_discretized_logistic","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"480e7b7bf0abeb03"}},{"code_sha256_prefix":"a41638efd4616d39","entry":"sample_mixture_normal","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a41638efd4616d39"}},{"code_sha256_prefix":"64ca67dc6ee10796","entry":"sample_normal","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"64ca67dc6ee10796"}},{"code_sha256_prefix":"eef8c6e77a17e984","entry":"sample_prior","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.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":"eef8c6e77a17e984"}},{"code_sha256_prefix":"b19a3a46fd7ce90b","entry":"space_to_depth","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b19a3a46fd7ce90b"}},{"code_sha256_prefix":"e318d8d641984ae4","entry":"Coupling","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"e318d8d641984ae4"}},{"code_sha256_prefix":"e517bb3d3bd6c07d","entry":"Flow","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"e517bb3d3bd6c07d"}},{"code_sha256_prefix":"c6ce52a8bf563a31","entry":"NN","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"c6ce52a8bf563a31"}},{"code_sha256_prefix":"9429bafa966d574b","entry":"RoundStraightThrough","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"9429bafa966d574b"}},{"code_sha256_prefix":"4f8d56e315314445","entry":"SmoothRound","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"4f8d56e315314445"}},{"code_sha256_prefix":"84becd55fb738b32","entry":"SplitFactorCoupling","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"84becd55fb738b32"}},{"code_sha256_prefix":"bd54a31770e937ad","entry":"SplitPrior","repo":"thu-ml/iodf","repo_kind":"official","path":"core/models/flow.py","file_url":"https://github.com/thu-ml/iodf/blob/HEAD/core/models/flow.py","link_basis":"first_harvest_node","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":"bd54a31770e937ad"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}