SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.08869 · ICML · 2022

Fast Lossless Neural Compression with Integer-Only Discrete Flows

Jun Zhu, Chongxuan Li, Jianfei Chen, Bo Zhang, Siyu Wang

arXiv · PDF · Open in the Atlas

Code that ran

15 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 6 failures of our instrument; 7 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2206.08869.json · badge: /api/ran/2206.08869.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
thu-ml/iodf marked official in Papers with Code
Papers with Code archive
15 ran · 7 no recorded run
FunctionStatusWhere it lives
BackRound Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("46f46fe8b4420885")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BackRound: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class ArgsConfig:
    def __init__(self, round_approx):
        self.round_approx = round_approx

ARGS = {
    'args': ArgsConfig(round_approx='smooth'),
    'inverse_bin_width': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BackRound — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BackRound output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Base Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("4088cdf57d658b64")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Base: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.temperature = 1.0
        self.hard_round = False

class TestModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.simple = SimpleModule()
        self.temperature = 1.0
        self.hard_round = False

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Base — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Base output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Permute Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("e53e1ce0d110e0d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Permute: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'n_channels': 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Permute — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Permute output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Squeeze Ran
ran on a synthesized input
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("450b2b62c561b13b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# INIT_ARGS for Squeeze.__init__()
# The __init__ method takes no parameters beyond self
INIT_ARGS = {}

# ARGS for Squeeze.forward()
# forward takes z and reverse (default False)
# z should be a 4D tensor (batch, channels, height, width)
# For space_to_depth: channels must be divisible by 4, height and width must be even
# For depth_to_space (reverse=True): channels must be divisible by 4, and we need appropriate spatial dims

# Test forward pass (space_to_depth)
z_forward = torch.randn(2, 8, 6, 4)  # batch=2, channels=8, height=6, width=4

# Test reverse pass (depth_to_space)
z_reverse = torch.randn(2, 16, 3, 2)  # batch=2, channels=16, height=3, width=2

ARGS = {
    'z': z_forward,
    'reverse': False
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
StochasticRound Ran
ran on a synthesized input · constructed an object; no result was computed
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("b4bcd6e9de03c77b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, StochasticRound: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# StochasticRound takes no __init__ parameters beyond self
# The class inherits from Base which takes no parameters
# So ARGS should be empty dict since __init__ takes only self

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type StochasticRound — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a StochasticRound output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_stacked_sigmoid Ran
ran; our contract draft was wrong, not the code
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("e888d3b7e8b35bde")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small input tensor with shape (2, 4)
x = torch.randn(2, 4)

# Temperature parameter - a small positive float
temperature = 0.1

# Number of approximation terms
n_approx = 3

ARGS = {
    "x": x,
    "temperature": temperature,
    "n_approx": n_approx,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
depth_to_space Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("5d24f20be4bf139b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 6, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# depth_to_space expects a tensor x with:
# - 4 dimensions: (batch, channels, height, width)
# - channels must be divisible by 4 (since it does xs[1] // 4)
# The function reshapes and permutes to convert depth to space

x = torch.randn(2, 4, 3, 5)  # batch=2, channels=4 (divisible by 4), height=3, width=5

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 6, 10) — shape (2, 1, 6, 10) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_discretized_logistic Ran
ran, honoured the contract we drafted
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("39a407de5f677119")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small test tensors
batch_size = 2
dim = 4

mean = torch.randn(batch_size, dim)
logscale = torch.randn(batch_size, dim)
inverse_bin_width = torch.tensor(2.0)

ARGS = {
    "mean": mean,
    "logscale": logscale,
    "inverse_bin_width": inverse_bin_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_discretized_normal Ran
ran, honoured the contract we drafted
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("3b27078feb569655")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the function parameters
mean = torch.randn(2, 4)  # batch size 2, dimension 4
logvar = torch.randn(2, 4)  # batch size 2, dimension 4
inverse_bin_width = torch.tensor(2.0)  # scalar tensor for discretization

ARGS = {
    "mean": mean,
    "logvar": logvar,
    "inverse_bin_width": inverse_bin_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_logistic Ran
ran, honoured the contract we drafted
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("30d19875779857af")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function sample_logistic takes two parameters: mean and logscale
# Both are used with torch operations (torch.rand_like, torch.exp, torch.log)
# so they should be tensors. They're also used together in arithmetic operations,
# so they should have compatible shapes.

mean = torch.randn(2, 4)
logscale = torch.randn(2, 4)

ARGS = {
    "mean": mean,
    "logscale": logscale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_mixture_discretized_logistic Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("480e7b7bf0abeb03")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions for clarity
b = 2  # batch size
c = 4  # channels
h = 3  # height
w = 5  # width
n_mixtures = 6  # number of mixture components

# mean: shape (b, c, h, w, n_mixtures)
mean = torch.randn(b, c, h, w, n_mixtures)

# logs: shape (b, c, h, w, n_mixtures) - log scale parameters
logs = torch.randn(b, c, h, w, n_mixtures)

# pi: shape (b, c, h, w, n_mixtures) - mixture weights (must sum to 1 along last dim)
pi = torch.rand(b, c, h, w, n_mixtures)
pi = pi / pi.sum(dim=-1, keepdim=True)  # normalize to make valid probabilities

# inverse_bin_width: scalar for quantization
inverse_bin_width = 256.0

ARGS = {
    "mean": mean,
    "logs": logs,
    "pi": pi,
    "inverse_bin_width": inverse_bin_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_mixture_normal Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("a41638efd4616d39")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct tensors for sample_mixture_normal
# Shape: (b, c, h, w, n_mixtures)
b, c, h, w, n_mixtures = 2, 4, 3, 5, 6

mean = torch.randn(b, c, h, w, n_mixtures)
logvar = torch.randn(b, c, h, w, n_mixtures)
pi = torch.softmax(torch.randn(b, c, h, w, n_mixtures), dim=-1)

ARGS = {
    "mean": mean,
    "logvar": logvar,
    "pi": pi,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_normal Ran
ran, honoured the contract we drafted
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("64ca67dc6ee10796")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function samples from a normal distribution using reparameterization trick
# It takes mean and logvar tensors and returns a sampled tensor
# Both should be same shape tensors

mean = torch.randn(2, 4)
logvar = torch.randn(2, 4)

ARGS = {
    "mean": mean,
    "logvar": logvar,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_prior Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("eef8c6e77a17e984")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Test case 1: discrete logistic with 2 parameters
px_discrete_logistic_2 = [
    torch.randn(2, 4),  # mean
    torch.randn(2, 4),  # logscale
]
inverse_bin_width_1 = 256.0

# Test case 2: discrete logistic with 3 parameters (mixture)
px_discrete_logistic_3 = [
    torch.randn(2, 4, 2, 3, 5),  # mean: (b, c, h, w, n_mixtures)
    torch.randn(2, 4, 2, 3, 5),  # logs: (b, c, h, w, n_mixtures)
    torch.softmax(torch.randn(2, 4, 2, 3, 5), dim=-1),  # pi: (b, c, h, w, n_mixtures)
]
inverse_bin_width_2 = 256.0

# Test case 3: discrete normal with 2 parameters
px_discrete_normal = [
    torch.randn(2, 4),  # mean
    torch.randn(2, 4),  # logvar
]
inverse_bin_width_3 = 256.0

# Test case 4: continuous logistic with 2 parameters
px_continuous_logistic = [
    torch.randn(2, 4),  # mean
    torch.randn(2, 4),  # logscale
]

# Test case 5: continuous normal with 2 parameters
px_continuous_normal_2 = [
    torch.randn(2, 4),  # mean
    torch.randn(2, 4),  # logvar
]

# Test case 6: continuous normal with 3 parameters (mixture)
px_continuous_normal_3 = [
    torch.randn(2, 4, 2, 3, 5),  # mean: (b, c, h, w, n_mixtures)
    torch.randn(2, 4, 2, 3, 5),  # logvar: (b, c, h, w, n_mixtures)
    torch.softmax(torch.randn(2, 4, 2, 3, 5), dim=-1),  # pi: (b, c, h, w, n_mixtures)
]

# Test case 7: continuous steplogistic with 2 parameters
px_continuous_steplogistic = [
    torch.randn(2, 4),  # mean
    torch.randn(2, 4),  # logscale
]

ARGS = {
    'px': px_discrete_logistic_2,
    'variable_type': 'discrete',
    'distribution_type': 'logistic',
    'inverse_bin_width': inverse_bin_width_1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
space_to_depth Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("b19a3a46fd7ce90b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 16, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects a tensor x with:
# - size() method that returns dimensions
# - view() method for reshaping
# - permute() method for reordering dimensions
# - contiguous() method
# The tensor must have even dimensions for xs[2] and xs[3] (height and width)

x = torch.randn(2, 4, 8, 6)  # batch=2, channels=4, height=8, width=6

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 16, 4, 3) — shape (2, 16, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Coupling Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("e318d8d641984ae4")
How it ran

no invocation recorded.

Flow Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("e517bb3d3bd6c07d")
How it ran

no invocation recorded.

NN Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("c6ce52a8bf563a31")
How it ran

no invocation recorded.

RoundStraightThrough Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("9429bafa966d574b")
How it ran

no invocation recorded.

SmoothRound Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("4f8d56e315314445")
How it ran

no invocation recorded.

SplitFactorCoupling Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("84becd55fb738b32")
How it ran

no invocation recorded.

SplitPrior Not yet run
unverified (harvested, no recorded run)
thu-ml/iodf/core/models/flow.py
code served (permissive licence) · get_code("bd54a31770e937ad")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 21 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
RoundStraightThrough
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2011.15056 (2020-11)
General Invertible Transformations for Flow-based Generative Modeling

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 10× inference speedup compared to the fastest existing neural compressors, while retaining the high compression rates on ImageNet32 and ImageNet64.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2206.08869")
get_code_for_paper("2206.08869")
have("2206.08869")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2206.08869.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2206.08869.svg)](https://syntology.ai/paper/2206.08869)

Connect an agent — have() is free.