SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.07125 · 2022

Self-Supervised Pretraining for Differentially Private Learning

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 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, 3 violated it and 7 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2206.07125.json · badge: /api/ran/2206.07125.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
UnchartedRLab/SSP canonical (classifier label)
classifier basis not recorded on the link
12 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_muP Ran
ran, violated the contract we drafted
UnchartedRLab/SSP/bayes_tuning.py
pointer only (licence: MIT); the stored copy get_code serves, from woodyx218/Deep-Learning-with-GDP-Tensorflow, is pointer only (licence: NONE) · get_code("985d1d3378bbbe97")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from woodyx218/Deep-Learning-with-GDP-Tensorflow, and GitHub detected no licence in that repository 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.

compute_muU Ran
ran, violated the contract we drafted
UnchartedRLab/SSP/bayes_tuning.py
pointer only (licence: MIT); the stored copy get_code serves, from woodyx218/Deep-Learning-with-GDP-Tensorflow, is pointer only (licence: NONE) · get_code("b9512c1b0601c501")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from woodyx218/Deep-Learning-with-GDP-Tensorflow, and GitHub detected no licence in that repository 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.

conv1x1 Ran
ran; our contract draft was wrong, not the code
UnchartedRLab/SSP/scatsim/extract_total.py
code served (permissive licence) · get_code("d9def42110729a85")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Conv2d. 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
UnchartedRLab/SSP/scatsim/extract_total.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository 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.

delta_eps_mu Ran
ran, violated the contract we drafted
UnchartedRLab/SSP/bayes_tuning.py
pointer only (licence: MIT); the stored copy get_code serves, from woodyx218/Deep-Learning-with-GDP-Tensorflow, is pointer only (licence: NONE) · get_code("4714ee287d2fc5bc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from woodyx218/Deep-Learning-with-GDP-Tensorflow, and GitHub detected no licence in that repository 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.

get_feature_data Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/data.py
code served (permissive licence) · get_code("7b1be05f1f7e328f")
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 torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary npz file with the required structure
temp_dir = tempfile.mkdtemp()
feature_path = os.path.join(temp_dir, 'features')

# Create small dummy data
train_data = np.random.randn(4, 3).astype(np.float32)  # 4 samples, 3 features
train_labels = np.random.randint(0, 2, 4).astype(np.int64)
test_data = np.random.randn(2, 3).astype(np.float32)  # 2 samples, 3 features
test_labels = np.random.randint(0, 2, 2).astype(np.int64)

# Save to npz file
np.savez(
    f'{feature_path}.npz',
    train_data=train_data,
    train_label=train_labels,
    test_data=test_data,
    test_label=test_labels
)

ARGS = {
    'feature_path': feature_path,
    'batch_size': 2,
    'shu': True,
    'worker': 0,
    'pin': False
}
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 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
get_feature_data_imagenet Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/data.py
code served (permissive licence) · get_code("6d7851db06546df4")
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 torch
import os
import tempfile

# Create temporary directory for features
temp_dir = tempfile.mkdtemp()
features_dir = os.path.join(temp_dir, 'features')
os.makedirs(features_dir, exist_ok=True)

# Create mock ImageNet feature files
torch.manual_seed(0)
np.random.seed(0)

# Training data
x_train = np.random.randn(10, 4).astype(np.float32)
y_train = np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1], dtype=np.int64)
np.savez(os.path.join(features_dir, 'imagenet_train.npz'), 
         train_data=x_train, train_labels=y_train)

# Test data
x_test = np.random.randn(6, 4).astype(np.float32)
y_test = np.array([0, 1, 0, 1, 0, 1], dtype=np.int64)
np.savez(os.path.join(features_dir, 'imagenet_test.npz'), 
         test_data=x_test, test_labels=y_test)

# Patch np.load to use our temp directory
original_load = np.load
def patched_load(path, *args, **kwargs):
    if 'imagenet_train.npz' in path:
        return original_load(os.path.join(features_dir, 'imagenet_train.npz'), *args, **kwargs)
    elif 'imagenet_test.npz' in path:
        return original_load(os.path.join(features_dir, 'imagenet_test.npz'), *args, **kwargs)
    return original_load(path, *args, **kwargs)

np.load = patched_load

ARGS = {
    'feature_path': './features',
    'batch_size': 2,
    'shu': True,
    'worker': 0,
    'pin': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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 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
get_specified_params Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/log.py
code served (permissive licence) · get_code("29d353252c6013b3")
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 sys
import torch

# Mock sys.argv to simulate command-line arguments
# The function parses sys.argv[1:] looking for --key=value patterns
sys.argv = ['script.py', '--learning_rate=0.001', '--batch_size=32', '--epochs=10']

# Create a hyperparameters dict with the keys that will be queried
hparams = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10,
    'hidden_dim': 128,
    'dropout': 0.5
}

ARGS = {
    'hparams': hparams
}
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 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
make_hparam_str Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/log.py
code served (permissive licence) · get_code("f570544454b90d95")
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 str. 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)

