SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.16111 · 2023

Locally Differentially Private Document Generation Using Zero Shot Prompting

arXiv · PDF · Open in the Atlas

Code that ran

14 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 9 failures of our instrument; 8 no recorded run), measured 2026-11-21; 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/2310.16111.json · badge: /api/ran/2310.16111.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
saitejautpala/dp_prompt canonical (classifier label)
classifier basis: census
14 ran · 8 no recorded run
FunctionStatusWhere it lives
build_idx_to_n_dict Ran
ran, honoured the contract we drafted
saitejautpala/dp_prompt/mechanisms/documentlevel/paraphrase_generation_data_utils.py
code served (permissive licence) · get_code("da4a1d96cbd0b5d6")
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 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 tempfile
import os
from pathlib import Path

# Create a temporary directory with test files
temp_dir = tempfile.mkdtemp()
root_dir = Path(temp_dir)

# Create some test files matching the pattern 'idx=(\\d+)_n=(\\d+).txt'
test_files = [
    'idx=0_n=5.txt',
    'idx=0_n=10.txt',
    'idx=1_n=5.txt',
    'idx=2_n=7.txt',
    'idx=4_n=3.txt',
]

for file_name in test_files:
    file_path = root_dir / file_name
    file_path.write_text('test content')

# Define arguments
ARGS = {
    'root_dir': root_dir,
    'n_find': 5,
    'N': 6,
}
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 1, 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
compute_metrics Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/attacks/text_attacker_architecture.py
code served (permissive licence) · get_code("9cd82bb0714b58e3")
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
from sklearn import metrics

def compute_metrics(eval_pred):
    logits, labels = eval_pred
    predictions = np.argmax(logits, axis=-1)
    acc = metrics.accuracy_score(labels, predictions)
    f1 = metrics.f1_score(labels, predictions, average='macro')
    mcc = metrics.matthews_corrcoef(labels, predictions)
    stats = {'Accuracy': acc, 'F1 Score': f1, 'Mathew correleation coefficient': mcc}
    return stats

# Create sample data for eval_pred
batch_size = 2
num_classes = 3

# Create logits (2 samples, 3 classes)
logits = np.random.randn(batch_size, num_classes).astype(np.float32)

# Create labels (2 samples with class indices from 0 to 2)
labels = np.array([0, 2], dtype=np.int64)

# Create eval_pred as a tuple
eval_pred = (logits, labels)

ARGS = {
    'eval_pred': eval_pred
}
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 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
generate Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/documentlevel/openai_paraphrase_generation.py
code served (permissive licence) · get_code("4b5ebeb9c7fe2859")
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 APIRemovedInV1. 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

# Mock the openai module since it requires API credentials
class MockChatCompletion:
    @staticmethod
    def create(model, messages, temperature):
        # Return a mock response object
        return {
            'choices': [{'message': {'content': 'This is a paraphrased review.'}}],
            'model': model,
            'temperature': temperature
        }

class MockOpenAI:
    ChatCompletion = MockChatCompletion()

import sys
from unittest.mock import MagicMock
sys.modules['openai'] = MockOpenAI()

# Now define the arguments for the generate function
review = "This product is amazing and works great!"
temperature = 0.7

