SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.05042 · 2021

Hermite Polynomial Features for Private Data Generation

arXiv · PDF · Open in the Atlas

Code that ran

21 of 25 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 21 have no contract verdict; 0 failures of our instrument; 4 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/2106.05042.json · badge: /api/ran/2106.05042.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
parklabml/dp-hp canonical (classifier label)
classifier basis: census
21 ran · 4 no recorded run
FunctionStatusWhere it lives
RFF_Gauss Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/error_comaprison_multiple_runs.py
code served (permissive licence) · get_code("7d085538ecf498bd")
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 2, dtype family float, shape (2, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - n_features: int, used in division and torch.Tensor([n_features])
# - X: tensor, used in torch.mm(X, torch.t(W)) - so X should be 2D
# - W: array-like, converted to torch.Tensor and transposed
# The function performs: XWT = X @ W^T, then computes cos and sin
# X shape should be (batch, input_dim) and W shape should be (n_features, input_dim)
# Result Z has shape (batch, 2*n_features)

n_features = 5
batch_size = 2
input_dim = 4

# X should be (batch_size, input_dim) for matrix multiplication with W^T
X = torch.randn(batch_size, input_dim)

# W should be (n_features, input_dim) so that W^T is (input_dim, n_features)
# Then X @ W^T gives (batch_size, n_features)
W = np.random.randn(n_features, input_dim)

ARGS = {
    "n_features": n_features,
    "X": X,
    "W": W
}
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 2, dtype family float, shape (2, 10) — shape (2, 10) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
binarize_data Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/binarize_adult.py
code served (permissive licence) · get_code("092d22b034889b21")
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. 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 collections import OrderedDict

# Construct a simple numeric array with distinct min/max values
# Shape: (n_samples=5, n_features=3) to test the function
np.random.seed(0)
data = np.array([
    [1, 10, 100],
    [2, 20, 110],
    [3, 30, 120],
    [4, 40, 130],
    [5, 50, 140]
], dtype=np.int32)

ARGS = {
    "data": data
}
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 — a tuple 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
binarize_feature Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/binarize_adult.py
code served (permissive licence) · get_code("4ef29f19dc6bfc04")
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. 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

# The function takes a single parameter: feature
# Looking at the function body:
# - feature must be a numpy array (np.min, np.max, shape indexing)
# - feature must support integer division (//) and modulo (%)
# - feature should have values where f_min != f_max
# - feature.shape[0] is used for the first dimension

# Create a simple feature array with distinct integer values
# Using values 10-20 to ensure f_min != f_max and support binary operations
feature = np.array([10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], dtype=np.int32)

ARGS = {
    "feature": feature
}
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 — a tuple 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
compute_phi_tab_coord Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/all_aux_files_tab_data.py
code served (permissive licence) · get_code("14fc7a1dff4b56d0")
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 (2, 4, 3) 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)

# Define small tensors for testing
n_data = 2
input_dim = 4
n_degrees = 3

x_in = torch.randn(n_data, input_dim, dtype=torch.float32)
rho = np.array([0.3, 0.5, 0.7, 0.2])
device = 'cpu'

