SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.01190 · 2023

On the Efficacy of Differentially Private Few-shot Image Classification

arXiv · PDF · Open in the Atlas

Code that ran

15 of 16 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 12 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2302.01190.json · badge: /api/ran/2302.01190.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
cambridge-mlg/dp-few-shot canonical (classifier label)
classifier basis not recorded on the link
15 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_accuracy Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/utils.py
code served (permissive licence) · get_code("335818a6c090235f")
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 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

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
num_classes = 4

# logits: shape (batch_size, num_classes)
logits = torch.randn(batch_size, num_classes)

# labels: shape (batch_size,) with class indices
labels = torch.tensor([0, 2])

ARGS = {
    "logits": logits,
    "labels": labels,
}
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 Tensor, 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
compute_score_lira Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/lira.py
code served (permissive licence) · get_code("d5709341a0e1b79a")
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 (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 scipy.stats

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

# Create small example data
# stat_target: array of k scalars (k=3 augmentations)
stat_target = np.array([0.5, 0.6, 0.7])

# stat_in: list where each element is m by k (m=2 shadow models, k=3 augmentations)
stat_in = [
    np.random.randn(2, 3),
    np.random.randn(2, 3),
]

# stat_out: list where each element is m by k (m=2 shadow models, k=3 augmentations)
stat_out = [
    np.random.randn(2, 3),
    np.random.randn(2, 3),
]

# Add some NaN values to test the replace_nan_with_column_mean functionality
stat_in[0][0, 1] = np.nan
stat_out[1][1, 0] = np.nan

ARGS = {
    'stat_target': stat_target,
    'stat_in': stat_in,
    'stat_out': stat_out,
    'option': 'both',
    'fix_variance': False,
    'median_or_mean': 'median',
    'return_in_dist': False,
}
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 (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
conv1x1 Ran
ran; our contract draft was wrong, not the code
cambridge-mlg/dp-few-shot/src/bit_resnet.py
code served (permissive licence) · get_code("ee80cf467065076b")
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 StdConv2d. 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)

ARGS = {
    'cin': 3,
    'cout': 16,
    'stride': 1,
    'bias': False,
}
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 StdConv2d — a StdConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StdConv2d 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
conv1x1 Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/ml-flair/flair_model.py
code served (permissive licence) · get_code("3e15ee986e0e840a")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 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 tensorflow as tf
import numpy as np

# Create a small input tensor
# Shape: (batch_size=2, height=4, width=4, channels=3)
x = tf.constant(np.random.randn(2, 4, 4, 3).astype(np.float32))

# Define all required parameters
ARGS = {
    'x': x,
    'scope': 'conv_layer',
    'out_planes': 16,
    'stride': 1,
    'seed': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 16) — shape (2, 4, 4, 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
cambridge-mlg/dp-few-shot/src/bit_resnet.py
code served (permissive licence) · get_code("f01b8d3901f0b289")
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 StdConv2d. 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)

ARGS = {
    'cin': 3,
    'cout': 16,
    'stride': 1,
    'groups': 1,
    'bias': False,
}
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 StdConv2d — a StdConv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StdConv2d 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 on a synthesized input
cambridge-mlg/dp-few-shot/ml-flair/flair_model.py
code served (permissive licence) · get_code("9ccdf59f83eb0db1")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 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 tensorflow as tf
import numpy as np

# Create a small input tensor (batch=2, height=4, width=4, channels=3)
input_tensor = tf.random.normal((2, 4, 4, 3))

ARGS = {
    'x': input_tensor,
    'scope': 'test_conv',
    'out_planes': 16,
    'stride': 1,
    'groups': 1,
    'dilation': 1,
    'seed': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 4, 16) — shape (2, 4, 4, 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
convert_logit_to_prob Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/lira.py
code served (permissive licence) · get_code("a9a48b3a8185da17")
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 (2, 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 logit array with n=2 samples and c=4 classes
logit = np.array([
    [1.0, 2.0, 0.5, 1.5],
    [0.1, 0.2, 0.3, 0.4]
], dtype=np.float64)

ARGS = {
    "logit": logit
}
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 2, dtype family float, shape (2, 4) — shape (2, 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_job_name Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/experiment_management/deploy_few_shot_universial_script.py
code served (permissive licence) · get_code("579d94114e5fc672")
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

class Args:
    def __init__(self):
        self.dataset = 'cifar10'
        self.learnable_params = 'film'
        self.examples_per_class = 100
        self.target_epsilon = 1.5
        self.seed = 42
        self.feature_extractor = 'resnet18'
        self.optimizer = 'adam'

ARGS = {'args': Args()}
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
cross_entropy_loss Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/utils.py
code served (permissive licence) · get_code("a521b8c61c81ecdd")
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 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.functional as F

torch.manual_seed(0)

# Create small tensors for cross_entropy_loss
# logits: shape (batch_size, num_classes) - raw model outputs
# labels: shape (batch_size,) - class indices

batch_size = 2
num_classes = 4

logits = torch.randn(batch_size, num_classes)
labels = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "logits": logits,
    "labels": labels,
}
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 Tensor, 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
get_film_parameters Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/film.py
code served (permissive licence) · get_code("10e24f830382cdf6")
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. 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)

class SimpleFeatureExtractor(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.bn = nn.BatchNorm1d(2)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.bn(x)
        return x

feature_extractor = SimpleFeatureExtractor()

film_parameter_names = [
    "layer1.weight",
    "layer1.bias",
    "bn.weight"
]

ARGS = {
    "film_parameter_names": film_parameter_names,
    "feature_extractor": feature_extractor
}
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 list — a list 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
get_full_parameter_names Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/film.py
code served (permissive licence) · get_code("57a78e1e2e3d70d2")
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 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

torch.manual_seed(0)

# Create a simple model with named parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.attention_head = nn.Linear(2, 1)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.attention_head(x)
        return x

model = SimpleModel()

# Create short parameter names to search for
short_parameter_names = ["layer1", "attention"]

ARGS = {
    "model": model,
    "short_parameter_names": short_parameter_names
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
log_loss Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/lira.py
code served (permissive licence) · get_code("0e4e4401e5d8b0fe")
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

# Test case 1: Binary classification (1D predictions)
labels_binary = np.array([0, 1, 1, 0], dtype=np.int32)
pred_binary = np.array([0.2, 0.8, 0.9, 0.1], dtype=np.float32)
sample_weight_binary = np.array([1.0, 1.0, 2.0, 1.0], dtype=np.float32)

# Test case 2: Multiclass classification (2D predictions)
labels_multiclass = np.array([0, 1, 2, 1], dtype=np.int32)
pred_multiclass = np.array([
    [0.7, 0.2, 0.1],
    [0.1, 0.8, 0.1],
    [0.2, 0.1, 0.7],
    [0.3, 0.6, 0.1]
], dtype=np.float32)

ARGS = {
    "labels": labels_binary,
    "pred": pred_binary,
    "sample_weight": sample_weight_binary,
    "from_logits": False,
    "small_value": 1e-08
}
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
parse_job_time Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/experiment_management/deploy_few_shot_universial_script.py
code served (permissive licence) · get_code("d3206fa419093bb3")
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
from types import SimpleNamespace

# The function parse_job_time expects an args object with a job_maximum_hours attribute
# It accesses args.job_maximum_hours twice: once for comparison and once for arithmetic
# The value must be > 0 (checked in the if statement)
# It uses int() conversion and modulo operator (%), so it should be a number

args = SimpleNamespace(
    job_maximum_hours=2.5
)

ARGS = {'args': args}
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
predict_by_max_logit Ran
ran on a synthesized input
cambridge-mlg/dp-few-shot/src/utils.py
code served (permissive licence) · get_code("dcadab8653f1f53a")
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 1, dtype family int, 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 torch

torch.manual_seed(0)

# Create a small batch of logits
# Shape: (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits
}
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 Tensor, ndim 1, dtype family int, 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
tf2th Ran
ran, violated the contract we drafted
cambridge-mlg/dp-few-shot/src/bit_resnet.py
code served (permissive licence) · get_code("7023eb86801bb3a3")
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 4, dtype family float, shape (6, 5, 3, 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)

# Create a 4D numpy array in HWIO format (Height, Width, Input channels, Output channels)
# Using distinct dimensions: H=3, W=4, I=5, O=6
conv_weights = np.random.randn(3, 4, 5, 6).astype(np.float32)

ARGS = {
    "conv_weights": conv_weights
}
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 4, dtype family float, shape (6, 5, 3, 4) — shape (6, 5, 3, 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
get_run_option_string Not yet run
unverified (harvested, no recorded run)
cambridge-mlg/dp-few-shot/experiment_management/deploy_few_shot_universial_script.py
code served (permissive licence) · get_code("72f35b8f0306e837")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 11 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
conv1x1 33 other papers
23 dated earlier, 9 later, 1 same year, order not determinable · 3 only as an assembly brick
1912.11370 (2019-12)
Big Transfer (BiT): General Visual Representation Learning
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
and 30 more not named here
conv3x3 33 other papers
23 dated earlier, 9 later, 1 same year, order not determinable · 3 only as an assembly brick
1912.11370 (2019-12)
Big Transfer (BiT): General Visual Representation Learning
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
and 30 more not named here
tf2th 17 other papers
11 dated earlier, 5 later, 1 same year, order not determinable
1912.11370 (2019-12)
Big Transfer (BiT): General Visual Representation Learning
2104.02610 (2021-04)
On the Robustness of Vision Transformers to Adversarial Examples
2106.01127 (2021-06)
Towards Robust Classification Model by Counterfactual and Invariant Data Generation
and 14 more not named here
compute_accuracy 1 other paper
1 dated earlier
2107.01105 (2021-07)
Memory Efficient Meta-Learning with Large Images
cross_entropy_loss 1 other paper
1 dated earlier
2107.01105 (2021-07)
Memory Efficient Meta-Learning with Large Images

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

There has been significant recent progress in training differentially private (DP) models which achieve accuracy that approaches the best non-private models. These DP models are typically pretrained on large public datasets and then fine-tuned on private downstream datasets that are relatively large and similar in distribution to the pretraining data. However, in many applications including personalization and federated learning, it is crucial to perform well (i) in the few-shot setting, as obtaining large amounts of labeled data may be problematic; and (ii) on datasets from a wide variety of domains for use in various specialist settings. To understand under which conditions few-shot DP can be effective, we perform an exhaustive set of experiments that reveals how the accuracy and vulnerability to attack of few-shot DP image classification models are affected as the number of shots per class, privacy level, model architecture, downstream dataset, and subset of learnable parameters in the model vary. We show that to achieve DP accuracy on par with non-private models, the shots per class must be increased as the privacy level increases. We also show that learning parameter-efficient FiLM adapters under DP is competitive with learning just the final classifier layer or learning all of the network parameters. Finally, we evaluate DP federated learning systems and establish state-of-the-art performance on the challenging FLAIR benchmark.

For agents

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

get_harvested_code_for_paper("2302.01190")
get_code_for_paper("2302.01190")
have("2302.01190")

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

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

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

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

Connect an agent — have() is free.