SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.10099 · ICML · 2020

Nonparametric Score Estimators

Jun Zhu, Yuhao Zhou, Jiaxin Shi

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 2 failures of our instrument; 3 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/2005.10099.json · badge: /api/ran/2005.10099.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
miskcoo/kscore canonical (classifier label)
classifier basis: classifier_2025
5 ran · 2 no recorded run
brendanmallery9/entropic-barycenters community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
Base Ran
ran on a synthesized input · constructed an object; no result was computed
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("00dada8da51d1f87")
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 an instance of its own class, Base: the run constructed the object and did not call it, so no result was computed. 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)

# Create a minimal kernel class that satisfies the usage in compute_energy
class MockKernel(nn.Module):
    def __init__(self):
        super().__init__()
    
    def kernel_type(self):
        return 'curl-free'
    
    def __call__(self, x):
        return x


# Create a minimal dtype representation
dtype = torch.float32

# Create instances for the Base constructor
lam = 0.1
kernel = MockKernel()

ARGS = {
    'lam': lam,
    'kernel': kernel,
    'dtype': dtype
}
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 Base — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Base 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
CurlFreeIMQ Ran
ran on a synthesized input · constructed an object; no result was computed
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("fb9d4f93a7487915")
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 an instance of its own class, CurlFreeIMQ: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np

# Create small TensorFlow tensors for testing
def create_test_tensors():
    # Batch size 2, number of samples 3, dimension 4
    x = tf.constant(np.random.randn(2, 3, 4).astype(np.float32))
    y = tf.constant(np.random.randn(2, 5, 4).astype(np.float32))
    return x, y

# Create a simple kernel hyperparams value
kernel_hyperparams = tf.constant(1.0, dtype=tf.float32)

# Create a simple heuristic function
def simple_heuristic(x, y):
    """Simple stand-in for median_heuristic"""
    n = tf.shape(x)[-2]
    m = tf.shape(y)[-2]
    x_expand = tf.expand_dims(x, -2)
    y_expand = tf.expand_dims(y, -3)
    pairwise_dist = tf.sqrt(tf.reduce_sum(tf.square(x_expand - y_expand), axis=-1))
    k = n * m // 2
    if k == 0:
        k = 1
    top_k_values = tf.nn.top_k(tf.reshape(pairwise_dist, [-1, n * m]), k=k).values
    kernel_width = tf.reshape(top_k_values[:, -1], tf.shape(x)[:-2])
    return tf.stop_gradient(kernel_width)

