SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.01264 · ICLR · 2021

HeteroFL: Computation and Communication Efficient Federated Learning for Heterogeneous Clients

Enmao Diao, Jie Ding, Vahid Tarokh

arXiv · PDF · Open in the Atlas

Code that ran

5 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 8 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/2010.01264.json · badge: /api/ran/2010.01264.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
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
k1l1/SLT community
Papers with Code archive
1 ran · 5 no recorded run
FunctionStatusWhere it lives
FedAvgDevice Ran
ran on a synthesized input · constructed an object; no result was computed
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("8af1ed3160ceca12")
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, FedAvgDevice: 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
from torch.utils.data import TensorDataset

torch.manual_seed(0)

# Create a minimal neural network model
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, 8)
        self.linear2 = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = torch.relu(self.linear1(x))
        x = self.linear2(x)
        return x

# Create training data: 2 samples, 4 features each
train_inputs = torch.randn(2, 4)
train_labels = torch.tensor([0, 1])
train_dataset = TensorDataset(train_inputs, train_labels)

# Create test data: 2 samples, 4 features each
test_inputs = torch.randn(2, 4)
test_labels = torch.tensor([0, 1])
test_dataset = TensorDataset(test_inputs, test_labels)

# Define arguments
ARGS = {
    'device_id': 0,
    'storage_path': '/tmp/fedavg_test'
}

# After instantiation, we need to set additional properties
def setup_device(device):
    device.set_seed(42)
    device.set_model(SimpleModel, {'input_dim': 4, 'num_classes': 3})
    device.init_model()
    device.set_train_data(train_dataset)
    device.set_test_data(test_dataset)
    device.set_torch_device('cpu')
    device.set_optimizer(torch.optim.SGD, {})
    device.set_loss_function(nn.CrossEntropyLoss)
    device.lr = 0.01
    return device
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 FedAvgDevice — 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 FedAvgDevice 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
check_exists Ran
ran on a synthesized input
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/utils.py
code served (permissive licence) · get_code("e54e85886591c7b5")
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 os
import tempfile

# Create a temporary file to test check_exists
temp_dir = tempfile.gettempdir()
existing_path = os.path.join(temp_dir, "test_file.txt")
with open(existing_path, 'w') as f:
    f.write("test")

non_existing_path = "/nonexistent/path/that/does/not/exist/file.txt"

ARGS = {
    "path": existing_path
}
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 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
input_collate Ran
ran; our contract draft was wrong, not the code
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/data.py
code served (permissive licence) · get_code("6fd4f7ea4a79121e")
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 torch
import numpy as np
from torch.utils.data.dataloader import default_collate

torch.manual_seed(0)

# Test case 1: batch of dictionaries
batch_dicts = [
    {"input_ids": torch.tensor([1, 2, 3, 4]), "attention_mask": torch.tensor([1, 1, 1, 0])},
    {"input_ids": torch.tensor([5, 6, 7, 8]), "attention_mask": torch.tensor([1, 1, 1, 1])}
]

ARGS = {
    "batch": batch_dicts
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
make_flops Ran
ran on a synthesized input
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/summary.py
code served (permissive licence) · get_code("d953f71ff87c935d")
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 int, ndim 0, dtype family int, 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)

# Create a Conv2d module for testing
conv_module = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, bias=True)

# Create input and output tensors
# Input: (batch_size=2, channels=3, height=5, width=5)
input_tensor = torch.randn(2, 3, 5, 5)

# Output: (batch_size=2, channels=4, height=3, width=3)
# After Conv2d with kernel=3, no padding: (5-3+1) = 3
output_tensor = torch.randn(2, 4, 3, 3)

ARGS = {
    "module": conv_module,
    "input": input_tensor,
    "output": output_tensor,
}
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 int, ndim 0, dtype family int, 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
make_size Ran
ran on a synthesized input
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/summary.py
code served (permissive licence) · get_code("8d994cf212a4e904")
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 torch

torch.manual_seed(0)

# The function make_size takes input and output parameters
# It recursively unwraps tuples and calls .size() on the tensor objects
# We need to provide either:
# 1. Two tensors directly, or
# 2. Tuples containing tensors

# Create two tensors with distinct sizes
input_tensor = torch.randn(2, 4)
output_tensor = torch.randn(3, 5)

ARGS = {
    "input": input_tensor,
    "output": output_tensor
}
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 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
FedAvgEvaluation Not yet run
unverified (harvested, no recorded run)
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("080430395c9cf070")
How it ran

no invocation recorded.

