SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1811.00995 · 2018

Invertible Residual Networks

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/1811.00995.json · badge: /api/ran/1811.00995.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
jhjacobsen/invertible-resnet canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
yperugachidiaz/invertible_densenets extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
geometric_logprob Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from mlvlab/monotoneflows
pointer only · get_code("3e0a8dc623475d8e")
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.

basic_logdet_estimator Ran
ran; our contract draft was wrong, not the code
yperugachidiaz/invertible_densenets/lib/layers/iresblock.py
code served (permissive licence) · get_code("9b16691c6712e596")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network that takes x and produces g
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(6, 6)
    
    def forward(self, x):
        return self.linear(x)

# Setup
batch_size = 2
dim = 6

# Create input tensor with requires_grad=True (needed for autograd.grad)
x = torch.randn(batch_size, dim, requires_grad=True)

# Create a simple model and compute g
model = SimpleNet()
g = model(x)

# n_power_series: number of terms in the power series
n_power_series = 3

# vareps: random perturbation vector with same shape as x
vareps = torch.randn(batch_size, dim)

# coeff_fn: a function that takes an integer k and returns a coefficient
def coeff_fn(k):
    return 1.0

# training: boolean flag
training = True

ARGS = {
    'g': g,
    'x': x,
    'n_power_series': n_power_series,
    'vareps': vareps,
    'coeff_fn': coeff_fn,
    'training': training
}
Setup block drafted by
a language model, Claude Sonnet 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 1, dtype family float, shape (2,) — shape (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
batch_jacobian Ran
ran; our contract draft was wrong, not the code
yperugachidiaz/invertible_densenets/lib/layers/iresblock.py
code served (permissive licence) · get_code("85a4b5aac95f359d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (2, 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)

# Create input tensor x with requires_grad=True
batch_size = 2
input_dim = 3
x = torch.randn(batch_size, input_dim, requires_grad=True)

# Create a simple computation that produces g from x
# g should have shape (batch_size, output_dim)
output_dim = 4
W = torch.randn(input_dim, output_dim)
g = torch.matmul(x, W)

ARGS = {
    'g': g,
    'x': x
}
Setup block drafted by
a language model, Claude Sonnet 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 3, dtype family float, shape (2, 4, 3) — shape (2, 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
batch_trace Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yperugachidiaz/invertible_densenets/lib/layers/iresblock.py
code served (permissive licence) · get_code("70b3429a213d3584")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (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)

# The function expects M to be a batched matrix where it:
# 1. Reshapes to (batch_size, -1) to flatten each matrix
# 2. Slices with step M.shape[1] + 1 to get diagonal elements
# 3. Sums along dimension 1 to get trace for each batch
# So M should be a 3D tensor of shape (batch, n, n) for square matrices

# Using batch=2, matrix size 4x4
M = torch.randn(2, 4, 4)

ARGS = {'M': M}
Setup block drafted by
a language model, Claude Sonnet 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 1, dtype family float, shape (2,) — shape (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
downsample_shape Ran
ran, violated the contract we drafted
jhjacobsen/invertible-resnet/models/conv_iResNet.py
code served (permissive licence) · get_code("229980ee5a77de9b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family int; 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)

# The function expects a shape tuple with 3 elements: (channels, height, width)
# It multiplies the first dimension by 4 and divides the last two by 2
# So we need a shape where dimensions 1 and 2 are divisible by 2

shape = (8, 16, 12)

ARGS = {
    'shape': shape
}
Setup block drafted by
a language model, Claude Sonnet 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 tuple, ndim 1, dtype family int — 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
get_init_batch Ran
ran, honoured the contract we drafted
jhjacobsen/invertible-resnet/CIFAR_main.py
code served (permissive licence) · get_code("ec74162145241ad3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (5, 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 simple dataloader as a list of (x, y) tuples
# Each batch has different batch sizes to test the accumulation logic
dataloader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(3, 4), torch.randint(0, 3, (3,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

batch_size = 5

ARGS = {
    'dataloader': dataloader,
    'batch_size': batch_size
}
Setup block drafted by
a language model, Claude Sonnet 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 (5, 4) — shape (5, 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
logistic_distribution Ran
ran; our contract draft was wrong, not the code
jhjacobsen/invertible-resnet/models/conv_iResNet.py
code served (permissive licence) · get_code("1f87158833d6c6ac")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned TransformedDistribution. 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.distributions as distributions
import torch.nn.functional as F
from torch.distributions import constraints

torch.manual_seed(0)

# Create loc and log_scale tensors with distinct shapes
# Using batch size 2, dimension 4
loc = torch.randn(2, 4)
log_scale = torch.randn(2, 4)

ARGS = {
    'loc': loc,
    'log_scale': log_scale
}
Setup block drafted by
a language model, Claude Sonnet 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 TransformedDistribution — a TransformedDistribution output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TransformedDistribution 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
standard_normal_logprob Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from mlvlab/monotoneflows
pointer only · get_code("2dc23e3f121c6a38")
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.

standard_normal_sample Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from mlvlab/monotoneflows
pointer only · get_code("2168d015a2e457cb")
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.

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, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 3 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
standard_normal_logprob 7 other papers
7 later
1906.02735 (2019-06)
Residual Flows for Invertible Generative Modeling
2002.02798 (2020-02)
How to Train Your Neural ODE: the World of Jacobian and Kinetic Regularization
2012.05942 (2020-12)
Convex Potential Flows: Universal Probability Distributions with Optimal Transport and Convex Optimization
and 4 more not named here
standard_normal_sample 6 other papers
6 later
1906.02735 (2019-06)
Residual Flows for Invertible Generative Modeling
2006.09347 (2020-06)
Understanding and Mitigating Exploding Inverses in Invertible Neural Networks
2012.05942 (2020-12)
Convex Potential Flows: Universal Probability Distributions with Optimal Transport and Convex Optimization
and 3 more not named here
geometric_logprob 4 other papers
4 later
1906.02735 (2019-06)
Residual Flows for Invertible Generative Modeling
2103.09527 (2021-03)
Implicit Normalizing Flows
2210.08176 (2022-10)
Invertible Monotone Operators for Normalizing Flows
and 1 more not named here
basic_logdet_estimator 1 other paper
1 later
2306.04675 (2023-06)
Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion models
batch_jacobian 1 other paper
1 later
2306.04675 (2023-06)
Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion models
batch_trace 1 other paper
1 later
2306.04675 (2023-06)
Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion models

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

We show that standard ResNet architectures can be made invertible, allowing the same model to be used for classification, density estimation, and generation. Typically, enforcing invertibility requires partitioning dimensions or restricting network architectures. In contrast, our approach only requires adding a simple normalization step during training, already available in standard frameworks. Invertible ResNets define a generative model which can be trained by maximum likelihood on unlabeled data. To compute likelihoods, we introduce a tractable approximation to the Jacobian log-determinant of a residual block. Our empirical evaluation shows that invertible ResNets perform competitively with both state-of-the-art image classifiers and flow-based generative models, something that has not been previously achieved with a single architecture.

For agents

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

get_harvested_code_for_paper("1811.00995")
get_code_for_paper("1811.00995")
have("1811.00995")

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

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

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

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

Connect an agent — have() is free.