SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.11258 · 2022

Many processors, little time: MCMC for partitions via optimal transport couplings

arXiv · PDF · Open in the Atlas

Code that ran

16 of 20 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, 0 violated it and 16 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2202.11258.json · badge: /api/ran/2202.11258.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
tinnguyen96/partition-coupling canonical (classifier label)
classifier basis not recorded on the link
16 ran · 4 no recorded run
FunctionStatusWhere it lives
LCP Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/interesting_functions.py
code served (permissive licence) · get_code("52ecba0403862b85")
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 (10,) 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

# The function expects:
# - clusts: a list of sets (K,) where each set contains cluster members
# - k: an integer specifying the output array size (default 10)

# Create sample cluster data
# Each cluster is a set of arbitrary identifiers (could be indices, object IDs, etc.)
clusts = [
    {0, 1, 2, 3, 4},      # cluster 0: 5 members
    {5, 6, 7},            # cluster 1: 3 members
    {8, 9},               # cluster 2: 2 members
    {10},                 # cluster 3: 1 member
]

k = 10

ARGS = {
    "clusts": clusts,
    "k": k,
}
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 (10,) — shape (10,) 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
SixNodeDegFourRegularinit Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/priors.py
code served (permissive licence) · get_code("757d637a887bc404")
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

ARGS = {
    'initType': '2with4'
}
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
VI_dist Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/partitions.py
code served (permissive licence) · get_code("006ad395725d839e")
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
from scipy import stats

# The function VI_dist expects two arguments: clusts1 and clusts2
# Each should be a list of collections (the code uses .intersection() and len())
# Looking at the function body:
# - It iterates over c1 in clusts1 and c2 in clusts2
# - It calls len(c1), len(c2), c1.intersection(c2), len(c1.intersection(c2))
# - This suggests c1 and c2 should be set-like objects (sets work perfectly)

# Create two distinct clustering partitions
# clusts1: partition of 10 items into 3 clusters
clusts1 = [
    {0, 1, 2, 3},      # cluster 1: 4 items
    {4, 5, 6},         # cluster 2: 3 items
    {7, 8, 9}          # cluster 3: 3 items
]

# clusts2: different partition of the same 10 items into 2 clusters
clusts2 = [
    {0, 1, 4, 5, 7},   # cluster 1: 5 items
    {2, 3, 6, 8, 9}    # cluster 2: 5 items
]

ARGS = {
    "clusts1": clusts1,
    "clusts2": clusts2
}
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 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
arith_mean Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/aggregators.py
code served (permissive licence) · get_code("a8a74b742ef32668")
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

# Create a small numpy array for x parameter
np.random.seed(42)
x = np.array([1.2, 2.3, 3.1, 2.8, 1.5, 3.2, 2.9, 1.8])

# Define all arguments
ARGS = {
    "x": x,
    "BT_size": 100,
    "true_val": 2.5
}
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
entropy Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/partitions.py
code served (permissive licence) · get_code("4bae1bb8c1f13a15")
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 numpy as np
from scipy import stats

# Construct valid arguments for the entropy function
# The function expects clusts: list of list
# Each inner list represents a cluster (items in the cluster)

clusts = [
    [1, 2, 3],           # cluster 1 with 3 items
    [4, 5],              # cluster 2 with 2 items
    [6, 7, 8, 9],        # cluster 3 with 4 items
    [10]                 # cluster 4 with 1 item
]

ARGS = {
    "clusts": clusts
}
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 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
extractUnbiasedEstimate Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/samplerLib.py
code served (permissive licence) · get_code("71a5be9eac813695")
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 math
import numpy as np

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

# Define parameters for extractUnbiasedEstimate
M = 4  # number of output dimensions
burnIn = 2  # burn-in period
minIter = 5  # minimum iterations
tau = 7  # meeting time (measured in X chain's time)

# Create hX: list of length (tau + 1) = 8
# Each element is a numpy array of shape (M,) = (4,)
hX = [np.random.randn(M) for _ in range(tau + 1)]

# Create hY: list of length tau = 7
# Each element is a numpy array of shape (M,) = (4,)
hY = [np.random.randn(M) for _ in range(tau)]

ARGS = {
    "M": M,
    "burnIn": burnIn,
    "minIter": minIter,
    "hX": hX,
    "hY": hY,
    "tau": tau,
}
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
indep_coupling Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/couplings.py
code served (permissive licence) · get_code("edd99dab9e297332")
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 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 a random number generator
rng = np.random.RandomState(42)

