SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.04088 · NeurIPS · 2020

An Efficient Framework for Clustered Federated Learning

Avishek Ghosh, Jichan Chung, Dong Yin

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 0 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/2006.04088.json · badge: /api/ran/2006.04088.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
jichan3751/ifca canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
microsoft/feddrift community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
FedAvgEnsAggregatorClusterFL Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/feddrift/fedml_api/distributed/fedavg_ens/FedAvgEnsAggregatorClusterFL.py
code served (permissive licence) · get_code("e823e74333aea070")
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 an instance of its own class, FedAvgEnsAggregatorClusterFL: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
from unittest.mock import MagicMock

torch.manual_seed(0)

# Define a minimal model
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super(SimpleModel, self).__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create minimal models
models = [SimpleModel(input_dim=4, output_dim=3) for _ in range(2)]

# Create minimal args
class Args:
    def __init__(self):
        self.client_num_in_total = 4
        self.epochs = 1
        self.lr = 0.01

args = Args()

# Create training and test data structures
train_globals = [
    [(torch.randn(2, 4), torch.randint(0, 3, (2,))) for _ in range(2)]
    for _ in range(2)
]

test_globals = [
    [(torch.randn(2, 4), torch.randint(0, 3, (2,))) for _ in range(2)]
    for _ in range(2)
]

# Local data dicts keyed by client index
train_data_local_dicts = {
    i: [(torch.randn(2, 4), torch.randint(0, 3, (2,))) for _ in range(2)]
    for i in range(4)
}

test_data_local_dicts = {
    i: [(torch.randn(2, 4), torch.randint(0, 3, (2,))) for _ in range(2)]
    for i in range(4)
}

train_data_local_num_dicts = {i: 10 for i in range(4)}

all_train_data_nums = 40
all_data = {i: 20 for i in range(4)}

worker_num = 4
device = torch.device('cpu')
class_num = 3

# Mock wandb to avoid issues
import sys
sys.modules['wandb'] = MagicMock()

ARGS = {
    'train_globals': train_globals,
    'test_globals': test_globals,
    'all_train_data_nums': all_train_data_nums,
    'train_data_local_dicts': train_data_local_dicts,
    'test_data_local_dicts': test_data_local_dicts,
    'train_data_local_num_dicts': train_data_local_num_dicts,
    'all_data': all_data,
    'worker_num': worker_num,
    'device': device,
    'models': models,
    'class_num': class_num,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FedAvgEnsAggregatorClusterFL — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FedAvgEnsAggregatorClusterFL 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
Server Ran
ran on a synthesized input · constructed an object; no result was computed
jichan3751/ifca/femnist/ifca/models/server.py
pointer only (licence: NONE) · get_code("78b8b86c447a8050")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jichan3751/ifca when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

transform_list_to_tensor Ran
ran; our contract draft was wrong, not the code
microsoft/feddrift/fedml_api/distributed/fedavg_ens/FedAvgEnsAggregatorClusterFL.py
code served (permissive licence) · get_code("0e6f185a772e98b4")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Construct a dictionary with parameter names mapping to numpy arrays
# The function expects model_params_list to be a dict with keys and values that are array-like
model_params_list = {
    'weight_1': np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=np.float32),
    'bias_1': np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32),
    'weight_2': np.array([[9.0, 10.0, 11.0, 12.0], [13.0, 14.0, 15.0, 16.0]], dtype=np.float32),
}

ARGS = {
    'model_params_list': model_params_list
}
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 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
transform_list_to_tensor
brick of this paper's assembly: helper
1 other paper
1 later
2501.19122 (2025-01)
FedRTS: Federated Robust Pruning via Combinatorial Thompson Sampling

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

We address the problem of federated learning (FL) where users are distributed and partitioned into clusters. This setup captures settings where different groups of users have their own objectives (learning tasks) but by aggregating their data with others in the same cluster (same learning task), they can leverage the strength in numbers in order to perform more efficient federated learning. For this new framework of clustered federated learning, we propose the Iterative Federated Clustering Algorithm (IFCA), which alternately estimates the cluster identities of the users and optimizes model parameters for the user clusters via gradient descent. We analyze the convergence rate of this algorithm first in a linear model with squared loss and then for generic strongly convex and smooth loss functions. We show that in both settings, with good initialization, IFCA is guaranteed to converge, and discuss the optimality of the statistical error rate. In particular, for the linear model with two clusters, we can guarantee that our algorithm converges as long as the initialization is slightly better than random. When the clustering structure is ambiguous, we propose to train the models by combining IFCA with the weight sharing technique in multi-task learning. In the experiments, we show that our algorithm can succeed even if we relax the requirements on initialization with random initialization and multiple restarts. We also present experimental results showing that our algorithm is efficient in non-convex problems such as neural networks. We demonstrate the benefits of IFCA over the baselines on several clustered FL benchmarks. 1 * Equal contributions 1 Implementation of our experiments is open sourced at https://github.com/jichan3751/ifca

For agents

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

get_harvested_code_for_paper("2006.04088")
get_code_for_paper("2006.04088")
have("2006.04088")

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

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

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

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

Connect an agent — have() is free.