SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.05735 · ICML · 2021

Autoencoding Under Normalization Constraints

Sangwoong Yoon, Yung-Kyun Noh, Frank Park

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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.05735.json · badge: /api/ran/2105.05735.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
swyoon/normalized-autoencoders canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
heidelberg-hepml/normalized-autoencoders community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
DummyDistribution Ran
ran on a synthesized input · constructed an object; no result was computed
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("d38130b99b55ad48")
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, DummyDistribution: 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
from torch import nn

torch.manual_seed(0)

# Create a simple dummy neural network to pass as the 'net' parameter
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the net
net = SimpleNet()

# Define ARGS dictionary with all parameters
ARGS = {
    'net': net
}
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 DummyDistribution — 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 DummyDistribution 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
FFEBM Ran
ran on a synthesized input · constructed an object; no result was computed
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("b45069bd21294783")
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, FFEBM: 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
import numpy as np

torch.manual_seed(0)

# Define a small neural network to serve as the energy function
class SmallEnergyNet(nn.Module):
    def __init__(self, input_dim=4):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, 8)
        self.fc2 = nn.Linear(8, 1)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        energy = self.fc2(x)
        return energy

# Create a small net instance
net = SmallEnergyNet(input_dim=4)

# Define all parameters for FFEBM
ARGS = {
    'net': net,
    'x_step': 10,
    'x_stepsize': 0.1,
    'x_noise_std': 0.05,
    'x_noise_anneal': None,
    'x_bound': (-1.0, 1.0),
    'x_clip_langevin_grad': 0.1,
    'l2_norm_reg': 0.001,
    'buffer_size': 1000,
    'replay_ratio': 0.95,
    'replay': True,
    'gamma': 1.0,
    'sampling': 'x',
    'initial_dist': 'gaussian',
    'temperature': 1.0,
    'temperature_trainable': False,
    'mh': False,
    'reject_boundary': False
}
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 FFEBM — 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 FFEBM 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
FFEBM Ran
ran on a synthesized input · constructed an object; no result was computed
heidelberg-hepml/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("67879547be299765")
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, FFEBM: 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
import numpy as np

torch.manual_seed(0)

# Define a simple feed-forward network for the energy model
class SimpleEnergyNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 1)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create the energy network
energy_net = SimpleEnergyNet()

ARGS = {
    'net': energy_net,
    'x_step': 10,
    'x_stepsize': 0.1,
    'x_noise_std': 0.05,
    'x_noise_anneal': None,
    'x_noise_anneal_full': None,
    'x_bound': None,
    'x_clip_langevin_grad': None,
    'l2_norm_reg': 0.0,
    'buffer_size': 100,
    'replay_ratio': 0.95,
    'replay': True,
    'gamma': 1.0,
    'sampling': 'x',
    'initial_dist': 'gaussian',
    'temperature': 1.0,
    'temperature_trainable': False,
    'mh': False,
    'reject_boundary': False,
    'x_norm': False,
}
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 FFEBM — 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 FFEBM 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
SampleBufferV2 Ran
ran on a synthesized input · constructed an object; no result was computed
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("3b443750b51dc7a6")
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, SampleBufferV2: 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 random

torch.manual_seed(0)

ARGS = {
    'max_samples': 10000,
    'replay_ratio': 0.95,
}
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 SampleBufferV2 — 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 SampleBufferV2 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
clip_vector_norm Ran
ran; our contract draft was wrong, not the code
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("598858c37d42e9fa")
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 tensor with batch size 2 and vector dimension 4
x = torch.randn(2, 4)

# Set max_norm to a reasonable value
max_norm = 1.0

ARGS = {
    "x": x,
    "max_norm": max_norm,
}
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_langevin_v2 Ran
ran; our contract draft was wrong, not the code
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("40093d60643ed584")
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 dict. 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
import numpy as np

torch.manual_seed(0)

# Define a simple energy-based model
class EnergyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        # Returns energy as a tensor
        return self.linear(x).squeeze(-1)

# Initialize model
model = EnergyModel()

# Create initial points: batch size 2, dimension 4
x = torch.randn(2, 4, requires_grad=False)

# Build arguments dictionary
ARGS = {
    'x': x,
    'model': model,
    'stepsize': 0.01,
    'n_steps': 3,
    'noise_scale': None,
    'intermediate_samples': False,
    'clip_x': (-1.0, 1.0),
    'clip_grad': 1.0,
    'reject_boundary': False,
    'noise_anneal': None,
    'spherical': False,
    'mh': False,
    'temperature': 1.0
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sample_langevin_v2 Ran
ran; our contract draft was wrong, not the code
heidelberg-hepml/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("5a5bf1957bb3828b")
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 dict. 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
import numpy as np

torch.manual_seed(0)

# Define a simple energy-based model
class SimpleEnergyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        # x shape: (batch_size, 4)
        # Flatten if needed and compute energy
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        energy = self.linear(x_flat)
        return energy.squeeze(-1)

# Create model instance
model = SimpleEnergyModel()

# Create initial points tensor (batch_size=2, dim=4)
x = torch.randn(2, 4, dtype=torch.float32)

# Set up ARGS dictionary with all parameters
ARGS = {
    'x': x,
    'model': model,
    'stepsize': 0.01,
    'n_steps': 3,
    'noise_scale': None,
    'intermediate_samples': False,
    'clip_x': None,
    'clip_grad': None,
    'reject_boundary': False,
    'noise_anneal': None,
    'noise_anneal_full': None,
    'spherical': False,
    'mh': False,
    'temperature': None,
    'norm': False,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
NAE Not yet run
unverified (harvested, no recorded run)
swyoon/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("5eb6900348fdf166")
How it ran

no invocation recorded.

NAE Not yet run
unverified (harvested, no recorded run)
heidelberg-hepml/normalized-autoencoders/models/nae.py
code served (permissive licence) · get_code("37793580612536cb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 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.

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

Repositories linked to this paper

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

Abstract

Likelihood is a standard estimate for outlier detection. The specific role of the normalization constraint is to ensure that the out-of-distribution (OOD) regime has a small likelihood when samples are learned using maximum likelihood. Because autoencoders do not possess such a process of normalization, they often fail to recognize outliers even when they are obviously OOD. We propose the Normalized Autoencoder (NAE), a normalized probabilistic model constructed from an autoencoder. The probability density of NAE is defined using the reconstruction error of an autoencoder, which is differently defined in the conventional energy-based model. In our model, normalization is enforced by suppressing the reconstruction of negative samples, significantly improving the outlier detection performance. Our experimental results confirm the efficacy of NAE, both in detecting outliers and in generating indistribution samples. However, autoencoders have been known to reconstruct

For agents

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

get_harvested_code_for_paper("2105.05735")
get_code_for_paper("2105.05735")
have("2105.05735")

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

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

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

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

Connect an agent — have() is free.