SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.12182 · 2021

Fairness for Image Generation with Uncertain Sensitive Attributes

arXiv · PDF · Open in the Atlas

Code that ran

8 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 6 have no contract verdict; 1 failure of our instrument; 4 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/2106.12182.json · badge: /api/ran/2106.12182.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
ajiljalal/code-cs-fairness canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
FunctionStatusWhere it lives
flatten_eps Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/glow/model.py
code served (permissive licence) · get_code("49323c1346259836")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 29) 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 list of numpy arrays with different shapes
# Each array should have shape (batch_size, *feature_dims)
# We'll use batch_size=2 and vary the feature dimensions

eps = [
    np.random.randn(2, 3),      # shape (2, 3)
    np.random.randn(2, 4, 5),   # shape (2, 4, 5)
    np.random.randn(2, 6),      # shape (2, 6)
]

ARGS = {
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 29) — shape (2, 29) 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_figsize Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/src/metrics_utils.py
code served (permissive licence) · get_code("857ba6b23095a4f0")
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
import numpy as np

# The function get_figsize takes a single boolean parameter 'is_save'
# and returns a figsize list if is_save is True, or None otherwise.
# We'll test both cases by creating two separate argument dictionaries.

# Test case 1: is_save = True
ARGS = {
    "is_save": True
}
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 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
get_image_nums Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/src/view_estimated_celebA_cs.py
code served (permissive licence) · get_code("8ad7897be275437c")
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)

class HParams:
    def __init__(self, num_input_images):
        self.num_input_images = num_input_images

hparams = HParams(num_input_images=10)

ARGS = {
    "start": 0,
    "stop": 5,
    "hparams": hparams
}
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
get_l2_loss Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/src/utils.py
code served (permissive licence) · get_code("3f8654a051989cdf")
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 float32, 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 numpy as np

# Create two small numpy arrays with the same shape
image1 = np.random.randn(2, 4, 3, 3).astype(np.float32)
image2 = np.random.randn(2, 4, 3, 3).astype(np.float32)

ARGS = {
    "image1": image1,
    "image2": image2,
}
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 float32, 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_measurement_loss Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/src/utils.py
code served (permissive licence) · get_code("ef7378456cb1ffb8")
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 float32, 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 numpy as np

class HParams:
    def __init__(self, measurement_type, image_shape=None, downsample=None, 
                 sign_pattern=None, train_indices=None, num_measurements=None):
        self.measurement_type = measurement_type
        self.image_shape = image_shape
        self.downsample = downsample
        self.sign_pattern = sign_pattern
        self.train_indices = train_indices
        self.num_measurements = num_measurements

# Create a simple hparams with 'project' measurement type (simplest case)
hparams = HParams(
    measurement_type='project',
    image_shape=(4, 4),
    downsample=2,
    sign_pattern=np.ones((4, 4)),
    train_indices=np.array([0, 1, 2, 3]),
    num_measurements=4
)

# x_hat: batch of 2 images, flattened to 16 elements each
x_hat = np.random.randn(2, 16).astype(np.float32)

# A: measurement matrix (not used in 'project' case, but needs to be present)
A = np.random.randn(16, 8).astype(np.float32)

# y: ground truth measurements, same shape as what get_measurements would return
y = np.random.randn(2, 16).astype(np.float32)

ARGS = {
    'x_hat': x_hat,
    'A': A,
    'y': y,
    'hparams': hparams
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
int_or_float Ran
ran on a synthesized input
ajiljalal/code-cs-fairness/src/metrics_utils.py
code served (permissive licence) · get_code("3a73f73ee48b894d")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

ARGS = {
    "val": "42"
}
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 int, ndim 0, dtype family int, 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
load_if_pickled Ran
ran; our contract draft was wrong, not the code
ajiljalal/code-cs-fairness/src/utils.py
code served (permissive licence) · get_code("5967953b68048c6e")
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 os
import pickle
import tempfile

# Create a temporary directory for this test
temp_dir = tempfile.mkdtemp()

# Create a test pickle file with some sample data
test_pkl_path = os.path.join(temp_dir, "test_data.pkl")
test_data = {"key1": "value1", "key2": [1, 2, 3]}
with open(test_pkl_path, 'wb') as f:
    pickle.dump(test_data, f)

# Define ARGS with the pickle file path
ARGS = {
    "pkl_filepath": test_pkl_path
}
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 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
make_kernel Ran
ran, violated the contract we drafted
ajiljalal/code-cs-fairness/stylegan2/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.

load_pb Not yet run
unverified (harvested, no recorded run)
ajiljalal/code-cs-fairness/glow/model.py
code served (permissive licence) · get_code("a55018130198de2e")
How it ran

no invocation recorded.

rep_error_deep_decoder Not yet run
unverified (harvested, no recorded run)
ajiljalal/code-cs-fairness/include/compression.py
code served (permissive licence) · get_code("a03608be0d70054a")
How it ran

no invocation recorded.

rep_error_wavelet Not yet run
unverified (harvested, no recorded run)
ajiljalal/code-cs-fairness/include/compression.py
code served (permissive licence) · get_code("e714657a883c50dd")
How it ran

no invocation recorded.

unflatten_eps Not yet run
unverified (harvested, no recorded run)
ajiljalal/code-cs-fairness/glow/model.py
code served (permissive licence) · get_code("b1faad04059b6767")
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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 1 later) and 5 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
11 dated earlier, 1 the same month, 28 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.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 37 more not named here
get_figsize 2 other papers
2 dated earlier
1807.01442 (2018-07)
Modeling Sparse Deviations for Compressed Sensing using Generative Models
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
int_or_float 2 other papers
2 dated earlier
1807.01442 (2018-07)
Modeling Sparse Deviations for Compressed Sensing using Generative Models
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
flatten_eps 1 other paper
1 dated earlier
1807.03039 (2018-07)
Glow: Generative Flow with Invertible 1x1 Convolutions
get_image_nums 1 other paper
1 dated earlier
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
get_l2_loss 1 other paper
1 dated earlier
2006.09461 (2020-06)
Robust Compressed Sensing using Generative Models
load_if_pickled 1 other paper
1 dated earlier
1807.01442 (2018-07)
Modeling Sparse Deviations for Compressed Sensing using Generative Models

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

This work tackles the issue of fairness in the context of generative procedures, such as image super-resolution, which entail different definitions from the standard classification setting. Moreover, while traditional group fairness definitions are typically defined with respect to specified protected groups -- camouflaging the fact that these groupings are artificial and carry historical and political motivations -- we emphasize that there are no ground truth identities. For instance, should South and East Asians be viewed as a single group or separate groups? Should we consider one race as a whole or further split by gender? Choosing which groups are valid and who belongs in them is an impossible dilemma and being "fair" with respect to Asians may require being "unfair" with respect to South Asians. This motivates the introduction of definitions that allow algorithms to be \emph{oblivious} to the relevant groupings. We define several intuitive notions of group fairness and study their incompatibilities and trade-offs. We show that the natural extension of demographic parity is strongly dependent on the grouping, and \emph{impossible} to achieve obliviously. On the other hand, the conceptually new definition we introduce, Conditional Proportional Representation, can be achieved obliviously through Posterior Sampling. Our experiments validate our theoretical results and achieve fair image reconstruction using state-of-the-art generative models.

For agents

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

get_harvested_code_for_paper("2106.12182")
get_code_for_paper("2106.12182")
have("2106.12182")

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

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

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

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

Connect an agent — have() is free.