SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.00185 · ICML · 2026

Fair Dataset Distillation via Cross-Group Barycenter Alignment

Boyu Wang, Nima Hosseini Dashtbayaz, Mohammad Moslemi, Zhimin Mei, Bissan Ghaddar

arXiv · PDF · Open in the Atlas

Code that ran

21 of 24 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, 0 violated it and 0 have no contract verdict; 20 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2605.00185.json · badge: /api/ran/2605.00185.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
mhmoslemi/COBRA canonical (classifier label)
classifier basis: census
21 ran · 3 no recorded run
FunctionStatusWhere it lives
BFFHQ Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/data_handler/bffhq.py
code served (permissive licence) · get_code("bd773d9c02e29a4e")
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 torch
import numpy as np
import os
import tempfile
from unittest.mock import patch, MagicMock

torch.manual_seed(0)

# Create a temporary directory structure for the mock data
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'bffhq')
os.makedirs(data_dir, exist_ok=True)

ARGS = {
    'data_dir': data_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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
VGG11 Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/networks.py
code served (permissive licence) · get_code("3a29eb3050e447c2")
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 VGG. 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 = {
    'channel': 3,
    'num_classes': 10
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
VGG11 Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/cafe/networks.py
code served (permissive licence) · get_code("f8401a9b3126d921")
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 VGG. 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 = {
    'channel': 3,
    'num_classes': 10
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
VGG11BN Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/networks.py
code served (permissive licence) · get_code("4ea4dd5c81bd5282")
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 VGG. 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)

# VGG11BN takes two parameters: channel and num_classes
ARGS = {
    'channel': 3,
    'num_classes': 10
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
VGG11BN Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/cafe/networks.py
code served (permissive licence) · get_code("6c632687325230f7")
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 VGG. 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 = {
    'channel': 3,
    'num_classes': 10
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
VGG13 Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/networks.py
code served (permissive licence) · get_code("dab7a34987ab9a33")
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 VGG. 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 = {
    'channel': 3,
    'num_classes': 10,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
VGG13 Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/cafe/networks.py
code served (permissive licence) · get_code("19c3f80dad09ae48")
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 VGG. 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 = {
    'channel': 3,
    'num_classes': 10,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
apply_hierarchical_noise Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/data_handler/cifar10.py
code served (permissive licence) · get_code("20eb235e3232f558")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (4, 3, 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 numpy as np
from PIL import Image

# Create a small test image (4x3 RGB image)
test_image = Image.new('RGB', (4, 3), color=(100, 150, 200))

# Draw some simple pattern to make it more interesting
pixels = test_image.load()
for i in range(4):
    for j in range(3):
        pixels[i, j] = ((i * 50) % 256, (j * 80) % 256, (i + j) * 30 % 256)

ARGS = {
    "img": test_image,
    "severity": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
compute_real_grad_cobra Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_dc.py
code served (permissive licence) · get_code("f1f76f7fadf00ad0")
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. 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)

# Build a minimal neural network
class SimpleNet(nn.Module):
    def __init__(self, input_size, output_size):
        super().__init__()
        self.fc1 = nn.Linear(input_size, 8)
        self.fc2 = nn.Linear(8, output_size)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create the network
net = SimpleNet(input_size=4, output_size=3)

# Get network parameters
net_parameters = list(net.parameters())

# Create a loss criterion
criterion = nn.CrossEntropyLoss()

# Create real images (batch_size=2, features=4)
img_real = torch.randn(2, 4)

# Create real labels (batch_size=2, class indices)
lab_real = torch.tensor([0, 1])

# Create color tensor with group assignments (batch_size=2)
# Using values 0 and 1 to represent different groups
color = torch.tensor([0, 1])

ARGS = {
    "net": net,
    "net_parameters": net_parameters,
    "criterion": criterion,
    "img_real": img_real,
    "lab_real": lab_real,
    "color": color,
}
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 — a list 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
compute_real_grad_fairdd Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_dc.py
code served (permissive licence) · get_code("face57d867a77268")
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. 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)

# Define a simple neural network
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

# Create the network
net = SimpleNet()

# Get network parameters (excluding buffers)
net_parameters = list(net.parameters())

# Create a simple criterion
criterion = nn.CrossEntropyLoss()

# Create small tensors for real images and labels
# batch_size=2, input_dim=4
img_real = torch.randn(2, 4)
lab_real = torch.tensor([0, 1])

# Create color/group labels - 2 groups (0 and 1)
color = torch.tensor([0, 1])

ARGS = {
    'net': net,
    'net_parameters': net_parameters,
    'criterion': criterion,
    'img_real': img_real,
    'lab_real': lab_real,
    'color': color
}
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 — a list 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
compute_real_grad_vanilla Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_dc.py
code served (permissive licence) · get_code("f1a3be539d4e5714")
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. 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)

# Create a simple neural network
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(4, 8)
        self.fc2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

net = SimpleNet()

# Get network parameters that require gradients
net_parameters = [p for p in net.parameters() if p.requires_grad]

# Create criterion
criterion = nn.CrossEntropyLoss()

# Create small tensors for real images and labels
img_real = torch.randn(2, 4)  # batch_size=2, feature_dim=4
lab_real = torch.randint(0, 3, (2,))  # batch_size=2, 3 classes

ARGS = {
    'net': net,
    'net_parameters': net_parameters,
    'criterion': criterion,
    'img_real': img_real,
    'lab_real': lab_real
}
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 — a list 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
decode_zoom Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_idc.py
code served (permissive licence) · get_code("f5e918040cde63d9")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# img is a 4D tensor (batch, channels, height, width)
# The function uses img.shape[-1] to get height
# It crops the image into factor x factor patches
# factor must divide evenly into the height
img = torch.randn(2, 4, 8, 8)  # batch=2, channels=4, height=8, width=8

# target is a 1D tensor of labels that will be repeated factor**2 times
# factor=2 means 4 patches, so target gets repeated 4 times
target = torch.tensor([0, 1])  # batch size 2

# factor determines how many patches to extract (factor x factor grid)
factor = 2

# size is the output size for the Upsample operation
size = (32, 32)

ARGS = {
    'img': img,
    'target': target,
    'factor': factor,
    'size': size
}
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 — 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
dist_idc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mhmoslemi/COBRA/utils.py
code served (permissive licence) · get_code("c4efcb9516f50468")
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 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 torch

torch.manual_seed(0)

# Create small tensors for x and y
# Shape: (batch_size=2, feature_dim=4)
x = torch.randn(2, 4)
y = torch.randn(2, 4)

# Test with different methods to ensure they all work
ARGS = {
    'x': x,
    'y': y,
    'method': 'l1'
}
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 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
distance_wb Ran
ran, honoured the contract we drafted
mhmoslemi/COBRA/cafe/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from saehyung-lee/dcc, is pointer only (licence: NONE) · get_code("6e9c65aaa7c1b5da")
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 saehyung-lee/dcc, 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.

feature_mse_class_mean Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_cafe.py
code served (permissive licence) · get_code("4e4242870127e755")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for feature_mse_class_mean
# The function expects:
# - real_feat: a tensor of shape (batch_size, feature_dim)
# - syn_feat: a tensor of shape (batch_size, feature_dim)
# - num_classes: an integer
# 
# The function reshapes both tensors to (num_classes, batch_size // num_classes, *feature_dims)
# So batch_size must be divisible by num_classes

num_classes = 2
samples_per_class = 3
batch_size = num_classes * samples_per_class  # 6
feature_dim = 4

# Create real and synthetic feature tensors
real_feat = torch.randn(batch_size, feature_dim)
syn_feat = torch.randn(batch_size, feature_dim)

ARGS = {
    'real_feat': real_feat,
    'syn_feat': syn_feat,
    'num_classes': num_classes
}
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 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_file_list Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/data_handler/bffhq.py
code served (permissive licence) · get_code("b67f67a82295a62c")
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. 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 os
import tempfile
from pathlib import Path

# Create a temporary directory structure for testing
temp_root = tempfile.mkdtemp()

# Create directory structure for '0.5pct' split
split_05_dir = os.path.join(temp_root, '0.5pct')
align_dir = os.path.join(split_05_dir, 'align', 'class1', 'class2')
conflict_dir = os.path.join(split_05_dir, 'conflict', 'class1', 'class2')
os.makedirs(align_dir, exist_ok=True)
os.makedirs(conflict_dir, exist_ok=True)

# Create some dummy files
Path(os.path.join(align_dir, 'file1.jpg')).touch()
Path(os.path.join(align_dir, 'file2.jpg')).touch()
Path(os.path.join(conflict_dir, 'file3.jpg')).touch()
Path(os.path.join(conflict_dir, 'file4.jpg')).touch()

# Create directory structure for 'valid' split
valid_dir = os.path.join(temp_root, 'valid')
os.makedirs(valid_dir, exist_ok=True)
Path(os.path.join(valid_dir, 'valid1.jpg')).touch()
Path(os.path.join(valid_dir, 'valid2.jpg')).touch()

# Create directory structure for 'test' split
test_dir = os.path.join(temp_root, 'test')
os.makedirs(test_dir, exist_ok=True)
Path(os.path.join(test_dir, 'test1.jpg')).touch()
Path(os.path.join(test_dir, 'test2.jpg')).touch()

ARGS = {
    'root': temp_root,
    'split': '0.5pct'
}
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 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
hierarchical_corruption Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mhmoslemi/COBRA/data_handler/cifar10.py
code served (permissive licence) · get_code("7a3793a121888ad3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (3, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from PIL import Image
import numpy as np

# Create a small test image (4x3 RGB)
test_image = Image.new('RGB', (4, 3), color=(100, 150, 200))

# Test with different severity levels
ARGS = {
    'img': test_image,
    'severity': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (3, 4, 3) — shape (3, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hierarchical_corruption_orig Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mhmoslemi/COBRA/data_handler/cifar10.py
code served (permissive licence) · get_code("74ed1c4f9c03881c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (3, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from PIL import Image

# Create a small test image (4x3 RGB)
img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
test_img = Image.fromarray(img_array, mode='RGB')

# Define arguments
ARGS = {
    'img': test_img,
    'severity': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (3, 4, 3) — shape (3, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_images_and_labels Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/data_handler/bffhq.py
code served (permissive licence) · get_code("eb044328dd99d591")
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 PIL import Image
import tempfile
import os

# Create temporary test images with filenames that match the expected format
temp_dir = tempfile.mkdtemp()

# Create a few test image files with names matching pattern: *_<first_attr>_<second_attr>.png
test_files = []
for i in range(3):
    first_attr = i % 2
    second_attr = (i + 1) % 2
    filename = f"test_image_{first_attr}_{second_attr}.png"
    filepath = os.path.join(temp_dir, filename)
    
    # Create a small RGB image
    img = Image.new('RGB', (64, 64), color=(73, 109, 137))
    img.save(filepath)
    test_files.append(filepath)

ARGS = {
    'files': test_files,
    'resize_dim': 64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
real_grad_per_group Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_idc.py
code served (permissive licence) · get_code("0490f91b27f98d25")
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 torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

net = SimpleNet()

# Get parameters that require grad
params = [p for p in net.parameters() if p.requires_grad]

# Create a criterion
criterion = nn.CrossEntropyLoss()

# Create input data: batch of 2 samples, 4 features each
img_real = torch.randn(2, 4, requires_grad=True)

# Create labels: batch of 2 samples with class indices (0-2 for 3 classes)
lab_real = torch.tensor([0, 2])

# Create color tensor: group assignments for each sample (2 samples, 2 groups)
color = torch.tensor([0, 1])

ARGS = {
    "net": net,
    "params": params,
    "criterion": criterion,
    "img_real": img_real,
    "lab_real": lab_real,
    "color": color
}
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
real_grad_vanilla Ran
ran; our contract draft was wrong, not the code
mhmoslemi/COBRA/train_idc.py
code served (permissive licence) · get_code("08025844a4712989")
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. 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)

# Build a minimal neural network
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

net = SimpleNet()

# Create parameters list (what we want gradients for)
params = list(net.parameters())

# Create a loss criterion
criterion = nn.CrossEntropyLoss()

# Create tiny batch of real images and labels
img_real = torch.randn(2, 4)  # batch_size=2, input_dim=4
lab_real = torch.tensor([0, 1])  # batch_size=2, class labels

ARGS = {
    'net': net,
    'params': params,
    'criterion': criterion,
    'img_real': img_real,
    'lab_real': lab_real
}
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 — a list 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
CelebA Not yet run
unverified (harvested, no recorded run)
mhmoslemi/COBRA/data_handler/celeba.py
code served (permissive licence) · get_code("23f6b1ff3ba2eadb")
How it ran

no invocation recorded.

get_biased_fashionmnist_dataloader Not yet run
unverified (harvested, no recorded run)
mhmoslemi/COBRA/data_handler/FashionMNIST.py
code served (permissive licence) · get_code("6323b93f20e4b638")
How it ran

no invocation recorded.

get_network Not yet run
unverified (harvested, no recorded run)
mhmoslemi/COBRA/cafe/utils.py
code served (permissive licence) · get_code("65b7653b03a39234")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 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
VGG11BN 28 other papers
28 dated earlier
2203.01531 (2022-03)
CAFE: Learning to Condense Dataset by Aligning Features
2204.07513 (2022-04)
Synthesizing Informative Training Samples with GAN
2210.16774 (2022-10)
Dataset Distillation via Factorization
and 25 more not named here
VGG11 27 other papers
27 dated earlier
2203.01531 (2022-03)
CAFE: Learning to Condense Dataset by Aligning Features
2204.07513 (2022-04)
Synthesizing Informative Training Samples with GAN
2210.16774 (2022-10)
Dataset Distillation via Factorization
and 24 more not named here
VGG13 19 other papers
19 dated earlier
2204.07513 (2022-04)
Synthesizing Informative Training Samples with GAN
2210.16774 (2022-10)
Dataset Distillation via Factorization
2211.04446 (2022-11)
Private Set Generation with Discriminative Information
and 16 more not named here
distance_wb 11 other papers
11 dated earlier
2202.02916 (2022-02)
Dataset Condensation with Contrastive Signals
2204.07513 (2022-04)
Synthesizing Informative Training Samples with GAN
2211.04446 (2022-11)
Private Set Generation with Discriminative Information
and 8 more not named here
get_network 1 other paper
1 dated earlier
2203.01531 (2022-03)
CAFE: Learning to Condense Dataset by Aligning Features

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

Dataset Distillation aims to compress a large dataset into a small synthetic one while maintaining predictive performance. We show that as different demographic groups exhibit distinct predictive patterns, the distillation process struggles to simultaneously preserve informative signals for all subgroups, regardless of whether group sizes are mildly or severely imbalanced. Consequently, models trained on distilled data can experience substantial performance drops for certain subgroups, leading to fairness gaps. Crucially, these gaps do not disappear by merely correcting group imbalance, since they stem from fundamental mismatches in subgroup predictive patterns rather than from sample-size disparities alone. We therefore formally analyze the interaction between these two sources of bias and cast the solution as identifying a group-imbalance-agnostic barycenter of the predictive information that induces similar representations across all subgroups. By distilling toward this shared aggregate representation, we show that group fairness concerns can be reduced. Our approach is compatible with existing distillation methods, and empirical results show that it substantially reduces bias introduced by dataset distillation. Code is available at https://github.com/mhmoslemi/COBRA

For agents

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

get_harvested_code_for_paper("2605.00185")
get_code_for_paper("2605.00185")
have("2605.00185")

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

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

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

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

Connect an agent — have() is free.