SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1607.00133 · 2016

Deep Learning with Differential Privacy

Kunal Talwar, H Mcmahan, Ilya Mironov, Li Zhang, Ian Goodfellow, Martin Abadi, Andy Chu

arXiv · PDF · Open in the Atlas

Code that ran

22 of 24 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, 1 violated it and 14 have no contract verdict; 7 failures of our instrument; 2 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/1607.00133.json · badge: /api/ran/1607.00133.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
sunblaze-ucb/dpml-benchmark community (classifier label)
classifier basis not recorded on the link
14 ran · 1 no recorded run
trusthlt/granularity-is-crucial-dp community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
zzzer1019/FL_DP reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
woodyx218/opacus_global_clipping extension (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Vname_to_FeedPname Ran
ran; our contract draft was wrong, not the code
zzzer1019/FL_DP/Helper_Functions.py
pointer only (licence: NONE) · get_code("4b5f34895003fc5f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zzzer1019/FL_DP when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Vname_to_Pname Ran
ran; our contract draft was wrong, not the code
zzzer1019/FL_DP/Helper_Functions.py
pointer only (licence: NONE) · get_code("96ac62e9e705aa09")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zzzer1019/FL_DP when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_binary_ys Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/gridsearch.py
code served (permissive licence) · get_code("636d2d70184406df")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; 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

# Create a sample vec_ys array with shape (batch_size, num_features)
# Using shape (2, 4) to keep it tiny and have distinct dimensions
vec_ys = np.array([
    [1, 0, 1, 0],
    [0, 1, 1, 1]
], dtype=int)

ARGS = {
    "vec_ys": vec_ys
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
clip_rows Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/clipping.py
code served (permissive licence) · get_code("055e3c60e4826989")
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 csr_matrix. 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 scipy.sparse import csr_matrix

# Create a small sparse matrix for testing
# Shape: 4 rows x 3 columns with some non-zero values
row = np.array([0, 0, 1, 2, 2, 3])
col = np.array([0, 2, 1, 0, 2, 1])
data = np.array([1.5, 2.0, 3.5, 1.0, 2.5, 4.0])
sparse_data = csr_matrix((data, (row, col)), shape=(4, 3))

ARGS = {
    "data": sparse_data,
    "ord": 2,
    "L": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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_alpha Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/algorithms/frank_wolfe.py
code served (permissive licence) · get_code("d9a28ecc659a537a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, 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

# Read the function body to understand what each parameter needs:
# - corner_size: used in multiplication with gradient, passed to np.ones()
# - gradient: multiplied by corner_size (scalar or array-like)
# - m: used as size parameter for np.random.laplace and np.arange
# - noise_para: passed as scale to np.random.laplace
# - theta: not used in the function body at all

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

ARGS = {
    "corner_size": 2.5,
    "gradient": 0.8,
    "m": 5,
    "noise_para": 0.1,
    "theta": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
compute_classification_counts Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/common.py
code served (permissive licence) · get_code("f0e8aa3d25432f87")
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 int; 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 random

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

# Create small example data
# x: feature matrix of shape (n_samples, n_features)
# y: binary labels (-1 or 1)
# theta: weight vector

n_samples = 2
n_features = 4

x = np.random.randn(n_samples, n_features).astype(np.float32)
y = np.array([-1, 1])
theta = np.random.randn(n_features).astype(np.float32)

ARGS = {
    'x': x,
    'y': y,
    'theta': theta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
compute_multiclass_counts Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/common.py
code served (permissive licence) · get_code("ff50dd3563228c04")
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 int; 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 numpy as np

torch.manual_seed(0)

# x: input features, shape (n_samples, n_features)
# The function iterates over n samples and performs @ (matrix multiplication) with each theta
x = torch.randn(2, 4)  # 2 samples, 4 features

# y: labels in one-hot encoded format, shape (n_samples, n_classes)
# The function checks if y[i][index_of_max_value] == 1
y = torch.tensor([
    [1, 0, 0],  # sample 0: class 0
    [0, 1, 0]   # sample 1: class 1
], dtype=torch.float32)

# thetas: list of weight vectors for multiclass classification
# Each theta should be shape (n_features,) to perform @ x[i] which is (n_features,)
# We have 3 classes, so 3 theta vectors
thetas = [
    torch.randn(4),  # theta for class 0
    torch.randn(4),  # theta for class 1
    torch.randn(4)   # theta for class 2
]

ARGS = {
    'x': x,
    'y': y,
    'thetas': thetas
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
constrain_l2_norm Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/constraints.py
code served (permissive licence) · get_code("48efe13866a9810d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

# Create a small parameter vector (theta)
theta = np.array([0.5, 1.2, -0.8, 0.3])

# Create a constraint value (L2 norm upper bound)
constraint = 1.0

ARGS = {
    "theta": theta,
    "constraint": constraint,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
constrain_to_unit_ball Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/common.py
code served (permissive licence) · get_code("664f0e18e9133aed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

# The function takes a theta parameter which is a numpy array
# It computes the norm, checks if > 1, and if so normalizes it
# The function modifies theta in place and returns it

# Create a test case with theta outside the unit ball
theta_outside = np.array([0.5, 0.6, 0.7, 0.8])

# Create another test case with theta inside the unit ball
theta_inside = np.array([0.1, 0.2, 0.1, 0.05])

ARGS = {
    "theta": theta_outside
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
constrain_to_unit_ball Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/constraints.py
code served (permissive licence) · get_code("6b151b2baef4dec8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

# constrain_to_unit_ball takes a single parameter 'theta' which is a numpy array
# The function computes the L2 norm and if it exceeds 1, normalizes it to fit within a unit ball

# Create a test theta array that is larger than unit ball (norm > 1)
theta = np.array([0.5, 0.6, 0.7, 0.8])

ARGS = {
    "theta": theta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
create_save_dir Ran
ran; our contract draft was wrong, not the code
zzzer1019/FL_DP/Helper_Functions.py
pointer only (licence: NONE) · get_code("f466d758bb1dc678")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zzzer1019/FL_DP when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

decode_postprocess_text Ran
ran; our contract draft was wrong, not the code
trusthlt/granularity-is-crucial-dp/utils.py
code served (permissive licence) · get_code("eced2545684e00aa")
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 torch
import numpy as np

torch.manual_seed(0)

class MockTokenizer:
    """Stand-in tokenizer with batch_decode method."""
    def batch_decode(self, token_ids, skip_special_tokens=True):
        # Convert token_ids (tensor or list) to strings
        # Simulate decoding by converting tensor values to text
        if isinstance(token_ids, torch.Tensor):
            token_ids = token_ids.tolist()
        
        decoded = []
        for ids in token_ids:
            if isinstance(ids, list):
                # Convert list of token ids to a string
                text = " ".join([f"token_{id}" for id in ids])
            else:
                text = f"token_{ids}"
            decoded.append(text)
        return decoded

# Create mock tokenizer
tokenizer = MockTokenizer()

# Create predictions and labels as tensors (simulating token IDs)
# batch size 2, sequence length 3
predictions = torch.tensor([[1, 2, 3], [4, 5, 6]], dtype=torch.long)
labels = torch.tensor([[7, 8, 9], [10, 11, 12]], dtype=torch.long)

ARGS = {
    "tokenizer": tokenizer,
    "predictions": predictions,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
dict_product Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/gridsearch.py
code served (permissive licence) · get_code("03cc2bf621d7826a")
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 generator. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from itertools import product

torch.manual_seed(0)

# The function dict_product takes a dict of iterables and produces
# a generator of dicts where each dict is a combination of values
# from the input iterables (Cartesian product).
# 
# Reading the body:
# - dicts: a dictionary where values are iterables
# - zip(dicts, x) zips the keys with values from product(*dicts.values())
# - product(*dicts.values()) creates Cartesian product of all value iterables

# Create a simple dict with multiple iterables as values
dicts = {
    'learning_rate': [0.001, 0.01],
    'batch_size': [16, 32],
    'epochs': [5, 10]
}

ARGS = {
    'dicts': dicts
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
gen_random_vector_in_unit_ball Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/constraints.py
code served (permissive licence) · get_code("6d88e181355723bb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def gen_random_vector_in_unit_ball(size):
    random_vec = np.random.normal(size=size)
    normalized_theta = np.linalg.norm(random_vec, ord=2)
    if normalized_theta > 1:
        random_vec /= normalized_theta / 1
    return random_vec

ARGS = {
    "size": (5,)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_max_norm Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/clipping.py
code served (permissive licence) · get_code("4184d0c4bb83a53e")
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 float64, ndim 0, 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 scipy.sparse import csr_matrix, hstack

# Create test data - the function expects either a csr_matrix or an object with a .data attribute

# Test case 1: csr_matrix
data_csr = csr_matrix(np.array([[1.0, 2.0, 0.0], 
                                 [3.0, 0.0, 4.0]]))

# Test case 2: object with .data attribute (numpy array)
class DataContainer:
    def __init__(self, data_array):
        self.data = data_array

# Create a 2D array where axis=1 represents rows
data_array = np.array([[1.0, 2.0, 0.0], 
                       [3.0, 0.0, 4.0]])
data_container = DataContainer(data_array)

# Define ARGS with csr_matrix as the primary test case
ARGS = {
    "data": data_csr,
    "ord": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
get_norm Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/clipping.py
code served (permissive licence) · get_code("a9e9e7baf4bbeecd")
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 float64, ndim 0, 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 scipy.sparse import csr_matrix
import torch

# Create a sparse matrix for testing
sparse_data = csr_matrix(np.array([[1, 0, 2], [0, 3, 0], [4, 0, 5]]))

# Create a dense array for testing
dense_data = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])

# Test with sparse matrix and default ord
ARGS = {
    "data": sparse_data,
    "ord": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
numpy_collate Ran
ran; our contract draft was wrong, not the code
trusthlt/granularity-is-crucial-dp/utils.py
code served (permissive licence) · get_code("2d04dae1de533b58")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import jax
from flax.training.common_utils import shard

# Create a small batch of samples
# Each sample needs to be a dict with at least 'input_ids' key
sample1 = {
    'input_ids': np.array([1, 2, 3, 4]),
    'attention_mask': np.array([1, 1, 1, 0]),
    'labels': np.array([0, 1, 1, 0])
}

sample2 = {
    'input_ids': np.array([5, 6, 7, 8]),
    'attention_mask': np.array([1, 1, 0, 0]),
    'labels': np.array([1, 0, 0, 1])
}

batch = [sample1, sample2]

ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, 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
private_frank_wolfe Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/algorithms/frank_wolfe.py
code served (permissive licence) · get_code("1859aa1574ad821e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np
import math
from scipy.sparse import csr_matrix

def loss_gradient(theta, x, y):
    """
    Compute gradient of loss function.
    theta: parameter vector of shape (m,)
    x: feature matrix of shape (minibatch_size, m)
    y: labels of shape (minibatch_size,)
    Returns: gradient of shape (m,)
    """
    if isinstance(x, csr_matrix):
        predictions = x.dot(theta)
    else:
        predictions = x @ theta
    residuals = predictions - y
    if isinstance(x, csr_matrix):
        gradient = x.T.dot(residuals) / len(y)
    else:
        gradient = x.T @ residuals / len(y)
    return gradient

# Create small synthetic data
np.random.seed(0)
n_samples = 100
n_features = 4

x = np.random.randn(n_samples, n_features).astype(np.float64)
y = np.random.randn(n_samples).astype(np.float64)

ARGS = {
    'x': x,
    'y': y,
    'loss_gradient': loss_gradient,
    'eps': 0.1,
    'delta': 0.01,
    'step_size': 1,
    'num_iters': 5,
    'constraint': 10,
    'L': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (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
random_projection Ran
ran on a synthesized input
sunblaze-ucb/dpml-benchmark/common/datasets.py
code served (permissive licence) · get_code("329c267465c93b73")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (5, 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 numpy as np
import sklearn.random_projection

# Create a small matrix for ori_matrix parameter
# Using shape (5, 4) - 5 samples, 4 features
np.random.seed(0)
ori_matrix = np.random.randn(5, 4)

# k is the number of components for the random projection
k = 2

ARGS = {
    "ori_matrix": ori_matrix,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 2) — shape (5, 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
sacre_bleu_postprocess_text Ran
ran; our contract draft was wrong, not the code
trusthlt/granularity-is-crucial-dp/utils.py
code served (permissive licence) · get_code("94bee6b69f7ebc31")
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 torch
import numpy as np

# Construct arguments for sacre_bleu_postprocess_text
# The function expects:
# - predictions: list of strings (or strings with whitespace)
# - labels: list of strings (or strings with whitespace)

predictions = [
    "  Hello world  ",
    "This is a test  "
]

labels = [
    "  Hello world  ",
    "  This is a test"
]

ARGS = {
    "predictions": predictions,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
str2bool Ran
ran, violated the contract we drafted
trusthlt/granularity-is-crucial-dp/flags_attack.py
code served (permissive licence) · get_code("387318c7a376d775")
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 bool, 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 argparse

def str2bool(val):
    if isinstance(val, bool):
        return val
    if val.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif val.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Expected boolean value.')

# Test cases for the str2bool function
ARGS = {
    'val': 'true'  # string that converts to True
}
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 bool, 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
wrap_collate_with_empty Ran
ran; our contract draft was wrong, not the code
trusthlt/granularity-is-crucial-dp/dataloader.py
code served (permissive licence) · get_code("1f6e34e8d7e65cec")
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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple collate function that stacks tensors and labels
def simple_collate_fn(batch):
    """Basic collate function that processes batches of (tensor, label) tuples"""
    tensors = torch.stack([item[0] for item in batch])
    labels = torch.tensor([item[1] for item in batch])
    return {'data': tensors, 'labels': labels}

ARGS = {
    'collate_fn': simple_collate_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
amp_run_classification Not yet run
unverified (harvested, no recorded run)
sunblaze-ucb/dpml-benchmark/algorithms/approximate_minima_perturbation.py
code served (permissive licence) · get_code("18dd5d7fb77b0965")
How it ran

no invocation recorded.

test Not yet run
unverified (harvested, no recorded run)
woodyx218/opacus_global_clipping/examples/mnist.py
code served (permissive licence) · get_code("0084ec1c2df6dc92")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 9 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 15 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
str2bool 4 other papers
4 later
2102.09604 (2021-02)
Privacy-Preserving Graph Convolutional Networks for Text Classification
2109.03175 (2021-09)
When differential privacy meets NLP: The devil is in the detail
2302.07636 (2023-02)
DP-BART for Privatized Text Rewriting under Local Differential Privacy
and 1 more not named here
test 2 other papers
2 later
1911.11607 (2019-11)
Deep Learning with Gaussian Differential Privacy
2007.14191 (2020-07)
Tempered Sigmoid Activations for Deep Learning with Differential Privacy
Vname_to_FeedPname 1 other paper
1 dated earlier
1602.05629 (2016-02)
Communication-Efficient Learning of Deep Networks from Decentralized Data
Vname_to_Pname 1 other paper
1 dated earlier
1602.05629 (2016-02)
Communication-Efficient Learning of Deep Networks from Decentralized Data
create_save_dir 1 other paper
1 dated earlier
1602.05629 (2016-02)
Communication-Efficient Learning of Deep Networks from Decentralized Data
decode_postprocess_text 1 other paper
1 later
2311.14465 (2023-11)
DP-NMT: Scalable Differentially-Private Machine Translation
numpy_collate 1 other paper
1 later
2311.14465 (2023-11)
DP-NMT: Scalable Differentially-Private Machine Translation
sacre_bleu_postprocess_text 1 other paper
1 later
2311.14465 (2023-11)
DP-NMT: Scalable Differentially-Private Machine Translation
wrap_collate_with_empty 1 other paper
1 later
2311.14465 (2023-11)
DP-NMT: Scalable Differentially-Private Machine Translation

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

Machine learning techniques based on neural networks are achieving remarkable results in a wide variety of domains. Often, the training of models requires large, representative datasets, which may be crowdsourced and contain sensitive information. The models should not expose private information in these datasets. Addressing this goal, we develop new algorithmic techniques for learning and a refined analysis of privacy costs within the framework of differential privacy. Our implementation and experiments demonstrate that we can train deep neural networks with non-convex objectives, under a modest privacy budget, and at a manageable cost in software complexity, training efficiency, and model quality. * Google. † OpenAI. Work done while at Google.

For agents

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

get_harvested_code_for_paper("1607.00133")
get_code_for_paper("1607.00133")
have("1607.00133")

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

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

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

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

Connect an agent — have() is free.