SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.07671 · 2026

Federated Learning with Profile Mapping under Distribution Shifts and Drifts

Dario Fenoglio, Martin Gjoreski, Marc Langheinrich, Mohan Li

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2602.07671.json · badge: /api/ran/2602.07671.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
dariofenoglio98/FEROMA canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
add_dp_noise Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dariofenoglio98/FEROMA/public/models.py
code served (permissive licence) · get_code("856d463c159a5605")
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 list, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define ARGS dictionary with all required parameters
ARGS = {
    "data": [1.0, 2.5, 3.7, 4.2, 5.1],
    "epsilon": 0.5,
    "sensitivity": 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
calculate_mean_std_metrics Ran
ran; our contract draft was wrong, not the code
dariofenoglio98/FEROMA/public/average_results.py
code served (permissive licence) · get_code("f50e75c75e5320a3")
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 numpy as np

# Create sample metrics data
# The function expects a list of metric dictionaries
# Each dictionary should have 'loss' as a key with a list value (one per client)
# and potentially other keys with either list or scalar values

metrics = [
    {
        'loss': [0.5, 0.6, 0.7],
        'accuracy': [0.8, 0.75, 0.72],
        'epoch': 1
    },
    {
        'loss': [0.4, 0.5, 0.6],
        'accuracy': [0.85, 0.80, 0.78],
        'epoch': 2
    },
    {
        'loss': [0.3, 0.4, 0.5],
        'accuracy': [0.88, 0.85, 0.82],
        'epoch': 3
    }
]

ARGS = {
    'metrics': metrics
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
residual_block Ran
ran; our contract draft was wrong, not the code
dariofenoglio98/FEROMA/public/models.py
code served (permissive licence) · get_code("314c58446a1c8ee8")
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 Sequential. 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 = {
    "in_channels": 3,
    "out_channels": 16,
    "pool": False
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
split_to_K_dist Ran
ran; our contract draft was wrong, not the code
dariofenoglio98/FEROMA/public/chexpert_data_gen.py
code served (permissive licence) · get_code("7a9b4c2e10971b7c")
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 list, 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 numpy as np
import pandas as pd
import tempfile
import os

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

# Create mock dataframe with required columns
n_rows = 100
mock_df = pd.DataFrame({
    'Path': [f'CheXpert-v1.0-small/train/p{i:06d}/s{i}.jpg' for i in range(n_rows)],
    'Frontal/Lateral': np.random.choice(['Frontal', 'Lateral'], n_rows),
    'Age': np.random.randint(20, 90, n_rows),
    'Sex': np.random.choice(['Male', 'Female'], n_rows),
    'Atelectasis': np.random.choice([0.0, 1.0, -1.0, np.nan], n_rows),
    'Cardiomegaly': np.random.choice([0.0, 1.0, -1.0, np.nan], n_rows),
    'Consolidation': np.random.choice([0.0, 1.0, -1.0, np.nan], n_rows),
    'Edema': np.random.choice([0.0, 1.0, -1.0, np.nan], n_rows),
})

# Save mock data
os.makedirs(temp_dir, exist_ok=True)
mock_csv_path = os.path.join(temp_dir, 'train.csv')
mock_df.to_csv(mock_csv_path, index=False)

# Create mock image arrays and save them
mock_images = np.random.randn(n_rows, 1, 64, 64).astype(np.float32)
mock_labels = np.random.randint(0, 2, (n_rows, 4)).astype(np.float32)

img_file = os.path.join(temp_dir, 'images_100000_20000.npy')
label_file = os.path.join(temp_dir, 'labels_100000_20000.npy')
df_file = os.path.join(temp_dir, 'df_100000_20000.pkl')

np.save(img_file, mock_images)
np.save(label_file, mock_labels)
mock_df.to_pickle(df_file)

ARGS = {
    'start_sample': 0,
    'n_sample': 50,
    'image_dim': 64,
    'dist_num': 2,
    'data_path': temp_dir,
    'save_dir': temp_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, pandas, torchvision, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
weighted_loss_avg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dariofenoglio98/FEROMA/feroma/server.py
code served (permissive licence) · get_code("fd8541b4625bbefe")
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 float, 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
from typing import List, Tuple

torch.manual_seed(0)

# Create sample evaluation results
# Each result is a tuple of (num_examples, loss)
results = [
    (10, 0.5),    # 10 examples with loss 0.5
    (20, 0.3),    # 20 examples with loss 0.3
    (15, 0.6),    # 15 examples with loss 0.6
]

ARGS = {
    "results": results
}
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 float, 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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) enables decentralized model training across clients without sharing raw data, but its performance degrades under real-world data heterogeneity. Existing methods often fail to address distribution shift across clients and distribution drift over time, or they rely on unrealistic assumptions such as known number of client clusters and data heterogeneity types, which limits their generalizability. We introduce FEROMA, a novel FL framework that explicitly handles both distribution shift and drift without relying on client or cluster identity. FEROMA builds on client distribution profiles-compact, privacy-preserving representations of local data-that guide model aggregation and test-time model assignment through adaptive similarity-based weighting. This design allows FEROMA to dynamically select aggregation strategies during training, ranging from clustered to personalized, and deploy suitable models to unseen, and unlabeled test clients without retraining, online adaptation, or prior knowledge on clients' data. Extensive experiments show that compared to 10 state-of-the-art methods, FEROMA improves performance and stability under dynamic data heterogeneity conditions-an average accuracy gain of up to 12 percentage points over the best baselines across 6 benchmarks-while maintaining computational and communication overhead comparable to FedAvg. These results highlight that distribution-profile-based aggregation offers a practical path toward robust FL under both data distribution shifts and drifts. Code is available at https://github.com/dariofenoglio98/FEROMA.

For agents

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

get_harvested_code_for_paper("2602.07671")
get_code_for_paper("2602.07671")
have("2602.07671")

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

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

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

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

Connect an agent — have() is free.