ARGS = {
    'review': review,
    'temperature': temperature
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type APIRemovedInV1 — a APIRemovedInV1 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a APIRemovedInV1 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
get_clipping_boundaries Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/sentencelevel/truncated_laplace.py
code served (permissive licence) · get_code("4718ef9387d6bbac")
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 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

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

# Create a small numpy array of deep candidate embeddings
# Shape: (10, 4) - 10 candidates, 4 dimensions each
deep_candidates = np.random.randn(10, 4).astype(np.float32)

# Create ARGS dict with all parameters
ARGS = {
    "deep_candidates": deep_candidates,
    "thresh_pct": 0.75,
}
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 2, 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_save_path Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/documentlevel/paraphrase_generation_data_utils.py
code served (permissive licence) · get_code("bf23d78423539474")
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 PosixPath. 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
from pathlib import Path

torch.manual_seed(0)

# Create a minimal AutoModel stand-in
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal AutoTokenizer stand-in
class MinimalTokenizer:
    def __init__(self, name_or_path):
        self.name_or_path = name_or_path

# Instantiate the model and tokenizer
model = MinimalModel()
tokenizer = MinimalTokenizer("bert-base-uncased")

# Build ARGS dictionary
ARGS = {
    "model": model,
    "tokenizer": tokenizer,
    "temperature": 0,
    "dataset_file_name": "train_wikitext_test.csv"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
multivariate_laplace Ran
ran, honoured the contract we drafted
saitejautpala/dp_prompt/mechanisms/wordlevel/madlib.py
code served (permissive licence) · get_code("ab1e036af7138a3a")
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

ARGS = {
    "dimension": 5,
    "epsilon": 0.1,
}
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
multivariate_mahalanobis_sample Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/wordlevel/mahalanobis.py
code served (permissive licence) · get_code("2e7db695e1d4a39c")
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

np.random.seed(42)

# Set up arguments for multivariate_mahalanobis_sample
dimension = 4
epsilon = 0.1

# Create a small covariance matrix and compute its square root
# Using a simple positive definite matrix
cov_matrix = np.array([
    [2.0, 0.5, 0.1, 0.0],
    [0.5, 1.5, 0.2, 0.1],
    [0.1, 0.2, 1.0, 0.0],
    [0.0, 0.1, 0.0, 0.8]
])

# Compute square root of covariance matrix using eigendecomposition
eigenvalues, eigenvectors = np.linalg.eigh(cov_matrix)
reg_cov_sq_root = eigenvectors @ np.diag(np.sqrt(np.maximum(eigenvalues, 1e-6))) @ eigenvectors.T

ARGS = {
    "reg_cov_sq_root": reg_cov_sq_root,
    "dimension": dimension,
    "epsilon": epsilon
}
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
prompt_template_fn Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/documentlevel/openai_paraphrase_generation.py
code served (permissive licence) · get_code("3eac08badfb8dd5d")
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

torch.manual_seed(0)

ARGS = {
    'review': 'This product is absolutely amazing and works great!'
}
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 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
radius_neighbors Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/wordlevel/tem.py
code served (permissive licence) · get_code("273fbd3b2860c533")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Create tiny tensors for testing
# vectors: a set of vectors to search within (batch_size=5, dim=4)
vectors = torch.randn(5, 4)

# vector: the target vector (dim=4)
vector = torch.randn(4)

# radius: search radius as a float
radius = 2.0

ARGS = {
    "vectors": vectors,
    "vector": vector,
    "radius": radius,
}
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 2, 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
run_eval Ran
ran on a synthesized input
saitejautpala/dp_prompt/attacks/text_attacker_architecture.py
code served (permissive licence) · get_code("cb16209dce94db5f")
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
from torch.utils.data import Dataset

torch.manual_seed(0)

class DummyDataset(Dataset):
    def __init__(self, size=2):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return {
            'input_ids': torch.randint(0, 100, (4,)),
            'labels': torch.randint(0, 2, (1,))
        }

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, input_ids, labels=None):
        logits = self.linear(input_ids.float())
        if labels is not None:
            loss = nn.functional.cross_entropy(logits, labels.squeeze())
            return {'loss': loss, 'logits': logits}
        return {'logits': logits}

class DummyTrainer:
    def __init__(self, model=None):
        self.model = model or DummyModel()
    
    def evaluate(self, eval_dataset=None):
        return {
            'eval_loss': 0.5,
            'eval_accuracy': 0.85,
            'eval_samples': len(eval_dataset) if eval_dataset else 0
        }

test_dataset = DummyDataset(size=2)
trainer = DummyTrainer(model=DummyModel())

ARGS = {
    'trainer': trainer,
    'test_dataset': test_dataset
}
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
save_strings_to_files Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/mechanisms/documentlevel/paraphrase_generation_data_utils.py
code served (permissive licence) · get_code("423e7a192563b20b")
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 os
import tempfile
from pathlib import Path

# Create a temporary directory for file operations
temp_dir = tempfile.mkdtemp()
root_dir = Path(temp_dir)

# Create valid arguments for the function
number_list = [1, 2, 3]
string_list = ["Hello World", "Test Content", "Another String"]

ARGS = {
    "number_list": number_list,
    "string_list": string_list,
    "root_dir": root_dir,
}
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 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
split_into_sentences Ran
ran; our contract draft was wrong, not the code
saitejautpala/dp_prompt/attacks/embedding_attacker_architecture.py
code served (permissive licence) · get_code("56d503b9d0430bed")
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.

from nltk.tokenize import sent_tokenize
from typing import List

# Construct a sample document string
sample_doc = """This is the first sentence. This is the second sentence! 
Here is a third one? And finally, a fourth sentence."""

# Define ARGS dictionary with the required parameter
ARGS = {
    "doc": sample_doc
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — 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
train_step Ran
ran, honoured the contract we drafted
saitejautpala/dp_prompt/attacks/embedding_attacker_architecture.py
code served (permissive licence) · get_code("480709d96ec54bf8")
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 float, 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
import torch.optim as optim

torch.manual_seed(0)

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

# Create model instance
model = SimpleModel()

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

# Create loss criterion
criterion = nn.CrossEntropyLoss()

# Create a simple dataloader as a list of (features, labels) tuples
# Batch size 2, feature dimension 4, 3 classes
train_dataloader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

ARGS = {
    "model": model,
    "optimizer": optimizer,
    "criterion": criterion,
    "train_dataloader": train_dataloader,
}
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 float, 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
train_step Ran
ran, honoured the contract we drafted
saitejautpala/dp_prompt/mechanisms/sentencelevel/deep_candidate.py
code served (permissive licence) · get_code("6dd4947c1a74cf75")
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 float, 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
import torch.optim as optim

torch.manual_seed(0)

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

# Create model instance
model = SimpleModel()

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

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

# Create a small train dataloader as a list of (features, label) tuples
train_dataloader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

ARGS = {
    "model": model,
    "optimizer": optimizer,
    "criterion": criterion,
    "train_dataloader": train_dataloader,
}
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 float, 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
attack Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/attacks/text_attack.py
code served (permissive licence) · get_code("badaa3f953333d88")
How it ran

no invocation recorded.

generate_df Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/mechanisms/documentlevel/openai_paraphrase_generation.py
code served (permissive licence) · get_code("2f08a06ea4a774e9")
How it ran

no invocation recorded.

get_text_attack_stats Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/attacks/text_attack.py
code served (permissive licence) · get_code("982fb5af87c4fc90")
How it ran

no invocation recorded.

preprocess_df Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/attacks/embedding_attacker_architecture.py
code served (permissive licence) · get_code("8cf7ca578c3d0196")
How it ran

no invocation recorded.

preprocess_df Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/mechanisms/sentencelevel/deep_candidate.py
code served (permissive licence) · get_code("e320b1070a6a8f5f")
How it ran

no invocation recorded.

preprocess_df Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/mechanisms/sentencelevel/truncated_laplace.py
code served (permissive licence) · get_code("2c51d5e1a22d4e0f")
How it ran

no invocation recorded.

split_into_sentences Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/mechanisms/sentencelevel/deep_candidate.py
code served (permissive licence) · get_code("cf8124a7098de674")
How it ran

no invocation recorded.

split_into_sentences Not yet run
unverified (harvested, no recorded run)
saitejautpala/dp_prompt/mechanisms/sentencelevel/truncated_laplace.py
code served (permissive licence) · get_code("245e7444d9ed2ce3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 17 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 2 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
attack 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
build_idx_to_n_dict 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
compute_metrics 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
generate 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
generate_df 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
get_clipping_boundaries 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
get_save_path 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
get_text_attack_stats 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
multivariate_laplace 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
multivariate_mahalanobis_sample 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
preprocess_df 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
prompt_template_fn 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
radius_neighbors 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
run_eval 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
save_strings_to_files 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
split_into_sentences 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting
train_step 1 other paper
1 same year, order not determinable
2023.findings-emnlp.566 (2023 (year only))
Locally Differentially Private Document Generation Using Zero Shot Prompting

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-21.

Repositories linked to this paper

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

Abstract

Numerous studies have highlighted the privacy risks associated with pretrained large language models. In contrast, our research offers a unique perspective by demonstrating that pretrained large language models can effectively contribute to privacy preservation. We propose a locally differentially private mechanism called DP-Prompt, which leverages the power of pretrained large language models and zero-shot prompting to counter author de-anonymization attacks while minimizing the impact on downstream utility. When DP-Prompt is used with a powerful language model like ChatGPT (gpt-3.5), we observe a notable reduction in the success rate of de-anonymization attacks, showing that it surpasses existing approaches by a considerable margin despite its simpler design. For instance, in the case of the IMDB dataset, DP-Prompt (with ChatGPT) perfectly recovers the clean sentiment F1 score while achieving a 46\% reduction in author identification F1 score against static attackers and a 26\% reduction against adaptive attackers. We conduct extensive experiments across six open-source large language models, ranging up to 7 billion parameters, to analyze various effects of the privacy-utility tradeoff.

For agents

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

get_harvested_code_for_paper("2310.16111")
get_code_for_paper("2310.16111")
have("2310.16111")

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

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

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

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

Connect an agent — have() is free.