SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper · CVPR · 2025

Multi-Group Proportional Representation for Text-to-Image Models

Flavio Calmon, Taesup Moon, Claudio Mayrink Verdun, Sangwon Jung, Alex Oesterling, Sajani Vithana

Open in the Atlas

Code that ran

7 of 8 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 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper.json · badge: /api/ran/Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper.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
sangwon-jung94/mpr-t2i canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
fill_config Ran
ran; our contract draft was wrong, not the code
sangwon-jung94/mpr-t2i/utils.py
code served (permissive licence) · get_code("ba97c03f69e9c1d2")
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 collections
from copy import deepcopy

# Create a valid config dictionary with nested structures
config = {
    'base': {
        'learning_rate': 0.001,
        'batch_size': 32,
        'hidden_dim': 128,
    },
    'model_a': {
        'learning_rate': 0.0005,
        'layers': 3,
    },
    'model_b': {
        'batch_size': 64,
        'dropout': 0.5,
    },
    'models': [
        {
            'learning_rate': 0.002,
            'hidden_dim': 256,
        },
        {
            'batch_size': 16,
            'layers': 5,
        },
    ],
    'nested': {
        'optimizer': {
            'lr': 0.0001,
            'momentum': 0.9,
        },
        'scheduler': {
            'step_size': 10,
            'gamma': 0.1,
        },
    },
}

ARGS = {
    'config': config,
}
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
getMPR Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sangwon-jung94/mpr-t2i/mpr/mpr.py
code served (permissive licence) · get_code("e24989a93b45e9ba")
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. 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 numpy as np
from sklearn.ensemble import RandomForestRegressor
import itertools

# Set seeds for reproducibility
np.random.seed(0)

# Create small dummy datasets
dataset = np.random.randn(6, 4).astype(np.float32)  # 6 samples, 4 features
curation_set = np.random.randn(3, 4).astype(np.float32)  # 3 samples, 4 features

# Create indices (select all samples)
indices = np.ones(6)

# Define groups - subset of available groups
groups = ['gender', 'age']

# Create a dummy statistics dict with the structure expected by _marginalize
# It needs 'group' and 'prob' keys
dummy_prob = np.random.rand(4, 2, 2)  # Dummy probability tensor
class DummyTensor:
    def numpy(self):
        return dummy_prob.flatten()
    
    def sum(self, axis):
        result = np.sum(dummy_prob, axis=axis)
        return DummyTensor() if not isinstance(result, np.ndarray) else result

statistics = {
    'group': ['female', 'male', 'young', 'old'],
    'prob': DummyTensor()
}

# Create a simple RandomForestRegressor as a model
model = RandomForestRegressor(n_estimators=2, max_depth=2, random_state=0)
model.fit(dataset, np.random.rand(6))

ARGS = {
    'groups': groups,
    'dataset': dataset,
    'k': 5,
    'curation_set': curation_set,
    'statistics': statistics,
    'modelname': 'linear',
    'indices': indices,
    'normalize': False,
    'onehot': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_statistics Ran
ran; our contract draft was wrong, not the code
sangwon-jung94/mpr-t2i/utils.py
code served (permissive licence) · get_code("3dd35387a481da3c")
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
import os
import pickle

torch.manual_seed(0)

ARGS = {
    'concept': 'ENIAC_test',
    'groups': ['female', 'male']
}
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
make_dnf_feature Ran
ran, violated the contract we drafted
sangwon-jung94/mpr-t2i/mpr/mpr.py
code served (permissive licence) · get_code("673fe1b9119f5fdc")
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 3, 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 numpy as np

# Create small sample datasets
np.random.seed(0)

# dataset: needs to be a numpy array with shape (n_samples, n_features)
# The function will access dataset.shape[1] and dataset[:, idxs]
dataset = np.random.randint(0, 2, size=(2, 4)).astype(float)

# curation_set: same structure as dataset
curation_set = np.random.randint(0, 2, size=(2, 4)).astype(float)

# modelname: needs to contain 'boolean' and a depth specification
modelname = "boolean5"

ARGS = {
    "modelname": modelname,
    "dataset": dataset,
    "curation_set": curation_set,
}
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 tuple, ndim 3, 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
make_grad_hook Ran
ran; our contract draft was wrong, not the code
sangwon-jung94/mpr-t2i/trainer/finetuning.py
code served (permissive licence) · get_code("51485529dc5e4917")
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) and returned function. 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)

