SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.18497 · NeurIPS · 2023

Collaborative Learning via Prediction Consensus

Celestine Mendler-Dünner, Martin Jaggi, Dongyang Fan

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 1 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/2305.18497.json · badge: /api/ran/2305.18497.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
fan1dy/collaboration-consensus canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
cross_entropy Ran
ran on a synthesized input
fan1dy/collaboration-consensus/client.py
code served (permissive licence) · get_code("c7949cb0f566dd0e")
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)

# Create input: probability distribution over classes (batch_size=2, num_classes=4)
# Values should be probabilities, so we'll use softmax to ensure they sum to 1
input_logits = torch.randn(2, 4)
input_probs = torch.softmax(input_logits, dim=1)

# Create target: one-hot encoded labels (batch_size=2, num_classes=4)
# This represents true class labels in one-hot format
target = torch.zeros(2, 4)
target[0, 1] = 1.0  # First sample belongs to class 1
target[1, 3] = 1.0  # Second sample belongs to class 3

ARGS = {
    "input": input_probs,
    "target": target,
}
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
dl_to_sampler Ran
ran on a synthesized input
fan1dy/collaboration-consensus/data_utils.py
code served (permissive licence) · get_code("7a498f40fca3ea5b")
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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create a simple dataset with tiny tensors
x = torch.randn(4, 3)  # 4 samples, 3 features
y = torch.randn(4, 2)  # 4 samples, 2 targets

dataset = TensorDataset(x, y)
dl = DataLoader(dataset, batch_size=2)

ARGS = {
    'dl': dl
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ref_data Ran
ran on a synthesized input
fan1dy/collaboration-consensus/data_utils.py
code served (permissive licence) · get_code("d5a35a314878d891")
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

torch.manual_seed(0)

# Create a temporary directory with mock data files
temp_dir = tempfile.mkdtemp()

# Create a mock numpy file with 'data' key containing x and y lists
mock_data_1 = {
    'data': np.array({
        'x': [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]],
        'y': [0, 1]
    }, dtype=object)
}

mock_data_2 = {
    'data': np.array({
        'x': [[9.0, 10.0, 11.0, 12.0]],
        'y': [2]
    }, dtype=object)
}

# Save mock data files
file_path_1 = os.path.join(temp_dir, 'data_1.npz')
file_path_2 = os.path.join(temp_dir, 'data_2.npz')

np.savez(file_path_1, data=mock_data_1['data'])
np.savez(file_path_2, data=mock_data_2['data'])

ARGS = {
    'curr_path': temp_dir
}
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 — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ref_labels_by_client Ran
ran on a synthesized input
fan1dy/collaboration-consensus/data_utils.py
code served (permissive licence) · get_code("efff0b821a5175e3")
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 numpy as np
import os
import tempfile

# Create a temporary directory structure with .npz files
temp_dir = tempfile.mkdtemp()

# Create sample .npz files with the expected structure
for client_id in range(2):
    filename = f"{client_id}.npz"
    filepath = os.path.join(temp_dir, filename)
    
    # Create sample data with 'y' key
    sample_data = {'y': [0, 1, 2, 3]}
    np.savez(filepath, data=sample_data)

ARGS = {
    'curr_path': temp_dir
}
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 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
resnet20 Ran
ran; our contract draft was wrong, not the code
fan1dy/collaboration-consensus/models/resnet.py
code served (permissive licence) · get_code("01565f5f63507277")
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 ResNet. 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 = {
    "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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
split_data Ran
ran on a synthesized input
fan1dy/collaboration-consensus/datasets/generate_fed_isic.py
code served (permissive licence) · get_code("9fe7ac0be9bc8ed2")
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 random seeds for reproducibility
np.random.seed(0)

# Create small sample data
# X should be a list of arrays, each with shape (num_samples, height, width, channels)
# y should be a list of label arrays
num_datasets = 2
num_samples_per_dataset = 8
height, width, channels = 4, 3, 2

X = []
y = []

for dataset_idx in range(num_datasets):
    # Create feature arrays with 4D shape (samples, height, width, channels)
    X_dataset = np.random.randn(num_samples_per_dataset, height, width, channels)
    # Create labels with at least 2 samples per class to avoid min(count) <= 1
    y_dataset = np.array([0, 0, 1, 1, 0, 1, 0, 1])
    X.append(X_dataset)
    y.append(y_dataset)

ARGS = {
    'X': X,
    'y': y,
    'ref': False,
    'mode': 'byratio'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_data Ran
ran on a synthesized input
fan1dy/collaboration-consensus/datasets/utils.py
code served (permissive licence) · get_code("fa5093664585de09")
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 random seed for reproducibility
np.random.seed(0)

# Create sample data
# X should be a list of arrays, y should be a list of label arrays
num_datasets = 2
X = []
y = []

for i in range(num_datasets):
    # Create feature arrays with distinct sizes
    X_sample = np.random.randn(10, 4)  # 10 samples, 4 features
    X.append(X_sample)
    
    # Create label arrays with multiple classes
    y_sample = np.random.randint(0, 3, size=10)  # 10 labels, 3 classes
    y.append(y_sample)

# Define arguments
ARGS = {
    'X': X,
    'y': y,
    'ref': False,
    'mode': 'byratio'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
separate_data Not yet run
unverified (harvested, no recorded run)
fan1dy/collaboration-consensus/datasets/utils.py
code served (permissive licence) · get_code("ffe2e9cf5b44ff3b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
resnet20 2 other papers
1 dated earlier, 1 later
1909.08174 (2019-09)
Gate Decorator: Global Filter Pruning Method for Accelerating Deep Convolutional Neural Networks
2403.19863 (2024-03)
DeNetDM: Debiasing by Network Depth Modulation

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

We consider a collaborative learning setting where the goal of each agent is to improve their own model by leveraging the expertise of collaborators, in addition to their own training data. To facilitate the exchange of expertise among agents, we propose a distillation-based method leveraging shared unlabeled auxiliary data, which is pseudo-labeled by the collective. Central to our method is a trust weighting scheme that serves to adaptively weigh the influence of each collaborator on the pseudo-labels until a consensus on how to label the auxiliary data is reached. We demonstrate empirically that our collaboration scheme is able to significantly boost the performance of individual models in the target domain from which the auxiliary data is sampled. By design, our method adeptly accommodates heterogeneity in model architectures and substantially reduces communication overhead compared to typical collaborative learning methods. At the same time, it can provably mitigate the negative impact of bad models on the collective. Code available at https://github.com/fan1dy/collaboration-consensus 37th Conference on Neural Information Processing Systems (NeurIPS 2023).

For agents

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

get_harvested_code_for_paper("2305.18497")
get_code_for_paper("2305.18497")
have("2305.18497")

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

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

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

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

Connect an agent — have() is free.