SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.03606 · 2020

Mime: Mimicking Centralized Stochastic Algorithms in Federated Learning

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 4 have no contract verdict; 1 failure of our instrument; 1 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/2008.03606.json · badge: /api/ran/2008.03606.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
google-research/public-data-in-dpfl community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
build_server_broadcast_message Ran
ran on a synthesized input
google-research/public-data-in-dpfl/mirror_descent.py
code served (permissive licence) · get_code("8281a4a071224715")
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 BroadcastMessage. 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 tensorflow as tf
import numpy as np

@attr.s(eq=False, frozen=True, slots=True)
class ServerState(object):
    model = attr.ib()
    dp_clip_norm = attr.ib()

# Create a simple model weights dictionary with TensorFlow tensors
model_weights = {
    '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], [0.5, 0.6], [0.7, 0.8]], dtype=tf.float32),
}

# Create dp_clip_norm as a scalar tensor
dp_clip_norm = tf.constant(1.5, dtype=tf.float32)

# Create server_state with the required attributes
server_state = ServerState(
    model=model_weights,
    dp_clip_norm=dp_clip_norm
)

ARGS = {
    'server_state': server_state
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
attr, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BroadcastMessage — a BroadcastMessage output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BroadcastMessage 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
create_recurrent_model Ran
ran on a synthesized input
google-research/public-data-in-dpfl/language_models.py
code served (permissive licence) · get_code("11fd482b84b16433")
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 Functional. 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

ARGS = {
    'vocab_size': 1000,
    'num_oov_buckets': 1,
    'embedding_size': 96,
    'latent_size': 670,
    'num_layers': 1,
    'name': 'test_rnn',
    'shared_embedding': False,
    'seed': 0,
    'cell_type': 'LSTM',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
keras_evaluate Ran
ran; our contract draft was wrong, not the code
google-research/public-data-in-dpfl/mirror_descent.py
code served (permissive licence) · get_code("56987b87a91ec23f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Build a minimal model that can be called with model(x, training=False)
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(5, 3)
    
    def forward(self, x, training=False):
        return self.linear(x)

model = SimpleModel()

# Build test_data as a list of batches
# Each batch can be a tuple (x, y) or a dict {'x': ..., 'y': ...}
batch1 = (torch.randn(2, 5), torch.randn(2, 3))
batch2 = {'x': torch.randn(2, 5), 'y': torch.randn(2, 3)}
test_data = [batch1, batch2]

# Build metrics that have reset_states() and update_state(y_true=..., y_pred=...)
class MockMetric:
    def __init__(self):
        self.value = 0.0
    
    def reset_states(self):
        self.value = 0.0
    
    def update_state(self, y_true, y_pred):
        self.value += torch.mean((y_true - y_pred) ** 2).item()

metrics = [MockMetric(), MockMetric()]

ARGS = {
    'model': model,
    'test_data': test_data,
    'metrics': metrics
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
per_position_loss Ran
ran on a synthesized input
google-research/public-data-in-dpfl/metrics.py
code served (permissive licence) · get_code("ded3310148b0bc17")
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 SymbolicTensor. 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 numpy as np

# Set random seed for reproducibility
tf.random.set_seed(0)

# Create small sample data
batch_size = 2
num_classes = 4
seq_length = 3

# Create labels: shape (batch_size, seq_length) with class indices
labels = tf.constant([
    [0, 1, 2],
    [3, 0, 1]
], dtype=tf.int64)

# Create logits: shape (batch_size, seq_length, num_classes)
logits = tf.constant([
    [[1.0, 2.0, 0.5, -1.0], [0.1, 3.0, -0.5, 0.2], [-1.0, 0.5, 2.0, 1.0]],
    [[2.0, 1.0, 0.5, 0.3], [1.5, -0.5, 2.0, 0.1], [0.2, 0.3, 1.0, -0.5]]
], dtype=tf.float32)

# Reshape to (batch_size * seq_length) for sparse_softmax_cross_entropy_with_logits
labels_flat = tf.reshape(labels, [-1])
logits_flat = tf.reshape(logits, [-1, num_classes])

padding_variable = 0
name = 'per_position_loss'

ARGS = {
    'labels': labels_flat,
    'logits': logits_flat,
    'padding_variable': padding_variable,
    'name': name
}
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 SymbolicTensor — a SymbolicTensor 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
split_input_target Ran
ran on a synthesized input
google-research/public-data-in-dpfl/data_word_prediction.py
code served (permissive licence) · get_code("d3671d4599d7e978")
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 tensorflow as tf
import numpy as np

# Create a small text tensor with shape (batch_size=2, sequence_length=5)
# Each element represents a character or token ID
chunk = tf.constant([
    [1, 2, 3, 4, 5],
    [6, 7, 8, 9, 10]
], dtype=tf.int32)

ARGS = {
    "chunk": chunk
}
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 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
build_to_ids_fn Not yet run
unverified (harvested, no recorded run)
google-research/public-data-in-dpfl/data_word_prediction.py
code served (permissive licence) · get_code("a8a69933cc6b5164")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
keras_evaluate 2 other papers
2 later
2107.06917 (2021-07)
A Field Guide to Federated Optimization
2303.10218 (2023-03)
An Empirical Evaluation of Federated Contextual Bandit Algorithms

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) is a challenging setting for optimization due to the heterogeneity of the data across different clients which gives rise to the client drift phenomenon. In fact, obtaining an algorithm for FL which is uniformly better than simple centralized training has been a major open problem thus far. In this work, we propose a general algorithmic framework, Mime, which i) mitigates client drift and ii) adapts arbitrary centralized optimization algorithms such as momentum and Adam to the cross-device federated learning setting. Mime uses a combination of control-variates and server-level statistics (e.g. momentum) at every client-update step to ensure that each local update mimics that of the centralized method run on iid data. We prove a reduction result showing that Mime can translate the convergence of a generic algorithm in the centralized setting into convergence in the federated setting. Further, we show that when combined with momentum based variance reduction, Mime is provably faster than any centralized method--the first such result. We also perform a thorough experimental exploration of Mime's performance on real world datasets.

For agents

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

get_harvested_code_for_paper("2008.03606")
get_code_for_paper("2008.03606")
have("2008.03606")

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

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

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

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

Connect an agent — have() is free.