SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.00309 · ICLR · 2023

Differentially Private Adaptive Optimization with Delayed Preconditioners

Manzil Zaheer, Tian Li, Virginia Smith, H. Brendan McMahan, Ken Ziyu Liu, Sashank J. Reddi

arXiv · PDF · Open in the Atlas

Code that ran

23 of 31 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 19 failures of our instrument; 8 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/2212.00309.json · badge: /api/ran/2212.00309.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
kenziyuliu/dp2 canonical (classifier label)
classifier basis: classifier_2025
23 ran · 8 no recorded run
FunctionStatusWhere it lives
_config_tf_loader Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("57022752f9995f59")
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 _PrefetchDataset. 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 simple tf.data.Dataset
def create_dummy_dataset():
    # Create some dummy data
    x_data = np.random.randn(100, 4).astype(np.float32)
    y_data = np.random.randint(0, 2, 100).astype(np.int32)
    
    # Create a tf.data.Dataset
    dataset = tf.data.Dataset.from_tensor_slices((x_data, y_data))
    return dataset

loader = create_dummy_dataset()

ARGS = {
    "loader": loader,
    "batch_size": 16,
    "shuffle_size": 50000,
    "seed": 42,
    "drop_remainder": True
}
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 _PrefetchDataset — a _PrefetchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _PrefetchDataset 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_tf_loader Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("5d8c2870379d3384")
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 _PrefetchDataset. 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
import tensorflow as tf

# Create small numpy arrays for x_data and y_data
x_data = np.random.randn(10, 4).astype(np.float32)
y_data = np.random.randint(0, 2, size=(10,)).astype(np.int32)

ARGS = {
    "x_data": x_data,
    "y_data": y_data,
    "batch_size": 2,
    "shuffle_size": 50000,
    "seed": 42,
    "drop_remainder": True,
    "cache": False,
}
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 _PrefetchDataset — a _PrefetchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _PrefetchDataset 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
_load_movielens_100k Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("09495c898e5d8e94")
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 numpy as np
from pathlib import Path
import pandas as pd
import tempfile
import os

# Create a temporary directory and a minimal u.data file
temp_dir = tempfile.mkdtemp()
data_file = Path(temp_dir) / 'u.data'

# Create a minimal MovieLens 100k format file
# Format: user_id item_id rating timestamp
data_content = """1\t1\t5\t874965758
1\t2\t3\t874965759
2\t1\t4\t874965760
2\t3\t2\t874965761
3\t2\t5\t874965762
"""

with open(data_file, 'w') as f:
    f.write(data_content)

ARGS = {
    'data_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
bce_loss Ran
ran, honoured the contract we drafted
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("b3407cf1906789ea")
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 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 jax
import jax.numpy as jnp
import optax
from typing import NamedTuple

# Create a minimal JAX model that has an apply method
class SimpleModel:
    def apply(self, params, inputs):
        # Simple linear transformation: params['w'] @ inputs.T
        return jnp.dot(inputs, params['w'])

# Create small test data
batch_size = 2
input_dim = 4
output_dim = 3

# Initialize random key for reproducibility
key = jax.random.PRNGKey(0)

# Create simple params dict with weight matrix
params = {
    'w': jax.random.normal(key, shape=(input_dim, output_dim))
}

# Create model instance
model = SimpleModel()

# Create batch: (inputs, targets)
# inputs shape: (batch_size, input_dim)
# targets shape: (batch_size, output_dim) - for binary cross entropy, values should be in [0, 1]
inputs = jax.random.normal(key, shape=(batch_size, input_dim))
targets = jax.random.uniform(key, shape=(batch_size, output_dim), minval=0.0, maxval=1.0)

batch = (inputs, targets)

ARGS = {
    'model': model,
    'params': params,
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, optax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
global_l2_clip Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("735e56344d7303e1")
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 jax.numpy as jnp
import numpy as np

# Create test tensors with distinct sizes
tensor1 = jnp.array([[1.0, 2.0, 3.0, 4.0],
                      [5.0, 6.0, 7.0, 8.0]], dtype=jnp.float32)

tensor2 = jnp.array([9.0, 10.0, 11.0, 12.0], dtype=jnp.float32)

tensor3 = jnp.array([[[13.0, 14.0],
                       [15.0, 16.0],
                       [17.0, 18.0],
                       [19.0, 20.0]]], dtype=jnp.float32)

# Create a nested structure using a dictionary (a valid pytree in JAX)
tensor_struct = {
    'layer1': tensor1,
    'layer2': tensor2,
    'layer3': tensor3
}

clip_value = 1.0

ARGS = {
    'tensor_struct': tensor_struct,
    'clip': clip_value
}
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 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
global_l2_norm_sq Ran
ran, honoured the contract we drafted
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("bbd8d1efcf5829de")
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 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 jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# The function expects a tensor_struct which is any pytree of JAX arrays
# Looking at the function body:
# - struct_flatten is called on tensor_struct
# - tree_flatten extracts tensors and tree definition
# - tensors are reshaped and concatenated
# - the flat vector is used in a dot product

# Create a simple tensor struct - can be a single array, list, dict, or nested structure
tensor_struct_single = jnp.array([1.0, 2.0, 3.0, 4.0])

# Or as a list of arrays (more complex pytree)
tensor_struct_list = [
    jnp.array([[1.0, 2.0], [3.0, 4.0]]),
    jnp.array([5.0, 6.0, 7.0, 8.0])
]

# Or as a dict (another valid pytree)
tensor_struct_dict = {
    'weights': jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]),
    'bias': jnp.array([0.1, 0.2, 0.3, 0.4])
}