# The function make_grad_hook takes a single parameter 'coef'
# It returns a lambda function that multiplies its input by coef
# coef should be a numeric value (int, float, or tensor scalar)

ARGS = {
    "coef": 2.5
}
Setup block drafted by
a language model, Claude Haiku 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
merge Ran
ran; our contract draft was wrong, not the code
sangwon-jung94/mpr-t2i/utils.py
code served (permissive licence) · get_code("649b936d1942f4bb")
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 collections
from copy import deepcopy

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# Simple nested dictionaries for testing merge function
dict1 = {
    "model": {
        "layers": 3,
        "hidden_size": 128
    },
    "training": {
        "lr": 0.001,
        "epochs": 10
    },
    "name": "base_config"
}

dict2 = {
    "model": {
        "hidden_size": 256,
        "dropout": 0.5
    },
    "training": {
        "epochs": 20
    },
    "new_param": "added"
}

ARGS = {
    "dict1": dict1,
    "dict2": dict2
}
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
oracle_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sangwon-jung94/mpr-t2i/mpr/mpr.py
code served (permissive licence) · get_code("1292c7d1499e887d")
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 1, dtype family float, shape (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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small numpy arrays for dataset and curation_set
# Using distinct dimensions: 5 samples x 4 features for dataset
# and 3 samples x 4 features for curation_set
dataset = np.random.randn(5, 4)
curation_set = np.random.randn(3, 4)

# Create indices array - binary selection vector with 5 elements
# (matching dataset first dimension)
indices = np.array([1, 0, 1, 1, 0])

# Model name parameter
modelname = 'linear'

# Construct ARGS dictionary with all parameters
ARGS = {
    'indices': indices,
    'dataset': dataset,
    'curation_set': curation_set,
    'modelname': modelname
}
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 1, dtype family float, shape (4,) — shape (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
customized_all_gather Not yet run
unverified (harvested, no recorded run)
sangwon-jung94/mpr-t2i/trainer/finetuning.py
code served (permissive licence) · get_code("a495b64cc3fbe810")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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
customized_all_gather 1 other paper
1 dated earlier
2311.07604 (2023-11)
Finetuning Text-to-Image Diffusion Models for Fairness
make_grad_hook 1 other paper
1 dated earlier
2311.07604 (2023-11)
Finetuning Text-to-Image Diffusion Models for Fairness

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

Repositories linked to this paper

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

Abstract

Text-to-image (T2I) generative models can create vivid, realistic images from textual descriptions. As these models proliferate, they expose new concerns about their ability to represent diverse demographic groups, propagate stereotypes, and efface minority populations. Despite growing attention to the "safe" and "responsible" design of artificial intelligence (AI), there is no established methodology to systematically measure and control representational harms in image generation. This paper introduces a novel framework to measure the representation of intersectional groups in images generated by T2I models by applying the Multi-Group Proportional Representation (MPR) metric. MPR evaluates the worst-case deviation of representation statistics across given population groups in images produced by a generative model, allowing for flexible and context-specific measurements based on user requirements. We also develop an algorithm to optimize T2I models for this metric. Through experiments, we demonstrate that MPR can effectively measure representation statistics across multiple intersectional groups and, when used as a training objective, can guide models toward a more balanced generation across demographic groups while maintaining generation quality. 1

For agents

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

get_harvested_code_for_paper("Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper")
get_code_for_paper("Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper")
have("Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper")

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

curl https://syntology.ai/api/ran/Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper.json

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

[![Syntology run record](https://syntology.ai/api/ran/Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper.svg)](https://syntology.ai/paper/Jung_Multi-Group_Proportional_Representations_for_Text-to-Image_Models_CVPR_2025_paper)

Connect an agent — have() is free.