SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.11521 · 2021

Conditional Frechet Inception Distance

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 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/2103.11521.json · badge: /api/ran/2103.11521.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
Michael-Soloveitchik/CFID canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
get_file_paths Ran
ran; our contract draft was wrong, not the code
Michael-Soloveitchik/CFID/Datasets/make_dataset_aligned.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from junyanz/pytorch-CycleGAN-and-pix2pix, is pointer only (licence: NOASSERTION) · get_code("cefa735e77f924d4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from junyanz/pytorch-CycleGAN-and-pix2pix, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

inpainting Ran
ran on a synthesized input
Michael-Soloveitchik/CFID/Datasets/build_inpainting_celeba.py
code served (permissive licence) · get_code("2379edc0053e0bf1")
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 (10, 8, 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)

# Create a small image array (height=10, width=8, channels=3)
image = np.random.randint(0, 256, size=(10, 8, 3), dtype=np.uint8)

# Define coordinates as ((x1, y1), (x2, y2))
cords = ((2, 3), (6, 7))

ARGS = {
    "image": image,
    "cords": cords
}
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 int, shape (10, 8, 3) — shape (10, 8, 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
rotate_image Ran
ran; our contract draft was wrong, not the code
Michael-Soloveitchik/CFID/Datasets/build_rotation_celeba.py
code served (permissive licence) · get_code("9a82f0bb49ac6ea2")
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 int, 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 cv2
import numpy as np

# Create a small test image (4x3 grayscale image)
# Using uint8 dtype as expected by cv2 functions
image = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

# Define rotation angle in degrees
angle = 45.0

ARGS = {
    "image": image,
    "angle": angle
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 int, 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
sample_covariance Ran
ran on a synthesized input
Michael-Soloveitchik/CFID/metrics.py
code served (permissive licence) · get_code("72fb2674395523aa")
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 EagerTensor, ndim 2, dtype family float, shape (4, 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 tensorflow as tf

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small sample tensors
# a and b must have the same shape [N, m]
# Using N=2 samples, m=4 features
N = 2
m = 4

a = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=tf.float32)

b = tf.constant([
    [0.5, 1.5, 2.5, 3.5],
    [4.5, 5.5, 6.5, 7.5]
], dtype=tf.float32)

ARGS = {
    "a": a,
    "b": b,
    "invert": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
symmetric_matrix_square_root Ran
ran on a synthesized input
Michael-Soloveitchik/CFID/metrics.py
code served (permissive licence) · get_code("d11e7957d2003e27")
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 EagerTensor, ndim 2, dtype family float, shape (4, 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 tensorflow as tf
import numpy as np

# Create a small symmetric positive semi-definite matrix
# We'll create a 4x4 symmetric matrix by constructing it from a random matrix
# and making it symmetric: M = A @ A.T ensures it's positive semi-definite
np.random.seed(0)
A = np.random.randn(4, 4).astype(np.float32)
symmetric_mat = (A @ A.T).astype(np.float32)

# Convert to TensorFlow tensor
mat_tensor = tf.constant(symmetric_mat, dtype=tf.float32)

ARGS = {
    "mat": mat_tensor,
    "eps": 1e-10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
to_cuda Ran
ran on a synthesized input
Michael-Soloveitchik/CFID/evaluate_models.py
code served (permissive licence) · get_code("da63d1ccf1d4270e")
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. 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
import torch.nn as nn

torch.manual_seed(0)

# Test with a tensor
tensor_arg = torch.randn(2, 4)

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

module_arg = SimpleModel()

# The function accepts either a tensor or nn.Module as 'elements'
# We'll test with a tensor since that's a common case
ARGS = {
    "elements": tensor_arg
}
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
trace_sqrt_product Ran
ran on a synthesized input
Michael-Soloveitchik/CFID/metrics.py
code served (permissive licence) · get_code("1633b9969b62b4ea")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small symmetric positive semi-definite matrices for testing
# These will be 4x4 matrices

np.random.seed(0)
tf.random.set_seed(0)

# Create a random matrix and make it symmetric positive semi-definite
# by computing A^T @ A
random_matrix_1 = np.random.randn(4, 4).astype(np.float32)
sigma_np = (random_matrix_1.T @ random_matrix_1) / 10  # Scale to keep values reasonable

random_matrix_2 = np.random.randn(4, 4).astype(np.float32)
sigma_v_np = (random_matrix_2.T @ random_matrix_2) / 10

# Convert to TensorFlow tensors
sigma = tf.constant(sigma_np, dtype=tf.float32)
sigma_v = tf.constant(sigma_v_np, dtype=tf.float32)

ARGS = {
    "sigma": sigma,
    "sigma_v": sigma_v,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
get_activations Not yet run
unverified (harvested, no recorded run)
Michael-Soloveitchik/CFID/evaluate_models.py
code served (permissive licence) · get_code("0d8acc35492e8752")
How it ran

no invocation recorded.

preprocess_images Not yet run
unverified (harvested, no recorded run)
Michael-Soloveitchik/CFID/evaluate_models.py
code served (permissive licence) · get_code("8c753610a14e69fb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 7 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_file_paths 3 other papers
1 dated earlier, 2 later
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
2305.15086 (2023-05)
Unpaired Image-to-Image Translation via Neural Schrödinger Bridge
2601.11779 (2026-01)
Cross-Domain Object Detection Using Unsupervised Image Translation
rotate_image 1 other paper
1 later
2105.00636 (2021-05)
Learning to drive from a world on rails

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 consider distance functions between conditional distributions. We focus on the Wasserstein metric and its Gaussian case known as the Frechet Inception Distance (FID). We develop conditional versions of these metrics, analyze their relations and provide a closed form solution to the conditional FID (CFID) metric. We numerically compare the metrics in the context of performance evaluation of modern conditional generative models. Our results show the advantages of CFID compared to the classical FID and mean squared error (MSE) measures. In contrast to FID, CFID is useful in identifying failures where realistic outputs which are not related to their inputs are generated. On the other hand, compared to MSE, CFID is useful in identifying failures where a single realistic output is generated even though there is a diverse set of equally probable outputs.

For agents

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

get_harvested_code_for_paper("2103.11521")
get_code_for_paper("2103.11521")
have("2103.11521")

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

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

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

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

Connect an agent — have() is free.