# Use the dict version as it's a good representative of a complex struct
ARGS = {
    'tensor_struct': tensor_struct_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
logreg_classify Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("26f3490ca9bbe47e")
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 (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 jax.numpy as jnp
import jax
from jax.scipy.special import expit as sigmoid

# Define a minimal JAX model that has an apply method
class SimpleLogisticRegression:
    def __init__(self):
        self.params = None
    
    def apply(self, params, inputs):
        # Simple linear model: inputs @ weights + bias
        weights = params['weights']
        bias = params['bias']
        return jnp.dot(inputs, weights) + bias

# Create model instance
model = SimpleLogisticRegression()

# Create parameters: weights (4,) and bias (1,)
params = {
    'weights': jnp.array([0.1, 0.2, -0.15, 0.05]),
    'bias': jnp.array([0.0])
}

# Create batch inputs: (2, 4) - batch of 2 samples, 4 features
batch_inputs = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [0.5, 1.5, 2.5, 3.5]
])

# Define ARGS dict
ARGS = {
    'model': model,
    'params': params,
    'batch_inputs': batch_inputs,
    'temperature': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 float, 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
movielens_loader Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("c3b75484cf237418")
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 numpy as np
import scipy as sp
import tensorflow as tf
from pathlib import Path
import tempfile
import os

# Create a temporary directory with minimal MovieLens data
temp_dir = tempfile.mkdtemp()
data_subdir = os.path.join(temp_dir, 'movielens_100k')
os.makedirs(data_subdir, exist_ok=True)

# Create minimal u.data file with a few ratings
u_data_content = """1	1	5	874965758
1	2	3	874965759
2	1	4	874965760
2	2	2	874965761
3	1	5	874965762
3	3	1	874965763
4	2	3	874965764
4	3	4	874965765
"""

with open(os.path.join(data_subdir, 'u.data'), 'w') as f:
    f.write(u_data_content)

ARGS = {
    'batch_size': 2,
    'matfac_dim_1': 4,
    'matfac_dim_2': 3,
    'density': 0.5,
    'seed': 42,
    'split': 'train',
    'data_dir': data_subdir,
    'is_eval': False,
    'drop_remainder': True,
    'public_split': 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy, tensorflow — 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
mse_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("f320dea1d5541ada")
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 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 jax
import jax.numpy as jnp
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal JAX model that has an apply method
class SimpleModel:
    def apply(self, params, inputs):
        # Simple linear transformation: inputs @ params
        return jnp.dot(inputs, params)

# Create model instance
model = SimpleModel()

# Create params as a JAX array (2D weight matrix)
# inputs will be (batch_size=2, input_dim=4), so params should be (4, 3)
params = jnp.array([
    [0.1, 0.2, 0.3],
    [0.4, 0.5, 0.6],
    [0.7, 0.8, 0.9],
    [1.0, 1.1, 1.2]
], dtype=jnp.float32)

# Create batch: (inputs, targets)
# inputs shape: (batch_size=2, input_dim=4)
# targets shape: (batch_size=2, output_dim=3) - same as preds
inputs = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)

targets = jnp.array([
    [1.5, 2.5, 3.5],
    [4.5, 5.5, 6.5]
], dtype=jnp.float32)

batch = (inputs, targets)

ARGS = {
    "model": model,
    "params": params,
    "batch": batch,
    "squeeze": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
num_params Ran
ran, honoured the contract we drafted
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("af4f5b33931d44c0")
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 int64, ndim 0, dtype family int, 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 numpy as np
import torch
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

torch.manual_seed(0)

# The function num_params takes a struct and uses tree_flatten on it
# to get a flat list of parameters, then sums their sizes.
# We need to create a JAX-compatible pytree structure with numeric arrays/tensors

# Create a simple nested structure with JAX arrays or numpy arrays
struct = {
    'layer1': np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]),
    'layer2': {
        'weights': np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0], [7.0, 8.0]]),
        'bias': np.array([0.1, 0.2])
    },
    'params': np.array([1.5, 2.5, 3.5, 4.5])
}