ARGS = {
    'x_in': x_in,
    'n_degrees': n_degrees,
    'rho': rho,
    '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 (2, 4, 3) — shape (2, 4, 3) 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
denormalize Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/aux.py
code served (permissive licence) · get_code("9d24c6690a4970ba")
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

# The function takes a single parameter: mnist_mat
# It expects a numpy array (or array-like) that will be multiplied by mnist_sdev,
# added to mnist_mean, and clipped to [0.0, 1.0]

# Create a small normalized MNIST-like matrix
# Use values typically in range [-2, 2] (normalized range for MNIST)
mnist_mat = np.array([
    [-0.5, 0.0, 0.5, 1.0],
    [1.5, -1.0, 0.2, -0.3]
])

ARGS = {
    "mnist_mat": mnist_mat
}
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
discretize_mat Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/marginals_eval.py
code served (permissive licence) · get_code("e4e30ffd1e62cf7a")
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 matrix with 4 features and 2 samples
mat = np.array([
    [1.4, 2.6, 3.1, 4.9],
    [5.2, 6.8, 7.3, 8.1]
], dtype=np.float32)

# Create a domain specification: bounds for each feature
# domain has shape (n_features, 2) where each row is [min, max]
domain = np.array([
    [1.0, 5.0],   # feature 0: min=1.0, max=5.0
    [2.0, 7.0],   # feature 1: min=2.0, max=7.0
    [3.0, 8.0],   # feature 2: min=3.0, max=8.0
    [4.0, 9.0]    # feature 3: min=4.0, max=9.0
], dtype=np.float32)

ARGS = {
    "mat": mat,
    "domain": domain
}
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
expand_vector Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/aux.py
code served (permissive licence) · get_code("f0bf493b7e17abed")
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 (2, 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

torch.manual_seed(0)

# Create a vector v with batch size 2 and dimension 4
v = torch.randn(2, 4)

# Create a target vector with 3 dimensions (batch, height, width)
# Using distinct sizes: 2, 3, 5
tgt_vec = torch.randn(2, 3, 5)

ARGS = {
    "v": v,
    "tgt_vec": tgt_vec,
}
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 4, dtype family float, shape (2, 1, 1, 4) — shape (2, 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
find_order Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/all_aux_files.py
code served (permissive licence) · get_code("d8e6270fa2b551af")
How it ran

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

import numpy as np

ARGS = {
    "rho": 0.5,
    "eigen_val_threshold": 1e-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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_rho Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/all_aux_files.py
code served (permissive licence) · get_code("92da6de3eaafec00")
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

# Analyze the function:
# - sigma2: used in division (1 / (2.0 * sigma2)), so needs to be a float or scalar
# - kernel_separate: used in if condition, so needs to be a boolean

# Case 1: scalar sigma2 with kernel_separate=False
# This will compute rho as a scalar and check if rho < 1, rho > 1, etc.

sigma2_scalar = 0.5
kernel_separate_false = False

ARGS = {
    "sigma2": sigma2_scalar,
    "kernel_separate": kernel_separate_false
}
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
find_rho_tab Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/all_aux_files_tab_data.py
code served (permissive licence) · get_code("c5e9560f6b1d57cc")
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

ARGS = {
    "sigma2": np.array([0.5, 1.0, 2.0, 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 (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
get_constants Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/mmd_approx_eigen.py
code served (permissive licence) · get_code("7d37efa649c2a920")
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 constants. 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 collections import namedtuple

constants_tuple_def = namedtuple('constants', ['a', 'b', 'c', 'big_a', 'big_b'])

def get_constants(px_sigma=None, kernel_l=None, a=None, b=None):
    assert px_sigma is not None and kernel_l is not None or (a is not None and b is not None)
    if a is None and b is None:
        a = 1 / (4 * px_sigma ** 2)
        b = 1 / (2 * kernel_l ** 2)
    c = np.sqrt(a ** 2 + 2 * a * b)
    big_a = a + b + c
    big_b = b / big_a
    print(f'c_tup: a={a}, b={b}, c={c}, A={big_a}, B={big_b}')
    return constants_tuple_def(a=a, b=b, c=c, big_a=big_a, big_b=big_b)

ARGS = {
    'px_sigma': 0.5,
    'kernel_l': 2.0,
    'a': None,
    'b': None,
}
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 constants — a constants output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a constants output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_domain Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/marginals_eval.py
code served (permissive licence) · get_code("5a74baea61336356")
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 (4, 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

# Create a small matrix with distinct dimensions (batch=2, features=4)
mat = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
])

ARGS = {
    "mat": mat
}
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 (4, 2) — shape (4, 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
get_svhn_dataloaders Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/aux.py
code served (permissive licence) · get_code("8df76b25bf288d28")
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 os
import torch as pt
from torchvision import datasets, transforms
from unittest.mock import Mock, MagicMock
import tempfile

pt.manual_seed(0)

# Create a temporary directory for data_dir
temp_dir = tempfile.mkdtemp()

# Create a minimal mock SVHN dataset
class MockSVHNDataset:
    def __init__(self, root, split='train', download=False, transform=None):
        self.root = root
        self.split = split
        self.download = download
        self.transform = transform
        self.data = pt.randn(10, 3, 32, 32)
        self.labels = pt.randint(0, 10, (10,))
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        img = self.data[idx]
        label = self.labels[idx].item()
        if self.transform:
            img = self.transform(img)
        return img, label

# Patch datasets.SVHN to use our mock
original_svhn = datasets.SVHN
datasets.SVHN = MockSVHNDataset

ARGS = {
    'batch_size': 2,
    'test_batch_size': 2,
    'use_cuda': False,
    'data_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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
mmd2_biased Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/kernel.py
code served (permissive licence) · get_code("4ce06002a6837671")
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 float32, 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

class MockKernel:
    """Mock kernel that computes RBF kernel between points."""
    def __call__(self, X, Y):
        """
        Compute kernel matrix between X and Y.
        X: shape (m, d)
        Y: shape (n, d)
        Returns: shape (m, n) kernel matrix
        """
        # Simple RBF kernel: exp(-||x-y||^2)
        # X: (m, d), Y: (n, d)
        m = X.shape[0]
        n = Y.shape[0]
        
        # Compute pairwise distances
        X_expanded = X[:, np.newaxis, :]  # (m, 1, d)
        Y_expanded = Y[np.newaxis, :, :]  # (1, n, d)
        
        distances_sq = np.sum((X_expanded - Y_expanded) ** 2, axis=2)  # (m, n)
        kernel_matrix = np.exp(-distances_sq)
        
        return kernel_matrix

# Create small sample data
X = np.random.randn(2, 4).astype(np.float32)  # m=2 points, d=4 dimensions
Y = np.random.randn(3, 4).astype(np.float32)  # n=3 points, d=4 dimensions

# Create kernel instance
k = MockKernel()

ARGS = {
    "X": X,
    "Y": Y,
    "k": k
}
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 float32, 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
normalized_batch_feature_embedding Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/mmd_approx_eigen.py
code served (permissive licence) · get_code("8f23ead3e8f8cad7")
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 (2, 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 small stand-in class for c_tup with the required attributes
class CTup:
    def __init__(self):
        self.a = 0.5
        self.big_a = 2.0
        self.c = 1.5
        self.big_b = 0.8
        
c_tup = CTup()

# Create tiny tensors for input
x_in = torch.randn(2, 4, dtype=torch.float32)  # batch_size=2, n_features=4

# Set parameters
n_degrees = 3
device = 'cpu'

ARGS = {
    'x_in': x_in,
    'n_degrees': n_degrees,
    'c_tup': c_tup,
    '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 (2, 3, 4) — shape (2, 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
normalized_lambda_phi_induction Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/mmd_approx_eigen.py
code served (permissive licence) · get_code("a26f7f3704a59f0e")
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 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 torch as pt
import numpy as np

pt.manual_seed(0)

# Create a small stand-in class for c_tup with the required attributes
class CTuple:
    def __init__(self):
        self.a = 0.5
        self.big_a = 2.0
        self.c = 1.5
        self.big_b = 0.8
        
c_tup = CTuple()

# Create small tensors for the inputs
# lphi_i_minus_one and lphi_i_minus_two are used in multiplication with x_in or as direct factors
lphi_i_minus_one = pt.randn(2, 4, dtype=pt.float32)
lphi_i_minus_two = pt.randn(2, 4, dtype=pt.float32)

# x_in is used in squaring and multiplication operations
x_in = pt.randn(2, 4, dtype=pt.float32)

# degree determines which branch is taken
degree = 2

# device is CPU
device = 'cpu'

ARGS = {
    'lphi_i_minus_one': lphi_i_minus_one,
    'lphi_i_minus_two': lphi_i_minus_two,
    'degree': degree,
    'x_in': x_in,
    'c_tup': c_tup,
    '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 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
phi_recursion Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/all_aux_files.py
code served (permissive licence) · get_code("df1ddad1ce961cfa")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for the function parameters
phi_k = torch.randn(2, 4)  # batch_size=2, dim=4
phi_k_minus_1 = torch.randn(2, 4)  # batch_size=2, dim=4
rho = 0.5  # scalar float parameter
degree = 2  # integer parameter for recursion depth
x_in = torch.randn(2, 4)  # batch_size=2, dim=4

ARGS = {
    "phi_k": phi_k,
    "phi_k_minus_1": phi_k_minus_1,
    "rho": rho,
    "degree": degree,
    "x_in": x_in,
}
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 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
plot_with_variance Ran
ran on a synthesized input
parklabml/dp-hp/code_balanced/plot_results.py
code served (permissive licence) · get_code("e60c37de87a6a4d8")
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 matplotlib.pyplot as plt
import numpy as np
import torch

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

# Create sample data
# x: array of x-axis values (4 settings)
x = np.array([1.0, 2.0, 3.0, 4.0])

# y: shape (x_settings=4, runs_to_average=3)
# This represents 4 different x settings, each with 3 runs to average
y = np.array([
    [1.0, 1.1, 0.9],
    [2.0, 2.2, 1.8],
    [3.0, 3.1, 2.9],
    [4.0, 4.3, 3.7]
])

color = 'blue'
label = 'test_label'
alpha = 0.2

ARGS = {
    'x': x,
    'y': y,
    'color': color,
    'label': label,
    'alpha': alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, 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
rescale_dims Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/discretized_datasets.py
code served (permissive licence) · get_code("029b09470962db30")
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. 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

# Create a small 2D numpy array with shape (2, 4)
# This represents 2 samples with 4 features
data = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 3.0, 1.0, 5.0]
], dtype=np.float32)

ARGS = {
    'data': data
}
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 — a tuple 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
revert_scaling Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/discretized_datasets.py
code served (permissive licence) · get_code("36311b4ecbbd2f46")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for revert_scaling(data, base_scale)
# The function multiplies data by base_scale, so both should be numeric types

data = torch.randn(2, 4)  # Small tensor: batch 2, dim 4
base_scale = 2.5  # Scalar multiplier

ARGS = {
    "data": data,
    "base_scale": base_scale,
}
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 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
un_binarize_data Ran
ran on a synthesized input
parklabml/dp-hp/dp_mehp/binarize_adult.py
code served (permissive licence) · get_code("7c46feaf1c3748a4")
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, 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

# Create binarized data: 2 samples, 4 binary features total
bin_data = np.array([
    [1, 0, 1, 1],
    [0, 1, 1, 0]
], dtype=np.float32)

# Create mapping_info dict
# Key: feature index
# Value: tuple of (number of binary features for this feature, minimum value)
mapping_info = {
    0: (2, 0.0),      # Feature 0: uses 2 binary bits, min value 0.0
    1: (2, 5.0)       # Feature 1: uses 2 binary bits, min value 5.0
}

ARGS = {
    "bin_data": bin_data,
    "mapping_info": mapping_info
}
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, 2) — shape (2, 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
create_centers Not yet run
unverified (harvested, no recorded run)
parklabml/dp-hp/dp_mehp/dp_mehp_synth_data_2d.py
code served (permissive licence) · get_code("b65a4472c0c4a389")
How it ran

no invocation recorded.

get_data_samples Not yet run
unverified (harvested, no recorded run)
parklabml/dp-hp/dp_mehp/dp_mehp_synth_data_2d.py
code served (permissive licence) · get_code("da8bfe66ddcff40d")
How it ran

no invocation recorded.

make_dataset Not yet run
unverified (harvested, no recorded run)
parklabml/dp-hp/dp_mehp/dp_mehp_synth_data_2d.py
code served (permissive licence) · get_code("551da8719a1dfc47")
How it ran

no invocation recorded.

phi_recursion_tab_coord Not yet run
unverified (harvested, no recorded run)
parklabml/dp-hp/dp_mehp/all_aux_files_tab_data.py
code served (permissive licence) · get_code("466954d98a697a19")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 25 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 25 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

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

Kernel mean embedding is a useful tool to represent and compare probability measures. Despite its usefulness, kernel mean embedding considers infinite-dimensional features, which are challenging to handle in the context of differentially private data generation. A recent work proposes to approximate the kernel mean embedding of data distribution using finite-dimensional random features, which yields analytically tractable sensitivity. However, the number of required random features is excessively high, often ten thousand to a hundred thousand, which worsens the privacy-accuracy trade-off. To improve the trade-off, we propose to replace random features with Hermite polynomial features. Unlike the random features, the Hermite polynomial features are ordered, where the features at the low orders contain more information on the distribution than those at the high orders. Hence, a relatively low order of Hermite polynomial features can more accurately approximate the mean embedding of the data distribution compared to a significantly higher number of random features. As demonstrated on several tabular and image datasets, Hermite polynomial features seem better suited for private data generation than random Fourier features.

For agents

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

get_harvested_code_for_paper("2106.05042")
get_code_for_paper("2106.05042")
have("2106.05042")

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

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

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

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

Connect an agent — have() is free.