SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.12699 · ICML · 2021

Distilling the Knowledge from Conditional Normalizing Flows

Artem Babenko, Dmitry Baranchuk, Vladimir Aliev

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 6 have no contract verdict; 3 failures of our instrument; 2 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/2106.12699.json · badge: /api/ran/2106.12699.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
yandex-research/distill-nf canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
calc_loss Ran
ran on a synthesized input
yandex-research/distill-nf/waveglow/models/waveglow.py
code served (permissive licence) · get_code("4e8785b3c11abfe7")
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 tuple, ndim 1, 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

torch.manual_seed(0)

# Construct valid arguments for calc_loss
z = torch.randn(2, 4)  # Small tensor for z

# log_s_list: list of tensors that will be summed
log_s_list = [torch.randn(2, 4), torch.randn(2, 4)]

# log_det_w_list: list of scalars/values that will be summed
log_det_w_list = [torch.tensor(0.5), torch.tensor(0.3)]

# sigma: default is 1.0, but we can specify it
sigma = 1.0

ARGS = {
    "z": z,
    "log_s_list": log_s_list,
    "log_det_w_list": log_det_w_list,
    "sigma": sigma,
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
files_from_txt Ran
ran on a synthesized input
yandex-research/distill-nf/waveglow/mel2samp.py
code served (permissive licence) · get_code("b9989538e2009b81")
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 list, ndim 1, 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 tempfile
import os

# Create a temporary text file with filenames
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "filelist.txt")

# Write some sample filenames to the file
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write("file1.txt\n")
    f.write("file2.txt\n")
    f.write("file3.txt\n")

ARGS = {
    "filename": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
files_to_list Ran
ran on a synthesized input
yandex-research/distill-nf/waveglow/mel2samp.py
code served (permissive licence) · get_code("605d293247f8400a")
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 list, ndim 1, 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 tempfile
import os
from pathlib import Path

# Create a temporary directory structure with some dummy .wav files
temp_dir = tempfile.mkdtemp()
split_dir = Path(temp_dir) / "test_split"
split_dir.mkdir(exist_ok=True)

# Create a few dummy .wav files
(split_dir / "audio1.wav").touch()
(split_dir / "audio2.wav").touch()
(split_dir / "audio3.wav").touch()

ARGS = {
    "data_root": temp_dir,
    "split": "test_split"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yandex-research/distill-nf/waveglow/models/waveglow.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from isletennos/mmvc_trainer, is pointer only (licence: NONE) · get_code("b38f9c28c5117398")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from isletennos/mmvc_trainer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_wav_to_torch Ran
ran on a synthesized input
yandex-research/distill-nf/waveglow/mel2samp.py
code served (permissive licence) · get_code("aa2a9755648c1fe1")
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 tuple. 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
import tempfile
import os
from scipy.io.wavfile import write

# Create a temporary WAV file for testing
temp_dir = tempfile.gettempdir()
temp_wav_path = os.path.join(temp_dir, "test_audio.wav")

# Generate simple audio data
sampling_rate = 16000
duration_seconds = 0.1
num_samples = int(sampling_rate * duration_seconds)
audio_data = np.random.randint(-32768, 32767, num_samples, dtype=np.int16)

# Write the WAV file
write(temp_wav_path, sampling_rate, audio_data)

ARGS = {
    "full_path": temp_wav_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
random_crop Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yandex-research/distill-nf/srflow/datasets.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("9c54ab0c75133028")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from andreas128/SRFlow, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

random_flip Ran
ran on a synthesized input
yandex-research/distill-nf/srflow/datasets.py
code served (permissive licence) · get_code("1ce86501baae76b7")
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 tuple, 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small test images and segmentation masks
# img and seg are numpy arrays that will be flipped along axis 2
img = np.random.rand(2, 3, 4).astype(np.float32)  # (batch, height, width)
seg = np.random.randint(0, 2, (2, 3, 4)).astype(np.int32)  # (batch, height, width)

ARGS = {
    "img": img,
    "seg": seg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
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
random_rotation Ran
ran on a synthesized input
yandex-research/distill-nf/srflow/datasets.py
code served (permissive licence) · get_code("61ad652e6d20d81a")
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 tuple, 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 numpy as np

# Create small sample arrays for img and seg
# The function uses np.rot90 on axes=(1, 2), so we need at least 3 dimensions
# img and seg should have compatible shapes for the operation
img = np.random.rand(2, 4, 3).astype(np.float32)
seg = np.random.rand(2, 4, 3).astype(np.uint8)

ARGS = {
    "img": img,
    "seg": seg,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
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
remove Ran
ran; our contract draft was wrong, not the code
yandex-research/distill-nf/waveglow/models/waveglow.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ANLGBOY/WaveNODE, is pointer only (licence: NONE) · get_code("b13a72233912c0b1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ANLGBOY/WaveNODE, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

define_Flow Not yet run
unverified (harvested, no recorded run)
yandex-research/distill-nf/srflow/models/networks.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("6d050c5262a0b80b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from andreas128/SRFlow, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

find_model_using_name Not yet run
unverified (harvested, no recorded run)
yandex-research/distill-nf/srflow/models/networks.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from andreas128/SRFlow, is pointer only (licence: NOASSERTION) · get_code("7d04d276ed855e64")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from andreas128/SRFlow, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 4 later) and 6 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
fused_add_tanh_sigmoid_multiply 6 other papers
3 dated earlier, 1 the same month, 2 later · 1 only as an assembly brick
1803.09017 (2018-03)
Style Tokens: Unsupervised Style Modeling, Control and Transfer in End-to-End Speech Synthesis
1811.00002 (2018-11)
WaveGlow: A Flow-based Generative Network for Speech Synthesis
2006.04598 (2020-06)
WaveNODE: A Continuous Normalizing Flow for Speech Synthesis
and 3 more not named here
remove 3 other papers
3 dated earlier
1803.09017 (2018-03)
Style Tokens: Unsupervised Style Modeling, Control and Transfer in End-to-End Speech Synthesis
1811.00002 (2018-11)
WaveGlow: A Flow-based Generative Network for Speech Synthesis
2006.04598 (2020-06)
WaveNODE: A Continuous Normalizing Flow for Speech Synthesis
define_Flow 2 other papers
2 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment
find_model_using_name 2 other papers
2 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment
random_crop 2 other papers
2 later
2204.09679 (2022-04)
FS-NCSR: Increasing Diversity of the Super-Resolution Space via Frequency Separation and Noise-Conditioned Normalizing Flow
2403.15139 (2024-03)
Deep Generative Model based Rate-Distortion for Image Downscaling Assessment

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

Normalizing flows are a powerful class of generative models demonstrating strong performance in several speech and vision problems. In contrast to other generative models, normalizing flows are latent variable models with tractable likelihoods and allow for stable training. However, they have to be carefully designed to represent invertible functions with efficient Jacobian determinant calculation. In practice, these requirements lead to overparameterized and sophisticated architectures that are inferior to alternative feed-forward models in terms of inference time and memory consumption. In this work, we investigate whether one can distill flow-based models into more efficient alternatives. We provide a positive answer to this question by proposing a simple distillation approach and demonstrating its effectiveness on state-of-the-art conditional flow-based models for image super-resolution and speech synthesis.

For agents

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

get_harvested_code_for_paper("2106.12699")
get_code_for_paper("2106.12699")
have("2106.12699")

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

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

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

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

Connect an agent — have() is free.