SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.05273 · ICLR · 2021

Federated Learning via Posterior Averaging: A New Perspective and Practical Algorithms

Eric Xing, Cmu, Maruan Al-Shedivat, Jennifer Gillenwater Google, Afshin Google

arXiv · PDF · Open in the Atlas

Code that ran

10 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 4 failures of our instrument; 10 no recorded run), measured 2026-11-23; 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/2010.05273.json · badge: /api/ran/2010.05273.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
alshedivat/fedpa canonical (classifier label)
classifier basis: classifier_2025
7 ran · 10 no recorded run
google-research/federated unrelated (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
DeltaUpdateOutput Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/federated/posterior_averaging/fed_pa_schedule.py
code served (permissive licence) · get_code("34b0baef8c41a338")
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 an instance of its own class, DeltaUpdateOutput: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import attr

# Create small sample weights dictionaries
initial_weights = {
    'layer1': tf.Variable(tf.random.normal([4, 3]), trainable=True),
    'layer2': tf.Variable(tf.random.normal([3, 2]), trainable=True),
}

updated_weights = {
    'layer1': tf.Variable(tf.random.normal([4, 3]), trainable=True),
    'layer2': tf.Variable(tf.random.normal([3, 2]), trainable=True),
}

# Compute weights_delta
weights_delta = tf.nest.map_structure(lambda a, b: a - b, updated_weights, initial_weights)

# Create recursion_state with TensorArrays
recursion_state = (
    tf.nest.map_structure(lambda d: tf.TensorArray(d.dtype, size=0, dynamic_size=True), weights_delta),
    tf.TensorArray(tf.float32, size=0, dynamic_size=True)
)

# Create sample weights_sample_mean
weights_sample_mean = {
    'layer1': tf.random.normal([4, 3]),
    'layer2': tf.random.normal([3, 2]),
}

ARGS = {
    'num_samples': tf.constant(5, dtype=tf.float32),
    'weights_delta': weights_delta,
    'weights_sample_mean': weights_sample_mean,
    'recursion_state': recursion_state,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DeltaUpdateOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DeltaUpdateOutput 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
LeastSquares Ran
ran on a synthesized input · constructed an object; no result was computed
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("9f9c22513d358ef8")
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 an instance of its own class, LeastSquares: the run constructed the object and did not call it, so no result was computed. 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 jax.numpy as jnp
from jax import random
import attr

# Create small sample data
key = random.PRNGKey(0)
X = jnp.array([[1.0, 2.0, 3.0, 4.0],
               [5.0, 6.0, 7.0, 8.0]], dtype=jnp.float32)
y = jnp.array([1.0, 2.0], dtype=jnp.float32)
batch_size = 2
lam = 0.1

ARGS = {
    'X': X,
    'y': y,
    'batch_size': batch_size,
    'lam': lam
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LeastSquares — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LeastSquares 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
ServerState Ran
ran on a synthesized input · constructed an object; no result was computed
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("8777261d5c9713c4")
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 an instance of its own class, ServerState: the run constructed the object and did not call it, so no result was computed. 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 attr
import jax.numpy as jnp
import numpy as np

@attr.s(eq=False, order=False, frozen=True)
class ServerState(object):
    """Represents the server state."""
    r: int = attr.ib()
    x: jnp.ndarray = attr.ib()
    v: jnp.ndarray = attr.ib()

# Create small test tensors with distinct dimensions
x_array = jnp.ones((2, 4))
v_array = jnp.ones((2, 3))

ARGS = {
    "r": 5,
    "x": x_array,
    "v": v_array,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ServerState — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ServerState 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
ShrinkageMomentEstimator Ran
ran on a synthesized input · constructed an object; no result was computed
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("d181fe7426893bee")
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 an instance of its own class, ShrinkageMomentEstimator: the run constructed the object and did not call it, so no result was computed. 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 jax.numpy as jnp
import attr

def rho_function(samples: jnp.ndarray) -> float:
    """A simple shrinkage intensity function."""
    n, d = samples.shape
    # Return a small positive value for shrinkage intensity
    return 0.1 / (1 + d)

ARGS = {
    "rho_fn": rho_function,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ShrinkageMomentEstimator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ShrinkageMomentEstimator 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
Timer Ran
ran on a synthesized input · constructed an object; no result was computed
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("d2449ec852478290")
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 an instance of its own class, Timer: the run constructed the object and did not call it, so no result was computed. 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 timeit

class Timer(object):

    def __init__(self, description):
        self.description = description
        self.elapsed = None

    def __enter__(self):
        self.start = timeit.default_timer()
        return self

    def __exit__(self, type, value, traceback):
        self.end = timeit.default_timer()
        self.elapsed = self.end - self.start


ARGS = {
    "description": "test timer"
}
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 Timer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Timer 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
_struct_dot Ran
ran, honoured the contract we drafted
google-research/federated/posterior_averaging/fed_pa_schedule.py
code served (permissive licence) · get_code("0a43b5b4b50de92c")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create two nested structures of tensors
# The function uses tf.nest.map_structure to apply element-wise operations
# and then flattens and sums the results

struct1 = {
    'a': tf.constant([[1.0, 2.0, 3.0, 4.0],
                      [5.0, 6.0, 7.0, 8.0]]),
    'b': tf.constant([[9.0, 10.0, 11.0, 12.0],
                      [13.0, 14.0, 15.0, 16.0]])
}

struct2 = {
    'a': tf.constant([[1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0]]),
    'b': tf.constant([[2.0, 2.0, 2.0, 2.0],
                      [2.0, 2.0, 2.0, 2.0]])
}

ARGS = {
    'struct1': struct1,
    'struct2': struct2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
_update_delta_posterior_mean Ran
ran; our contract draft was wrong, not the code
google-research/federated/posterior_averaging/fed_pa_schedule.py
code served (permissive licence) · get_code("eaa077e6329940db")
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) and returned DeltaUpdateOutput. 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 tensorflow as tf
import attr

# Create a minimal DataPassOutputs-like structure
@attr.s(eq=False, order=False, frozen=True)
class DataPassOutputs(object):
    model_weights_trainable_sample = attr.ib()

# Create sample weight structures (nested dicts of tensors)
def create_sample_weights():
    return {
        'layer1': tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32),
        'layer2': tf.constant([0.1, 0.2, 0.3, 0.4], dtype=tf.float32)
    }

def create_sample_weights_perturbed():
    return {
        'layer1': tf.constant([[1.1, 2.1, 3.1, 4.1], [5.1, 6.1, 7.1, 8.1]], dtype=tf.float32),
        'layer2': tf.constant([0.11, 0.21, 0.31, 0.41], dtype=tf.float32)
    }

# Create initial weights
initial_weights = create_sample_weights()
updated_weights = create_sample_weights_perturbed()

# Create DeltaUpdateOutput using the from_weights classmethod
@attr.s(eq=False, order=False, frozen=True)
class DeltaUpdateOutput(object):
    num_samples = attr.ib()
    weights_delta = attr.ib()
    weights_sample_mean = attr.ib(default=None)
    recursion_state = attr.ib(default=None)

    @classmethod
    def from_weights(cls, initial_weights, updated_weights, num_samples=0):
        weights_delta = tf.nest.map_structure(lambda a, b: a - b, updated_weights, initial_weights)
        recursion_state_init = (tf.nest.map_structure(lambda d: tf.TensorArray(d.dtype, size=0, dynamic_size=True), weights_delta), tf.TensorArray(tf.float32, size=0, dynamic_size=True))
        return cls(num_samples=tf.cast(num_samples, dtype=tf.float32), weights_delta=weights_delta, weights_sample_mean=updated_weights, recursion_state=recursion_state_init)

# Create previous_updates with num_samples = 1
previous_updates = DeltaUpdateOutput.from_weights(initial_weights, updated_weights, num_samples=1)

# Create data_pass_outputs with a new sample
new_sample_weights = create_sample_weights_perturbed()
data_pass_outputs = DataPassOutputs(model_weights_trainable_sample=new_sample_weights)

ARGS = {
    'data_pass_outputs': data_pass_outputs,
    'previous_updates': previous_updates,
    'rho': 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
attr, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DeltaUpdateOutput — a DeltaUpdateOutput output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DeltaUpdateOutput 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
compute_server_update Ran
ran; our contract draft was wrong, not the code
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("f73b84bbec6b612d")
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 ServerState. 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 jax.numpy as jnp
import attr

@attr.s(eq=False, order=False, frozen=True)
class ServerState(object):
    """Represents the server state."""
    r: int = attr.ib()
    x: jnp.ndarray = attr.ib()
    v: jnp.ndarray = attr.ib()

# Create small JAX arrays for client deltas (2 clients, 4 dimensions each)
client_deltas = [
    jnp.array([0.1, 0.2, 0.3, 0.4]),
    jnp.array([0.05, 0.15, 0.25, 0.35])
]

# Create client weights (2 clients)
client_weights = jnp.array([0.6, 0.4])

# Create initial server state
init_state = ServerState(
    r=0,
    x=jnp.array([1.0, 2.0, 3.0, 4.0]),
    v=jnp.array([0.0, 0.0, 0.0, 0.0])
)

# Create a simple learning rate schedule function
def learning_rate_schedule(round_num: int) -> float:
    return 0.01 / (1.0 + 0.1 * round_num)

ARGS = {
    "client_deltas": client_deltas,
    "client_weights": client_weights,
    "init_state": init_state,
    "learning_rate_schedule": learning_rate_schedule,
    "momentum": 0.9
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ServerState — a ServerState output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ServerState 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
compute_weighted_average Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("9b2ee5bb98428332")
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 ArrayImpl, ndim 1, dtype family float, shape (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 jax.numpy as jnp
import numpy as np

# Create small state vectors (list of jax arrays)
state1 = jnp.array([1.0, 2.0, 3.0, 4.0])
state2 = jnp.array([5.0, 6.0, 7.0, 8.0])
state3 = jnp.array([9.0, 10.0, 11.0, 12.0])
states = [state1, state2, state3]

# Create weights array
weights = jnp.array([0.2, 0.3, 0.5])

ARGS = {
    "states": states,
    "weights": weights,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (4,) — shape (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
sample_clients_uniformly Ran
ran; our contract draft was wrong, not the code
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("e87e32e7160fb616")
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) and returned ArrayImpl, ndim 1, dtype family int, shape (3,) 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 jax
import jax.numpy as jnp
from jax import random

# Create a PRNG key for JAX
prng_key = random.PRNGKey(0)

# Define arguments for the function
ARGS = {
    "prng_key": prng_key,
    "num_clients_total": 10,
    "num_clients_to_sample": 3,
    "replace": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family int, shape (3,) — shape (3,) 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
ExactQuadraticSampler Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("e5e8feea11b53c2d")
How it ran

no invocation recorded.

MomentEstimator Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("4122cb4942002b5a")
How it ran

no invocation recorded.

Objective Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("8cf9dfda8fb3ede4")
How it ran

no invocation recorded.

PosteriorSampler Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("abed1126812891d5")
How it ran

no invocation recorded.

Quadratic Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("9ba95e935bbdd3a0")
How it ran

no invocation recorded.

StochasticObjective Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("679e078965242bff")
How it ran

no invocation recorded.

compute_post_avg_delta Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("e40f2ebbac79d228")
How it ran

no invocation recorded.

compute_post_avg_delta_dp Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("59a6c293bce93c9b")
How it ran

no invocation recorded.

create_post_avg_exact Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("9384f324dbb90599")
How it ran

no invocation recorded.

fed_opt Not yet run
unverified (harvested, no recorded run)
alshedivat/fedpa/federated/learning/algorithms.py
code served (permissive licence) · get_code("165dada095da4159")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 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 19 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
sample_clients_uniformly
brick of this paper's assembly: helper
1 other paper
1 later
2302.04228 (2023-02)
Federated Learning as Variational Inference: A Scalable Expectation Propagation Approach

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 is typically approached as an optimization problem, where the goal is to minimize a global loss function by distributing computation across client devices that possess local data and specify different parts of the global objective. We present an alternative perspective and formulate federated learning as a posterior inference problem, where the goal is to infer a global posterior distribution by having client devices each infer the posterior of their local data. While exact inference is often intractable, this perspective provides a principled way to search for global optima in federated settings. Further, starting with the analysis of federated quadratic objectives, we develop a computation-and communicationefficient approximate posterior inference algorithm-federated posterior averaging (FEDPA). Our algorithm uses MCMC for approximate inference of local posteriors on the clients and efficiently communicates their statistics to the server, where the latter uses them to refine a global estimate of the posterior mode. Finally, we show that FEDPA generalizes federated averaging (FEDAVG), can similarly benefit from adaptive optimizers, and yields state-of-the-art results on four realistic and challenging benchmarks, converging faster, to better optima.

For agents

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

get_harvested_code_for_paper("2010.05273")
get_code_for_paper("2010.05273")
have("2010.05273")

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

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

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

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

Connect an agent — have() is free.