SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.09194 · 2022

Efficient Aggregated Kernel Tests using Incomplete $U$-statistics

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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 0 have no contract verdict; 6 failures of our instrument; 3 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/2206.09194.json · badge: /api/ran/2206.09194.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
antoninschrab/ksdagg canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
antoninschrab/agginc-paper canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
antoninschrab/mmdagg reimplementation (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
antoninschrab/agginc community (classifier label)
classifier basis not recorded on the link
0 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_pairwise_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antoninschrab/mmdagg/mmdagg/np.py
code served (permissive licence) · get_code("139c7796806ebcb2")
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 ndarray, ndim 2, dtype family float, shape (6, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import scipy.spatial

np.random.seed(0)

# Create sample data
# X and Y should be (m, d) arrays
m = 3  # number of samples
d = 4  # dimension

X = np.random.randn(m, d).astype(np.float32)
Y = np.random.randn(m, d).astype(np.float32)

# l parameter should be 'l1' or 'l2'
l = 'l2'

ARGS = {
    'X': X,
    'Y': Y,
    'l': l
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (6, 6) — shape (6, 6) 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_indices Ran
ran, honoured the contract we drafted
antoninschrab/agginc-paper/agginc/np.py
code served (permissive licence) · get_code("752346c21d60e812")
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 tuple, ndim 2, 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 itertools

def create_indices(N, R):
    """
    Return lists of indices of R subdiagonals of N x N matrix
    """
    index_X = list(itertools.chain(*[[i for i in range(N - r)] for r in range(1, R + 1)]))
    index_Y = list(itertools.chain(*[[i + r for i in range(N - r)] for r in range(1, R + 1)]))
    return (index_X, index_Y)


ARGS = {
    "N": 5,
    "R": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 tuple, ndim 2, dtype family int — 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
create_indices Ran
ran, honoured the contract we drafted
antoninschrab/agginc-paper/agginc/jax.py
code served (permissive licence) · get_code("b94b433bd9c69435")
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 tuple, ndim 2, 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 itertools

def create_indices(N, R):
    """
    Return lists of indices of R superdiagonals of N x N matrix
    
    This function can be modified to compute any type of incomplete U-statistic.
    """
    index_X = list(itertools.chain(*[[i for i in range(N - r)] for r in range(1, R + 1)]))
    index_Y = list(itertools.chain(*[[i + r for i in range(N - r)] for r in range(1, R + 1)]))
    return (index_X, index_Y)


ARGS = {
    "N": 7,
    "R": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 tuple, ndim 2, dtype family int — 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
create_weights Ran
ran, honoured the contract we drafted
antoninschrab/ksdagg/ksdagg/jax.py
code served (permissive licence) · get_code("35e8a1dce671edd0")
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 ArrayImpl, 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 jax.numpy as jnp

# Define ARGS dict with valid arguments for create_weights function
ARGS = {
    "N": 5,
    "weights_type": "uniform"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
create_weights Ran
ran, honoured the contract we drafted
antoninschrab/mmdagg/mmdagg/jax.py
code served (permissive licence) · get_code("ade4e10146ee1a5c")
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 ArrayImpl, 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 jax.numpy as jnp

# Define arguments for create_weights function
ARGS = {
    'N': 5,
    'weights_type': 'uniform'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
jax_distances Ran
ran; our contract draft was wrong, not the code
antoninschrab/ksdagg/ksdagg/jax.py
code served (permissive licence) · get_code("f3d6af9cdda0f3d5")
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 ArrayImpl, ndim 1, dtype family float, shape (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 jax.numpy as jnp
import numpy as np

# Create small test arrays for X and Y
# X and Y should be 2D arrays where first dimension is samples
X = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0]
])

Y = jnp.array([
    [1.5, 2.5, 3.5, 4.5],
    [5.5, 6.5, 7.5, 8.5],
    [9.5, 10.5, 11.5, 12.5]
])

max_samples = 2

ARGS = {
    "X": X,
    "Y": Y,
    "max_samples": max_samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (3,) — shape (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
kernel_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antoninschrab/mmdagg/mmdagg/jax.py
code served (permissive licence) · get_code("2c48c4eb0714eef3")
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 ArrayImpl, ndim 2, dtype family float, shape (4, 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 jax.numpy as jnp
import numpy as np

# Create a small pairwise distance matrix (4x4)
# This represents pairwise distances between 2 points (2m=4, so m=2)
pairwise_matrix = jnp.array([
    [0.0, 1.5, 2.0, 2.5],
    [1.5, 0.0, 1.2, 1.8],
    [2.0, 1.2, 0.0, 0.9],
    [2.5, 1.8, 0.9, 0.0]
], dtype=jnp.float32)

# Valid combinations of l and kernel based on the function logic:
# - gaussian with l2
# - imq with l2
# - matern_0.5_l1 with l1, or matern_0.5_l2 with l2, or laplace with l1
# - matern_1.5_l1 with l1, or matern_1.5_l2 with l2
# - etc.

l = "l2"
kernel = "gaussian"
bandwidth = 1.0

ARGS = {
    "pairwise_matrix": pairwise_matrix,
    "l": l,
    "kernel": kernel,
    "bandwidth": bandwidth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
kernel_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antoninschrab/mmdagg/mmdagg/np.py
code served (permissive licence) · get_code("4e7beb2199214856")
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 ndarray, ndim 2, dtype family float, shape (4, 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 pairwise distance matrix (4x4)
pairwise_matrix = np.array([
    [0.0, 0.5, 1.0, 1.5],
    [0.5, 0.0, 0.8, 1.2],
    [1.0, 0.8, 0.0, 0.6],
    [1.5, 1.2, 0.6, 0.0]
])

# Valid combinations of l and kernel_type
l = "l2"
kernel_type = "gaussian"
bandwidth = 1.0

ARGS = {
    "pairwise_matrix": pairwise_matrix,
    "l": l,
    "kernel_type": kernel_type,
    "bandwidth": bandwidth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 4) — shape (4, 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
mmdagg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antoninschrab/mmdagg/mmdagg/jax.py
code served (permissive licence) · get_code("6fe45123a54a45b7")
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 ArrayImpl, 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 jax
import jax.numpy as jnp
from jax import random
import numpy as np

# Create small sample data
np.random.seed(0)
key = random.PRNGKey(42)

# Create X and Y with shape (m, d) and (n, d)
# Using distinct sizes: m=5, n=6, d=4
m, n, d = 5, 6, 4
X = jnp.array(np.random.randn(m, d), dtype=jnp.float32)
Y = jnp.array(np.random.randn(n, d), dtype=jnp.float32)

# Define ARGS dictionary with all parameters for mmdagg
ARGS = {
    'X': X,
    'Y': Y,
    'alpha': 0.05,
    'kernel': 'laplace',
    'number_bandwidths': 5,
    'weights_type': 'uniform',
    'B1': 100,
    'B2': 100,
    'B3': 10,
    'seed': 42,
    'return_dictionary': False,
    'permutations_same_sample_size': False,
    'bandwidths': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
mmdagg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
antoninschrab/mmdagg/mmdagg/np.py
code served (permissive licence) · get_code("e46e1093bf2aa225")
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 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

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

# Create small sample data
m = 5  # number of samples in X
n = 5  # number of samples in Y
d = 3  # dimension

X = np.random.randn(m, d).astype(np.float64)
Y = np.random.randn(n, d).astype(np.float64)

ARGS = {
    'X': X,
    'Y': Y,
    'alpha': 0.05,
    'kernel': 'laplace_gaussian',
    'number_bandwidths': 10,
    'weights_type': 'uniform',
    'B1': 2000,
    'B2': 2000,
    'B3': 50,
    'seed': 42,
    'return_dictionary': False,
    'permutations_same_sample_size': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — 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
agginc Not yet run
unverified (harvested, no recorded run)
antoninschrab/agginc/agginc/np.py
code served (permissive licence) · get_code("52b452b4fab9d208")
How it ran

no invocation recorded.

inc Not yet run
unverified (harvested, no recorded run)
antoninschrab/agginc/agginc/np.py
code served (permissive licence) · get_code("2c9d9a068ef0b1e9")
How it ran

no invocation recorded.

ksdagg Not yet run
unverified (harvested, no recorded run)
antoninschrab/ksdagg/ksdagg/jax.py
code served (permissive licence) · get_code("c07fb17178973f65")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 2 the same month, 0 later) and 5 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
compute_pairwise_matrix 2 other papers
1 dated earlier, 1 the same month
2110.15073 (2021-10)
MMD Aggregated Two-Sample Test
2206.08843 (2022-06)
AutoML Two-Sample Test
create_weights 2 other papers
2 dated earlier
2110.15073 (2021-10)
MMD Aggregated Two-Sample Test
2202.00824 (2022-02)
KSD Aggregated Goodness-of-fit Test
kernel_matrix 2 other papers
1 dated earlier, 1 the same month
2110.15073 (2021-10)
MMD Aggregated Two-Sample Test
2206.08843 (2022-06)
AutoML Two-Sample Test
jax_distances 1 other paper
1 dated earlier
2202.00824 (2022-02)
KSD Aggregated Goodness-of-fit Test
kernel_matrix 1 other paper
1 dated earlier
2110.15073 (2021-10)
MMD Aggregated Two-Sample Test
ksdagg 1 other paper
1 dated earlier
2202.00824 (2022-02)
KSD Aggregated Goodness-of-fit Test

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

We propose a series of computationally efficient nonparametric tests for the two-sample, independence, and goodness-of-fit problems, using the Maximum Mean Discrepancy (MMD), Hilbert Schmidt Independence Criterion (HSIC), and Kernel Stein Discrepancy (KSD), respectively. Our test statistics are incomplete $U$-statistics, with a computational cost that interpolates between linear time in the number of samples, and quadratic time, as associated with classical $U$-statistic tests. The three proposed tests aggregate over several kernel bandwidths to detect departures from the null on various scales: we call the resulting tests MMDAggInc, HSICAggInc and KSDAggInc. This procedure provides a solution to the fundamental kernel selection problem as we can aggregate a large number of kernels with several bandwidths without incurring a significant loss of test power. For the test thresholds, we derive a quantile bound for wild bootstrapped incomplete $U$-statistics, which is of independent interest. We derive non-asymptotic uniform separation rates for MMDAggInc and HSICAggInc, and quantify exactly the trade-off between computational efficiency and the attainable rates: this result is novel for tests based on incomplete $U$-statistics, to our knowledge. We further show that in the quadratic-time case, the wild bootstrap incurs no penalty to test power over the more widespread permutation-based approach, since both attain the same minimax optimal rates (which in turn match the rates that use oracle quantiles). We support our claims with numerical experiments on the trade-off between computational efficiency and test power. In all three testing frameworks, the linear-time versions of our proposed tests perform at least as well as the current linear-time state-of-the-art tests.

For agents

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

get_harvested_code_for_paper("2206.09194")
get_code_for_paper("2206.09194")
have("2206.09194")

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

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

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

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

Connect an agent — have() is free.