SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1802.05983 · 2018

Disentangling by Factorising

Andriy Mnih, Hyunjik Kim

arXiv · PDF · Open in the Atlas

Code that ran

14 of 24 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; 1 honoured the contract we drafted, 2 violated it and 8 have no contract verdict; 3 failures of our instrument; 10 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/1802.05983.json · badge: /api/ran/1802.05983.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
1Konny/FactorVAE community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
mmrl/disent-and-gen community
Papers with Code archive
4 ran · 1 no recorded run
Guiliang/FactorVAE community
Papers with Code archive
1 ran · 2 no recorded run
carbonati/variational-zoo community
Papers with Code archive
1 ran · 1 no recorded run
AliLotfi92/Disentangling_by_Factorising community
Papers with Code archive
1 ran · 0 no recorded run
ducnx/FactorVAE community
Papers with Code archive
1 ran · 0 no recorded run
nicolasigor/FactorVAE community
Papers with Code archive
0 ran · 3 no recorded run
wangdedi1997/Disentanglement-Beta-FactorVAE community
Papers with Code archive
0 ran · 1 no recorded run
gene-chou/conditional-factor-vae community
Papers with Code archive
0 ran · 1 no recorded run
OZA15015/custom_FVAE community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
FactorLoss Ran
ran on a synthesized input · constructed an object; no result was computed
mmrl/disent-and-gen/src/training/loss.py
code served (permissive licence) · get_code("2ac2573096dd729f")
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, FactorLoss: 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

torch.manual_seed(0)

ARGS = {
    'reconstruction_loss': 'bce',
    'gamma': 10.0,
    'gamma_schedule': (100, 0.1),
    'disc_args': None,
    'optim_kwargs': {'optimizer': 'adam', 'lr': 1e-05, 'betas': (0.5, 0.9)},
}
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 FactorLoss — 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 FactorLoss 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
FactorVAE1 Ran
ran on a synthesized input · constructed an object; no result was computed
Guiliang/FactorVAE/model.py
code served (permissive licence) · get_code("cf4c65d2fe9af40c")
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, FactorVAE1: 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 torch.nn.init as init

torch.manual_seed(0)

def kaiming_init(m):
    if isinstance(m, (nn.Linear, nn.Conv2d)):
        init.kaiming_normal_(m.weight)
        if m.bias is not None:
            m.bias.data.fill_(0)
    elif isinstance(m, (nn.BatchNorm1d, nn.BatchNorm2d)):
        m.weight.data.fill_(1)
        if m.bias is not None:
            m.bias.data.fill_(0)

def normal_init(m):
    if isinstance(m, (nn.Linear, nn.Conv2d)):
        init.normal_(m.weight, 0, 0.02)
        if m.bias is not None:
            m.bias.data.fill_(0)
    elif isinstance(m, (nn.BatchNorm1d, nn.BatchNorm2d)):
        m.weight.data.fill_(1)
        if m.bias is not None:
            m.bias.data.fill_(0)

