SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.07425 · 2019

A Characteristic Function Approach to Deep Implicit Generative Modeling

arXiv · PDF · Open in the Atlas

Code that ran

6 of 12 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, 1 violated it and 5 have no contract verdict; 0 failures of our instrument; 6 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/1909.07425.json · badge: /api/ran/1909.07425.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
crslab/OCFGAN canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
FunctionStatusWhere it lives
conv_sizes Ran
ran on a synthesized input
crslab/OCFGAN/src/networks.py
code served (permissive licence) · get_code("6bd64cdb12ca82b6")
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 list, 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)

def conv_sizes(imsize, layers=5, stride=2):
    s = [imsize]
    for i in range(layers):
        s.append(s[-1] // stride)
    return s

ARGS = {
    "imsize": 256,
    "layers": 5,
    "stride": 2
}
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 list, ndim 1, dtype family int — a list 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
gallery Ran
ran on a synthesized input
crslab/OCFGAN/src/util.py
code served (permissive licence) · get_code("5bd7bf186d32335f")
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 float, shape (8, 15, 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
import numpy as np

torch.manual_seed(0)

# The function takes an array with shape (nindex, height, width, intensity)
# and reshapes/rearranges it into a gallery format with ncols columns.
# It returns a result array with shape (height*nrows, width*ncols, intensity)

# Create a small test array with distinct dimensions:
# nindex=6 (will be split into nrows=2, ncols=3)
# height=4
# width=5
# intensity=3
array = np.random.rand(6, 4, 5, 3).astype(np.float32)

ARGS = {
    "array": array,
    "ncols": 3
}
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 ndarray, ndim 3, dtype family float, shape (8, 15, 3) — shape (8, 15, 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
gaussian_ecfd Ran
ran on a synthesized input
crslab/OCFGAN/src/ecfd.py
code served (permissive licence) · get_code("ad873fe6f3ce814d")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Small tensors: batch size 2, dimension 4
batch_size = 2
dim = 4

X = torch.randn(batch_size, dim)
Y = torch.randn(batch_size, dim)

# sigmas as a list of floats for optimize_sigma=False case
sigmas_list = [0.1, 0.5, 1.0]

# sigmas as a tensor of shape [1 x D] for optimize_sigma=True case
sigmas_tensor = torch.randn(1, dim)

ARGS = {
    "X": X,
    "Y": Y,
    "sigmas": sigmas_list,
    "num_freqs": 8,
    "optimize_sigma": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
grad_norm Ran
ran on a synthesized input
crslab/OCFGAN/src/networks.py
code served (permissive licence) · get_code("6a54e18e9e479881")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

m = SimpleModel()

x = torch.randn(2, 4)
y = torch.randn(2, 2)

output = m(x)
loss = nn.MSELoss()(output, y)
loss.backward()

ARGS = {
    "m": m,
    "norm_type": 2
}
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
is_image_file Ran
ran, violated the contract we drafted
crslab/OCFGAN/src/datasets.py
code served (permissive licence) · get_code("5fff86ff937930aa")
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.

# Setup code for is_image_file function

ARGS = {
    'filename': 'test_image.png'
}

# Test with different filenames to verify the function works
test_filenames = [
    'photo.jpg',
    'picture.jpeg',
    'image.png',
    'document.txt',
    'video.mp4'
]
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 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
sanitize_images Ran
ran on a synthesized input
crslab/OCFGAN/src/util.py
code served (permissive licence) · get_code("e02170376a355a41")
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 int, shape (2, 4, 5, 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 test image array with shape (batch, height, width, channels)
# This is a 3D array that will be converted to 4D by the function
imgs = np.random.randn(2, 4, 5, 3).astype(np.float32)

# Scale to be in range [-1, 1] to test the normalization logic
imgs = imgs / 10.0

ARGS = {
    "imgs": imgs
}
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 int, shape (2, 4, 5, 3) — shape (2, 4, 5, 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
download Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/download.py
code served (permissive licence) · get_code("67536e62bea58293")
How it ran

no invocation recorded.

get_confirm_token Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/download.py
pointer only (licence: MIT); the stored copy get_code serves, from med-air/FedBN, is pointer only (licence: NONE) · get_code("135b3dc835ffe6ad")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from med-air/FedBN, and GitHub detected no licence in that repository 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.

get_dataset Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/src/datasets.py
code served (permissive licence) · get_code("82c582e06818012f")
How it ran

no invocation recorded.

laplace_ecfd Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/src/ecfd.py
code served (permissive licence) · get_code("e0abbd30d2c90acf")
How it ran

no invocation recorded.

load_img Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/src/datasets.py
code served (permissive licence) · get_code("6947b5517bf45bff")
How it ran

no invocation recorded.

studentT_ecfd Not yet run
unverified (harvested, no recorded run)
crslab/OCFGAN/src/ecfd.py
code served (permissive licence) · get_code("f2d81bce836f2454")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 8 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
get_confirm_token 38 other papers
17 dated earlier, 21 later
1409.8230 (2014-09)
RENOIR - A Dataset for Real Low-Light Image Noise Reduction
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1506.03134 (2015-06)
Pointer Networks
and 35 more not named here
is_image_file 8 other papers
4 dated earlier, 4 later
1802.08797 (2018-02)
Residual Dense Network for Image Super-Resolution
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
1903.10128 (2019-03)
Recurrent Back-Projection Network for Video Super-Resolution
and 5 more not named here
download 3 other papers
3 dated earlier
1609.07009 (2016-09)
Is the deconvolution layer the same as a convolutional layer?
1703.03208 (2017-03)
Compressed Sensing using Generative Models
1805.11565 (2018-05)
On gradient regularizers for MMD GANs
load_img 3 other papers
1 dated earlier, 2 later
1803.02735 (2018-03)
Deep Back-Projection Networks For Super-Resolution
2107.00652 (2021-07)
CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows
2309.04089 (2023-09)
Toward Sufficient Spatial-Frequency Interaction for Gradient-aware Underwater Image Enhancement

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

Implicit Generative Models (IGMs) such as GANs have emerged as effective data-driven models for generating samples, particularly images. In this paper, we formulate the problem of learning an IGM as minimizing the expected distance between characteristic functions. Specifically, we minimize the distance between characteristic functions of the real and generated data distributions under a suitably-chosen weighting distribution. This distance metric, which we term as the characteristic function distance (CFD), can be (approximately) computed with linear time-complexity in the number of samples, in contrast with the quadratic-time Maximum Mean Discrepancy (MMD). By replacing the discrepancy measure in the critic of a GAN with the CFD, we obtain a model that is simple to implement and stable to train. The proposed metric enjoys desirable theoretical properties including continuity and differentiability with respect to generator parameters, and continuity in the weak topology. We further propose a variation of the CFD in which the weighting distribution parameters are also optimized during training; this obviates the need for manual tuning, and leads to an improvement in test power relative to CFD. We demonstrate experimentally that our proposed method outperforms WGAN and MMD-GAN variants on a variety of unsupervised image generation benchmarks.

For agents

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

get_harvested_code_for_paper("1909.07425")
get_code_for_paper("1909.07425")
have("1909.07425")

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

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

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

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

Connect an agent — have() is free.