SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.06600 · 2020

Closed-Form Factorization of Latent Semantics in GANs

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 7 failures of our instrument; 1 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/2007.06600.json · badge: /api/ran/2007.06600.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
genforce/sefa canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
akashgit/stylegan2_wt community (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
kostagiolasn/Unsupervised-Discovery-of-Semantic-Concepts-in-Satellite-Imagery-with-Style-based-Wavelet-driven-Gen community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
all_gather Ran
ran on a synthesized input
akashgit/stylegan2_wt/distributed.py
code served (permissive licence) · get_code("ed03ba54397adbe4")
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 float; no output shape is stated. 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 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
import pickle

torch.manual_seed(0)

# The function all_gather takes one parameter: data
# It should be something that can be pickled and unpickled
# We'll use a simple dictionary containing a tensor and some other data

data = {
    'tensor': torch.randn(2, 4),
    'value': 42,
    'string': 'test'
}

ARGS = {
    'data': data
}
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 float — 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
calc_fid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
akashgit/stylegan2_wt/fid.py
pointer only (licence: MIT); the stored copy get_code serves, from seasonSH/LiftedGAN, is pointer only (licence: NONE) · get_code("e6c1de4697e7ed81")
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 seasonSH/LiftedGAN, 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. A run is recorded.

convert_conv Ran
ran; our contract draft was wrong, not the code
akashgit/stylegan2_wt/convert_weight.py
code served (permissive licence) · get_code("7fe245a7216ae67b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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 numpy as np

torch.manual_seed(0)

# Create a stand-in class for vars that mimics TensorFlow variable behavior
class MockTFVariable:
    def __init__(self, numpy_array):
        self._value = numpy_array
    
    def value(self):
        return self
    
    def eval(self):
        return self._value

class MockVarsDict:
    def __init__(self):
        self.data = {}
    
    def __getitem__(self, key):
        return self.data[key]
    
    def __setitem__(self, key, value):
        self.data[key] = value

# Create mock vars dictionary
vars_dict = MockVarsDict()

# Create weight tensor with shape (H, W, C_in, C_out) for TensorFlow convention
# Using distinct dimensions: height=3, width=5, in_channels=2, out_channels=4
weight_np = np.random.randn(3, 5, 2, 4).astype(np.float32)
vars_dict['conv_layer/weight'] = MockTFVariable(weight_np)

# Create bias tensor with shape (C_out,)
bias_np = np.random.randn(4).astype(np.float32)
vars_dict['conv_layer/bias'] = MockTFVariable(bias_np)

ARGS = {
    'vars': vars_dict,
    'source_name': 'conv_layer',
    'target_name': 'model.conv',
    'bias': True,
    'start': 0
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
convert_modconv Ran
ran; our contract draft was wrong, not the code
akashgit/stylegan2_wt/convert_weight.py
code served (permissive licence) · get_code("1c7cd5abc48bcf75")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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 numpy as np

torch.manual_seed(0)

# Create a stand-in class that mimics TensorFlow variable behavior
class TFVariable:
    def __init__(self, data):
        self.data = data
    
    def value(self):
        return self
    
    def eval(self):
        return self.data

# Create mock variables dictionary with the required keys
# The function expects TensorFlow-style variables with .value().eval() chain

# weight shape: (H, W, in_channels, out_channels) in TensorFlow format
weight_data = np.random.randn(3, 3, 5, 7).astype(np.float32)

# mod_weight shape: (in_features, out_features) in TensorFlow format
mod_weight_data = np.random.randn(6, 5).astype(np.float32)

# mod_bias shape: (out_features,)
mod_bias_data = np.random.randn(5).astype(np.float32)

# noise_strength: scalar
noise_data = np.array(0.5, dtype=np.float32)

# bias shape: (out_channels,)
bias_data = np.random.randn(7).astype(np.float32)

vars_dict = {
    'source_layer/weight': TFVariable(weight_data),
    'source_layer/mod_weight': TFVariable(mod_weight_data),
    'source_layer/mod_bias': TFVariable(mod_bias_data),
    'source_layer/noise_strength': TFVariable(noise_data),
    'source_layer/bias': TFVariable(bias_data)
}

ARGS = {
    'vars': vars_dict,
    'source_name': 'source_layer',
    'target_name': 'target_layer',
    'flip': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
convert_torgb Ran
ran; our contract draft was wrong, not the code
akashgit/stylegan2_wt/convert_weight.py
code served (permissive licence) · get_code("96b279b9ef818d94")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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 numpy as np

torch.manual_seed(0)

class MockTensorValue:
    def __init__(self, array):
        self.array = array
    
    def value(self):
        return self
    
    def eval(self):
        return self.array

# Create mock variables dictionary
# The function expects vars to have keys like 'source_name/weight', 'source_name/mod_weight', etc.
# Each value should have .value().eval() methods that return numpy arrays

# Define shapes based on typical StyleGAN ToRGB layer:
# - weight: (H, W, in_channels, out_channels) = (1, 1, 5, 3) for RGB output
# - mod_weight: (in_channels, style_dim) = (5, 7)
# - mod_bias: (in_channels,) = (5,)
# - bias: (out_channels,) = (3,) for RGB

weight_array = np.random.randn(1, 1, 5, 3).astype(np.float32)
mod_weight_array = np.random.randn(5, 7).astype(np.float32)
mod_bias_array = np.random.randn(5).astype(np.float32)
bias_array = np.random.randn(3).astype(np.float32)

vars_dict = {
    'my_source/weight': MockTensorValue(weight_array),
    'my_source/mod_weight': MockTensorValue(mod_weight_array),
    'my_source/mod_bias': MockTensorValue(mod_bias_array),
    'my_source/bias': MockTensorValue(bias_array)
}

source_name = 'my_source'
target_name = 'my_target'

ARGS = {
    'vars': vars_dict,
    'source_name': source_name,
    'target_name': target_name
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
extract_features Ran
ran on a synthesized input
akashgit/stylegan2_wt/calc_inception.py
code served (permissive licence) · get_code("826a4bfd8b5cb2fc")
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 (6, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal inception model that returns a tuple with a tensor
class MiniInception(nn.Module):
    def __init__(self):
        super().__init__()
        # Simple conv layer to process input
        self.conv = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
    
    def forward(self, x):
        # x shape: (batch, 3, H, W)
        x = self.conv(x)  # (batch, 8, H, W)
        x = self.pool(x)  # (batch, 8, 1, 1)
        # Return as tuple with first element being the feature tensor
        return (x,)

# Create a data loader - list of batches (just image tensors)
# The function iterates over loader and treats each item as img
batch_size = 2
num_batches = 3
image_height = 4
image_width = 4
num_channels = 3

loader = [
    torch.randn(batch_size, num_channels, image_height, image_width)
    for _ in range(num_batches)
]

# Create the inception model
inception = MiniInception()

# Set device to CPU
device = 'cpu'

ARGS = {
    'loader': loader,
    'inception': inception,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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 (6, 8) — shape (6, 8) 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
make_image Ran
ran on a synthesized input
kostagiolasn/Unsupervised-Discovery-of-Semantic-Concepts-in-Satellite-Imagery-with-Style-based-Wavelet-driven-Gen/apply_factor.py
code served (permissive licence) · get_code("3a06aea8ca067253")
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 torch

torch.manual_seed(0)

# The function expects a tensor with shape (batch, channels, height, width)
# It will permute to (batch, height, width, channels) at the end
# Values should be in range [-1, 1] based on clamp operation
tensor = torch.randn(2, 3, 4, 5) * 0.5  # batch=2, channels=3, height=4, width=5

ARGS = {
    "tensor": tensor
}
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 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
make_kernel Ran
ran, violated the contract we drafted
akashgit/stylegan2_wt/model.py
pointer only (licence: MIT); the stored copy get_code serves, from dkn16/multi-fidel-gan-21cm, is pointer only (licence: NOASSERTION) · get_code("6f65e378a4313f87")
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 dkn16/multi-fidel-gan-21cm, 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.

reduce_loss_dict Ran
ran on a synthesized input
akashgit/stylegan2_wt/distributed.py
code served (permissive licence) · get_code("5144ad456049f8ce")
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 dict. 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
from torch import distributed as dist

torch.manual_seed(0)

# Create a sample loss_dict with tensor values
# The function iterates over keys, stacks values, and performs distributed operations
loss_dict = {
    'loss_classifier': torch.tensor(0.5),
    'loss_box_reg': torch.tensor(0.3),
    'loss_objectness': torch.tensor(0.2),
}

ARGS = {
    'loss_dict': loss_dict,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
reduce_sum Ran
ran, honoured the contract we drafted
akashgit/stylegan2_wt/distributed.py
code served (permissive licence) · get_code("3f0a1105ef251d78")
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
import torch.nn as nn
from torch import distributed as dist

torch.manual_seed(0)

# The function takes a single parameter: tensor
# It calls .clone() on it and passes it to dist.all_reduce()
# So we need a torch.Tensor

tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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
sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
genforce/sefa/interface.py
code served (permissive licence) · get_code("c829d5c7718a2fb6")
How it ran

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

torch.manual_seed(0)

class PixelNorm(nn.Module):
    def forward(self, x):
        return x / torch.sqrt(torch.mean(x ** 2, dim=1, keepdim=True) + 1e-8)

class Layer0(nn.Module):
    def __init__(self):
        super().__init__()
        self.pixel_norm = PixelNorm()

class Mapping(nn.Module):
    def __init__(self, z_dim, w_dim):
        super().__init__()
        self.fc = nn.Linear(z_dim, w_dim)
    
    def forward(self, z):
        return {'w': self.fc(z)}

class Truncation(nn.Module):
    def forward(self, w, trunc_psi, trunc_layers):
        return w * trunc_psi

class PGGANModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.z_space_dim = 6
        self.layer0 = Layer0()

class StyleGANModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.z_space_dim = 6
        self.mapping = Mapping(6, 8)
        self.truncation = Truncation()

class StyleGAN2Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.z_space_dim = 6
        self.mapping = Mapping(6, 10)
        self.truncation = Truncation()

model = StyleGANModel()
gan_type = 'stylegan'
num = 2

ARGS = {
    'model': model,
    'gan_type': gan_type,
    'num': num
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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
score_2afc_dataset Ran
ran; our contract draft was wrong, not the code
kostagiolasn/Unsupervised-Discovery-of-Semantic-Concepts-in-Satellite-Imagery-with-Style-based-Wavelet-driven-Gen/lpips/dist_model.py
code served (permissive licence) · get_code("514dd3c0eee3691c")
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 torch
import numpy as np

torch.manual_seed(0)

# Create a minimal distance function that takes two tensors and returns distances
def distance_func(tensor1, tensor2):
    """Compute L2 distance between two tensors and return as torch tensor"""
    # tensor1, tensor2 shape: Nx3xXxY
    # Flatten and compute L2 distance
    batch_size = tensor1.shape[0]
    diff = (tensor1 - tensor2).reshape(batch_size, -1)
    distances = torch.norm(diff, dim=1, keepdim=True)
    return distances

# Create a minimal data loader class with load_data method
class CustomDatasetDataLoader:
    def __init__(self, data_list):
        self.data_list = data_list
    
    def load_data(self):
        return iter(self.data_list)

# Create sample data batches
# Each batch contains 'ref', 'p0', 'p1', and 'judge' keys
batch_size = 2
height = 4
width = 5

data_batches = []
for _ in range(2):  # 2 batches
    batch = {
        'ref': torch.randn(batch_size, 3, height, width),
        'p0': torch.randn(batch_size, 3, height, width),
        'p1': torch.randn(batch_size, 3, height, width),
        'judge': torch.tensor([0.3, 0.7])  # Human preference scores in [0, 1]
    }
    data_batches.append(batch)

data_loader = CustomDatasetDataLoader(data_batches)

ARGS = {
    'data_loader': data_loader,
    'func': distance_func,
    'name': 'test_2afc'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
score_jnd_dataset Ran
ran; our contract draft was wrong, not the code
kostagiolasn/Unsupervised-Discovery-of-Semantic-Concepts-in-Satellite-Imagery-with-Style-based-Wavelet-driven-Gen/lpips/dist_model.py
code served (permissive licence) · get_code("581c80d602289d6d")
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 torch
import numpy as np

torch.manual_seed(0)

# Create a minimal distance function that takes two tensors and returns distances
def mock_distance_func(in0, in1):
    """Mock distance function that returns distances between image pairs"""
    # in0 and in1 should be Nx3xXxY tensors
    # Return a tensor of length N with distances
    batch_size = in0.shape[0]
    distances = torch.randn(batch_size)
    return distances

# Create a minimal CustomDatasetDataLoader-like object
class MockDataLoader:
    def __init__(self, num_batches=2, batch_size=2):
        self.num_batches = num_batches
        self.batch_size = batch_size
    
    def load_data(self):
        """Generator that yields batches of data"""
        for _ in range(self.num_batches):
            batch = {
                'p0': torch.randn(self.batch_size, 3, 4, 4),  # Nx3xXxY
                'p1': torch.randn(self.batch_size, 3, 4, 4),  # Nx3xXxY
                'same': torch.randint(0, 2, (self.batch_size, 1), dtype=torch.float32)  # N x 1
            }
            yield batch

# Mock lpips.voc_ap function
import sys
from types import ModuleType
lpips_mock = ModuleType('lpips')

def mock_voc_ap(recalls, precisions):
    """Mock VOC AP calculation"""
    return float(np.random.rand())

lpips_mock.voc_ap = mock_voc_ap
sys.modules['lpips'] = lpips_mock

# Construct arguments
ARGS = {
    'data_loader': MockDataLoader(num_batches=2, batch_size=2),
    'func': mock_distance_func,
    'name': 'test_jnd_score'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lpips, numpy, torch, tqdm — 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
extract_feature_from_samples Not yet run
unverified (harvested, no recorded run)
akashgit/stylegan2_wt/fid.py
code served (permissive licence) · get_code("7284618ab4d5847d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 1 the same month, 12 later) and 2 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
make_kernel 40 other papers
2 dated earlier, 1 the same month, 37 later · 10 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.15646 (2020-07)
Rewriting a Deep Generative Model
and 37 more not named here
score_2afc_dataset 15 other papers
5 dated earlier, 10 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
2005.00953 (2020-05)
Deep Generative Adversarial Residual Convolutional Networks for Real-World Super-Resolution
and 12 more not named here
reduce_sum 14 other papers
2 dated earlier, 12 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.08017 (2021-06)
Color2Embed: Fast Exemplar-Based Image Colorization using Color Embeddings
and 11 more not named here
all_gather 13 other papers
2 dated earlier, 11 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.08017 (2021-06)
Color2Embed: Fast Exemplar-Based Image Colorization using Color Embeddings
and 10 more not named here
reduce_loss_dict 13 other papers
2 dated earlier, 11 later
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.08017 (2021-06)
Color2Embed: Fast Exemplar-Based Image Colorization using Color Embeddings
and 10 more not named here
extract_features 6 other papers
1 dated earlier, 5 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2105.14230 (2021-05)
Transforming the Latent Space of StyleGAN for Real Face Editing
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
and 3 more not named here
score_jnd_dataset 6 other papers
3 dated earlier, 3 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2002.09219 (2020-02)
Stochastic Latent Residual Video Prediction
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
and 3 more not named here
calc_fid 5 other papers
1 dated earlier, 4 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2011.13126 (2020-11)
Lifting 2D StyleGAN for 3D-Aware Face Generation
2105.14230 (2021-05)
Transforming the Latent Space of StyleGAN for Real Face Editing
and 2 more not named here
convert_conv 4 other papers
1 dated earlier, 3 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
and 1 more not named here
convert_modconv 4 other papers
1 dated earlier, 3 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
and 1 more not named here
convert_torgb 4 other papers
1 dated earlier, 3 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
2108.00946 (2021-08)
StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators
and 1 more not named here
extract_feature_from_samples 3 other papers
1 dated earlier, 2 later
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2106.12423 (2021-06)
Alias-Free Generative Adversarial Networks
2110.11728 (2021-10)
BlendGAN: Implicitly GAN Blending for Arbitrary Stylized Face Generation

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

A rich set of interpretable dimensions has been shown to emerge in the latent space of the Generative Adversarial Networks (GANs) trained for synthesizing images. In order to identify such latent dimensions for image editing, previous methods typically annotate a collection of synthesized samples and train linear classifiers in the latent space. However, they require a clear definition of the target attribute as well as the corresponding manual annotations, limiting their applications in practice. In this work, we examine the internal representation learned by GANs to reveal the underlying variation factors in an unsupervised manner. In particular, we take a closer look into the generation mechanism of GANs and further propose a closed-form factorization algorithm for latent semantic discovery by directly decomposing the pre-trained weights. With a lightning-fast implementation, our approach is capable of not only finding semantically meaningful dimensions comparably to the state-of-the-art supervised methods, but also resulting in far more versatile concepts across multiple GAN models trained on a wide range of datasets.

For agents

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

get_harvested_code_for_paper("2007.06600")
get_code_for_paper("2007.06600")
have("2007.06600")

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

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

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

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

Connect an agent — have() is free.