ARGS = {
    'struct': struct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, 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
privatize_grad Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("591c9ea59777949b")
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 jax
import jax.numpy as jnp
from jax import random

# Set seed for reproducibility
key = random.PRNGKey(0)

# Create example gradients as a PyTree (nested structure of arrays)
# Simulate per-example gradients with batch_size=2
batch_size = 2
example_grads = {
    'layer1': jnp.ones((batch_size, 4)),
    'layer2': jnp.ones((batch_size, 3)),
}

# Define parameters for the privatize_grad function
clip = 1.0
noise_mult = 0.5

ARGS = {
    'example_grads': example_grads,
    'key': key,
    'clip': clip,
    'noise_mult': noise_mult,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
stackoverflow_tag_loader Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("19770acf0fa0aa44")
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 numpy as np
from pathlib import Path
import tempfile
import os

# Create temporary directory with mock data files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'stackoverflow_tag')
os.makedirs(data_dir, exist_ok=True)

# Create small mock numpy arrays for x and y data
num_samples = 8
x_train = np.random.randn(num_samples, 10000).astype(np.float32)
y_train = np.random.randint(0, 100, num_samples).astype(np.int64)

x_test = np.random.randn(4, 10000).astype(np.float32)
y_test = np.random.randint(0, 100, 4).astype(np.int64)

# Save the mock data
np.save(os.path.join(data_dir, 'x_train.npy'), x_train)
np.save(os.path.join(data_dir, 'y_train.npy'), y_train)
np.save(os.path.join(data_dir, 'x_test.npy'), x_test)
np.save(os.path.join(data_dir, 'y_test.npy'), y_test)

# Define arguments dictionary
ARGS = {
    'batch_size': 2,
    'split': 'train',
    'data_dir': data_dir,
    'is_eval': False,
    'seed': 42,
    'drop_remainder': True,
    'public_split': 0.0
}
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, 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
stackoverflow_tag_loader_cached Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("919aea51fdf26b6d")
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 numpy as np
from pathlib import Path
import tempfile
import os

# Create a temporary directory for fake data files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'stackoverflow_tag')
os.makedirs(data_dir, exist_ok=True)

# Create small fake numpy arrays for x_train.npy and y_train.npy
x_train = np.random.randn(10, 4).astype(np.float32)
y_train = np.random.randint(0, 2, (10, 3)).astype(np.int32)

x_test = np.random.randn(8, 4).astype(np.float32)
y_test = np.random.randint(0, 2, (8, 3)).astype(np.int32)

# Save the fake data
np.save(os.path.join(data_dir, 'x_train.npy'), x_train)
np.save(os.path.join(data_dir, 'y_train.npy'), y_train)
np.save(os.path.join(data_dir, 'x_test.npy'), x_test)
np.save(os.path.join(data_dir, 'y_test.npy'), y_test)

ARGS = {
    'batch_size': 2,
    'split': 'train',
    'data_dir': data_dir,
    'is_eval': False,
    'seed': 42,
    'drop_remainder': True,
    'public_split': 0.0
}
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, 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
struct_add Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("cca3cf0b80500ec6")
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 jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# struct_add takes two arguments: struct_1 and struct_2
# The function uses tree_map(jnp.add, struct_1, struct_2)
# This means both arguments should be pytree structures containing JAX arrays
# We'll create two nested pytrees with small JAX arrays

struct_1 = {
    'a': jnp.array([1.0, 2.0, 3.0, 4.0]),
    'b': {
        'nested': jnp.array([[1.0, 2.0], [3.0, 4.0]])
    },
    'c': jnp.array([5.0, 6.0])
}

struct_2 = {
    'a': jnp.array([0.5, 1.5, 2.5, 3.5]),
    'b': {
        'nested': jnp.array([[0.5, 1.5], [2.5, 3.5]])
    },
    'c': jnp.array([1.0, 2.0])
}

ARGS = {
    'struct_1': struct_1,
    'struct_2': struct_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_add_scalar Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("34bf4ad4230cf55d")
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 jax
import jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

@jit
def struct_add_scalar(struct, value):
    t_list, tree_def = tree_flatten(struct)
    new_t_list = [t + value for t in t_list]
    return tree_unflatten(tree_def, new_t_list)

# Create a nested structure (dict of arrays) as the struct parameter
struct = {
    "a": jnp.array([1.0, 2.0, 3.0, 4.0]),
    "b": jnp.array([5.0, 6.0]),
    "nested": {
        "c": jnp.array([7.0, 8.0, 9.0])
    }
}

# Create a scalar value to add
value = 10.0

ARGS = {
    "struct": struct,
    "value": value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_div Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("7d340e00912389f7")
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 jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# Create two nested structures with JAX arrays
# struct_div divides corresponding elements in two tree structures

struct_1 = {
    'a': jnp.array([4.0, 8.0, 12.0, 16.0]),
    'b': jnp.array([[2.0, 4.0], [6.0, 8.0]]),
    'c': (jnp.array([1.0, 2.0, 3.0]), jnp.array([4.0, 5.0]))
}

struct_2 = {
    'a': jnp.array([2.0, 2.0, 3.0, 4.0]),
    'b': jnp.array([[1.0, 2.0], [2.0, 4.0]]),
    'c': (jnp.array([1.0, 1.0, 1.0]), jnp.array([2.0, 1.0]))
}

ARGS = {
    'struct_1': struct_1,
    'struct_2': struct_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_div_scalar Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("e488dedf8e381c96")
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 jax
import jax.numpy as jnp
from jax.tree_util import tree_flatten, tree_unflatten

# Create a test structure - can be nested dicts/lists/tuples of arrays
struct = {
    'a': jnp.array([1.0, 2.0, 3.0, 4.0]),
    'b': jnp.array([[5.0, 6.0], [7.0, 8.0]]),
    'nested': {
        'c': jnp.array([9.0, 10.0, 11.0, 12.0])
    }
}

factor = 2.0

ARGS = {
    'struct': struct,
    'factor': factor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_flatten Ran
ran, honoured the contract we drafted
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("155ccee594f8679d")
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 (16,) 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 device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# Create a test struct - can be a nested dict/list of arrays
test_struct = {
    'a': jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]),
    'b': jnp.array([7.0, 8.0]),
    'c': {
        'nested': jnp.array([[9.0, 10.0], [11.0, 12.0], [13.0, 14.0], [15.0, 16.0]])
    }
}

ARGS = {
    'struct': test_struct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 float, shape (16,) — shape (16,) 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
struct_mul_scalar Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("6050b70841d335c1")
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 jax
import jax.numpy as jnp
from jax import tree_util

# Create a simple nested structure with JAX arrays
struct = {
    'layer1': jnp.array([1.0, 2.0, 3.0, 4.0]),
    'layer2': {
        'weights': jnp.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]),
        'bias': jnp.array([0.5, 1.5])
    },
    'layer3': jnp.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
}

factor = 2.5

ARGS = {
    'struct': struct,
    'factor': factor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_sq Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("145eda8014bfd82a")
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 jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# Create a simple nested structure (pytree) containing JAX arrays
struct = {
    'a': jnp.array([1.0, 2.0, 3.0, 4.0]),
    'b': jnp.array([[5.0, 6.0], [7.0, 8.0]]),
    'nested': {
        'c': jnp.array([9.0, 10.0, 11.0]),
        'd': jnp.array([12.0])
    }
}

ARGS = {
    'struct': struct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_sqrt Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("ebb3869ec1266c1e")
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 jax.numpy as jnp
from jax import device_put, random, grad, jit, vmap, value_and_grad
from jax.tree_util import tree_flatten, tree_unflatten, tree_map

# Create a nested structure (tree) with jax arrays
struct = {
    'array1': jnp.array([1.0, 4.0, 9.0, 16.0]),
    'nested': {
        'array2': jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]),
        'array3': jnp.array([0.25, 0.5, 0.75, 1.0])
    },
    'list_arrays': [jnp.array([4.0, 9.0]), jnp.array([16.0, 25.0])]
}

ARGS = {
    'struct': struct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
struct_sub Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("0bf286afd514640c")
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 jax.numpy as jnp
from jax import device_put, random, tree_util
import numpy as np

# struct_sub uses tree_map with jnp.subtract on two structures
# The structures can be nested dicts, lists, tuples of arrays
# We need two compatible nested structures

# Create simple nested structures with JAX arrays
struct_1 = {
    'a': jnp.array([1.0, 2.0, 3.0, 4.0]),
    'b': jnp.array([[5.0, 6.0], [7.0, 8.0]]),
    'nested': {
        'c': jnp.array([9.0, 10.0])
    }
}

struct_2 = {
    'a': jnp.array([0.1, 0.2, 0.3, 0.4]),
    'b': jnp.array([[0.5, 0.6], [0.7, 0.8]]),
    'nested': {
        'c': jnp.array([0.9, 1.0])
    }
}

ARGS = {
    'struct_1': struct_1,
    'struct_2': struct_2
}
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 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
struct_zeros_like Ran
ran; our contract draft was wrong, not the code
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("06cd2aedfcb73bb6")
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 jax.numpy as jnp
from jax import tree_util

# struct_zeros_like takes a pytree structure and returns zeros_like for each leaf
# We need to construct a valid JAX pytree as the struct argument

# Create a simple pytree structure with nested arrays and dicts
struct = {
    "array1": jnp.array([[1.0, 2.0, 3.0, 4.0],
                         [5.0, 6.0, 7.0, 8.0]]),
    "nested": {
        "array2": jnp.array([1.0, 2.0, 3.0, 4.0]),
        "array3": jnp.array([[1.0, 2.0],
                             [3.0, 4.0],
                             [5.0, 6.0]])
    },
    "list_arrays": [jnp.array([1.0, 2.0, 3.0, 4.0]),
                    jnp.array([[1.0, 2.0, 3.0, 4.0]])]
}

ARGS = {
    "struct": struct
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
BaseTrainer Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("dca6afaa2e23a3be")
How it ran

no invocation recorded.

Trainer Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("458f345611469a88")
How it ran

no invocation recorded.

imdb_loader Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("f4a878bc9479f4bc")
How it ran

no invocation recorded.

linear_model_fn Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("29b863abc869ce7a")
How it ran

no invocation recorded.

matfac_model_fn Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("32b7bb707740780e")
How it ran

no invocation recorded.

multiclass_classify Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("aeca8b544abd9191")
How it ran

no invocation recorded.

print_log Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("defe6270f77abbbd")
How it ran

no invocation recorded.

sce_loss Not yet run
unverified (harvested, no recorded run)
kenziyuliu/dp2/trainers/dp2_adagrad.py
code served (permissive licence) · get_code("1d3f9fc33b06bb7f")
How it ran

no invocation recorded.

Also present in other papers' code

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

Privacy noise may negate the benefits of using adaptive optimizers in differentially private model training. Prior works typically address this issue by using auxiliary information (e.g., public data) to boost the effectiveness of adaptive optimization. In this work, we explore techniques to estimate and efficiently adapt to gradient geometry in private adaptive optimization without auxiliary data. Motivated by the observation that adaptive methods can tolerate stale preconditioners, we propose differentially private adaptive training with delayed preconditioners (DP 2 ), a simple method that constructs delayed but less noisy preconditioners to better realize the benefits of adaptivity. Theoretically, we provide convergence guarantees for our method for both convex and non-convex problems, and analyze trade-offs between delay and privacy noise reduction. Empirically, we explore DP 2 across several realworld datasets, demonstrating that it can improve convergence speed by as much as 4× relative to non-adaptive baselines and match the performance of state-of-the-art optimization methods that require auxiliary data.

For agents

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

get_harvested_code_for_paper("2212.00309")
get_code_for_paper("2212.00309")
have("2212.00309")

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

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

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

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

Connect an agent — have() is free.