# Analyze the function:
# - make_hparam_str takes `hparams` (a dict) and `exclude` (likely a list/set of keys to skip)
# - It iterates over sorted hparams items, formats each as 'key_value', and skips items where key is in exclude
# - Returns comma-joined string

hparams = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'num_layers': 3,
    'dropout': 0.5,
    'activation': 'relu'
}

exclude = {'dropout', 'activation'}

ARGS = {
    'hparams': hparams,
    'exclude': exclude
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
model_input Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/log.py
code served (permissive licence) · get_code("2b4ba03361a27d50")
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 Tensor, ndim 3, dtype family float, shape (1, 1, 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 torch
import numpy as np

torch.manual_seed(0)

class SimpleData:
    """Stand-in data object with a .data attribute"""
    def __init__(self):
        # Create a small numpy array as the first element
        self.data = np.array([[[1.0, 2.0, 3.0, 4.0]]], dtype=np.float32)

# Create instances
data_obj = SimpleData()
device = 'cpu'

ARGS = {
    'data': data_obj,
    'device': device
}
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 Tensor, ndim 3, dtype family float, shape (1, 1, 4) — shape (1, 1, 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
train_dfa Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/train_tools.py
code served (permissive licence) · get_code("42cbf7cf6c30a797")
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 torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F

torch.manual_seed(0)

# Build a minimal model that takes input and produces log probabilities
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)  # 4 input features, 3 output classes
    
    def forward(self, x):
        x = self.fc(x)
        return F.log_softmax(x, dim=1)

# Build a minimal alignment callable
class MinimalAlignment:
    def __call__(self, data, target, loss_fn):
        # Return angles (not used in function) and alignments dict
        angles = torch.tensor([0.0])
        alignments = {'metric': 0.5}
        return angles, alignments

# Create model and optimizer
model = MinimalModel()
optimizer = optim.SGD(model.parameters(), lr=0.01)

# Create tiny train loader with 2 batches
# Each batch has 2 samples with 4 features and targets in range [0, 2]
train_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,)))
]

# Create alignment function
alignment = MinimalAlignment()

# Device
device = 'cpu'

# Epoch number
epoch = 1

ARGS = {
    'model': model,
    'train_loader': train_loader,
    'optimizer': optimizer,
    'alignment': alignment,
    'device': device,
    'epoch': epoch
}
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 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
train_ohm Ran
ran on a synthesized input
UnchartedRLab/SSP/lib/train_tools.py
code served (permissive licence) · get_code("cc266e6cfd8eab7d")
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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a simple model
class SimpleModel(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel(input_dim=4, num_classes=3)

# Create a simple train loader (list of batches)
# Each batch is (images, targets) or (images, targets, labels)
train_loader = [
    (torch.randn(2, 4), torch.tensor([0, 1])),
    (torch.randn(2, 4), torch.tensor([2, 0])),
]

# Create an optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create a loss criterion
criterion = nn.CrossEntropyLoss()

# Set epoch number
epoch = 1

# Set device
device = 'cpu'

ARGS = {
    'model': model,
    'train_loader': train_loader,
    'optimizer': optimizer,
    'criterion': criterion,
    'epoch': epoch,
    'device': device
}
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 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
get_data Not yet run
unverified (harvested, no recorded run)
UnchartedRLab/SSP/lib/data.py
code served (permissive licence) · get_code("2cb94cd1f9eba3c7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 2 later) and 8 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
conv3x3 686 other papers
394 dated earlier, 3 the same month, 278 later, 11 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
192 dated earlier, 1 the same month, 226 later, 11 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
compute_muP 1 other paper
1 dated earlier
1911.11607 (2019-11)
Deep Learning with Gaussian Differential Privacy
compute_muU 1 other paper
1 dated earlier
1911.11607 (2019-11)
Deep Learning with Gaussian Differential Privacy
delta_eps_mu 1 other paper
1 dated earlier
1911.11607 (2019-11)
Deep Learning with Gaussian Differential Privacy

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We demonstrate self-supervised pretraining (SSP) is a scalable solution to deep learning with differential privacy (DP) regardless of the size of available public datasets in image classification. When facing the lack of public datasets, we show the features generated by SSP on only one single image enable a private classifier to obtain much better utility than the non-learned handcrafted features under the same privacy budget. When a moderate or large size public dataset is available, the features produced by SSP greatly outperform the features trained with labels on various complex private datasets under the same private budget. We also compared multiple DP-enabled training frameworks to train a private classifier on the features generated by SSP. Finally, we report a non-trivial utility 25.3\% of a private ImageNet-1K dataset when $ε=3$. Our source code can be found at \url{https://github.com/UnchartedRLab/SSP}.

For agents

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

get_harvested_code_for_paper("2206.07125")
get_code_for_paper("2206.07125")
have("2206.07125")

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

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

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

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

Connect an agent — have() is free.