SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.09327 · 2021

Incentivizing Collaboration in Machine Learning via Synthetic Data Rewards

arXiv · PDF · Open in the Atlas

Code that ran

16 of 18 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 15 have no contract verdict; 0 failures of our instrument; 2 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/2112.09327.json · badge: /api/ran/2112.09327.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
XinyiYS/CML-RewardDistribution canonical (classifier label)
classifier basis not recorded on the link
16 ran · 2 no recorded run
FunctionStatusWhere it lives
class_proportion Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/metrics/class_imbalance.py
code served (permissive licence) · get_code("cbe2bf3d1c21b866")
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

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

# Create a small array of class indices
# classes should be shape (n,) with values from 0 to num_classes-1
classes = np.array([0, 1, 2, 0, 1, 2, 0, 1], dtype=np.int64)

# Number of classes
num_classes = 3

ARGS = {
    "classes": classes,
    "num_classes": num_classes,
}
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 — 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
dkl Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/metrics/phi_div.py
code served (permissive licence) · get_code("4f622cbc27dc5889")
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 float64, ndim 0, 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

np.random.seed(0)

# Create small sample arrays P and Q with distinct dimensions
# P: (n=5, d=3) - 5 samples in 3D space
P = np.random.randn(5, 3).astype(np.float64)

# Q: (m=7, d=3) - 7 samples in 3D space (different from P size)
Q = np.random.randn(7, 3).astype(np.float64)

# k parameter for k-nearest neighbors
k = 2

ARGS = {
    "P": P,
    "Q": Q,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_alpha_min Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/reward_calculation.py
code served (permissive licence) · get_code("90d6cc3fa087a4e0")
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 float, 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)

# The function get_alpha_min takes a parameter 'alpha' which should be:
# - An iterable (list, tuple, or similar) that supports min() and sorted()
# - Contains numeric values

# Construct a valid alpha argument
alpha = [0.1, 0.0, 0.5, 0.2]

ARGS = {
    "alpha": alpha
}
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 float, 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_classes Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/metrics/class_imbalance.py
code served (permissive licence) · get_code("1f09a140e61a66d1")
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 numpy as np

# Create small test data
# rewards: shape (n, d) - points we want to classify
# candidates: shape (m, d) - reference points with known classes
# classes: shape (m,) - class index for each candidate

n = 2  # number of reward points
m = 4  # number of candidate points
d = 3  # dimensionality

# Create candidates array
candidates = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0],
    [10.0, 11.0, 12.0]
], dtype=np.float32)

# Create class assignments for each candidate
classes = np.array([0, 1, 0, 2], dtype=np.int32)

# Create rewards that are exact matches to some candidates
# rewards[0] matches candidates[1] (class 1)
# rewards[1] matches candidates[2] (class 0)
rewards = np.array([
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0]
], dtype=np.float32)

ARGS = {
    "rewards": rewards,
    "candidates": candidates,
    "classes": classes
}
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 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
is_all_above_lb Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/kernel.py
code served (permissive licence) · get_code("f9bac8360204bdf5")
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 bool, 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
import numpy as np

torch.manual_seed(0)

# k is called as k(val_points) and the result has .cpu().detach().numpy()
# So k must be a callable (likely nn.Module) that takes val_points and returns a tensor
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

k = SimpleModel()

# val_points is passed to k and also has len() called on it
# After k(val_points), the result is compared to lb element-wise
# Then .sum() is called and compared to len(val_points) ** 2
# So val_points should be a 2D tensor that when passed through k gives output
# with shape matching len(val_points) ** 2 elements
# If val_points has shape (n, 4), k outputs shape (n, 1)
# We need num_above == len(val_points) ** 2
# So if val_points is shape (2, 4), len is 2, and we need 2**2 = 4 comparisons
# But k would output (2, 1)... 
# Actually, looking more carefully: (k(val_points).cpu().detach().numpy() > lb).sum()
# This compares all elements to lb and sums. For this to equal len(val_points)**2,
# k(val_points) must have len(val_points)**2 elements total
# If val_points is (2, 4), we need k to output (4,) or (2, 2) or similar with 4 total elements
# Let's make val_points shape (2, 4) and k output shape (2, 2)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        # x shape: (2, 4)
        # output shape: (2, 2) which has 4 elements total
        return self.linear(x)

k = SimpleModel()

# val_points: shape (2, 4) - 2 is batch size, 4 is feature dim
val_points = torch.randn(2, 4)

# lb: threshold value for comparison
# Make it low so all values are above it, to satisfy the condition
lb = -10.0

