SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.10196 · 2021

Federated Robustness Propagation: Sharing Robustness in Heterogeneous Federated Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 failure of our instrument; 2 no recorded run), 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/2106.10196.json · badge: /api/ran/2106.10196.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
illidanlab/FedRBN canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
fgsm Ran
ran; our contract draft was wrong, not the code
illidanlab/FedRBN/utils/attack.py
code served (permissive licence) · get_code("e964320f8a75d974")
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 2, dtype family float, shape (2, 4) 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)

# Create a small gradient tensor
gradz = torch.randn(2, 4)

# Define step size
step_size = 0.1

ARGS = {
    "gradz": gradz,
    "step_size": step_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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
find_classes Ran
ran on a synthesized input
illidanlab/FedRBN/utils/data_utils.py
code served (permissive licence) · get_code("d314609fe14f2e8d")
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
from typing import Tuple, List, Dict

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

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

# Define the arguments dictionary
ARGS = {
    "dir": 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
get_bn_layer Ran
ran on a synthesized input
illidanlab/FedRBN/nets/models.py
code served (permissive licence) · get_code("d66472c02f873eb3")
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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'bn_type': 'bn'
}
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 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
get_model_fh Ran
ran on a synthesized input
illidanlab/FedRBN/fedat.py
code served (permissive licence) · get_code("7443272e77fc3541")
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 type. 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

torch.manual_seed(0)

# Create mock model classes since we can't import from nets.models
class DigitModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 10)
    
    def forward(self, x):
        return self.fc(x)

class AlexNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 1000)
    
    def forward(self, x):
        return self.fc(x)

# Monkey patch the imports so they work
import sys
from types import ModuleType

nets = ModuleType('nets')
nets_models = ModuleType('nets.models')
nets_models.DigitModel = DigitModel
nets_models.AlexNet = AlexNet
nets.models = nets_models
sys.modules['nets'] = nets
sys.modules['nets.models'] = nets_models

ARGS = {
    'data': 'Digits',
    'model': 'digit'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nets, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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_dataset_from_dir Ran
ran on a synthesized input
illidanlab/FedRBN/utils/data_utils.py
code served (permissive licence) · get_code("670c8c6d4f4b2ebb")
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 os
import tempfile
import shutil
from torchvision.datasets.folder import IMG_EXTENSIONS, has_file_allowed_extension
from typing import Tuple, List, Dict, Optional, Callable

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create class subdirectories with some image files
class_names = ["cat", "dog"]
class_to_idx = {"cat": 0, "dog": 1}

for class_name in class_names:
    class_dir = os.path.join(temp_dir, class_name)
    os.makedirs(class_dir, exist_ok=True)
    # Create dummy image files
    for i in range(2):
        filepath = os.path.join(class_dir, f"image_{i}.jpg")
        with open(filepath, "w") as f:
            f.write("dummy")

# Define ARGS
ARGS = {
    "directory": temp_dir,
    "class_to_idx": class_to_idx,
    "extensions": (".jpg", ".jpeg", ".png", ".gif", ".bmp"),
    "is_valid_file": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torchvision — 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
train_simple Ran
ran on a synthesized input
illidanlab/FedRBN/federated/learning.py
code served (permissive licence) · get_code("93a2c43394eff5ea")
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 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 torch
import torch.nn as nn
import torch.optim as optim
import numpy as np

torch.manual_seed(0)

# Create 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)

model = SimpleModel()

# Create a simple data loader (list of (data, target) tuples)
data_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

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

# Create loss function
loss_fun = nn.CrossEntropyLoss()

# Set device to CPU
device = torch.device('cpu')

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'optimizer': optimizer,
    'loss_fun': loss_fun,
    'device': device,
    'start_iter': 0,
    'max_iter': np.inf
}
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 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
copy_multi_dual_noise_bn Not yet run
unverified (harvested, no recorded run)
illidanlab/FedRBN/federated/aggregation.py
code served (permissive licence) · get_code("b8595d79858cfea0")
How it ran

no invocation recorded.

create_attacks Not yet run
unverified (harvested, no recorded run)
illidanlab/FedRBN/utils/autoattack.py
code served (permissive licence) · get_code("eeaf7948909ec19c")
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, 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 7 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
fgsm 1 other paper
1 later
2110.14068 (2021-10)
Drawing Robust Scratch Tickets: Subnetworks with Inborn Robustness Are Found within Randomly Initialized Networks

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

Federated learning (FL) emerges as a popular distributed learning schema that learns a model from a set of participating users without sharing raw data. One major challenge of FL comes with heterogeneous users, who may have distributionally different (or non-iid) data and varying computation resources. As federated users would use the model for prediction, they often demand the trained model to be robust against malicious attackers at test time. Whereas adversarial training (AT) provides a sound solution for centralized learning, extending its usage for federated users has imposed significant challenges, as many users may have very limited training data and tight computational budgets, to afford the data-hungry and costly AT. In this paper, we study a novel FL strategy: propagating adversarial robustness from rich-resource users that can afford AT, to those with poor resources that cannot afford it, during federated learning. We show that existing FL techniques cannot be effectively integrated with the strategy to propagate robustness among non-iid users and propose an efficient propagation approach by the proper use of batch-normalization. We demonstrate the rationality and effectiveness of our method through extensive experiments. Especially, the proposed method is shown to grant federated models remarkable robustness even when only a small portion of users afford AT during learning. Source code will be released.

For agents

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

get_harvested_code_for_paper("2106.10196")
get_code_for_paper("2106.10196")
have("2106.10196")

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

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

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

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

Connect an agent — have() is free.