class FactorVAE1(nn.Module):
    """Encoder and Decoder architecture for 2D Shapes data."""

    def __init__(self, z_dim=10):
        super(FactorVAE1, self).__init__()
        self.z_dim = z_dim
        self.encode = nn.Sequential(nn.Conv2d(1, 32, 4, 2, 1), nn.ReLU(True), nn.Conv2d(32, 32, 4, 2, 1), nn.ReLU(True), nn.Conv2d(32, 64, 4, 2, 1), nn.ReLU(True), nn.Conv2d(64, 64, 4, 2, 1), nn.ReLU(True), nn.Conv2d(64, 128, 4, 1), nn.ReLU(True), nn.Conv2d(128, 2 * z_dim, 1))
        self.decode = nn.Sequential(nn.Conv2d(z_dim, 128, 1), nn.ReLU(True), nn.ConvTranspose2d(128, 64, 4), nn.ReLU(True), nn.ConvTranspose2d(64, 64, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(64, 32, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(32, 32, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(32, 1, 4, 2, 1))
        self.weight_init()

    def weight_init(self, mode='normal'):
        if mode == 'kaiming':
            initializer = kaiming_init
        elif mode == 'normal':
            initializer = normal_init
        for block in self._modules:
            for m in self._modules[block]:
                initializer(m)

    def reparametrize(self, mu, logvar):
        std = logvar.mul(0.5).exp_()
        eps = std.data.new(std.size()).normal_()
        return eps.mul(std).add_(mu)

    def forward(self, x, no_dec=False):
        stats = self.encode(x)
        mu = stats[:, :self.z_dim]
        logvar = stats[:, self.z_dim:]
        z = self.reparametrize(mu, logvar)
        if no_dec:
            return z.squeeze()
        else:
            x_recon = self.decode(z).view(x.size())
            return (x_recon, mu, logvar, z.squeeze())

ARGS = {
    "z_dim": 4
}
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 FactorVAE1 — 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 FactorVAE1 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
FactorVAE1 Ran
ran on a synthesized input · constructed an object; no result was computed
AliLotfi92/Disentangling_by_Factorising/FactorizedVAE.py
pointer only (licence: NONE) · get_code("73d0c8f4c7646b0f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AliLotfi92/Disentangling_by_Factorising 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.

FactorVAE1 Ran
ran on a synthesized input · constructed an object; no result was computed
ducnx/FactorVAE/model.py
code served (permissive licence) · get_code("bec5ff7fdcceb70f")
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, FactorVAE1: 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 torch.nn.init as init

torch.manual_seed(0)

def kaiming_init(m):
    if isinstance(m, (nn.Linear, nn.Conv2d)):
        init.kaiming_normal_(m.weight)
        if m.bias is not None:
            m.bias.data.fill_(0)
    elif isinstance(m, (nn.BatchNorm1d, nn.BatchNorm2d)):
        m.weight.data.fill_(1)
        if m.bias is not None:
            m.bias.data.fill_(0)

def normal_init(m):
    if isinstance(m, (nn.Linear, nn.Conv2d)):
        init.normal_(m.weight, 0, 0.02)
        if m.bias is not None:
            m.bias.data.fill_(0)
    elif isinstance(m, (nn.BatchNorm1d, nn.BatchNorm2d)):
        m.weight.data.fill_(1)
        if m.bias is not None:
            m.bias.data.fill_(0)

class FactorVAE1(nn.Module):
    """Encoder and Decoder architecture for 2D Shapes data."""

    def __init__(self, z_dim=10):
        super(FactorVAE1, self).__init__()
        self.z_dim = z_dim
        self.encode = nn.Sequential(nn.Conv2d(1, 32, kernel_size=4, stride=2, padding=1), nn.ReLU(True), nn.Conv2d(32, 32, kernel_size=4, stride=2, padding=1), nn.ReLU(True), nn.Conv2d(32, 64, kernel_size=4, stride=2, padding=1), nn.ReLU(True), nn.Conv2d(64, 64, kernel_size=4, stride=2, padding=1), nn.ReLU(True), nn.Conv2d(64, 128, kernel_size=4, stride=1), nn.ReLU(True), nn.Conv2d(128, 2 * z_dim, kernel_size=1))
        self.decode = nn.Sequential(nn.Conv2d(z_dim, 128, 1), nn.ReLU(True), nn.ConvTranspose2d(128, 64, 4), nn.ReLU(True), nn.ConvTranspose2d(64, 64, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(64, 32, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(32, 32, 4, 2, 1), nn.ReLU(True), nn.ConvTranspose2d(32, 1, 4, 2, 1))
        self.weight_init()

    def weight_init(self, mode='normal'):
        if mode == 'kaiming':
            initializer = kaiming_init
        elif mode == 'normal':
            initializer = normal_init
        for block in self._modules:
            for m in self._modules[block]:
                initializer(m)

    def reparametrize(self, mu, logvar):
        std = logvar.mul(0.5).exp_()
        eps = std.data.new(std.size()).normal_()
        return eps.mul(std).add_(mu)

    def forward(self, x, no_dec=False):
        stats = self.encode(x)
        mu = stats[:, :self.z_dim]
        logvar = stats[:, self.z_dim:]
        z = self.reparametrize(mu, logvar)
        if no_dec:
            return z.squeeze()
        else:
            x_recon = self.decode(z).view(x.size())
            return (x_recon, mu, logvar, z.squeeze())

ARGS = {
    'z_dim': 4
}
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 FactorVAE1 — 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 FactorVAE1 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
_gaussian_kl Ran
ran; our contract draft was wrong, not the code
mmrl/disent-and-gen/src/training/loss.py
code served (permissive licence) · get_code("ac9b4cd1604cceb7")
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 small tensors for the function parameters
# The function expects:
# - mean: a tensor (used with .pow(2))
# - logvar: a tensor (used with .exp())

mean = torch.randn(2, 4)
logvar = torch.randn(2, 4)

ARGS = {
    "mean": mean,
    "logvar": logvar,
}
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
_permute_dims Ran
ran; our contract draft was wrong, not the code
mmrl/disent-and-gen/src/training/loss.py
code served (permissive licence) · get_code("1618797ac42b1d4d")
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 for latent_sample
# Shape: (batch_size=2, num_dims=4)
latent_sample = torch.randn(2, 4)

ARGS = {
    "latent_sample": latent_sample
}
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
init_optimizer Ran
ran; our contract draft was wrong, not the code
mmrl/disent-and-gen/src/training/loss.py
code served (permissive licence) · get_code("7c1f2ad3c96fb760")
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 Adam. 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 torch.optim as optim

torch.manual_seed(0)

# Create a simple model with parameters to optimize
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()
params = model.parameters()

ARGS = {
    'optimizer': 'adam',
    'params': params,
    'lr': 0.01,
    'l2_norm': 0.0
}
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 Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam 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
is_power_of_2 Ran
ran, violated the contract we drafted
1Konny/FactorVAE/dataset.py
code served (permissive licence) · get_code("6523d8d6272a3cc5")
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 bool, 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

torch.manual_seed(0)

ARGS = {
    "num": 8
}
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 bool, 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
kl_divergence Ran
ran on a synthesized input
1Konny/FactorVAE/ops.py
code served (permissive licence) · get_code("36190b3f24d53e67")
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)

# The function kl_divergence expects:
# - mu: a tensor that supports arithmetic operations and .sum()
# - logvar: a tensor that supports arithmetic operations, .exp(), and .sum()
# Both should have shape (batch_size, latent_dim) based on the .sum(1) operation

batch_size = 2
latent_dim = 4

mu = torch.randn(batch_size, latent_dim)
logvar = torch.randn(batch_size, latent_dim)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
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
permute_dims Ran
ran, honoured the contract we drafted
carbonati/variational-zoo/vzoo/losses/disentangled_losses.py
pointer only (licence: NONE) · get_code("e65cfdcf1fad978e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, carbonati/variational-zoo 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.

permute_dims Ran
ran on a synthesized input
1Konny/FactorVAE/ops.py
code served (permissive licence) · get_code("e2f78217c9061bef")
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)

# The function permute_dims takes a 2D tensor z
# It splits along dimension 1, permutes each column independently, and concatenates back
# Parameters: z is a 2D tensor of shape (B, features)

z = torch.randn(2, 4)  # Small batch size 2, 4 features

ARGS = {
    'z': z
}
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
recon_loss Ran
ran on a synthesized input
1Konny/FactorVAE/ops.py
code served (permissive licence) · get_code("2cbe0cbb9e1cf86e")
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.functional as F

torch.manual_seed(0)

# x and x_recon should be tensors
# The function uses:
# - x.size(0) to get batch size
# - F.binary_cross_entropy_with_logits(x_recon, x, size_average=False)
# This means x_recon and x should have the same shape and be float tensors

# Create small tensors: batch size 2, 4 features
batch_size = 2
num_features = 4

x = torch.randn(batch_size, num_features)
x_recon = torch.randn(batch_size, num_features)

ARGS = {
    "x": x,
    "x_recon": x_recon,
}
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
return_data Ran
ran on a synthesized input
1Konny/FactorVAE/dataset.py
code served (permissive licence) · get_code("8752210a3f89714d")
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 DataLoader. 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
import random
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader
from torchvision.datasets import ImageFolder
from torchvision import transforms
import tempfile
from PIL import Image

torch.manual_seed(0)
random.seed(0)

# Create a temporary directory with minimal image structure for testing
temp_dir = tempfile.mkdtemp()
dset_dir = temp_dir

# Create CelebA-like structure
celeba_dir = os.path.join(dset_dir, 'CelebA')
os.makedirs(celeba_dir, exist_ok=True)

# Create a dummy class subdirectory with dummy images
class_dir = os.path.join(celeba_dir, 'class0')
os.makedirs(class_dir, exist_ok=True)

# Create 2 small dummy images
for i in range(2):
    img = Image.new('RGB', (32, 32), color=(i*100, i*100, i*100))
    img.save(os.path.join(class_dir, f'img_{i}.jpg'))

# Create args object as a simple class
class Args:
    def __init__(self):
        self.dataset = 'celeba'
        self.dset_dir = dset_dir
        self.batch_size = 2
        self.num_workers = 0
        self.image_size = 64

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
str2bool Ran
ran, violated the contract we drafted
1Konny/FactorVAE/utils.py
code served (permissive licence) · get_code("f017532fc389cbfe")
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 bool, 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 argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Setup code to construct valid arguments
ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 bool, 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
AELoss Not yet run
unverified (harvested, no recorded run)
mmrl/disent-and-gen/src/training/loss.py
code served (permissive licence) · get_code("827f05f31dbb1dcc")
How it ran

no invocation recorded.

Beta_Factor_VAE Not yet run
unverified (harvested, no recorded run)
wangdedi1997/Disentanglement-Beta-FactorVAE/beta_factorVAE.py
pointer only (licence: NONE) · get_code("39e6b74d32f518be")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wangdedi1997/Disentanglement-Beta-FactorVAE 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. No invocation recorded.

FactorVAE Not yet run
unverified (harvested, no recorded run)
nicolasigor/FactorVAE/factor_vae_mine_v3.py
code served (permissive licence) · get_code("b634434403efcc68")
How it ran

no invocation recorded.

FactorVAE Not yet run
unverified (harvested, no recorded run)
gene-chou/conditional-factor-vae/models.py
pointer only (licence: NONE) · get_code("0081025339279ee3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gene-chou/conditional-factor-vae 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. No invocation recorded.

FactorVAE1 Not yet run
unverified (harvested, no recorded run)
OZA15015/custom_FVAE/model.py
pointer only (licence: NONE) · get_code("469a9d4b711b6f36")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, OZA15015/custom_FVAE 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. No invocation recorded.

MINE Not yet run
unverified (harvested, no recorded run)
nicolasigor/FactorVAE/factor_vae_mine_v3.py
code served (permissive licence) · get_code("30676973d384c175")
How it ran

no invocation recorded.

VAE Not yet run
unverified (harvested, no recorded run)
nicolasigor/FactorVAE/factor_vae_mine_v3.py
code served (permissive licence) · get_code("b773ab7c4411241a")
How it ran

no invocation recorded.

compute_factor_vae_loss Not yet run
unverified (harvested, no recorded run)
carbonati/variational-zoo/vzoo/losses/disentangled_losses.py
pointer only (licence: NONE) · get_code("cde89c348c9272a6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, carbonati/variational-zoo 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. No invocation recorded.

kaiming_init Not yet run
unverified (harvested, no recorded run)
Guiliang/FactorVAE/model.py
code served (permissive licence) · get_code("f55d759c3d225e46")
How it ran

no invocation recorded.

normal_init Not yet run
unverified (harvested, no recorded run)
Guiliang/FactorVAE/model.py
code served (permissive licence) · get_code("aed5880c62317c0e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 8 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 16 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
str2bool 82 other papers
3 dated earlier, 79 later
1510.03055 (2015-10)
A Diversity-Promoting Objective Function for Neural Conversation Models
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
and 79 more not named here
kaiming_init
brick of this paper's assembly: helper
3 other papers
3 later · 2 only as an assembly brick
2105.14203 (2021-05)
Understanding Instance-based Interpretability of Variational Auto-Encoders
2310.17325 (2023-10)
C-Disentanglement: Discovering Causally-Independent Generative Factors under an Inductive Bias of Confounder
2310.18615 (2023-10)
Temporally Disentangled Representation Learning under Unknown Nonstationarity
is_power_of_2 2 other papers
2 later
1902.01568 (2019-02)
Relevance Factor VAE: Learning and Identifying Disentangled Factors
2406.19298 (2024-06)
Compositional Image Decomposition with Diffusion Models
AELoss
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
_gaussian_kl
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
kl_divergence 1 other paper
1 later
1912.13361 (2019-12)
Learning Representations by Maximizing Mutual Information in Variational Autoencoders
permute_dims 1 other paper
1 later
1907.04809 (2019-07)
Variational Autoencoders and Nonlinear ICA: A Unifying Framework
recon_loss 1 other paper
1 later
1902.01568 (2019-02)
Relevance Factor VAE: Learning and Identifying Disentangled Factors

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

We define and address the problem of unsupervised learning of disentangled representations on data generated from independent factors of variation. We propose FactorVAE, a method that disentangles by encouraging the distribution of representations to be factorial and hence independent across the dimensions. We show that it improves upon β-VAE by providing a better trade-off between disentanglement and reconstruction quality. Moreover, we highlight the problems of a commonly used disentanglement metric and introduce a new metric that does not suffer from them.

For agents

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

get_harvested_code_for_paper("1802.05983")
get_code_for_paper("1802.05983")
have("1802.05983")

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

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

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

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

Connect an agent — have() is free.