ARGS = {
    "k": k,
    "val_points": val_points,
    "lb": lb
}
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 bool, 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
median_heuristic Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/kernel.py
code served (permissive licence) · get_code("4aa9d3cd501cca31")
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 float64, ndim 0, 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

np.random.seed(0)

# Create a small input array of shape (n, d)
# Using n=10 samples and d=4 dimensions
input_data = np.random.randn(10, 4)

ARGS = {
    "input": input_data,
    "num_samples": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
mmd_neg_biased_batched Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/mmd.py
code served (permissive licence) · get_code("bb078ca7f84056be")
How it ran

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

import torch
import numpy as np
from gpytorch.kernels import RBFKernel

torch.manual_seed(0)

# Create a simple GPyTorch kernel mock that supports the .evaluate() interface
class SimpleKernel:
    def __call__(self, x, y=None):
        # Returns an object with .evaluate() method
        if y is None:
            # Self-kernel case
            y = x
        # Compute RBF kernel: exp(-||x - y||^2)
        distances = torch.cdist(x, y)
        kernel_matrix = torch.exp(-distances ** 2)
        return KernelOutput(kernel_matrix)

class KernelOutput:
    def __init__(self, matrix):
        self.matrix = matrix
    
    def evaluate(self):
        return self.matrix

# Create tiny sample data
X = np.random.randn(6, 4).astype(np.float32)  # 6 samples, 4 dimensions
Y = np.random.randn(5, 4).astype(np.float32)  # 5 samples, 4 dimensions

# Create kernel
kernel = SimpleKernel()

# Device
device = 'cpu'

# Batch size
batch_size = 2

ARGS = {
    'X': X,
    'Y': Y,
    'k': kernel,
    'device': device,
    'batch_size': batch_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gpytorch, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mmd_neg_unbiased Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/mmd.py
code served (permissive licence) · get_code("fe15b2c7c79d0509")
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 gpytorch

torch.manual_seed(0)

# Create a simple RBF kernel from GPyTorch
class SimpleKernel(gpytorch.kernels.Kernel):
    def forward(self, x1, x2=None, **kwargs):
        if x2 is None:
            x2 = x1
        # Simple RBF kernel: exp(-||x1-x2||^2)
        x1_norm = (x1 ** 2).sum(dim=-1, keepdim=True)
        x2_norm = (x2 ** 2).sum(dim=-1, keepdim=True)
        dist_sq = x1_norm - 2 * x1 @ x2.t() + x2_norm.t()
        return gpytorch.lazy.LazyTensor.from_matrix(torch.exp(-dist_sq))

# Create tensors: X is 2x4, Y is 3x4 (distinct sizes for different purposes)
X = torch.randn(2, 4)
Y = torch.randn(3, 4)

# Create a simple callable kernel that returns a LazyTensor or object with evaluate() method
class SimpleKernelCallable:
    def __call__(self, x1, x2=None):
        if x2 is None:
            x2 = x1
        x1_norm = (x1 ** 2).sum(dim=-1, keepdim=True)
        x2_norm = (x2 ** 2).sum(dim=-1, keepdim=True)
        dist_sq = x1_norm - 2 * x1 @ x2.t() + x2_norm.t()
        kernel_matrix = torch.exp(-dist_sq)
        
        # Return object with evaluate() method
        class KernelOutput:
            def __init__(self, matrix):
                self.matrix = matrix
            def evaluate(self):
                return self.matrix
        
        return KernelOutput(kernel_matrix)

k = SimpleKernelCallable()

ARGS = {
    "X": X,
    "Y": Y,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gpytorch, 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
nonneg_lb Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/kernel.py
code served (permissive licence) · get_code("843e20627d748a8c")
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 float, 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 numpy as np

# The function nonneg_lb takes scalar parameters and performs arithmetic operations
# It does not use torch or numpy directly, just basic Python arithmetic

ARGS = {
    "n": 100,           # size of reference dataset Y
    "S": 30,            # minimum party dataset size
    "k": 1,             # value of diagonal terms
    "eta": 2,           # upper bound (optional, will use k if None)
    "tol": 0.0001       # tolerance parameter
}
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 float, 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
shapley Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/reward_calculation.py
code served (permissive licence) · get_code("788ddc68a51d366d")
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 math
import itertools

def shapley(v, num_parties):
    """
    :param v: Dictionary with keys as repr(set(C)), e.g. v[repr(set((4,)))] = 10, v[repr(set((1,2)))] = 18 etc.,
    for all permutations
    """
    sums = [0 for i in range(num_parties)]
    for perm in itertools.permutations(list(range(1, num_parties + 1))):
        current_val = 0
        coalition = set()
        for party in perm:
            coalition.add(party)
            marginal = v[repr(coalition)] - current_val
            sums[party - 1] += marginal
            current_val = v[repr(coalition)]
    return list(map(lambda x: 1 / math.factorial(num_parties) * x, sums))

# Build a valid v dictionary for num_parties=3
# We need entries for all possible coalitions of parties {1, 2, 3}
num_parties = 3
v = {}

# Empty coalition
v[repr(set())] = 0

# Single party coalitions
v[repr(set((1,)))] = 5
v[repr(set((2,)))] = 3
v[repr(set((3,)))] = 7

# Two party coalitions
v[repr(set((1, 2)))] = 12
v[repr(set((1, 3)))] = 15
v[repr(set((2, 3)))] = 11

# Full coalition
v[repr(set((1, 2, 3)))] = 20

ARGS = {
    "v": v,
    "num_parties": num_parties
}
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
split_proportions Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/utils.py
code served (permissive licence) · get_code("98dbe24f0f0cb1dd")
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

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

# Create a small dataset with shape (num_classes, N, feature_dim)
# num_classes = 3, N = 12, feature_dim = 4
num_classes = 3
N = 12
feature_dim = 4
dataset = np.random.randn(num_classes, N, feature_dim)

# Create proportions array of shape (num_parties, num_classes)
# num_parties = 2, num_classes = 3
# Each row must sum to 1 (probability simplex)
num_parties = 2
proportions = np.array([
    [0.5, 0.3, 0.2],  # Party 0: 50% class 0, 30% class 1, 20% class 2
    [0.2, 0.4, 0.4],  # Party 1: 20% class 0, 40% class 1, 40% class 2
])

# party_data_size is optional, set to None to use minimum
party_data_size = None

ARGS = {
    "dataset": dataset,
    "proportions": proportions,
    "party_data_size": party_data_size,
}
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 — 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
union Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/utils.py
code served (permissive licence) · get_code("1294c7010443724a")
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 (5, 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

# Create two sample numpy arrays with different shapes to test the union function
# Using distinct dimensions: 2x4 and 3x4 to make shapes clearly different
D = np.array([[1, 2, 3, 4],
              [5, 6, 7, 8]], dtype=np.float32)

R_non_empty = np.array([[9, 10, 11, 12],
                        [13, 14, 15, 16],
                        [17, 18, 19, 20]], dtype=np.float32)

R_empty = np.array([], dtype=np.float32).reshape(0, 4)

# Test case 1: non-empty R
ARGS = {
    "D": D,
    "R": R_non_empty
}
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 (5, 4) — shape (5, 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
unison_shuffled_copies Ran
ran, violated the contract we drafted
XinyiYS/CML-RewardDistribution/core/utils.py
code served (permissive licence) · get_code("2402bc396a04d18a")
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 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 numpy as np

# The function takes two numpy arrays of equal length
# and returns shuffled copies of both with the same permutation applied

a = np.array([1, 2, 3, 4])
b = np.array([10, 20, 30, 40])

ARGS = {
    'a': a,
    'b': b
}
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 2, dtype family int — 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
v_update_batch Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/reward_realization.py
code served (permissive licence) · get_code("812b608f950089ca")
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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a minimal kernel class that implements the interface used in the function
class SimpleKernel(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, x1, x2=None):
        """
        Computes kernel matrix between x1 and x2 (or x1 and x1 if x2 is None)
        Returns an object with .evaluate() method
        """
        if x2 is None:
            # Diagonal case: k(x)
            x2 = x1
        
        # Simple RBF-like kernel computation
        class KernelMatrix:
            def __init__(self, matrix):
                self.matrix = matrix
            
            def evaluate(self):
                return self.matrix
        
        # Compute pairwise squared distances and apply RBF
        # x1: (n, d), x2: (m, d)
        x1_norm = torch.sum(x1 ** 2, dim=1, keepdim=True)  # (n, 1)
        x2_norm = torch.sum(x2 ** 2, dim=1, keepdim=True)  # (m, 1)
        dist_sq = x1_norm + x2_norm.t() - 2 * torch.mm(x1, x2.t())  # (n, m)
        kernel_matrix = torch.exp(-dist_sq)
        
        return KernelMatrix(kernel_matrix)
    
    def __call__(self, x1, x2=None):
        return self.forward(x1, x2)

# Create kernel instance
k = SimpleKernel()

# Create small tensors with distinct dimensions
# x: (z=2, d=4) - batch of new points
x = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]], dtype=np.float32)

# X: (n=3, d=4) - existing set X
X = np.array([[0.1, 0.2, 0.3, 0.4],
              [0.5, 0.6, 0.7, 0.8],
              [0.9, 1.0, 1.1, 1.2]], dtype=np.float32)

# Y: (m=2, d=4) - existing set Y (different size)
Y = np.array([[1.5, 1.6, 1.7, 1.8],
              [2.0, 2.1, 2.2, 2.3]], dtype=np.float32)

# S_X: scalar float
S_X = 0.5

# S_XY: scalar float
S_XY = 0.3

ARGS = {
    'x': x,
    'X': X,
    'Y': Y,
    'S_X': S_X,
    'S_XY': S_XY,
    'k': k
}
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 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
v_update_batch_iter Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/core/reward_realization.py
code served (permissive licence) · get_code("ea3311f490193b70")
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
import numpy as np

torch.manual_seed(0)

# Create a minimal kernel class that implements the required interface
class MockKernel:
    def __call__(self, x, y=None):
        """
        Returns a kernel matrix wrapper that has an evaluate() method.
        """
        return MockKernelMatrix(x, y)

class MockKernelMatrix:
    def __init__(self, x, y=None):
        self.x = x
        self.y = y
    
    def evaluate(self):
        """Return a kernel matrix of appropriate shape."""
        if self.y is None:
            # Self kernel: shape (batch_size, batch_size)
            batch_size = self.x.shape[0]
            return torch.eye(batch_size, device=self.x.device, dtype=self.x.dtype)
        else:
            # Cross kernel: shape (x.shape[0], y.shape[0])
            return torch.randn(self.x.shape[0], self.y.shape[0], device=self.x.device, dtype=self.x.dtype)

# Define dimensions
d = 4  # feature dimension
z = 2  # number of new points
m = 3  # number of points in X
n = 5  # number of points in Y

# Create sample data
x = np.random.randn(z, d).astype(np.float32)
X = np.random.randn(m, d).astype(np.float32)
Y = np.random.randn(n, d).astype(np.float32)

# Create scalar summation terms
S_X = np.float32(1.5)
S_XY = np.float32(2.3)

# Create mock kernel
k = MockKernel()

# Set device
device = 'cpu'

# Set batch_size
batch_size = 2048

ARGS = {
    'x': x,
    'X': X,
    'Y': Y,
    'S_X': S_X,
    'S_XY': S_XY,
    'k': k,
    'device': device,
    'batch_size': batch_size
}
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 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
wasserstein_2 Ran
ran on a synthesized input
XinyiYS/CML-RewardDistribution/metrics/wasserstein.py
code served (permissive licence) · get_code("7b5a5cb7090ef739")
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 complex128, 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

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

# Create sample data matrices
# P: (m, d) matrix - Reference data, shape (2, 4)
P = np.random.randn(2, 4).astype(np.float64)

# Q: (n, d) matrix - Distribution we are evaluating, shape (3, 4)
Q = np.random.randn(3, 4).astype(np.float64)

ARGS = {
    "P": P,
    "Q": Q,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type complex128, 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
average_dkl Not yet run
unverified (harvested, no recorded run)
XinyiYS/CML-RewardDistribution/metrics/phi_div.py
code served (permissive licence) · get_code("5695a395e366c914")
How it ran

no invocation recorded.

mmd_neg_biased Not yet run
unverified (harvested, no recorded run)
XinyiYS/CML-RewardDistribution/core/mmd.py
code served (permissive licence) · get_code("2754b9bb22c231a4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 17 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
unison_shuffled_copies 1 other paper
1 dated earlier
1903.02557 (2019-03)
DASH: Deep Learning for the Automated Spectral Classification of Supernovae and their Hosts

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 paper presents a novel collaborative generative modeling (CGM) framework that incentivizes collaboration among self-interested parties to contribute data to a pool for training a generative model (e.g., GAN), from which synthetic data are drawn and distributed to the parties as rewards commensurate to their contributions. Distributing synthetic data as rewards (instead of trained models or money) offers task- and model-agnostic benefits for downstream learning tasks and is less likely to violate data privacy regulation. To realize the framework, we firstly propose a data valuation function using maximum mean discrepancy (MMD) that values data based on its quantity and quality in terms of its closeness to the true data distribution and provide theoretical results guiding the kernel choice in our MMD-based data valuation function. Then, we formulate the reward scheme as a linear optimization problem that when solved, guarantees certain incentives such as fairness in the CGM framework. We devise a weighted sampling algorithm for generating synthetic data to be distributed to each party as reward such that the value of its data and the synthetic data combined matches its assigned reward value by the reward scheme. We empirically show using simulated and real-world datasets that the parties' synthetic data rewards are commensurate to their contributions.

For agents

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

get_harvested_code_for_paper("2112.09327")
get_code_for_paper("2112.09327")
have("2112.09327")

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

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

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

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

Connect an agent — have() is free.