SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.05186 · NeurIPS · 2024

One-shot Federated Learning via Synthetic Distiller-Distillate Communication

Xinchao Wang, Songhua Liu, Junyuan Zhang

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-23; 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/2412.05186.json · badge: /api/ran/2412.05186.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
Carkham/FedSD2C canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
carkham/fedsd2c canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
test_model Ran
ran, honoured the contract we drafted
carkham/fedsd2c/fedsd2c_main.py
code served (permissive licence) · get_code("07e49de23e69430c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:15:43Z). 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
from torch import nn

torch.manual_seed(0)

# Define a minimal model that satisfies the function's usage
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = SimpleClassifier(input_dim=4, num_classes=3)

# Create a minimal test dataset as list of (x, y) tuples
# 2 samples, input dimension 4, 3 classes
testset = [
    (torch.randn(1, 4), torch.tensor([0])),
    (torch.randn(1, 4), torch.tensor([1])),
]

# Define arguments
ARGS = {
    "model": model,
    "testset": testset,
    "batch_size": 2,
    "device": "cpu"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
as_python_object Ran
ran, violated the contract we drafted
carkham/fedsd2c/oneshot_main.py
code served (permissive licence) · get_code("a4e70b20401bd9fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned 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 pickle
import base64

# Create a simple Python object to pickle
test_object = {"key": "value", "number": 42, "list": [1, 2, 3]}

# Pickle it and encode it as latin-1 string
pickled_bytes = pickle.dumps(test_object)
pickled_string = pickled_bytes.decode('latin-1')

# Create the input dictionary with the _python_object key
dct = {
    '_python_object': pickled_string
}

ARGS = {
    'dct': dct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
find_classes Ran
ran; our contract draft was wrong, not the code
Carkham/FedSD2C/preprocessing/Imagenette.py
code served (permissive licence) · get_code("7c734ce1770698ff")
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 os
import tempfile
import shutil

# Create a temporary directory with class subdirectories
temp_dir = tempfile.mkdtemp()

# Create some class folders
class_folders = ['class_a', 'class_b', 'class_c']
for class_name in class_folders:
    os.makedirs(os.path.join(temp_dir, class_name), exist_ok=True)

ARGS = {
    'directory': temp_dir
}
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 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
generate_resnet Ran
ran; our contract draft was wrong, not the code
Carkham/FedSD2C/utils/models.py
code served (permissive licence) · get_code("6192134916ac15bd")
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
import torchvision.models as models

torch.manual_seed(0)

ARGS = {
    'num_classes': 10,
    'in_channels': 1,
    'model_name': 'ResNet18'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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
generate_vgg Ran
ran; our contract draft was wrong, not the code
Carkham/FedSD2C/utils/models.py
code served (permissive licence) · get_code("b1af2fdbd7849952")
How it ran

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

import torch
import torch.nn as nn
import torchvision.models as models

torch.manual_seed(0)

ARGS = {
    'num_classes': 10,
    'in_channels': 1,
    'model_name': 'VGG11'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_specified_labels Ran
ran; our contract draft was wrong, not the code
carkham/fedsd2c/fedsd2c_main.py
code served (permissive licence) · get_code("8afce78fa7c317d2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned 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 unittest.mock import Mock

# Create a mock dataset with the required structure
mock_dataset = Mock()
mock_dataset.targets = np.array([0, 0, 0, 1, 1, 2, 2, 2, 2, 2], dtype=np.int64)

# Create a mock Subset that wraps the dataset
mock_subset = Mock()
mock_subset.indices = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
mock_subset.dataset = mock_dataset

# Create a mock client with _train_data attribute
mock_client = Mock()
mock_client._train_data = mock_subset

ARGS = {
    "client": mock_client,
    "ipc": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
has_file_allowed_extension Ran
ran, violated the contract we drafted
Carkham/FedSD2C/preprocessing/Imagenette.py
code served (permissive licence) · get_code("38857cba5f3e4e0f")
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 numpy as np

# Setup for has_file_allowed_extension function

# The function checks if a filename ends with one of the allowed extensions
# It takes a filename (string) and extensions (tuple of strings or string)

ARGS = {
    "filename": "document.pdf",
    "extensions": ("pdf", "txt", "doc")
}
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
pad Ran
ran; our contract draft was wrong, not the code
Carkham/FedSD2C/fedsd2c/util.py
code served (permissive licence) · get_code("680f3862844d8a00")
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 4, dtype family float, shape (2, 4, 8, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small input tensor with shape (batch=2, channels=4, height=3, width=5)
input_tensor = torch.randn(2, 4, 3, 5)

# Define target dimensions
target_height = 8
target_width = 10

ARGS = {
    "input_tensor": input_tensor,
    "target_height": target_height,
    "target_width": target_width,
}
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 4, dtype family float, shape (2, 4, 8, 10) — shape (2, 4, 8, 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
patchnify Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Carkham/FedSD2C/fedsd2c/util.py
code served (permissive licence) · get_code("aff27d97a57bfef7")
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 5, dtype family float, shape (2, 1, 4, 16, 16) 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 takes an image tensor x and a patch_size parameter
# x should be a 4D tensor of shape (batch_size, channels, height, width)
# The function patches the spatial dimensions

x = torch.randn(2, 4, 16, 16)  # bs=2, c=4, h=16, w=16
patch_size = 16

ARGS = {
    'x': x,
    'patch_size': patch_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 1, 4, 16, 16) — shape (2, 1, 4, 16, 16) 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
unpatchnify Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Carkham/FedSD2C/fedsd2c/util.py
code served (permissive licence) · get_code("07f682641fa87427")
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 4, dtype family float, shape (2, 3, 16, 16) 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

torch.manual_seed(0)

# The function unpatchnify takes a tensor x with shape (bs, n, c, p, p)
# where:
# - bs: batch size
# - n: number of patches (must be a perfect square)
# - c: number of channels
# - p: patch size
# It reshapes and permutes to reconstruct an image of shape (bs, c, p*sqrt(n), p*sqrt(n))

# Create a valid input tensor
# Let's use:
# - bs=2 (batch size)
# - n=4 (number of patches, sqrt(4)=2)
# - c=3 (channels)
# - p=8 (patch size)
# This will produce output of shape (2, 3, 16, 16)

bs = 2
n = 4
c = 3
p = 8

x = torch.randn(bs, n, c, p, p)

ARGS = {
    'x': x
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 16, 16) — shape (2, 3, 16, 16) 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
is_image_file Not yet run
unverified (harvested, no recorded run)
Carkham/FedSD2C/preprocessing/Imagenette.py
code served (permissive licence) · get_code("17595095b3e7dbf7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
is_image_file 12 other papers
11 dated earlier, 1 same year, order not determinable
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
and 9 more not named here
find_classes 2 other papers
2 dated earlier
aaai_25284 (2023 (year only))
Minority-Oriented Vicinity Expansion with Attentive Aggregation for Video Long-Tailed Recognition
2406.09750 (2024-06)
ControlVAR: Exploring Controllable Visual Autoregressive Modeling
pad 2 other papers
2 dated earlier
2312.03526 (2023-12)
On the Diversity and Realism of Distilled Dataset: An Efficient Dataset Distillation Paradigm
2411.19946 (2024-11)
DELT: A Simple Diversity-driven EarlyLate Training for Dataset Distillation
as_python_object 1 other paper
1 dated earlier
2208.11311 (2022-08)
Federated Learning via Decentralized Dataset Distillation in Resource-Constrained Edge Environments
generate_vgg 1 other paper
1 dated earlier
2208.11311 (2022-08)
Federated Learning via Decentralized Dataset Distillation in Resource-Constrained Edge Environments

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

One-shot Federated learning (FL) is a powerful technology facilitating collaborative training of machine learning models in a single round of communication. While its superiority lies in communication efficiency and privacy preservation compared to iterative FL, one-shot FL often compromises model performance. Prior research has primarily focused on employing data-free knowledge distillation to optimize data generators and ensemble models for better aggregating local knowledge into the server model. Prior research has primarily focused on employing datafree knowledge distillation to optimize data generators and ensemble models for better aggregating local knowledge into the server model. However, these methods typically struggle with data heterogeneity, where inconsistent local data distributions can cause teachers to provide misleading knowledge. Additionally, they may encounter scalability issues with complex datasets due to inherent twostep information loss: first, during local training (from data to model), and second, when transferring knowledge to the server model (from model to inversed data). In this paper, we propose FedSD2C, a novel and practical one-shot FL framework designed to address these challenges. FedSD2C introduces a distiller to synthesize informative distillates directly from local data to reduce information loss and proposes sharing synthetic distillates instead of inconsistent local models to tackle data heterogeneity. Our empirical results demonstrate that FedSD2C consistently outperforms other one-shot FL methods with more complex and real datasets, achieving up to 2.6 × the performance of the best baseline. Code: https:// github.com/Carkham/FedSD2C

For agents

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

get_harvested_code_for_paper("2412.05186")
get_code_for_paper("2412.05186")
have("2412.05186")

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

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

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

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

Connect an agent — have() is free.