SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.01528 · NeurIPS · 2022

Normalizing Flows for Knockoff-free Controlled Feature Selection

Jeffrey Regier, Derek Hansen, Brian Manzo

arXiv · PDF · Open in the Atlas

Code that ran

25 of 33 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 9 have no contract verdict; 13 failures of our instrument; 8 no recorded run), measured 2026-11-22; 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.01528.json · badge: /api/ran/2106.01528.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
tansey/hrt unrelated (classifier label)
classifier basis: classifier_2025
17 ran · 5 no recorded run
msesia/deepknockoffs unrelated (classifier label)
classifier basis: classifier_2025
8 ran · 2 no recorded run
firmai/tsgan unrelated (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
BootstrapConditionalModel Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("5c388071175a785e")
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, BootstrapConditionalModel: 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 numpy as np
from scipy import stats

class StandInModel:
    """A minimal model that has predict() method returning a distribution-like object."""
    
    def __init__(self):
        pass
    
    def predict(self, X):
        """Returns an object with pdf, cdf, and sample methods."""
        return StandInDistribution()


class StandInDistribution:
    """A minimal distribution-like object with pdf, cdf, and sample methods."""
    
    def __init__(self):
        pass
    
    def pdf(self, y):
        """Return probability density values."""
        if isinstance(y, np.ndarray):
            return np.ones(y.shape[0])
        return np.array([1.0])
    
    def cdf(self, y):
        """Return cumulative distribution values."""
        if isinstance(y, np.ndarray):
            return np.ones(y.shape[0]) * 0.5
        return np.array([0.5])
    
    def sample(self):
        """Return a sample."""
        return np.random.randn(2)


def fit_fn(X, y):
    """A minimal fit function that returns a StandInModel."""
    return StandInModel()


# Create minimal data
X = np.random.randn(6, 4)  # 6 samples, 4 features
y = np.random.randn(6, 3)  # 6 samples, 3 targets

ARGS = {
    'X': X,
    'y': y,
    'fit_fn': fit_fn,
    'nbootstraps': 2,
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BootstrapConditionalModel — 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 BootstrapConditionalModel 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
CrossValidationSampler Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("db6d9a8444f8edbd")
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, CrossValidationSampler: 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 numpy as np
from scipy.stats import norm

class MockDistribution:
    """Mock distribution with sample() and pdf() methods"""
    def __init__(self, loc=0.0, scale=1.0):
        self.loc = loc
        self.scale = scale
        self._dist = norm(loc=loc, scale=scale)
    
    def sample(self):
        return self._dist.rvs()
    
    def pdf(self, x):
        return self._dist.pdf(x)

class MockModelSet:
    """Mock model set with models attribute"""
    def __init__(self, models):
        self.models = models

class MockModel:
    """Mock model with predict method that returns distributions"""
    def __init__(self, n_outputs=3):
        self.n_outputs = n_outputs
    
    def predict(self, X):
        # Return a list of distributions for each output
        return [MockDistribution(loc=float(i), scale=0.5) for i in range(self.n_outputs)]

# Setup data
np.random.seed(42)
N = 10  # number of samples
n_features = 4
n_folds = 2
samples_per_fold = N // n_folds

X = np.random.randn(N, n_features).astype(np.float32)

# Create fold indices
fold_1 = np.arange(0, samples_per_fold)
fold_2 = np.arange(samples_per_fold, N)
folds = [fold_1, fold_2]

# Create models - one model set per fold
models_1 = [MockModel(n_outputs=3) for _ in range(2)]
models_2 = [MockModel(n_outputs=3) for _ in range(2)]
model_sets = [MockModelSet(models_1), MockModelSet(models_2)]

# Quantiles for percentile computation
quantiles = [25, 50, 75]

ARGS = {
    "X": X,
    "models": model_sets,
    "folds": folds,
    "quantiles": quantiles,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CrossValidationSampler — 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 CrossValidationSampler 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
DiscreteBootstrapConditionalModel Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("befe2dc54f127a04")
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, DiscreteBootstrapConditionalModel: 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 numpy as np
import torch
import torch.nn as nn

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

# Create a small stand-in distribution class that has pmf, cmf, and sample methods
class DiscreteDistribution:
    def __init__(self, logits):
        self.logits = logits
    
    def pmf(self, y):
        # Return probability mass function values
        probs = torch.softmax(torch.tensor(self.logits), dim=-1)
        return probs.numpy()
    
    def cmf(self, y):
        # Return cumulative mass function values
        probs = torch.softmax(torch.tensor(self.logits), dim=-1)
        return np.cumsum(probs.numpy())
    
    def sample(self):
        # Return a sample
        probs = torch.softmax(torch.tensor(self.logits), dim=-1)
        return np.random.choice(len(self.logits), p=probs.numpy())

# Create a small model class that has predict method
class SimpleDiscreteModel(nn.Module):
    def __init__(self, input_dim, num_classes):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def predict(self, X, return_std=False):
        # X is numpy array, convert to tensor
        X_tensor = torch.tensor(X, dtype=torch.float32)
        with torch.no_grad():
            logits = self.linear(X_tensor).numpy()
        
        if return_std:
            # Return a distribution-like object with sample method
            return DiscreteDistribution(logits[0] if logits.ndim > 1 else logits)
        else:
            # Return distribution for each sample
            return DiscreteDistribution(logits[0] if logits.ndim > 1 else logits)

# Create fit function that trains and returns a model
def fit_fn(X_train, y_train):
    input_dim = X_train.shape[1]
    num_classes = 5  # arbitrary number of classes
    model = SimpleDiscreteModel(input_dim, num_classes)
    return model

# Create small sample data
X = np.random.randn(6, 4).astype(np.float32)  # 6 samples, 4 features
y = np.random.randint(0, 5, 6)  # 6 labels

ARGS = {
    'X': X,
    'y': y,
    'fit_fn': fit_fn,
    'nbootstraps': 2
}
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 DiscreteBootstrapConditionalModel — 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 DiscreteBootstrapConditionalModel 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
DiscreteClassifierNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("aa9395158d2da40a")
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, DiscreteClassifierNetwork: 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 numpy as np
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create small, distinct dimensions for clarity
nfeatures = 4
nclasses = 3

# Create classes array
classes = np.array([0, 1, 2])

# Create X_means and X_stds with same dimension as nfeatures
X_means = np.array([0.5, 1.0, 1.5, 2.0], dtype=np.float32)
X_stds = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)

ARGS = {
    'nfeatures': nfeatures,
    'classes': classes,
    'X_means': X_means,
    'X_stds': X_stds
}
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 DiscreteClassifierNetwork — 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 DiscreteClassifierNetwork 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
GaussianMixtureModel Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("d01652f4c7968e16")
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, GaussianMixtureModel: 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 numpy as np
from scipy.stats import norm

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

# Create a small Gaussian Mixture Model with:
# - 2 samples (batch size)
# - 3 mixture components
# - Different dimensions for clarity

n_samples = 2
n_components = 3

# pi: mixture weights, shape (n_samples, n_components)
# Each row should sum to 1 (valid probability distribution)
pi = np.array([
    [0.5, 0.3, 0.2],
    [0.2, 0.5, 0.3]
], dtype=np.float64)

# mu: means for each sample and component, shape (n_samples, n_components)
mu = np.array([
    [0.0, 2.0, 4.0],
    [1.0, 3.0, 5.0]
], dtype=np.float64)

# sigma: standard deviations for each sample and component, shape (n_samples, n_components)
sigma = np.array([
    [0.5, 0.7, 0.9],
    [0.6, 0.8, 1.0]
], dtype=np.float64)

# y_mean and y_std are optional parameters for normalization
y_mean = 0.0
y_std = 1.0

ARGS = {
    'pi': pi,
    'mu': mu,
    'sigma': sigma,
    'y_mean': y_mean,
    'y_std': y_std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GaussianMixtureModel — 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 GaussianMixtureModel 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
HoldoutSampler Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("02fd42887a52a943")
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, HoldoutSampler: 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 numpy as np
import torch
import torch.nn as nn
from scipy.stats import norm

torch.manual_seed(0)

# Create a mock distribution class that has pdf() and sample() methods
class MockDistribution:
    def __init__(self, loc=0.0, scale=1.0):
        self.loc = loc
        self.scale = scale
        self.dist = norm(loc=loc, scale=scale)
    
    def sample(self):
        return self.dist.rvs(size=1).astype(np.float32)
    
    def pdf(self, x):
        return self.dist.pdf(x).astype(np.float32)

# Create a mock model with a predict method that returns distributions
class MockSubModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 1)
    
    def predict(self, X):
        # Return a list of MockDistribution objects
        return [MockDistribution(loc=0.0, scale=1.0),
                MockDistribution(loc=0.5, scale=1.2),
                MockDistribution(loc=1.0, scale=0.8)]

class MockEnsembleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.models = [MockSubModel(), MockSubModel(), MockSubModel()]
    
    def predict(self, X):
        # Aggregate predictions from all models
        all_dists = []
        for model in self.models:
            all_dists.extend(model.predict(X))
        return all_dists

# Create input data
X = torch.randn(2, 3)  # batch_size=2, input_dim=3

# Create the model
model = MockEnsembleModel()

# Define quantiles
quantiles = [25, 50, 75]

ARGS = {
    'X': X,
    'model': model,
    'quantiles': quantiles
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type HoldoutSampler — 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 HoldoutSampler 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
MixtureDensityNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("cbe098cac4a6fd68")
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, MixtureDensityNetwork: 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 numpy as np
import torch.nn as nn

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

# Create small example data for the network
nfeatures = 4
ncomponents = 3

# Compute means and stds for normalization (from dummy data)
X_dummy = np.random.randn(10, nfeatures)
X_means = X_dummy.mean(axis=0)
X_stds = X_dummy.std(axis=0) + 1e-8

y_dummy = np.random.randn(10)
y_mean = y_dummy.mean()
y_std = y_dummy.std() + 1e-8

ARGS = {
    "nfeatures": nfeatures,
    "ncomponents": ncomponents,
    "X_means": X_means,
    "X_stds": X_stds,
    "y_mean": y_mean,
    "y_std": y_std,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MixtureDensityNetwork — 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 MixtureDensityNetwork 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
MultinomialModel Ran
ran on a synthesized input · constructed an object; no result was computed
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("e117979a67e9dbec")
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, MultinomialModel: 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 numpy as np

# Create probability distributions for multinomial model
# Shape: (batch_size, num_classes)
# batch_size = 2, num_classes = 4
probs = np.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25]
])

# Define class labels
classes = np.array([10, 20, 30, 40])

ARGS = {
    "probs": probs,
    "classes": classes
}
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 MultinomialModel — 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 MultinomialModel 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
Net Ran
ran on a synthesized input · constructed an object; no result was computed
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("44a37c78381afc80")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

_mix_rbf_kernel Ran
ran; our contract draft was wrong, not the code
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("48dd34f19c1766db")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

_mmd2 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("ce10f353f05f5250")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

batches Ran
ran; our contract draft was wrong, not the code
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("ff0fb920ccf5b064")
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 generator. 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

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

# Create indices array - a simple array of integers representing data point indices
indices = np.arange(10)  # 10 data points indexed 0-9

# Define batch_size
batch_size = 3

# Define shuffle parameter
shuffle = True

# Construct ARGS dictionary with all parameters
ARGS = {
    'indices': indices,
    'batch_size': batch_size,
    'shuffle': shuffle
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
covariance_diff_biased Ran
ran, violated the contract we drafted
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("2e39bc098a25ff99")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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_folds Ran
ran; our contract draft was wrong, not the code
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("d9996f0a1157eaa1")
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 list. 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

# Test with different input types
# Case 1: integer input
X_int = 10

# Case 2: list input
X_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Case 3: numpy array input
X_array = np.array([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]])

# Number of folds
k = 3

# Use array as the primary test case
ARGS = {
    'X': X_array,
    '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 list — a list 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
gen_batches Ran
ran, honoured the contract we drafted
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("a10785afdd1943d9")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

ks_test Ran
ran, honoured the contract we drafted
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("a929f8158e0f37f5")
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

np.random.seed(0)

# ks_test parameters:
# - ksstat: a scalar float representing a Kolmogorov-Smirnov test statistic
# - nsamples: an integer for the number of samples
# - ntrials: an integer for the number of trials (default 10000)

ksstat = 0.15  # A scalar KS test statistic value
nsamples = 50  # Number of samples to use in null distribution generation
ntrials = 1000  # Number of trials for null distribution

ARGS = {
    "ksstat": ksstat,
    "nsamples": nsamples,
    "ntrials": ntrials,
}
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
logsumexp Ran
ran; our contract draft was wrong, not the code
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("c73bee7360661346")
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 shape (2, 4) for testing
inputs = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "inputs": inputs,
    "dim": 1,
    "keepdim": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
matrix_str Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("db0aefbe8dbc29a8")
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 str. 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)

# Analyze the function: matrix_str takes a parameter 'p' that is iterated over
# Each element 'a' is passed to vector_str
# vector_str iterates over elements in 'a' and formats them
# So 'p' should be a 2D structure (matrix)

# Create a small 2D numpy array (4 rows x 3 columns for distinctness)
p = np.array([
    [1.23456, 2.34567, 3.45678],
    [4.56789, 5.67890, 6.78901],
    [7.89012, 8.90123, 9.01234],
    [10.12345, 11.23456, 12.34567]
])

# decimal_places: integer controlling format precision
decimal_places = 2

# ignore: can be None, a scalar, or something with __len__ (list/set)
# The function checks: if hasattr(ignore, '__len__') and a in ignore or a == ignore
# Let's use a value that appears in the matrix
ignore = None

# label_columns: boolean parameter
label_columns = False

ARGS = {
    'p': p,
    'decimal_places': decimal_places,
    'ignore': ignore,
    'label_columns': label_columns
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
mix_rbf_mmd2 Ran
ran; our contract draft was wrong, not the code
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("661038d37be136e9")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

mix_rbf_mmd2_loss Ran
ran; our contract draft was wrong, not the code
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("6817b2d2b5a8ba50")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("e1d9c760ce9d1c42")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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.

pretty_str Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("ab49a597c1aff75c")
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 str. 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 a small 2D tensor to test the function
p_2d = torch.tensor([
    [1.23456, 2.34567, 3.45678, 4.56789],
    [5.67890, 6.78901, 7.89012, 8.90123]
], dtype=torch.float32)

# Create a small 1D tensor to test the function
p_1d = torch.tensor([1.23456, 2.34567, 3.45678, 4.56789], dtype=torch.float32)

# Test with 2D case
ARGS = {
    'p': p_2d,
    'decimal_places': 2,
    'ignore': None,
    'label_columns': False
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
sample_holdout_dists Ran
ran; our contract draft was wrong, not the code
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("45caf0e3cf7297ea")
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 scipy.stats import norm

class MockDistribution:
    """Mock distribution with sample() and pdf() methods"""
    def __init__(self, loc=0.0, scale=1.0):
        self.loc = loc
        self.scale = scale
    
    def sample(self):
        return np.random.normal(self.loc, self.scale, size=(4,))
    
    def pdf(self, x):
        return norm.pdf(x, self.loc, self.scale)

np.random.seed(0)

# Create list of mock distributions
dists = [
    MockDistribution(loc=0.0, scale=1.0),
    MockDistribution(loc=0.5, scale=1.2),
    MockDistribution(loc=-0.5, scale=0.8),
]

# Model is not actually used in the function body
model = None

# Quantiles for percentile calculation
quantiles = [25, 50, 75]

ARGS = {
    "dists": dists,
    "model": model,
    "quantiles": quantiles,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
tv_test Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("b4c04d0603c1c2db")
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

np.random.seed(0)

# Analyze the function:
# - tvstat: a scalar or array that will be compared with sample_tv
# - marginals: a 1D numpy array of probabilities that sum to 1 (used with len() and indexing)
# - nsamples: integer, number of samples per trial
# - ntrials: integer with default 10000

# Create valid arguments
marginals = np.array([0.2, 0.3, 0.5])  # 3 categories with probabilities summing to 1
tvstat = 0.15  # scalar total variation statistic
nsamples = 5  # number of samples per trial
ntrials = 1000  # number of trials

ARGS = {
    "tvstat": tvstat,
    "marginals": marginals,
    "nsamples": nsamples,
    "ntrials": ntrials
}
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
vector_str Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("e69ab4938b9c4680")
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 str. 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)

# Analyze the function:
# - p: an iterable that yields numeric values (used in for loop `for a in p`)
# - decimal_places: int, defaults to 2
# - ignore: optional parameter that can be None, or has __len__ (list-like), or is a scalar value

# Create test data
p = [1.2345, 2.5678, 3.9012, 4.1234]
decimal_places = 2
ignore = [1.2345]  # A list-like ignore parameter with __len__

ARGS = {
    'p': p,
    'decimal_places': decimal_places,
    'ignore': ignore
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
KnockoffGAN Not yet run
unverified (harvested, no recorded run)
firmai/tsgan/alg/knockoffgan/KnockoffGAN.py
pointer only (licence: NOASSERTION) · get_code("a78618a3a2bcc9c2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, firmai/tsgan (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. No invocation recorded.

KnockoffMachine Not yet run
unverified (harvested, no recorded run)
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("e61b4c8c3d64412e")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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. No invocation recorded.

calibrate_continuous Not yet run
unverified (harvested, no recorded run)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("c7dde2181bd90c3f")
How it ran

no invocation recorded.

calibrate_discrete Not yet run
unverified (harvested, no recorded run)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("450d25e7824a48dc")
How it ran

no invocation recorded.

fit_classifier Not yet run
unverified (harvested, no recorded run)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("0cddd24f3b7ed39a")
How it ran

no invocation recorded.

fit_mdn Not yet run
unverified (harvested, no recorded run)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("4d0755e27691fb59")
How it ran

no invocation recorded.

hrt Not yet run
unverified (harvested, no recorded run)
tansey/hrt/pyhrt/hrt.py
code served (permissive licence) · get_code("2e296d67a46288e5")
How it ran

no invocation recorded.

save_checkpoint Not yet run
unverified (harvested, no recorded run)
msesia/deepknockoffs/DeepKnockoffs/DeepKnockoffs/machine.py
pointer only (licence: GPL-3.0) · get_code("96f1fefe68df3674")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, msesia/deepknockoffs, 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. No invocation recorded.

Also present in other papers' code

Of 33 samples lifted from this paper's linked repositories, 33 carry a function identity and 0 do not. Of the 33 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 32 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
mix_rbf_mmd2
brick of this paper's assembly: helper
1 other paper
1 later
2407.11734 (2024-07)
Multi-Modal and Multi-Attribute Generation of Single Cells with CFGen

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-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Controlled feature selection aims to discover the features a response depends on while limiting the false discovery rate (FDR) to a predefined level. Recently, multiple deep-learning-based methods have been proposed to perform controlled feature selection through the Model-X knockoff framework. We demonstrate, however, that these methods often fail to control the FDR for two reasons. First, these methods often learn inaccurate models of features. Second, the "swap" property, which is required for knockoffs to be valid, is often not well enforced. We propose a new procedure called FLOWSELECT to perform controlled feature selection that does not suffer from either of these two problems. To more accurately model the features, FLOWSELECT uses normalizing flows, the state-of-the-art method for density estimation. Instead of enforcing the "swap" property, FLOWSELECT uses a novel MCMC-based procedure to calculate p-values for each feature directly. Asymptotically, FLOWSELECT computes valid p-values. Empirically, FLOWSELECT consistently controls the FDR on both synthetic and semi-synthetic benchmarks, whereas competing knockoff-based approaches do not. FLOWSELECT also demonstrates greater power on these benchmarks. Additionally, FLOWSELECT correctly infers the genetic variants associated with specific soybean traits from GWAS data.

For agents

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

get_harvested_code_for_paper("2106.01528")
get_code_for_paper("2106.01528")
have("2106.01528")

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

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

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

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

Connect an agent — have() is free.