SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.12023 · ICLR · 2023

Generative Modeling Helps Weak Supervision (and Vice Versa)

Stefano Ermon, Artur Dubrawski, Willie Neiswanger, Nicholas Roberts, Benedikt Boecking, Frederic Sala

arXiv · PDF · Open in the Atlas

Code that ran

12 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 8 have no contract verdict; 2 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2203.12023.json · badge: /api/ran/2203.12023.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
benbo/wsgan-paper canonical (classifier label)
classifier basis: classifier_2025
11 ran · 5 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DCDiscriminatorThree Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("6d3ca84445b61c8a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DCDiscriminatorThree: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects:
# - img_shape: tuple of integers representing image shape (channels, height, width)
# - dropout: float for dropout rate (optional, defaults to 0.2)

# Looking at the forward pass:
# - img_shape[0] is used to get number of channels (nc)
# - The model processes images with Conv2d operations
# - The forward method takes img tensor and returns output

# img_shape should be (channels, height, width) for a 3D tensor batch dimension
# The model has multiple strided convolutions (stride 2) that reduce spatial dims
# Starting from height/width of at least 64 to avoid issues with multiple downsampling

img_shape = (3, 64, 64)  # 3 channels, 64x64 image
dropout = 0.2

ARGS = {
    'img_shape': img_shape,
    'dropout': dropout
}
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 DCDiscriminatorThree — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DCDiscriminatorThree 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
DCGenerator64 Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("805afed0b83c9d86")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DCGenerator64: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'latent_dim': 100,
    'ngf': 64,
    'img_shape': (3, 32, 32)
}
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 DCGenerator64 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DCGenerator64 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
DCGeneratorThree Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("4fa1e9c8cab4c845")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DCGeneratorThree: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "latent_dim": 100,
    "ngf": 64,
    "img_shape": (3, 32, 32)
}
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 DCGeneratorThree — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DCGeneratorThree 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
EncoderLabelmodel Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("9a3908d102d2323b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EncoderLabelmodel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'Num_LFs': 3,
    'num_features': 4,
    'cardinality': 2,
    'hidden_dims': [8],
    'class_balance': [0.5, 0.5],
    'acc_activation': 'Sigmoid',
    'modeltype': 'encoder'
}
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 EncoderLabelmodel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EncoderLabelmodel 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
InfoDCDiscriminator Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("3eb1f0f388c9b649")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, InfoDCDiscriminator: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "img_shape": (3, 32, 32),
    "n_codes": 10,
    "dropout": 0.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 InfoDCDiscriminator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InfoDCDiscriminator 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
InfoDCDiscriminator64 Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("5fa6efe00c21b746")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, InfoDCDiscriminator64: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# img_shape: tuple of (channels, height, width) for input images
# The discriminator expects 64x64 images based on the class name
# After 4 strided conv layers with stride 2, spatial dims go 64->32->16->8->4
img_shape = (3, 64, 64)

# n_codes: number of discrete codes to predict
n_codes = 10

# dropout: dropout rate in the trunk
dropout = 0.2

ARGS = {
    "img_shape": img_shape,
    "n_codes": n_codes,
    "dropout": dropout,
}
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 InfoDCDiscriminator64 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InfoDCDiscriminator64 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
LinearLrSchedule Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("039df6026700e3af")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, LinearLrSchedule: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "lr": 0.1,
    "n_epochs": 150,
    "minlr": 1e-08
}
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 LinearLrSchedule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearLrSchedule 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("fd993e3e914b0902")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 4,
    "output_dim": 2,
    "hidden_dims": [8, 6],
    "dropout": 0.1
}
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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
_cl_update Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("5db77e1abcabcf52")
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 2, 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

torch.manual_seed(0)

# Create valid 1d tensors with the same number of elements
x = torch.randn(5)
y = torch.randn(5)

ARGS = {
    "x": x,
    "y": y,
}
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 tuple, ndim 2, 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
get_linear_lr_schedule Ran
ran; our contract draft was wrong, not the code
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("17ccd2118b85dd0d")
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 method. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "lr": 0.001,
    "n_epochs": 150,
    "minlr": 1e-08,
}
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 method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
inception_transforms Ran
ran, violated the contract we drafted
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("c2e3b63879be9a20")
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 4, dtype family int, shape (2, 3, 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 torch

torch.manual_seed(0)

# Create a small test tensor
# The function expects imgs with shape (batch, channels, height, width)
# Let's create a batch of 2 images with 1 channel, 4x4 spatial dimensions
imgs = torch.randn(2, 1, 4, 4)

ARGS = {
    "imgs": imgs
}
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 4, dtype family int, shape (2, 3, 4, 4) — shape (2, 3, 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
soft_cross_entropy Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from kyrs/subpws-gan
pointer only; the stored copy get_code serves, from kyrs/subpws-gan, is pointer only (licence: NONE) · get_code("49e2f0c554d81ea3")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

ARI Not yet run
unverified (harvested, no recorded run)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("8a4ef744ac07ecc3")
How it ran

no invocation recorded.

GANLabelModel Not yet run
unverified (harvested, no recorded run)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("b9ec6c174fb615f4")
How it ran

no invocation recorded.

InceptionScores Not yet run
unverified (harvested, no recorded run)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("3a35531cc71bfc4f")
How it ran

no invocation recorded.

LightningGAN Not yet run
unverified (harvested, no recorded run)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("30d589374cf0746c")
How it ran

no invocation recorded.

get_networks_base Not yet run
unverified (harvested, no recorded run)
benbo/wsgan-paper/lightning/module.py
code served (permissive licence) · get_code("1637a6dbd0af625c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 16 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
soft_cross_entropy
brick of this paper's assembly: loss
1 other paper
1 later
2312.10366 (2023-12)
Fusing Conditional Submodular GAN and Programmatic Weak Supervision

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many promising applications of supervised machine learning face hurdles in the acquisition of labeled data in sufficient quantity and quality, creating an expensive bottleneck. To overcome such limitations, techniques that do not depend on ground truth labels have been studied, including weak supervision and generative modeling. While these techniques would seem to be usable in concert, improving one another, how to build an interface between them is not well-understood. In this work, we propose a model fusing programmatic weak supervision and generative adversarial networks and provide theoretical justification motivating this fusion. The proposed approach captures discrete latent variables in the data alongside the weak supervision derived label estimate. Alignment of the two allows for better modeling of sample-dependent accuracies of the weak supervision sources, improving the estimate of unobserved labels. It is the first approach to enable data augmentation through weakly supervised synthetic images and pseudolabels. Additionally, its learned latent variables can be inspected qualitatively. The model outperforms baseline weak supervision label models on a number of multiclass image classification datasets, improves the quality of generated images, and further improves end-model performance through data augmentation with synthetic samples.

For agents

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

get_harvested_code_for_paper("2203.12023")
get_code_for_paper("2203.12023")
have("2203.12023")

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

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

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

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

Connect an agent — have() is free.