ARGS = {
    'kernel_hyperparams': kernel_hyperparams,
    'heuristic_hyperparams': simple_heuristic
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CurlFreeIMQ — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CurlFreeIMQ 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
CurlFreeIMQ Ran
ran on a synthesized input · constructed an object; no result was computed
brendanmallery9/entropic-barycenters/classification_example/kscore/estimators/landweber.py
code served (permissive licence) · get_code("bab1d123d3526fe0")
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 an instance of its own class, CurlFreeIMQ: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np

# Create tiny test tensors
batch_size_x = 2
batch_size_y = 3
input_dim = 4

x = tf.constant(np.random.randn(batch_size_x, input_dim).astype(np.float32))
y = tf.constant(np.random.randn(batch_size_y, input_dim).astype(np.float32))

# kernel_hyperparams can be None or a tensor representing kernel width
kernel_hyperparams = None

# heuristic_hyperparams is a callable that takes (x, y) and returns kernel width
def heuristic_hyperparams(x, y):
    n = tf.shape(x)[-2]
    m = tf.shape(y)[-2]
    x_expand = tf.expand_dims(x, -2)
    y_expand = tf.expand_dims(y, -3)
    pairwise_dist = tf.sqrt(tf.reduce_sum(tf.square(x_expand - y_expand), axis=-1))
    k = n * m // 2
    top_k_values = tf.nn.top_k(tf.reshape(pairwise_dist, [-1, n * m]), k=k).values
    kernel_width = tf.reshape(top_k_values[:, -1], tf.shape(x)[:-2])
    return tf.stop_gradient(kernel_width)

ARGS = {
    'kernel_hyperparams': kernel_hyperparams,
    'heuristic_hyperparams': heuristic_hyperparams,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CurlFreeIMQ — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CurlFreeIMQ 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
SquareCurlFree Ran
ran on a synthesized input · constructed an object; no result was computed
brendanmallery9/entropic-barycenters/classification_example/kscore/estimators/landweber.py
code served (permissive licence) · get_code("35137fdaa4981d2f")
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 an instance of its own class, SquareCurlFree: the run constructed the object and did not call it, so no result was computed. 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 tensorflow as tf
import numpy as np

def median_heuristic_impl(x, y):
    n = tf.shape(x)[-2]
    m = tf.shape(y)[-2]
    x_expand = tf.expand_dims(x, -2)
    y_expand = tf.expand_dims(y, -3)
    pairwise_dist = tf.sqrt(tf.reduce_sum(tf.square(x_expand - y_expand), axis=-1))
    k = n * m // 2
    top_k_values = tf.nn.top_k(tf.reshape(pairwise_dist, [-1, n * m]), k=k).values
    kernel_width = tf.reshape(top_k_values[:, -1], tf.shape(x)[:-2])
    return tf.stop_gradient(kernel_width)

ARGS = {
    'kernel_hyperparams': None,
    'heuristic_hyperparams': median_heuristic_impl
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SquareCurlFree — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SquareCurlFree 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
conjugate_gradient Ran
ran; our contract draft was wrong, not the code
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("8a283ce3ca6eff56")
How it ran

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

class LinearOperator:
    """Stand-in linear operator that implements the apply method."""
    def __init__(self, matrix):
        self.matrix = matrix
        self.shape = matrix.shape
    
    def apply(self, x):
        """Apply the linear operator to vector x."""
        return tf.matmul(self.matrix, x)

# Create a small positive definite matrix (4x4)
matrix_data = tf.constant([
    [4.0, 1.0, 0.5, 0.2],
    [1.0, 3.0, 0.3, 0.1],
    [0.5, 0.3, 2.0, 0.4],
    [0.2, 0.1, 0.4, 1.5]
], dtype=tf.float32)

operator = LinearOperator(matrix_data)

# Create a right-hand side vector (4,)
rhs = tf.constant([1.0, 2.0, 3.0, 4.0], dtype=tf.float32)

# Optional initial guess (4,)
x_init = tf.constant([0.1, 0.2, 0.3, 0.4], dtype=tf.float32)

ARGS = {
    'operator': operator,
    'rhs': rhs,
    'x': x_init,
    'tol': 0.0001,
    'max_iter': 40
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CGState — a CGState 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
median_heuristic Ran
ran, violated the contract we drafted
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("0172bbfec8cc6de4")
How it ran

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

import tensorflow as tf
import numpy as np

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

# Create small test tensors
# x: shape (batch=2, n=4, features=3)
# y: shape (batch=2, m=5, features=3)
x = tf.constant(np.random.randn(2, 4, 3).astype(np.float32))
y = tf.constant(np.random.randn(2, 5, 3).astype(np.float32))

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
random_choice Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("699449111969a487")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Create a small tensor with shape [n_states, n_features]
# Using distinct dimensions: 5 states, 3 features
inputs = tf.constant(np.random.randn(5, 3).astype(np.float32))

# Number of samples to draw
n_samples = 2

ARGS = {
    "inputs": inputs,
    "n_samples": n_samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
Landweber Not yet run
unverified (harvested, no recorded run)
brendanmallery9/entropic-barycenters/classification_example/kscore/estimators/landweber.py
code served (permissive licence) · get_code("8a3a8181a923765c")
How it ran

no invocation recorded.

SquareCurlFree Not yet run
unverified (harvested, no recorded run)
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("7f7043b286d83fe0")
How it ran

no invocation recorded.

Tikhonov Not yet run
unverified (harvested, no recorded run)
miskcoo/kscore/kscore/estimators/tikhonov.py
code served (permissive licence) · get_code("91c7c7ebc3f9af0a")
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 9 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 9 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

Estimating the score, i.e., the gradient of log density function, from a set of samples generated by an unknown distribution is a fundamental task in inference and learning of probabilistic models that involve flexible yet intractable densities. Kernel estimators based on Stein's methods or score matching have shown promise, however their theoretical properties and relationships have not been fully-understood. We provide a unifying view of these estimators under the framework of regularized nonparametric regression. It allows us to analyse existing estimators and construct new ones with desirable properties by choosing different hypothesis spaces and regularizers. A unified convergence analysis is provided for such estimators. Finally, we propose score estimators based on iterative regularization that enjoy computational benefits from curl-free kernels and fast convergence.

For agents

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

get_harvested_code_for_paper("2005.10099")
get_code_for_paper("2005.10099")
have("2005.10099")

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

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

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

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

Connect an agent — have() is free.