SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.10335 · 2019

Perceptual Generative Autoencoders

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1906.10335.json · badge: /api/ran/1906.10335.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
zj10/PGA canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
calculate_frechet_distance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zj10/PGA/src/fid.py
code served (permissive licence) · get_code("b6f978273b6c7b7c")
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
from scipy import linalg

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

# Create small sample means (1D arrays representing activation vectors)
# Using dimension 4 for feature space
mu1 = np.random.randn(4).astype(np.float64)
mu2 = np.random.randn(4).astype(np.float64)

# Create small covariance matrices (4x4)
# Generate positive semi-definite matrices by A @ A.T
A1 = np.random.randn(4, 4).astype(np.float64)
sigma1 = A1 @ A1.T

A2 = np.random.randn(4, 4).astype(np.float64)
sigma2 = A2 @ A2.T

# Define arguments dict
ARGS = {
    'mu1': mu1,
    'sigma1': sigma1,
    'mu2': mu2,
    'sigma2': sigma2,
    'eps': 1e-06
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
directory Ran
ran; our contract draft was wrong, not the code
zj10/PGA/src/pylib/path.py
code served (permissive licence) · get_code("eed7dfe6d7eb4968")
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

def split(path):
    dir, name_ext = os.path.split(path)
    name, ext = os.path.splitext(name_ext)
    return (dir, name, ext)

def name(path):
    return split(path)[1]

def ext(path):
    return split(path)[2]

def name_ext(path):
    return ''.join(split(path)[1:])

def directory(path):
    return split(path)[0]

ARGS = {
    'path': '/home/user/documents/example.txt'
}
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
float2im Ran
ran on a synthesized input
zj10/PGA/src/imlib/dtype.py
code served (permissive licence) · get_code("b4a0e3033db188f4")
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 ndarray, ndim 4, dtype family float, shape (2, 4, 3, 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 numpy as np

# Create a valid numpy array with float32 dtype in range [0, 1.0]
images = np.random.uniform(0.0, 1.0, size=(2, 4, 3, 3)).astype(np.float32)

ARGS = {
    'images': images
}
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 ndarray, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
float2uint Ran
ran on a synthesized input
zj10/PGA/src/imlib/dtype.py
code served (permissive licence) · get_code("7da8feb6cb76e81a")
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 ndarray, ndim 3, dtype family int, shape (2, 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 numpy as np

# Create a valid image array with float values in [0, 1] range
images = np.array([
    [[0.0, 0.5, 1.0, 0.25],
     [0.75, 0.1, 0.9, 0.3]],
    [[0.2, 0.8, 0.4, 0.6],
     [0.15, 0.95, 0.05, 0.7]]
], dtype=np.float32)

ARGS = {
    'images': images
}
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 ndarray, ndim 3, dtype family int, shape (2, 2, 4) — shape (2, 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
immerge Ran
ran on a synthesized input
zj10/PGA/src/imlib/transform.py
code served (permissive licence) · get_code("d9b8413d4ecbe399")
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 ndarray, ndim 3, dtype family int, shape (5, 25, 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 numpy as np

# Create a small batch of images in shape N * H * W (* C)
# Let's create 4 grayscale images (2D) and 4 color images (3D) as test cases

# Test case 1: Grayscale images (N, H, W)
images_grayscale = np.random.randint(0, 256, size=(4, 8, 6), dtype=np.uint8)

# Test case 2: Color images (N, H, W, C)
images_color = np.random.randint(0, 256, size=(3, 5, 7, 3), dtype=np.uint8)

# Using the color images as the main test case
images = images_color

ARGS = {
    'images': images,
    'n_row': None,
    'n_col': None,
    'padding': 2,
    'pad_value': 128
}
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 ndarray, ndim 3, dtype family int, shape (5, 25, 3) — shape (5, 25, 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
imread Ran
ran on a synthesized input
zj10/PGA/src/imlib/basic.py
code served (permissive licence) · get_code("9f280946211388f6")
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 ndarray, ndim 2, dtype family float, shape (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 numpy as np
import tempfile
import os
from PIL import Image

# Create a temporary image file to read
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a small test image with uint8 dtype
test_image = np.random.randint(0, 256, (4, 3), dtype=np.uint8)
pil_image = Image.fromarray(test_image, mode='L')
pil_image.save(temp_image_path)

ARGS = {
    "path": temp_image_path,
    "as_gray": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 3) — shape (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
name Ran
ran; our contract draft was wrong, not the code
zj10/PGA/src/pylib/path.py
code served (permissive licence) · get_code("87a498cbec79e938")
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

# The function 'name' takes a single parameter 'path' which is a string
# representing a file path. The function uses os.path.split and os.path.splitext
# to extract the directory, name, and extension from the path.

ARGS = {
    'path': '/home/user/documents/example_file.txt'
}
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
split Ran
ran; our contract draft was wrong, not the code
zj10/PGA/src/pylib/path.py
code served (permissive licence) · get_code("ded2db9b11b1035e")
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

def split(path):
    dir, name_ext = os.path.split(path)
    name, ext = os.path.splitext(name_ext)
    return (dir, name, ext)

# The split function takes a single parameter: path (a string file path)
# It uses os.path.split and os.path.splitext to decompose the path
# These are standard library functions that work with any string path

ARGS = {
    'path': '/home/user/documents/myfile.txt'
}
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 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
to_range Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zj10/PGA/src/imlib/dtype.py
code served (permissive licence) · get_code("c75a52b1e074ded6")
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 ndarray, 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 numpy as np

# Create a valid numpy array in the range [-1.0, 1.0] with float32 dtype
images = np.array([[-0.5, 0.0, 0.5, 1.0],
                    [-1.0, -0.8, 0.2, 0.9]], dtype=np.float32)

ARGS = {
    'images': images,
    'min_value': 0.0,
    'max_value': 1.0,
    'dtype': np.float32
}
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 ndarray, 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
calculate_activation_statistics Not yet run
unverified (harvested, no recorded run)
zj10/PGA/src/fid.py
code served (permissive licence) · get_code("744bd707d0fa38ac")
How it ran

no invocation recorded.

get_activations Not yet run
unverified (harvested, no recorded run)
zj10/PGA/src/fid.py
code served (permissive licence) · get_code("f3156e8742e34851")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 7 later) and 0 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
calculate_frechet_distance 15 other papers
5 dated earlier, 10 later
1406.2661 (2014-06)
Generative Adversarial Networks
1703.10593 (2017-03)
Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
1706.08500 (2017-06)
GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
and 12 more not named here
calculate_activation_statistics 12 other papers
5 dated earlier, 7 later
1406.2661 (2014-06)
Generative Adversarial Networks
1703.10593 (2017-03)
Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 9 more not named here
get_activations 9 other papers
4 dated earlier, 5 later
1703.10593 (2017-03)
Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1802.10551 (2018-02)
A Variational Inequality Perspective on Generative Adversarial Networks
and 6 more not named here
directory 2 other papers
1 dated earlier, 1 later
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
2104.12476 (2021-04)
EigenGAN: Layer-Wise Eigen-Learning for GANs
name 2 other papers
1 dated earlier, 1 later
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
2104.12476 (2021-04)
EigenGAN: Layer-Wise Eigen-Learning for GANs
split 2 other papers
1 dated earlier, 1 later
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
2104.12476 (2021-04)
EigenGAN: Layer-Wise Eigen-Learning for GANs
to_range 2 other papers
1 dated earlier, 1 later
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
2104.12476 (2021-04)
EigenGAN: Layer-Wise Eigen-Learning for GANs
float2im 1 other paper
1 dated earlier
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
float2uint 1 other paper
1 dated earlier
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
immerge 1 other paper
1 dated earlier
1312.6114 (2013-12)
Auto-Encoding Variational Bayes
imread 1 other paper
1 dated earlier
1312.6114 (2013-12)
Auto-Encoding Variational Bayes

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

Modern generative models are usually designed to match target distributions directly in the data space, where the intrinsic dimension of data can be much lower than the ambient dimension. We argue that this discrepancy may contribute to the difficulties in training generative models. We therefore propose to map both the generated and target distributions to a latent space using the encoder of a standard autoencoder, and train the generator (or decoder) to match the target distribution in the latent space. Specifically, we enforce the consistency in both the data space and the latent space with theoretically justified data and latent reconstruction losses. The resulting generative model, which we call a perceptual generative autoencoder (PGA), is then trained with a maximum likelihood or variational autoencoder (VAE) objective. With maximum likelihood, PGAs generalize the idea of reversible generative models to unrestricted neural network architectures and arbitrary number of latent dimensions. When combined with VAEs, PGAs substantially improve over the baseline VAEs in terms of sample quality. Compared to other autoencoder-based generative models using simple priors, PGAs achieve state-of-the-art FID scores on CIFAR-10 and CelebA.

For agents

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

get_harvested_code_for_paper("1906.10335")
get_code_for_paper("1906.10335")
have("1906.10335")

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

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

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

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

Connect an agent — have() is free.