SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.07852 · 2021

OpenFed: A Comprehensive and Versatile Open-Source Federated Learning Framework

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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; 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/2109.07852.json · badge: /api/ran/2109.07852.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
federallab/openfed canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
average_aggregation Ran
ran on a synthesized input
federallab/openfed/openfed/functional/agg.py
code served (permissive licence) · get_code("2bb1988b54997051")
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 defaultdict. 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.optim import SGD

torch.manual_seed(0)

# Create a simple model to get parameters
model = nn.Linear(4, 3)

# Create an optimizer
optim = SGD(model.parameters(), lr=0.01)

# Create sample parameter states for each parameter in the model
param_states_1 = {}
param_states_2 = {}

for p in model.parameters():
    # Initialize state for param_states_1
    param_state_1 = {
        'param': p.clone().detach(),
        'grad': torch.randn_like(p),
    }
    param_states_1[p] = param_state_1
    
    # Initialize state for param_states_2 with slight variations
    param_state_2 = {
        'param': p.clone().detach() + torch.randn_like(p) * 0.01,
        'grad': torch.randn_like(p),
    }
    param_states_2[p] = param_state_2

# Create data list with multiple param states to aggregate
data_list = [param_states_1, param_states_2]

# Create meta_list (optional, can be None or any metadata)
meta_list = None

# Create optim_list
optim_list = [optim]

ARGS = {
    'data_list': data_list,
    'meta_list': meta_list,
    'optim_list': optim_list,
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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_store_value Ran
ran on a synthesized input
federallab/openfed/openfed/federated/pipe.py
code served (permissive licence) · get_code("74d385914aa278c1")
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 json
import warnings
from typing import Any, Dict, Optional

class MockStore:
    """Mock store that implements the get() method."""
    def __init__(self):
        self.data = {
            'test_key': json.dumps({'result': 'success', 'value': 42}).encode('utf-8')
        }
    
    def get(self, key):
        if key in self.data:
            return self.data[key]
        raise KeyError(f"Key {key} not found")

store = MockStore()
key = 'test_key'

ARGS = {
    'store': store,
    'key': key
}
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 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
is_aggregator Ran
ran on a synthesized input
federallab/openfed/openfed/federated/const.py
code served (permissive licence) · get_code("d47ad6991d4f664e")
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

torch.manual_seed(0)

ARGS = {
    'role': 'openfed_aggregator'
}
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 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
is_collaborator Ran
ran on a synthesized input
federallab/openfed/openfed/federated/const.py
code served (permissive licence) · get_code("f9f66ed321df7fc3")
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

collaborator = 'openfed_collaborator'

def is_collaborator(role: str) -> bool:
    """Returns `True` if `role` is collaborator."""
    return role == collaborator

ARGS = {
    'role': 'openfed_collaborator'
}
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 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
naive_aggregation Ran
ran on a synthesized input
federallab/openfed/openfed/functional/agg.py
code served (permissive licence) · get_code("5bb3585dcb05c33c")
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 defaultdict. 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.optim import SGD

torch.manual_seed(0)

# Create small tensors for parameters
param1 = torch.randn(2, 3, requires_grad=True)
param2 = torch.randn(4, requires_grad=True)

# Create data_list: list of dicts mapping tensors to state dicts
data_list = [
    {
        param1: {
            'param': torch.randn(2, 3),
            'grad': torch.randn(2, 3),
            'momentum_buffer': torch.randn(2, 3),
        },
        param2: {
            'param': torch.randn(4),
            'grad': torch.randn(4),
            'momentum_buffer': torch.randn(4),
        }
    },
    {
        param1: {
            'param': torch.randn(2, 3),
            'grad': torch.randn(2, 3),
            'momentum_buffer': torch.randn(2, 3),
        },
        param2: {
            'param': torch.randn(4),
            'grad': torch.randn(4),
            'momentum_buffer': None,
        }
    }
]

# Create meta_list with instance counts
meta_list = [
    {'instances': 10},
    {'instances': 5}
]

# Create a simple model with the parameters
model = nn.Linear(3, 4)
model.weight.data = param1
model.bias.data = param2

# Create optimizers
optim = SGD([param1, param2], lr=0.01)

# Define the arguments
ARGS = {
    'data_list': data_list,
    'meta_list': meta_list,
    'optim_list': optim
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
set_store_value Ran
ran on a synthesized input
federallab/openfed/openfed/federated/pipe.py
code served (permissive licence) · get_code("f6ba950119528be3")
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 json
import warnings


class MockStore:
    """Mock store that implements set() method."""
    def __init__(self):
        self.data = {}
    
    def set(self, key, value):
        """Store a key-value pair."""
        self.data[key] = value


store = MockStore()
key = "test_key"
value = {"data": [1, 2, 3], "name": "test_value"}

ARGS = {
    "store": store,
    "key": key,
    "value": value
}
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
build_point2point_group Not yet run
unverified (harvested, no recorded run)
federallab/openfed/openfed/federated/functional.py
code served (permissive licence) · get_code("4e1243396d8c2a94")
How it ran

no invocation recorded.

elastic_aggregation Not yet run
unverified (harvested, no recorded run)
federallab/openfed/openfed/functional/agg.py
code served (permissive licence) · get_code("c61342f2aeeada0d")
How it ran

no invocation recorded.

joint_federated_group Not yet run
unverified (harvested, no recorded run)
federallab/openfed/openfed/federated/functional.py
code served (permissive licence) · get_code("12f2ea7aa876f2fd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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

Recent developments in Artificial Intelligence techniques have enabled their successful application across a spectrum of commercial and industrial settings. However, these techniques require large volumes of data to be aggregated in a centralized manner, forestalling their applicability to scenarios wherein the data is sensitive or the cost of data transmission is prohibitive. Federated Learning alleviates these problems by decentralizing model training, thereby removing the need for data transfer and aggregation. To advance the adoption of Federated Learning, more research and development needs to be conducted to address some important open questions. In this work, we propose OpenFed, an open-source software framework for end-to-end Federated Learning. OpenFed reduces the barrier to entry for both researchers and downstream users of Federated Learning by the targeted removal of existing pain points. For researchers, OpenFed provides a framework wherein new methods can be easily implemented and fairly evaluated against an extensive suite of benchmarks. For downstream users, OpenFed allows Federated Learning to be plugged and play within different subject-matter contexts, removing the need for deep expertise in Federated Learning.

For agents

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

get_harvested_code_for_paper("2109.07852")
get_code_for_paper("2109.07852")
have("2109.07852")

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

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

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

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

Connect an agent — have() is free.