SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.04620 · NeurIPS · 2022

FLamby: Datasets and Benchmarks for Cross-Silo Federated Learning in Realistic Healthcare Settings

Martin Jaggi, Chaoyang He, Salman Avestimehr, Othmane Marfoq, Giovanni Neglia, Sai Praneeth Karimireddy, Constantin Philippenko, Aymeric Dieuleveut, Aurélien Bellet, Felix Grimberg, Jean Ogier Du Terrail, Samy-Safwan Ayed, and 13 more

arXiv · PDF · Open in the Atlas

Code that ran

5 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 5 have no contract verdict; 0 failures of our instrument; 3 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/2210.04620.json · badge: /api/ran/2210.04620.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
owkin/FLamby canonical (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
FunctionStatusWhere it lives
evaluate_model_on_tests Ran
ran on a synthesized input
owkin/FLamby/flamby/utils.py
code served (permissive licence) · get_code("3e91e64ea676ecce")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

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

# Create model instance
model = SimpleModel()

# Create test dataloaders - list of dataloaders
# Each dataloader is simulated as a list of (X, y) tuples
test_dataloaders = [
    [
        (torch.randn(2, 4), torch.randint(0, 3, (2,))),
        (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    ],
    [
        (torch.randn(2, 4), torch.randint(0, 3, (2,))),
        (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    ],
]

# Define a simple metric function
def accuracy_metric(y_true, y_pred):
    """Simple accuracy metric"""
    y_pred_labels = np.argmax(y_pred, axis=1)
    return np.mean(y_true == y_pred_labels)

ARGS = {
    'model': model,
    'test_dataloaders': test_dataloaders,
    'metric': accuracy_metric,
    'use_gpu': False,
    'return_pred': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
fill_df_with_xp_results Ran
ran on a synthesized input
owkin/FLamby/flamby/benchmarks/benchmark_utils.py
code served (permissive licence) · get_code("7b172164baf1a3dd")
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 DataFrame. 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 pandas as pd
import tempfile
import os

# Create a temporary file for results
temp_dir = tempfile.mkdtemp()
results_file = os.path.join(temp_dir, "results.csv")

# Create initial dataframe with some columns
columns_names = ["Method", "Test", "Metric", "learning_rate", "batch_size"]
df = pd.DataFrame(columns=columns_names)

# Define performance dictionary with test results
perf_dict = {
    "Local Test 1": 0.85,
    "Local Test 2": 0.92
}

# Define hyperparameters
hyperparams = {
    "learning_rate": 0.001,
    "batch_size": 32
}

# Define method name
method_name = "RandomForest"

# Define pooled version for testing pooled parameter
perf_dict_pooled = {
    "Test": 0.88
}

ARGS = {
    "df": df,
    "perf_dict": perf_dict,
    "hyperparams": hyperparams,
    "method_name": method_name,
    "columns_names": columns_names,
    "results_file": results_file,
    "dump": False,
    "pooled": False
}
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 DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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_xps_in_df Ran
ran on a synthesized input
owkin/FLamby/flamby/benchmarks/benchmark_utils.py
code served (permissive licence) · get_code("374c91959163c0df")
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 Index. 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 pandas as pd

# Create a sample dataframe with experimental results
df = pd.DataFrame({
    'Method': ['FedAvg5', 'FedAvg5', 'Scaffold5', 'FedProx5', 'FedAvg10'],
    'learning_rate': [0.01, 0.01, 0.02, 0.01, 0.01],
    'batch_size': [32, 32, 64, 32, 32],
    'momentum': [0.9, 0.9, 0.9, 0.85, 0.9],
    'optimizer': ['sgd', 'sgd', 'adam', 'sgd', 'sgd'],
    'deterministic_cycle': [1.0, 1.0, np.nan, 0.0, 1.0],
    'accuracy': [0.85, 0.86, 0.84, 0.87, 0.88],
})

# Create hyperparameters dict that matches some columns in the dataframe
hyperparameters = {
    'learning_rate': 0.01,
    'batch_size': 32,
    'momentum': 0.9,
    'optimizer': 'sgd',
}

# Strategy name - must be one from the allowed list
sname = 'FedAvg'

# Number of updates
num_updates = 5

ARGS = {
    'df': df,
    'hyperparameters': hyperparameters,
    'sname': sname,
    'num_updates': num_updates,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Index — a Index output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Index output the recorded ndim 1 and dtype family int 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
init_data_loaders Ran
ran on a synthesized input
owkin/FLamby/flamby/benchmarks/benchmark_utils.py
code served (permissive licence) · get_code("571f424167465dfc")
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 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
import torch.nn as nn
from torch.utils.data import Dataset

torch.manual_seed(0)

class DummyDataset(Dataset):
    def __init__(self, center=None, train=True, pooled=False):
        self.center = center
        self.train = train
        self.pooled = pooled
        # Create small dataset with 5 samples
        self.size = 5
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        # Return (features, label) tuple
        x = torch.randn(4)
        y = torch.tensor(idx % 2, dtype=torch.long)
        return (x, y)

ARGS = {
    'dataset': DummyDataset,
    'pooled': False,
    'batch_size': 2,
    'num_workers': 0,
    'num_clients': 3,
    'batch_size_test': 2,
    'collate_fn': None,
}
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 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
read_config Ran
ran on a synthesized input
owkin/FLamby/flamby/utils.py
code served (permissive licence) · get_code("76e264c5ebbf5074")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-26T22:57:59Z. 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 yaml
import tempfile

# Create a temporary YAML config file
temp_dir = tempfile.mkdtemp()
config_file_path = os.path.join(temp_dir, "test_config.yaml")

# Write a simple YAML config
config_data = {
    "model": "test_model",
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 10
}

with open(config_file_path, 'w') as f:
    yaml.dump(config_data, f)

ARGS = {
    "config_file": config_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_config Not yet run
unverified (harvested, no recorded run)
owkin/FLamby/flamby/benchmarks/conf.py
code served (permissive licence) · get_code("8715d10e0a857dc9")
How it ran

no invocation recorded.

get_dataset_args Not yet run
unverified (harvested, no recorded run)
owkin/FLamby/flamby/benchmarks/conf.py
code served (permissive licence) · get_code("9f6d33710c9dc368")
How it ran

no invocation recorded.

use_gpu_idx Not yet run
unverified (harvested, no recorded run)
owkin/FLamby/flamby/gpu_utils.py
code served (permissive licence) · get_code("0d3321abd53098b0")
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, 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 8 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

Federated Learning (FL) is a novel approach enabling several clients holding sensitive data to collaboratively train machine learning models, without centralizing data. The cross-silo FL setting corresponds to the case of few (2-50) reliable clients, each holding medium to large datasets, and is typically found in applications such as healthcare, finance, or industry. While previous works have proposed representative datasets for cross-device FL, few realistic healthcare cross-silo FL datasets exist, thereby slowing algorithmic research in this critical application. In this work, we propose a novel cross-silo dataset suite focused on healthcare, FLamby (Federated Learning AMple Benchmark of Your cross-silo strategies), to bridge the gap between theory and practice of cross-silo FL. FLamby encompasses 7 healthcare datasets with natural splits, covering multiple tasks, modalities, and data volumes, each accompanied with baseline training code. As an illustration, we additionally benchmark standard FL algorithms on all datasets. Our flexible and modular suite allows researchers to easily download datasets, reproduce results and re-use the different components for their research. FLamby is available at www.github.com/ owkin/flamby. Recently it has become clear that, in many application fields, impressive machine learning (ML) task performance can be reached by scaling the size of both ML models and their training data while Preprint. Under review.

For agents

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

get_harvested_code_for_paper("2210.04620")
get_code_for_paper("2210.04620")
have("2210.04620")

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

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

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

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

Connect an agent — have() is free.