SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.06280 · NeurIPS · 2020

NanoFlow: Scalable Normalizing Flows with Sublinear Parameter Complexity

Sang-Gil Lee, Sungwon Kim, Sungroh Yoon

arXiv · PDF · Open in the Atlas

Code that ran

4 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 6 no recorded run), measured 2026-11-21; 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/2006.06280.json · badge: /api/ran/2006.06280.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
L0SG/NanoFlow canonical (classifier label)
classifier basis: classifier_2025
4 ran · 6 no recorded run
FunctionStatusWhere it lives
Conv2D Ran
ran on a synthesized input
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("57d37eb7da3b2ecf")
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, shape (2, 4, 8, 6) 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
from torch import nn

class Conv2D(nn.Module):

    def __init__(self, in_channels, out_channels, kernel_size=3, dilation_h=1, dilation_w=1, causal=True, use_wn_bias=True):
        super(Conv2D, self).__init__()
        self.causal = causal
        self.use_wn_bias = use_wn_bias
        self.dilation_h, self.dilation_w = (dilation_h, dilation_w)
        if self.causal:
            self.padding_h = dilation_h * (kernel_size - 1)
        else:
            self.padding_h = dilation_h * (kernel_size - 1) // 2
        self.padding_w = dilation_w * (kernel_size - 1) // 2
        self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, dilation=(dilation_h, dilation_w), padding=(self.padding_h, self.padding_w), bias=use_wn_bias)
        self.conv = nn.utils.weight_norm(self.conv)
        nn.init.kaiming_normal_(self.conv.weight)

    def forward(self, tensor):
        out = self.conv(tensor)
        if self.causal and self.padding_h != 0:
            out = out[:, :, :-self.padding_h, :]
        return out

    def reverse_fast(self, tensor):
        self.conv.padding = (0, self.padding_w)
        out = self.conv(tensor)
        return out


INIT_ARGS = {
    'in_channels': 3,
    'out_channels': 4,
    'kernel_size': 3,
    'dilation_h': 1,
    'dilation_w': 1,
    'causal': True,
    'use_wn_bias': True,
}

ARGS = {
    'tensor': torch.randn(2, 3, 8, 6),
}

if __name__ == '__main__':
    model = Conv2D(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8, 6) — shape (2, 4, 8, 6) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ZeroConv2d Ran
ran on a synthesized input
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("fcb8fa0312da0cef")
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, shape (2, 3, 5, 6) 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
from torch import nn
from torch.nn import functional as F, init

class ZeroConv2d(nn.Module):

    def __init__(self, in_channel, out_channel):
        super().__init__()
        self.conv = nn.Conv2d(in_channel, out_channel, 1, padding=0)
        init.uniform_(self.conv.weight, -0.001, 0.001)
        init.uniform_(self.conv.bias, -0.001, 0.001)
        self.scale = nn.Parameter(torch.zeros(1, out_channel, 1, 1))

    def forward(self, x):
        out = self.conv(x)
        out = out * torch.exp(self.scale * 3)
        return out


INIT_ARGS = {
    'in_channel': 4,
    'out_channel': 3,
}

ARGS = {
    'x': torch.randn(2, 4, 5, 6),
}

if __name__ == '__main__':
    model = ZeroConv2d(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 3, 5, 6) — shape (2, 3, 5, 6) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
fused_add_tanh_sigmoid_multiply Ran
ran; our contract draft was wrong, not the code
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("833dd73d4b4818ef")
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) and returned Tensor, ndim 2, dtype family float, shape (2, 2) 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)

# Analyze the function:
# - input_a: tensor, used with indexing [:, :n_channels_int] and [:, n_channels_int:]
# - input_b: tensor, added to input_a
# - n_channels: indexable with [0], returns an int

# The function does:
# 1. in_act = input_a + input_b (both tensors must have same shape)
# 2. Splits in_act along dimension 1 at position n_channels_int
# 3. So input_a and input_b must have shape (batch, total_channels)
# 4. n_channels[0] must be <= total_channels

batch_size = 2
total_channels = 4
n_channels_int = 2

# Create input tensors
input_a = torch.randn(batch_size, total_channels)
input_b = torch.randn(batch_size, total_channels)

# Create n_channels as a list/tuple with first element being the split point
n_channels = [n_channels_int]

ARGS = {
    "input_a": input_a,
    "input_b": input_b,
    "n_channels": n_channels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 2) — shape (2, 2) 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
fused_add_tanh_sigmoid_multiply_with_context Ran
ran; our contract draft was wrong, not the code
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("81594c7c2ceb8c09")
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, 2) 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)

# Analyze the function:
# - input_a, input_b, input_c: tensors that are added together
# - n_channels: indexable (uses n_channels[0])
# - The result of addition is sliced at n_channels_int
# - First slice goes through tanh, second through sigmoid, then multiplied
# - So we need input tensors with shape (batch, total_channels) where total_channels >= 2*n_channels_int

batch_size = 2
n_channels_int = 2
total_channels = 2 * n_channels_int  # 4 channels total

input_a = torch.randn(batch_size, total_channels)
input_b = torch.randn(batch_size, total_channels)
input_c = torch.randn(batch_size, total_channels)
n_channels = [n_channels_int]

ARGS = {
    "input_a": input_a,
    "input_b": input_b,
    "input_c": input_c,
    "n_channels": n_channels,
}
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, 2) — shape (2, 2) 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
FlowWithHyperSharedEstimator Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("79e218d5c07e0c5f")
How it ran

no invocation recorded.

NanoFlow Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("c8fa142be06b3c9d")
How it ran

no invocation recorded.

ResBlock2DHyperMultGate Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("8aab2e7ecf75fc31")
How it ran

no invocation recorded.

WaveNet2DHyperDensityEstimator Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("c95065abd413b88c")
How it ran

no invocation recorded.

Wavenet2DHyperMultGate Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("f0f97895e48e37a6")
How it ran

no invocation recorded.

fused_res_skip_multgate Not yet run
unverified (harvested, no recorded run)
L0SG/NanoFlow/models/nanoflow.py
code served (permissive licence) · get_code("7140a2899c7049ec")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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-21.

Repositories linked to this paper

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

Abstract

Normalizing flows (NFs) have become a prominent method for deep generative models that allow for an analytic probability density estimation and efficient synthesis. However, a flow-based network is considered to be inefficient in parameter complexity because of reduced expressiveness of bijective mapping, which renders the models unfeasibly expensive in terms of parameters. We present an alternative parameterization scheme called NanoFlow, which uses a single neural density estimator to model multiple transformation stages. Hence, we propose an efficient parameter decomposition method and the concept of flow indication embedding, which are key missing components that enable density estimation from a single neural network. Experiments performed on audio and image models confirm that our method provides a new parameter-efficient solution for scalable NFs with significant sublinear parameter complexity.

For agents

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

get_harvested_code_for_paper("2006.06280")
get_code_for_paper("2006.06280")
have("2006.06280")

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

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

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

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

Connect an agent — have() is free.