SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.00546 · 2021

Classifying Anomalies THrough Outer Density Estimation (CATHODE)

arXiv · PDF · Open in the Atlas

Code that ran

19 of 20 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; 1 honoured the contract we drafted, 0 violated it and 14 have no contract verdict; 4 failures of our instrument; 1 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/2109.00546.json · badge: /api/ran/2109.00546.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
hepml-anomalydetection/cathode canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
uhh-pd-ml/sk_cathode community (classifier label)
classifier basis not recorded on the link
16 ran · 1 no recorded run
FunctionStatusWhere it lives
class_weight_to_sample_weight Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/classifier_models/boosted_decision_tree.py
code served (permissive licence) · get_code("c744e101573e38f0")
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 (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

# Construct arguments for class_weight_to_sample_weight
# y: numpy array of binary target data
y = np.array([0, 1, 0, 1, 1, 0])

# class_weights: dict mapping class indices to their weights
class_weights = {0: 0.6, 1: 0.4}

ARGS = {
    "y": y,
    "class_weights": class_weights,
}
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 (6,) — shape (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
class_weight_to_sample_weight Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/classifier_models/neural_network_classifier.py
code served (permissive licence) · get_code("7ac0c8933b00c421")
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 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 torch

torch.manual_seed(0)

# Create a binary classification target tensor
# Shape: (2,) for a batch of 2 samples
y = torch.tensor([0.0, 1.0])

# Create class weights dictionary
# Maps class 0 and class 1 to their respective weights
class_weights = {0: 0.7, 1: 0.3}

ARGS = {
    "y": y,
    "class_weights": class_weights,
}
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 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
compute_loss_over_batches Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_flow_matching.py
code served (permissive licence) · get_code("8b615ac08adc2b4b")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple flow module that satisfies the interface
class SimpleFlow(nn.Module):
    def __init__(self, input_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, input_dim)
    
    def forward(self, t, x, mask=None, cond=None):
        # t: (batch,), x: (batch, seq_len, dim) or (batch, dim)
        # Return same shape as x
        return self.linear(x)

# Create model (nn.ModuleList of flows)
input_dim = 4
model = nn.ModuleList([SimpleFlow(input_dim), SimpleFlow(input_dim)])

# Create data loader
# Each batch is a tuple: (data, cond_data)
# data shape: (batch_size, seq_len, dim) or (batch_size, dim)
# cond_data shape: (batch_size, cond_dim)
batch_size = 2
seq_len = 3
cond_dim = 5

batch_1_data = torch.randn(batch_size, seq_len, input_dim)
batch_1_cond = torch.randn(batch_size, cond_dim)

batch_2_data = torch.randn(batch_size, seq_len, input_dim)
batch_2_cond = torch.randn(batch_size, cond_dim)

data_loader = [
    (batch_1_data, batch_1_cond),
    (batch_2_data, batch_2_cond)
]

device = torch.device('cpu')

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'device': device
}
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 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
compute_loss_over_batches Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_normalizing_flow_nflows.py
code served (permissive licence) · get_code("40a27ec70bfe22aa")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define a minimal model that implements log_prob method
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def log_prob(self, data, cond_data):
        # data shape: (batch_size, 4)
        # cond_data shape: (batch_size, 3)
        # Return log probability values for each sample
        batch_size = data.shape[0]
        return self.linear(data).squeeze(-1)  # shape: (batch_size,)

# Create model
model = SimpleModel()

# Create a simple data loader
# Each batch is a tuple of (data_tensor, cond_data_tensor)
batch1_data = torch.randn(2, 4)
batch1_cond = torch.randn(2, 3)
batch2_data = torch.randn(2, 4)
batch2_cond = torch.randn(2, 3)

data_loader = [
    (batch1_data, batch1_cond),
    (batch2_data, batch2_cond)
]

# Device
device = torch.device('cpu')

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'device': device
}
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 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
compute_loss_over_batches Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_normalizing_flow_pyro.py
code served (permissive licence) · get_code("2a3b4049a4d29c3e")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model that implements the log_probs method
class SimpleModel(nn.Module):
    def __init__(self, data_dim=4, cond_dim=3):
        super().__init__()
        self.linear = nn.Linear(data_dim + cond_dim, 1)
    
    def log_probs(self, data, cond_data):
        # Concatenate data and conditional data
        combined = torch.cat([data, cond_data], dim=1)
        # Return log probabilities (shape: batch_size, 1)
        return self.linear(combined)

