SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.12152 · 2021

Density estimation on low-dimensional manifolds: an inflation-deflation approach

arXiv · PDF · Open in the Atlas

Code that ran

7 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 0 have no contract verdict; 7 failures of our instrument; 3 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/2105.12152.json · badge: /api/ran/2105.12152.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
chrvt/inflation-deflation canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_KS_in_2d Ran
ran; our contract draft was wrong, not the code
chrvt/inflation-deflation/main_cluster.py
code served (permissive licence) · get_code("6db1f83e0b28af6e")
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 float64, ndim 0, 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

# Construct a small 2D difference array
# The function performs operations on this array, summing subarrays
# and computing KS statistics in 4 directions
n_pts = 5
diff = np.random.randn(n_pts, n_pts)

# Define spatial grid parameters
dx = 0.1
dy = 0.2

ARGS = {
    'diff': diff,
    'n_pts': n_pts,
    'dx': dx,
    'dy': dy,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
calculate_nearest_neighbor Ran
ran; our contract draft was wrong, not the code
chrvt/inflation-deflation/generate_sigma_bounds.py
code served (permissive licence) · get_code("84dea89d5395e837")
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 float64, ndim 0, 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

# Construct a small 2D array of points for nearest neighbor calculation
# Shape: (n_, d) where n_=5 points in 2D space
np.random.seed(0)
X = np.random.randn(5, 2).astype(np.float64)

n_ = 5

ARGS = {
    "X": X,
    "n_": n_,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
compute_kl_pq_loss Ran
ran; our contract draft was wrong, not the code
chrvt/inflation-deflation/main_cluster.py
code served (permissive licence) · get_code("1d336f923df67adf")
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 0, dtype family float, shape () 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
import torch.nn as nn

torch.manual_seed(0)

class SimpleFlowModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
        # Create a base distribution (standard normal)
        self.base_dist = torch.distributions.Normal(
            loc=torch.zeros(4),
            scale=torch.ones(4)
        )
    
    def forward(self, batch):
        # batch shape: (2, 4)
        # Return z_ (transformed samples) and logdet_ (log determinant of jacobian)
        z_ = self.linear(batch)  # shape: (2, 4)
        logdet_ = torch.ones(2, 1) * 0.5  # shape: (2, 1), log determinant
        return z_, logdet_

model = SimpleFlowModel()
batch = torch.randn(2, 4)

ARGS = {
    "model": model,
    "batch": batch
}
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 0, dtype family float, shape () — shape () 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
create_filename Ran
ran; our contract draft was wrong, not the code
chrvt/inflation-deflation/utils.py
code served (permissive licence) · get_code("78143f7e32a87acb")
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 str. 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 os
from types import SimpleNamespace

# Create a minimal args object with all necessary attributes
args = SimpleNamespace(
    step=5,
    latent_distribution=None,
    dataset='mnist',
    output_dir='/tmp/output',
    dir='/tmp',
    modelname='test_model',
    label=None,
    trueparam=None,
    chain=0,
    algorithm='test_algo',
    outerlayers=2,
    outertransform='linear',
    outercouplingmlp=True,
    outercouplinglayers=3,
    outercouplinghidden=64,
    paramscanstudyname='test_study'
)

ARGS = {
    'type_': 'sample',
    'label': 'test_label',
    'args': args
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
integrand_circle Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from chrvt/denoising-normalizing-flow
pointer only · get_code("69ee46a945fa4d1a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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_checkpoint Ran
ran; our contract draft was wrong, not the code
chrvt/inflation-deflation/utils.py
code served (permissive licence) · get_code("59bd8cc3027d2b45")
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 os
import logging
import torch
import torch.nn as nn
import tempfile

torch.manual_seed(0)

# Create a temporary directory for checkpoint files
temp_dir = tempfile.mkdtemp()

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate model
model = MinimalModel()

# Create optimizer
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)

# Create scheduler
scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=10)

# Create a checkpoint file for the non-best case
checkpoint_data = {
    'state_dict': model.state_dict(),
    'optimizer': optimizer.state_dict(),
    'scheduler': scheduler.state_dict(),
    'step': 42
}
torch.save(checkpoint_data, os.path.join(temp_dir, 'checkpoint.pt'))

# Create a checkpoint file for the best case
torch.save(checkpoint_data, os.path.join(temp_dir, 'checkpoint_best.pt'))

ARGS = {
    'output_dir': temp_dir,
    'model': model,
    'optimizer': optimizer,
    'scheduler': scheduler,
    'best': False
}
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
tile Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chrvt/inflation-deflation/models/made.py
code served (permissive licence) · get_code("a256b1f457aa6c31")
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 1, dtype family float, shape (24,) 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 takes a tensor x and an integer n
# It reshapes, repeats, transposes, and reshapes again
# x should be a tensor that can be reshaped and repeated
# n should be an integer representing the number of repetitions

x = torch.randn(2, 4)  # Small tensor: batch=2, dim=4
n = 3  # Integer for repetition count

ARGS = {
    "x": x,
    "n": n
}
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 1, dtype family float, shape (24,) — shape (24,) 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
calculate_KS_stats Not yet run
unverified (harvested, no recorded run)
chrvt/inflation-deflation/main_cluster.py
code served (permissive licence) · get_code("604cc2e2e72a4e93")
How it ran

no invocation recorded.

calculate_KS_stats Not yet run
unverified (harvested, no recorded run)
chrvt/inflation-deflation/main_fom.py
code served (permissive licence) · get_code("9d936f1574eac7eb")
How it ran

no invocation recorded.

nat_to_bit_per_dim Not yet run
unverified (harvested, no recorded run)
chrvt/inflation-deflation/utils.py
code served (permissive licence) · get_code("d4ec1b364105cab3")
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, 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 9 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
integrand_circle 1 other paper
1 dated earlier
2006.05479 (2020-06)
Probabilistic Autoencoder

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 (NFs) are universal density estimators based on Neural Networks. However, this universality is limited: the density's support needs to be diffeomorphic to a Euclidean space. In this paper, we propose a novel method to overcome this limitation without sacrificing universality. The proposed method inflates the data manifold by adding noise in the normal space, trains an NF on this inflated manifold, and, finally, deflates the learned density. Our main result provides sufficient conditions on the manifold and the specific choice of noise under which the corresponding estimator is exact. Our method has the same computational complexity as NFs and does not require computing an inverse flow. We also show that, if the embedding dimension is much larger than the manifold dimension, noise in the normal space can be well approximated by Gaussian noise. This allows using our method for approximating arbitrary densities on unknown manifolds provided that the manifold dimension is known.

For agents

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

get_harvested_code_for_paper("2105.12152")
get_code_for_paper("2105.12152")
have("2105.12152")

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

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

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

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

Connect an agent — have() is free.