SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.07381 · 2023

"Private Prediction Strikes Back!'' Private Kernelized Nearest Neighbors with Individual Renyi Filter

arXiv · PDF · Open in the Atlas

Code that ran

4 of 10 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, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 6 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/2306.07381.json · badge: /api/ran/2306.07381.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
jeremy43/ind_knn canonical (classifier label)
classifier basis: census
4 ran · 6 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
jeremy43/ind_knn/metrics.py
code served (permissive licence) · get_code("7c1e00dfd120ada1")
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 numpy as np

# Test case 1: logits with shape (batch_size, num_classes)
logits_2d = np.array([
    [0.1, 0.9, 0.0],
    [0.8, 0.1, 0.1]
])
labels_2d = np.array([1, 0])

# Test case 2: predicted labels (1D array)
logits_1d = np.array([1, 0])
labels_1d = np.array([1, 0])

# Use the 2D case (more typical)
ARGS = {
    "logits": logits_2d,
    "labels": labels_2d
}
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 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
collate_fn Ran
ran; our contract draft was wrong, not the code
jeremy43/ind_knn/create_vit_feauture.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from rock-z/instilling-inductiva-bias, is pointer only (licence: NONE) · get_code("437d2d938ea34c0c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from rock-z/instilling-inductiva-bias, 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.

hamming_accuracy Ran
ran on a synthesized input
jeremy43/ind_knn/metrics.py
code served (permissive licence) · get_code("cca4c16a09d03afa")
How it ran

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

import numpy as np

# Construct valid arguments for hamming_accuracy
# The function expects two numpy arrays of the same shape
# It computes per-sample accuracy (fraction of matching elements)
# and returns the mean across all samples

np.random.seed(0)

# Create y_pred: predictions with shape (batch_size, seq_length)
# Using batch_size=2, seq_length=4
y_pred = np.array([
    [0, 1, 0, 1],
    [1, 1, 0, 0]
])

# Create y_true: ground truth with same shape
y_true = np.array([
    [0, 1, 1, 1],
    [1, 0, 0, 0]
])

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
inceptionv4 Ran
ran on a synthesized input
jeremy43/ind_knn/models/InceptionV4.py
code served (permissive licence) · get_code("539d62387cac2128")
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 InceptionV4. 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)

# Build the inceptionv4 function signature by analyzing the code structure
# The function appears to construct an InceptionV4 model with optional pretrained weights

class InceptionV4(nn.Module):
    def __init__(self, num_classes=1000, pretrained=False):
        super(InceptionV4, self).__init__()
        self.num_classes = num_classes
        
        # Minimal stem
        self.conv1 = nn.Conv2d(3, 32, kernel_size=3, stride=2, padding=1)
        self.conv2 = nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1)
        
        # Average pooling for global features
        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(64, num_classes)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.avgpool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

def inceptionv4(num_classes=1000, pretrained=False):
    """
    Constructs an InceptionV4 model.
    
    Args:
        num_classes (int): Number of output classes. Default: 1000
        pretrained (bool): If True, returns a model pre-trained on ImageNet
    
    Returns:
        model: InceptionV4 model instance
    """
    model = InceptionV4(num_classes=num_classes, pretrained=pretrained)
    if pretrained:
        settings = pretrained_settings['inceptionv4']['imagenet']
        # Simulate pretrained loading (but don't actually download)
        pass
    return model

# Create minimal test data
x = torch.randn(2, 3, 299, 299)

ARGS = {
    'num_classes': 1000,
    'pretrained': False
}
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 InceptionV4 — a InceptionV4 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a InceptionV4 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
dpn68 Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/models/DPN.py
code served (permissive licence) · get_code("d3c51a3388ab8f59")
How it ran

no invocation recorded.

dpn68b Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/models/DPN.py
code served (permissive licence) · get_code("5df46107e776cb93")
How it ran

no invocation recorded.

dpn92 Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/models/DPN.py
code served (permissive licence) · get_code("bea8ff0b9ac93d39")
How it ran

no invocation recorded.

inceptionresnetv2 Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/models/InceptionResNetV2.py
code served (permissive licence) · get_code("7ce343155350faa6")
How it ran

no invocation recorded.

predFeature Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/network.py
code served (permissive licence) · get_code("dbfda2c3ad0999f9")
How it ran

no invocation recorded.

train_transforms Not yet run
unverified (harvested, no recorded run)
jeremy43/ind_knn/create_vit_feauture.py
code served (permissive licence) · get_code("35689ad155993ecd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 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
inceptionresnetv2 4 other papers
3 dated earlier, 1 later
1905.00953 (2019-05)
Omni-Scale Feature Learning for Person Re-Identification
1910.06180 (2019-10)
KonIQ-10k: An ecologically valid database for deep learning of blind image quality assessment
2010.05435 (2020-10)
Top-DB-Net: Top DropBlock for Activation Enhancement in Person Re-Identification
and 1 more not named here
collate_fn 1 other paper
1 later
2310.10899 (2023-10)
Instilling Inductive Biases with Subnetworks

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

Most existing approaches of differentially private (DP) machine learning focus on private training. Despite its many advantages, private training lacks the flexibility in adapting to incremental changes to the training dataset such as deletion requests from exercising GDPR's right to be forgotten. We revisit a long-forgotten alternative, known as private prediction, and propose a new algorithm named Individual Kernelized Nearest Neighbor (Ind-KNN). Ind-KNN is easily updatable over dataset changes and it allows precise control of the Rényi DP at an individual user level -- a user's privacy loss is measured by the exact amount of her contribution to predictions; and a user is removed if her prescribed privacy budget runs out. Our results show that Ind-KNN consistently improves the accuracy over existing private prediction methods for a wide range of $ε$ on four vision and language tasks. We also illustrate several cases under which Ind-KNN is preferable over private training with NoisySGD.

For agents

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

get_harvested_code_for_paper("2306.07381")
get_code_for_paper("2306.07381")
have("2306.07381")

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

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

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

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

Connect an agent — have() is free.