# Create model
model = SimpleModel(data_dim=4, cond_dim=3)

# Create a simple data loader
# Each batch is a tuple of (data, cond_data)
# data: shape (batch_size, 4)
# cond_data: shape (batch_size, 3)
batch1_data = torch.randn(2, 4)
batch1_cond = torch.randn(2, 3)
batch2_data = torch.randn(2, 4)
batch2_cond = torch.randn(2, 3)

data_loader = [
    (batch1_data, batch1_cond),
    (batch2_data, batch2_cond)
]

# Device
device = torch.device('cpu')

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'device': device
}
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 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
create_namespace_DE_training Ran
ran; our contract draft was wrong, not the code
hepml-anomalydetection/cathode/run_all.py
pointer only (licence: GPL-3.0) · get_code("12cf7248903b7f0c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, hepml-anomalydetection/cathode, is not in the permissive set Syntology serves inline. 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.

create_namespace_classifier_creation Ran
ran; our contract draft was wrong, not the code
hepml-anomalydetection/cathode/run_all.py
pointer only (licence: GPL-3.0) · get_code("cb3121c2357324c1")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, hepml-anomalydetection/cathode, is not in the permissive set Syntology serves inline. 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.

create_namespace_classifier_training Ran
ran; our contract draft was wrong, not the code
hepml-anomalydetection/cathode/run_all.py
pointer only (licence: GPL-3.0) · get_code("cb566f2040e7fa1c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, hepml-anomalydetection/cathode, is not in the permissive set Syntology serves inline. 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.

get_CL_mask Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/flows.py
code served (permissive licence) · get_code("b71ded1550ff5634")
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 (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
import torch

torch.manual_seed(0)

ARGS = {
    'num_inputs': 4,
    'mask_type': 'binary'
}
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 (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
get_mask Ran
ran, honoured the contract we drafted
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/flows.py
pointer only (licence: MIT); the stored copy get_code serves, from kmzzhang/nbi, is pointer only (licence: NOASSERTION) · get_code("d580682a49233ab6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kmzzhang/nbi, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

numpy_to_torch_loader Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/classifier_models/neural_network_classifier.py
code served (permissive licence) · get_code("6d64d44fec2b30fc")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small numpy arrays
X = np.random.randn(6, 4).astype(np.float32)  # 6 samples, 4 features
y = np.random.randn(6).astype(np.float32)     # 6 targets
sample_weights = np.random.rand(6).astype(np.float32)  # 6 weights

ARGS = {
    'X': X,
    'y': y,
    'sample_weights': sample_weights,
    'batch_size': 2,
    'shuffle': True,
    'device': torch.device('cpu')
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
numpy_to_torch_loader Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_flow_matching.py
code served (permissive licence) · get_code("34eec1e2c5622b5c")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create small numpy arrays for X and m
X = np.random.randn(10, 4).astype(np.float32)  # 10 samples, 4 features
m = np.random.randn(10, 3).astype(np.float32)  # 10 samples, 3 conditional dims

ARGS = {
    'X': X,
    'm': m,
    'batch_size': 256,
    'shuffle': True,
    'drop_last': False,
    'device': torch.device('cpu')
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
numpy_to_torch_loader Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_normalizing_flow_nflows.py
code served (permissive licence) · get_code("0ec2721a4bf5e622")
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 DataLoader. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small numpy arrays
# X: input data with shape (8, 4) - 8 samples, 4 features
X = np.random.randn(8, 4).astype(np.float32)

# m: conditional data with shape (8, 3) - 8 samples, 3 conditional features
m = np.random.randn(8, 3).astype(np.float32)

# Define ARGS dict with all parameters
ARGS = {
    'X': X,
    'm': m,
    'batch_size': 2,
    'shuffle': True,
    'drop_last': False,
    'device': torch.device('cpu')
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
plot_roc_and_sic Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/utils/evaluation_functions.py
code served (permissive licence) · get_code("27dde8341772bf1d")
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 sklearn.metrics import roc_curve, roc_auc_score

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

# Create synthetic data
n_samples = 50
n_sources = 3

# Create true binary labels (0 and 1)
y_true = np.random.randint(0, 2, size=n_samples)

# Create multiple score arrays from different sources
y_scores = [
    np.random.rand(n_samples),
    np.random.rand(n_samples),
    np.random.rand(n_samples),
]

# Create labels for each source
labels = ['Method A', 'Method B', 'Method C']

# Optional: sample weights
sample_weight = None

# Optional: position label (default is None, which works for {0,1} labels)
pos_label = None

# Optional: sic_max for SIC plot
sic_max = 20

# Optional: roc_max for ROC plot
roc_max = 10000.0

# Optional: include random baseline
include_random = True

ARGS = {
    'y_true': y_true,
    'y_scores': y_scores,
    'pos_label': pos_label,
    'sample_weight': sample_weight,
    'labels': labels,
    'sic_max': sic_max,
    'roc_max': roc_max,
    'include_random': include_random,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, sklearn — 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
profile_1d Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/utils/evaluation_functions.py
code served (permissive licence) · get_code("4f53ededc22efba7")
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 sample data for profile_1d
# The function expects:
# - data: 1D array of values to bin
# - preds: 1D array of predictions corresponding to data points
# - bins: number of bins or bin edges for np.histogram

np.random.seed(0)

data = np.random.uniform(0, 10, size=50)
preds = np.random.uniform(-1, 1, size=50)
bins = 5

ARGS = {
    "data": data,
    "preds": preds,
    "bins": bins,
}
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
separate_SB_SR Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/demos/utils/data_preparation.py
code served (permissive licence) · get_code("12d0ab31d14e66a2")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a small data tensor with shape (batch=2, features=4)
# The function indexes data[:, 0], so we need at least 2 columns
# Column 0 will contain mass values that we'll filter on
data = torch.tensor([
    [3.5, 1.0, 2.0, 3.0],  # mass=3.5, within [3.3, 3.7]
    [2.0, 4.0, 5.0, 6.0]   # mass=2.0, outside [3.3, 3.7]
], dtype=torch.float32)

minmass = 3.3
maxmass = 3.7

ARGS = {
    "data": data,
    "minmass": minmass,
    "maxmass": maxmass
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
sic_curve Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/utils/evaluation_functions.py
code served (permissive licence) · get_code("44ae550f6632f7c1")
How it ran

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

import numpy as np

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

# Create simple binary classification data
n_samples = 20

# y_true: binary labels (0 or 1)
y_true = np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 
                   0, 1, 0, 1, 0, 1, 0, 1, 0, 1])

# y_score: prediction scores (confidence values between 0 and 1)
y_score = np.array([0.1, 0.9, 0.2, 0.8, 0.3, 0.7, 0.15, 0.85, 0.25, 0.75,
                    0.35, 0.65, 0.4, 0.6, 0.45, 0.55, 0.05, 0.95, 0.12, 0.88])

# pos_label: the label considered as positive class
pos_label = 1

# sample_weight: optional weights for samples
sample_weight = None

ARGS = {
    'y_true': y_true,
    'y_score': y_score,
    'pos_label': pos_label,
    'sample_weight': sample_weight
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
sum_except_batch Ran
ran; our contract draft was wrong, not the code
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/flows.py
code served (permissive licence) · get_code("0286a0665361e516")
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 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 torch

torch.manual_seed(0)

# Create a small tensor with batch dimension and other dimensions
# Shape: (batch_size=2, dim1=4, dim2=3)
x = torch.randn(2, 4, 3)

# num_batch_dims specifies how many leading dimensions are batch dimensions
# The function will sum over all dimensions except the first num_batch_dims
num_batch_dims = 1

ARGS = {
    "x": x,
    "num_batch_dims": num_batch_dims,
}
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 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
train_epoch Ran
ran on a synthesized input
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_flow_matching.py
code served (permissive licence) · get_code("37aba3a4ae5719b2")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal flow module that satisfies the interface
class SimpleFlow(nn.Module):
    def __init__(self, input_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, input_dim)
    
    def forward(self, t, x, mask=None, cond=None):
        # t is shape (batch,), x is shape (batch, seq_len, dim) or (batch, dim)
        # Returns same shape as x
        return self.linear(x)

# Build a minimal model that is an nn.ModuleList of flows
class FlowModel(nn.ModuleList):
    def __init__(self):
        super().__init__()
        self.append(SimpleFlow(4))
        self.append(SimpleFlow(4))

# Create a minimal flow model
flow_model = FlowModel()

# Create optimizer
optimizer = torch.optim.Adam(flow_model.parameters(), lr=0.001)

# Create a minimal data loader
# Each batch is a list with [data] or [data, cond]
batch_size = 2
feature_dim = 4
seq_len = 3

# Create data samples: (batch_size, seq_len, feature_dim) for 3D case
data_sample_1 = torch.randn(batch_size, seq_len, feature_dim)
cond_sample_1 = torch.randn(batch_size, 2)

data_sample_2 = torch.randn(batch_size, seq_len, feature_dim)
cond_sample_2 = torch.randn(batch_size, 2)

# Data loader is a list of batches
data_loader = [
    [data_sample_1, cond_sample_1],
    [data_sample_2, cond_sample_2],
]

# Wrap in a simple loader-like object with dataset attribute
class SimpleDataLoader:
    def __init__(self, data):
        self.data = data
        self.dataset = type('obj', (object,), {'__len__': lambda: len(data)})()
    
    def __iter__(self):
        return iter(self.data)

data_loader = SimpleDataLoader([
    [data_sample_1, cond_sample_1],
    [data_sample_2, cond_sample_2],
])

device = torch.device('cpu')

ARGS = {
    'model': flow_model,
    'optimizer': optimizer,
    'data_loader': data_loader,
    'device': device,
    'verbose': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
train_epoch Not yet run
unverified (harvested, no recorded run)
uhh-pd-ml/sk_cathode/sk_cathode/generative_models/conditional_normalizing_flow_nflows.py
code served (permissive licence) · get_code("fd1f2958063d7cda")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 17 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
get_mask 3 other papers
2 dated earlier, 1 later
1705.07057 (2017-05)
Masked Autoregressive Flow for Density Estimation
2003.05033 (2020-03)
Generalized Energy Based Models
2203.09470 (2022-03)
CURTAINs for your Sliding Window: Constructing Unobserved Regions by Transforming Adjacent Intervals
get_CL_mask 1 other paper
1 later
2203.09470 (2022-03)
CURTAINs for your Sliding Window: Constructing Unobserved Regions by Transforming Adjacent Intervals
sum_except_batch 1 other paper
1 later
2203.09470 (2022-03)
CURTAINs for your Sliding Window: Constructing Unobserved Regions by Transforming Adjacent Intervals

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

We propose a new model-agnostic search strategy for physics beyond the standard model (BSM) at the LHC, based on a novel application of neural density estimation to anomaly detection. Our approach, which we call Classifying Anomalies THrough Outer Density Estimation (CATHODE), assumes the BSM signal is localized in a signal region (defined e.g. using invariant mass). By training a conditional density estimator on a collection of additional features outside the signal region, interpolating it into the signal region, and sampling from it, we produce a collection of events that follow the background model. We can then train a classifier to distinguish the data from the events sampled from the background model, thereby approaching the optimal anomaly detector. Using the LHC Olympics R&D dataset, we demonstrate that CATHODE nearly saturates the best possible performance, and significantly outperforms other approaches that aim to enhance the bump hunt (CWoLa Hunting and ANODE). Finally, we demonstrate that CATHODE is very robust against correlations between the features and maintains nearly-optimal performance even in this more challenging setting.

For agents

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

get_harvested_code_for_paper("2109.00546")
get_code_for_paper("2109.00546")
have("2109.00546")

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

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

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

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

Connect an agent — have() is free.