FedAvgServer Not yet run
unverified (harvested, no recorded run)
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("e89d03990ff4aa9c")
How it ran

no invocation recorded.

FederatedDropoutServer Not yet run
unverified (harvested, no recorded run)
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("ebcd0f36349906e5")
How it ran

no invocation recorded.

HeteroFLServer Not yet run
unverified (harvested, no recorded run)
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("78ba575006dae527")
How it ran

no invocation recorded.

SubsetDevice Not yet run
unverified (harvested, no recorded run)
k1l1/SLT/algorithms/heterofl.py
code served (permissive licence) · get_code("2d7838d7550bb2fa")
How it ran

no invocation recorded.

fetch_dataset Not yet run
unverified (harvested, no recorded run)
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/data.py
code served (permissive licence) · get_code("750cad056c7e60fd")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/utils.py
code served (permissive licence) · get_code("eb70b22d55cbf5cb")
How it ran

no invocation recorded.

to_device Not yet run
unverified (harvested, no recorded run)
diaoenmao/HeteroFL-Computation-and-Communication-Efficient-Federated-Learning-for-Heterogeneous-Clients/src/utils.py
code served (permissive licence) · get_code("ee167d57eabab823")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 9 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 9 later) and 4 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
FedAvgDevice
brick of this paper's assembly: helper
3 other papers
3 later · 1 only as an assembly brick
2102.13451 (2021-02)
FjORD: Fair and Accurate Federated Learning under heterogeneous targets with Ordered Dropout
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2305.17005 (2023-05)
Aggregating Capacity in FL through Successive Layer Training for Computationally-Constrained Devices
SubsetDevice
brick of this paper's assembly: helper
3 other papers
3 later · 1 only as an assembly brick
2102.13451 (2021-02)
FjORD: Fair and Accurate Federated Learning under heterogeneous targets with Ordered Dropout
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2305.17005 (2023-05)
Aggregating Capacity in FL through Successive Layer Training for Computationally-Constrained Devices
input_collate 3 other papers
3 later
2106.01425 (2021-06)
GAL: Gradient Assisted Learning for Decentralized Multi-Organization Collaborations
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2405.19789 (2024-05)
Estimating before Debiasing: A Bayesian Approach to Detaching Prior Bias in Federated Semi-Supervised Learning
FedAvgEvaluation
brick of this paper's assembly: metric
2 other papers
2 later
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2305.17005 (2023-05)
Aggregating Capacity in FL through Successive Layer Training for Computationally-Constrained Devices
FedAvgServer
brick of this paper's assembly: helper
2 other papers
2 later
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2305.17005 (2023-05)
Aggregating Capacity in FL through Successive Layer Training for Computationally-Constrained Devices
FederatedDropoutServer
brick of this paper's assembly: helper
2 other papers
2 later
2212.01548 (2022-12)
FedRolex: Model-Heterogeneous Federated Learning with Rolling Sub-Model Extraction
2305.17005 (2023-05)
Aggregating Capacity in FL through Successive Layer Training for Computationally-Constrained Devices
to_device 2 other papers
2 later
2405.19789 (2024-05)
Estimating before Debiasing: A Bayesian Approach to Detaching Prior Bias in Federated Semi-Supervised Learning
2410.23227 (2024-10)
(FL) 2 : Overcoming Few Labels in Federated Semi-Supervised Learning
make_flops 1 other paper
1 later
2106.01425 (2021-06)
GAL: Gradient Assisted Learning for Decentralized Multi-Organization Collaborations
make_size 1 other paper
1 later
2106.01425 (2021-06)
GAL: Gradient Assisted Learning for Decentralized Multi-Organization Collaborations

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

Federated Learning (FL) is a method of training machine learning models on private data distributed over a large number of possibly heterogeneous clients such as mobile phones and IoT devices. In this work, we propose a new federated learning framework named HeteroFL to address heterogeneous clients equipped with very different computation and communication capabilities. Our solution can enable the training of heterogeneous local models with varying computation complexities and still produce a single global inference model. For the first time, our method challenges the underlying assumption of existing work that local models have to share the same architecture as the global model. We demonstrate several strategies to enhance FL training and conduct extensive empirical evaluations, including five computation complexity levels of three model architecture on three datasets. We show that adaptively distributing subnetworks according to clients' capabilities is both computation and communication efficient. Our code is available here.

For agents

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

get_harvested_code_for_paper("2010.01264")
get_code_for_paper("2010.01264")
have("2010.01264")

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

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

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

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

Connect an agent — have() is free.