SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.10888 · 2023

Unlocking Accuracy and Fairness in Differentially Private Image Classification

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-24; 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/2308.10888.json · badge: /api/ran/2308.10888.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
deepmind/jax_privacy canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
FunctionStatusWhere it lives
as_augmented_optimizer Ran
ran; our contract draft was wrong, not the code
deepmind/jax_privacy/jax_privacy/optimizers.py
code served (permissive licence) · get_code("6c5061bc06fbb495")
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 AugmentedGradientTransformation. 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 optax
import jax
import jax.numpy as jnp

# Create a simple test case for as_augmented_optimizer

# First, create a simple optax optimizer
base_optimizer = optax.adam(learning_rate=0.001)

# Test case 1: Pass a GradientTransformation
ARGS = {
    "optimizer": base_optimizer
}
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 AugmentedGradientTransformation — a AugmentedGradientTransformation output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AugmentedGradientTransformation output the recorded ndim 1 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
batch Ran
ran, honoured the contract we drafted
deepmind/jax_privacy/jax_privacy/_validate.py
code served (permissive licence) · get_code("2c02fa4677bd1e99")
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 int, 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 jax
import jax.numpy as jnp

# Create a valid pytree of arrays with batch size 2
# The function checks that:
# 1. pytree has at least one leaf
# 2. all leaves are arrays with at least one dimension
# 3. all leaves have the same size along axis 0 (batch size)

pytree = {
    'data': jnp.array([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0]]),  # shape (2, 4)
    'labels': jnp.array([[0], [1]]),  # shape (2, 1)
}

ARGS = {
    'pytree': pytree,
}
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 int, 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
compute_early_stopping_order Ran
ran, honoured the contract we drafted
deepmind/jax_privacy/jax_privacy/sharding_utils.py
code served (permissive licence) · get_code("5f1eb92e28e0c956")
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 int, shape (10,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    "batch_size": 10,
    "microbatch_size": 2,
}
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 int, shape (10,) — shape (10,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_map_dataset Ran
ran, violated the contract we drafted
deepmind/jax_privacy/jax_privacy/_compilation.py
code served (permissive licence) · get_code("18187c13b6b4e2bd")
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 torch
import torch.nn as nn
from typing import Any

# Create a mock MapDataset class that has MapDataset in its MRO
class MockMapDataset:
    """A mock dataset that has 'MapDataset' in its class hierarchy."""
    def __init__(self):
        pass

# Rename to make it look like a real MapDataset for the test
MockMapDataset.__name__ = 'MapDataset'

# Create a mock RandomAccessDataSource class
class MockRandomAccessDataSource:
    """A mock dataset that has 'RandomAccessDataSource' in its class hierarchy."""
    def __init__(self):
        pass

MockRandomAccessDataSource.__name__ = 'RandomAccessDataSource'

# Create a regular dataset that is NOT a map dataset
class RegularDataset:
    """A regular dataset that doesn't match either name."""
    def __init__(self):
        pass

# Test with a MapDataset instance
map_dataset_instance = MockMapDataset()

# Test with a RandomAccessDataSource instance
random_access_instance = MockRandomAccessDataSource()

# Test with a regular dataset
regular_dataset = RegularDataset()

# Create arguments for different test cases
ARGS = {
    'dataset': map_dataset_instance
}
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 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
scale_then_privatize Ran
ran; our contract draft was wrong, not the code
deepmind/jax_privacy/jax_privacy/optimizers.py
code served (permissive licence) · get_code("eb1ed7a8ecdfd97a")
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 AugmentedGradientTransformation. 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
from jax import numpy as jnp
import optax
from typing import Callable

# Create a simple base optimizer (Adam)
base_optimizer = optax.adam(learning_rate=0.001)

# Create eps and eps_root parameters
eps = 1e-8
eps_root = 0.0

# Create extract_preconditioner_from_state_fn - can be None or a custom function
# The function signature expects: Callable[[optax.OptState], optax.Updates]
extract_preconditioner_from_state_fn = None

ARGS = {
    "base_optimizer": base_optimizer,
    "eps": eps,
    "eps_root": eps_root,
    "extract_preconditioner_from_state_fn": extract_preconditioner_from_state_fn,
}
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 AugmentedGradientTransformation — a AugmentedGradientTransformation output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AugmentedGradientTransformation output the recorded ndim 1 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
flatten_with_zero_redundancy Not yet run
unverified (harvested, no recorded run)
deepmind/jax_privacy/jax_privacy/sharding_utils.py
code served (permissive licence) · get_code("376af6360331fd3d")
How it ran

no invocation recorded.

local_reshape_add Not yet run
unverified (harvested, no recorded run)
deepmind/jax_privacy/jax_privacy/sharding_utils.py
code served (permissive licence) · get_code("c012bb62ca5640f9")
How it ran

no invocation recorded.

pad_to_multiple_of Not yet run
unverified (harvested, no recorded run)
deepmind/jax_privacy/jax_privacy/batch_selection.py
code served (permissive licence) · get_code("80ba5cbb9f1a0511")
How it ran

no invocation recorded.

split_and_pad_global_batch Not yet run
unverified (harvested, no recorded run)
deepmind/jax_privacy/jax_privacy/batch_selection.py
code served (permissive licence) · get_code("47fdcab6048d7107")
How it ran

no invocation recorded.

Also present in other papers' code

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

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-preserving machine learning aims to train models on private data without leaking sensitive information. Differential privacy (DP) is considered the gold standard framework for privacy-preserving training, as it provides formal privacy guarantees. However, compared to their non-private counterparts, models trained with DP often have significantly reduced accuracy. Private classifiers are also believed to exhibit larger performance disparities across subpopulations, raising fairness concerns. The poor performance of classifiers trained with DP has prevented the widespread adoption of privacy preserving machine learning in industry. Here we show that pre-trained foundation models fine-tuned with DP can achieve similar accuracy to non-private classifiers, even in the presence of significant distribution shifts between pre-training data and downstream tasks. We achieve private accuracies within a few percent of the non-private state of the art across four datasets, including two medical imaging benchmarks. Furthermore, our private medical classifiers do not exhibit larger performance disparities across demographic groups than non-private models. This milestone to make DP training a practical and reliable technology has the potential to widely enable machine learning practitioners to train safely on sensitive datasets while protecting individuals' privacy.

For agents

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

get_harvested_code_for_paper("2308.10888")
get_code_for_paper("2308.10888")
have("2308.10888")

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

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

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

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

Connect an agent — have() is free.