SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.01068 · ICML · 2023

Personalized Federated Learning under Mixture of Distributions

Quanquan Gu, Yue Wu, Wei Cheng, Wenchao Yu, Haifeng Chen, Dawei Zhou, Shuaicheng Zhang, Yanchi Liu

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 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; 5 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/2305.01068.json · badge: /api/ran/2305.01068.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
zshuai8/FedGMM_ICML2023 canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
FunctionStatusWhere it lives
grayscale Ran
ran on a synthesized input
zshuai8/FedGMM_ICML2023/datasets.py
code served (permissive licence) · get_code("ae7b10d3672e7026")
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 4, dtype family float, shape (2, 1, 4, 5) 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

torch.manual_seed(0)

# The function grayscale takes imgs and calls .mean(dim=1, keepdim=True)
# This suggests imgs is a tensor with at least 2 dimensions
# Typically for images: (batch, channels, height, width)
# We'll create a small tensor with distinct dimensions for probing

# Create a small batch of image tensors
# Shape: (batch=2, channels=3, height=4, width=5)
imgs = torch.randn(2, 3, 4, 5)

ARGS = {
    "imgs": imgs
}
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 4, dtype family float, shape (2, 1, 4, 5) — shape (2, 1, 4, 5) 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
rand_label Ran
ran on a synthesized input
zshuai8/FedGMM_ICML2023/ood.py
code served (permissive licence) · get_code("30259c744405c874")
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 1, dtype family int, shape (2,) 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 numpy as np

torch.manual_seed(0)

n_labels = 10
targets = torch.randint(0, 10, (2,))

ARGS = {
    "n_labels": n_labels,
    "targets": targets
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) 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
random_invert Ran
ran on a synthesized input
zshuai8/FedGMM_ICML2023/datasets.py
code served (permissive licence) · get_code("fda05b799d510a22")
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 4, dtype family float, shape (2, 3, 4, 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)

# The function random_invert takes imgs and returns 1 - imgs
# imgs should be a tensor with numerical values that can be subtracted from 1
# Typically this is used for image data, so values in range [0, 1]

imgs = torch.rand(2, 3, 4, 4)  # batch=2, channels=3, height=4, width=4

ARGS = {
    "imgs": imgs
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
random_rotation Ran
ran on a synthesized input
zshuai8/FedGMM_ICML2023/datasets.py
code served (permissive licence) · get_code("5e304b1b4a9be39a")
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 4, dtype family float, shape (2, 3, 4, 5) 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)

# x is used with torch.rot90(x, 2, [1, 2])
# torch.rot90 expects a tensor with at least 2 dimensions
# We'll create a small 4D tensor (batch=2, channels=3, height=4, width=5)
x = torch.randn(2, 3, 4, 5)

ARGS = {
    "x": x
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
sigmoid Ran
ran on a synthesized input
zshuai8/FedGMM_ICML2023/fedem_plot.py
code served (permissive licence) · get_code("592303d3ca37b03a")
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 ndarray, ndim 1, dtype family float, shape (10,) 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 math
import numpy as np

# The sigmoid function takes two parameters: x and b (with default b=1)
# x should be an array-like object (the function iterates over it)
# b should be a numeric value (used as a multiplier in the sigmoid calculation)

# Create a simple numpy array for x
x_input = np.linspace(-5, 5, 10)

# Create arguments dictionary
ARGS = {
    'x': x_input,
    'b': 1
}
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 ndarray, ndim 1, dtype family float, shape (10,) — shape (10,) 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
evalute_batch Not yet run
unverified (harvested, no recorded run)
zshuai8/FedGMM_ICML2023/ood_em.py
code served (permissive licence) · get_code("0fb07fcd00e9a795")
How it ran

no invocation recorded.

get_mobilenet Not yet run
unverified (harvested, no recorded run)
zshuai8/FedGMM_ICML2023/models.py
pointer only (licence: MIT); the stored copy get_code serves, from LINs-lab/HCFL, is pointer only (licence: NONE) · get_code("7f801fe50e913058")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from LINs-lab/HCFL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_squeezenet Not yet run
unverified (harvested, no recorded run)
zshuai8/FedGMM_ICML2023/models.py
pointer only (licence: MIT); the stored copy get_code serves, from LINs-lab/HCFL, is pointer only (licence: NONE) · get_code("6725864ab93354db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from LINs-lab/HCFL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_vgg11 Not yet run
unverified (harvested, no recorded run)
zshuai8/FedGMM_ICML2023/models.py
pointer only (licence: MIT); the stored copy get_code serves, from LINs-lab/HCFL, is pointer only (licence: NONE) · get_code("c62118f0aae4e1f5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from LINs-lab/HCFL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

init_clients Not yet run
unverified (harvested, no recorded run)
zshuai8/FedGMM_ICML2023/ood.py
code served (permissive licence) · get_code("f4f86bc5b5427a5f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 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
get_mobilenet 4 other papers
3 dated earlier, 1 later
2108.10252 (2021-08)
Federated Multi-Task Learning under a Mixture of Distributions
2210.02129 (2022-10)
Decentralized Hyper-Gradient Computation over Time-Varying Directed Networks
2301.04632 (2023-01)
Federated Learning under Heterogeneous and Correlated Client Availability
and 1 more not named here
get_squeezenet 3 other papers
2 dated earlier, 1 later
2108.10252 (2021-08)
Federated Multi-Task Learning under a Mixture of Distributions
2301.04632 (2023-01)
Federated Learning under Heterogeneous and Correlated Client Availability
2310.05397 (2023-10)
Enhancing Clustered Federated Learning: Integration of Strategies and Improved Methodologies
get_vgg11 3 other papers
2 dated earlier, 1 later
2108.10252 (2021-08)
Federated Multi-Task Learning under a Mixture of Distributions
2301.04632 (2023-01)
Federated Learning under Heterogeneous and Correlated Client Availability
2310.05397 (2023-10)
Enhancing Clustered Federated Learning: Integration of Strategies and Improved Methodologies

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

The recent trend towards Personalized Federated Learning (PFL) has garnered significant attention as it allows for the training of models that are tailored to each client while maintaining data privacy. However, current PFL techniques primarily focus on modeling the conditional distribution heterogeneity (i.e. concept shift), which can result in suboptimal performance when the distribution of input data across clients diverges (i.e. covariate shift). Additionally, these techniques often lack the ability to adapt to unseen data, further limiting their effectiveness in realworld scenarios. To address these limitations, we propose a novel approach, FedGMM, which utilizes Gaussian mixture models (GMM) to effectively fit the input data distributions across diverse clients. The model parameters are estimated by maximum likelihood estimation utilizing a federated Expectation-Maximization algorithm, which is solved in closed form and does not assume gradient similarity. Furthermore, FedGMM possesses an additional advantage of adapting to new clients with minimal overhead, and it also enables uncertainty quantification. Empirical evaluations on synthetic and benchmark datasets demonstrate the superior performance of our method in both PFL classification and novel sample detection. * Equal contribution, work done when the first author was an intern at NEC Laboratories America working with Wei Cheng.

For agents

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

get_harvested_code_for_paper("2305.01068")
get_code_for_paper("2305.01068")
have("2305.01068")

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

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

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

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

Connect an agent — have() is free.