# Create probability distributions for two locations
# These should sum to 1 and be used with cumsum and uniform sampling
loc_probs1 = np.array([0.2, 0.3, 0.5])
loc_probs2 = np.array([0.1, 0.4, 0.3, 0.2])

ARGS = {
    "loc_probs1": loc_probs1,
    "loc_probs2": loc_probs2,
    "rng": rng,
}
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 1, 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
loadGraphData Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/dataUtils.py
code served (permissive licence) · get_code("fe91a32664a7e966")
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 Graph. 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 igraph
import pickle
import tempfile
import os

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

# Create a simple igraph Graph and save it as pickle
test_graph = igraph.Graph()
test_graph.add_vertices(3)
test_graph.add_edges([(0, 1), (1, 2)])

# Save the graph to a pickle file
graph_path = os.path.join(temp_dir, "test_graph.pkl")
with open(graph_path, 'wb') as f:
    pickle.dump(test_graph, f)

# Define arguments
ARGS = {
    'rDir': temp_dir + '/',
    'dataName': 'test_graph.pkl'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
igraph — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph 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
loadMixtureData Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/dataUtils.py
code served (permissive licence) · get_code("d9a3a10fbbe7322e")
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 (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 pandas as pd
import tempfile
import os

# Create a temporary directory and CSV file
temp_dir = tempfile.mkdtemp()
csv_filename = 'test_data.csv'
csv_path = os.path.join(temp_dir, csv_filename)

# Create a simple CSV file with sample data
data = {
    'col1': [1.0, 2.0, 3.0, 4.0],
    'col2': [5.0, 6.0, 7.0, 8.0],
    'col3': [9.0, 10.0, 11.0, 12.0]
}
df = pd.DataFrame(data)
df.to_csv(csv_path, index=False)

# Define ARGS
ARGS = {
    'rDir': temp_dir + os.sep,
    'dataName': csv_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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 (4, 3) — shape (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
med_of_m Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/aggregators.py
code served (permissive licence) · get_code("5747252b4dfbd0bc")
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 numpy.random import default_rng

# Create a simple numpy array for x parameter
np.random.seed(42)
x = np.random.randn(20)  # N=20, which divides evenly by K values

# K must divide N evenly, so K=4 works with N=20
K = 4

# BT_size for bootstrap samples
BT_size = 100

# true_val for RMSE computation
true_val = 0.5

ARGS = {
    "x": x,
    "K": K,
    "BT_size": BT_size,
    "true_val": true_val,
}
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
pairwise_VI_dists Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/partitions.py
code served (permissive licence) · get_code("b2c557935d487b3c")
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 (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 scipy import stats

# Analyze the function to understand what's needed:
# pairwise_VI_dists takes:
# - clusts1: list of sets (clusters as sets of indices)
# - clusts2: list of sets (clusters as sets of indices)
# - n: int (index of new point to add)
# - allowNewClustX: bool (default True)
# - allowNewClustY: bool (default True)

# The function works with sets that have .union() and len() operations
# It calls VI_dist which expects lists of clusters (which must be iterable and have len())
# The clusters contain indices (integers)

# Create simple test clustering data
# clusts1: 2 clusters with indices
clust1_a = {0, 1, 2}
clust1_b = {3, 4}
clusts1 = [clust1_a, clust1_b]

# clusts2: 2 different clusters with same indices
clust2_a = {0, 1}
clust2_b = {2, 3, 4}
clusts2 = [clust2_a, clust2_b]

# Point to add (must not already be in either clustering)
n = 5

ARGS = {
    "clusts1": clusts1,
    "clusts2": clusts2,
    "n": n,
    "allowNewClustX": True,
    "allowNewClustY": True,
}
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 ndarray, ndim 2, dtype family float, shape (3, 3) — shape (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
parse_compile_file Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/names_and_parser.py
code served (permissive licence) · get_code("5aaa57f3f9c92ea4")
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 tempfile
import os

# Create a temporary file with valid compilation settings
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("vary_key,learning_rate\n")
temp_file.write("var_items,float,0.001;0.01;0.1\n")
temp_file.close()

# Define ARGS with the path to the temporary file
ARGS = {
    'path': temp_file.name
}
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
posterior_predictive_density Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/interesting_functions.py
code served (permissive licence) · get_code("1be9212a536baf06")
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 (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 scipy import stats

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

# Create small example data
D = 4  # dimensionality
N = 5  # number of observations
N_new = 3  # number of new points to evaluate

# Generate synthetic data
data = np.random.randn(N, D) * 2.0

# Generate cluster assignments (z)
# Using a simple assignment: first 2 points in cluster 0, next 2 in cluster 1, last 1 in cluster 0
z = np.array([0, 0, 1, 1, 0])

# Generate new data points at which to compute posterior predictive density
data_new = np.random.randn(N_new, D)

# Set hyperparameters
sd = 0.5  # standard deviation of noise
sd0 = 1.0  # standard deviation of prior on means
alpha = 1.0  # DP concentration parameter

ARGS = {
    "data": data,
    "z": z,
    "data_new": data_new,
    "sd": sd,
    "sd0": sd0,
    "alpha": alpha
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (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
pure_maximal_coupling Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/couplings.py
code served (permissive licence) · get_code("2685d793e0e91366")
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 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 a random number generator
rng = np.random.RandomState(42)

# Create two probability distributions
# loc_probs1: K elements, must sum to approximately 1.0
loc_probs1 = np.array([0.3, 0.4, 0.2, 0.1])

# loc_probs2: M elements, must sum to approximately 1.0
loc_probs2 = np.array([0.25, 0.35, 0.25, 0.15])

ARGS = {
    "loc_probs1": loc_probs1,
    "loc_probs2": loc_probs2,
    "rng": rng,
}
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 1, 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
pure_naive_coupling Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/couplings.py
code served (permissive licence) · get_code("ecc9d019e106cf66")
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 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

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

# Create a random number generator
rng = np.random.RandomState(42)

# Create probability distributions that sum to 1
# loc_probs1 and loc_probs2 are used with np.cumsum and indexing
# They need to be valid probability distributions (sum to 1, all non-negative)
loc_probs1 = np.array([0.2, 0.3, 0.3, 0.2])
loc_probs2 = np.array([0.1, 0.4, 0.35, 0.15])

ARGS = {
    'loc_probs1': loc_probs1,
    'loc_probs2': loc_probs2,
    'rng': rng
}
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 1, 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
strToList Ran
ran on a synthesized input
tinnguyen96/partition-coupling/modules/names_and_parser.py
code served (permissive licence) · get_code("13b4e62e68acd01a")
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 torch

torch.manual_seed(0)

# The function strToList takes a string in format "means,sds,concentration"
# and splits it by comma to return a list
sampleNonPartitionStr = "means,sds,concentration"

ARGS = {
    "sampleNonPartitionStr": sampleNonPartitionStr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family 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
find_representative_dists Not yet run
unverified (harvested, no recorded run)
tinnguyen96/partition-coupling/modules/compileUtils.py
code served (permissive licence) · get_code("46911ec11ede55ea")
How it ran

no invocation recorded.

paired_init Not yet run
unverified (harvested, no recorded run)
tinnguyen96/partition-coupling/modules/priors.py
code served (permissive licence) · get_code("768b052a3ef85107")
How it ran

no invocation recorded.

parse_compile_file_type2 Not yet run
unverified (harvested, no recorded run)
tinnguyen96/partition-coupling/modules/names_and_parser.py
code served (permissive licence) · get_code("8c9a742daa3a2f4d")
How it ran

no invocation recorded.

trim_mean Not yet run
unverified (harvested, no recorded run)
tinnguyen96/partition-coupling/modules/aggregators.py
code served (permissive licence) · get_code("887b7c45b6e67b1a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 20 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.

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

Markov chain Monte Carlo (MCMC) methods are often used in clustering since they guarantee asymptotically exact expectations in the infinite-time limit. In finite time, though, slow mixing often leads to poor performance. Modern computing environments offer massive parallelism, but naive implementations of parallel MCMC can exhibit substantial bias. In MCMC samplers of continuous random variables, Markov chain couplings can overcome bias. But these approaches depend crucially on paired chains meetings after a small number of transitions. We show that straightforward applications of existing coupling ideas to discrete clustering variables fail to meet quickly. This failure arises from the "label-switching problem": semantically equivalent cluster relabelings impede fast meeting of coupled chains. We instead consider chains as exploring the space of partitions rather than partitions' (arbitrary) labelings. Using a metric on the partition space, we formulate a practical algorithm using optimal transport couplings. Our theory confirms our method is accurate and efficient. In experiments ranging from clustering of genes or seeds to graph colorings, we show the benefits of our coupling in the highly parallel, time-limited regime.

For agents

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

get_harvested_code_for_paper("2202.11258")
get_code_for_paper("2202.11258")
have("2202.11258")

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

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

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

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

Connect an agent — have() is free.