SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.12330 · 2023

ProtoGate: Prototype-based Neural Networks with Global-to-local Feature Selection for Tabular Biomedical Data

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 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 6 have no contract verdict; 0 failures of our instrument; 7 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/2306.12330.json · badge: /api/ran/2306.12330.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
SilenceX12138/ProtoGate canonical (classifier label)
classifier basis: census
7 ran · 7 no recorded run
FunctionStatusWhere it lives
get_activation Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/custom_models/protogate/ProtoGate.py
code served (permissive licence) · get_code("b4bc72c526346eb6")
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 ReLU. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class DeactFunc(nn.Module):
    def __init__(self) -> None:
        super().__init__()

    def forward(self, x):
        return x

def get_activation(value):
    if value == 'relu':
        return torch.nn.ReLU()
    elif value == 'l_relu':
        return torch.nn.LeakyReLU(negative_slope=0.2)
    elif value == 'sigmoid':
        return torch.nn.Sigmoid()
    elif value == 'tanh':
        return torch.nn.Tanh()
    elif value == 'none':
        return DeactFunc()
    else:
        raise NotImplementedError('activation for the gating network not recognized')

ARGS = {
    'value': 'relu'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
get_labels_lists Ran
ran, honoured the contract we drafted
SilenceX12138/ProtoGate/src/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from andreimargeloiu/wpfs, is pointer only (licence: NONE) · get_code("cda491bdda02d633")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from andreimargeloiu/wpfs, and GitHub detected no licence in that repository when it was checked. 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_run_name Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/run_experiment.py
code served (permissive licence) · get_code("c4e423c29d9e9d75")
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 torch.nn as nn

torch.manual_seed(0)

class Args:
    def __init__(self, model, sparsity_type):
        self.model = model
        self.sparsity_type = sparsity_type

ARGS = {
    'args': Args(model='dnn', sparsity_type='global')
}
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 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
pearson_distance Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/_shared_imports.py
code served (permissive licence) · get_code("61cbaf7cc10d3fe4")
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 torch
import numpy as np
from scipy.stats import pearsonr, spearmanr

torch.manual_seed(0)

# pearson_distance expects two array-like arguments x and y
# It calls pearsonr(x, y)[0] to get the correlation coefficient
# and returns 1 - that coefficient

# Create small 1D arrays for x and y
x = np.array([1.0, 2.0, 3.0, 4.0])
y = np.array([2.0, 4.0, 5.0, 4.0])

ARGS = {
    'x': x,
    'y': y
}
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 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
pred_loss Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/custom_models/protogate/ProtoGate.py
code served (permissive licence) · get_code("33fe70f3b4718dbc")
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 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class ProtoLayer(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, query, neighbors):
        # query: (batch_size, dim)
        # neighbors: (batch_size, num_neighbors, dim)
        # output: (batch_size, num_neighbors)
        batch_size = query.shape[0]
        num_neighbors = neighbors.shape[1]
        
        # Simple scoring: compute similarity
        query_expanded = query.unsqueeze(1)  # (batch_size, 1, dim)
        scores = (query_expanded * neighbors).sum(-1)  # (batch_size, num_neighbors)
        return scores

# Create small tensors
batch_size = 2
num_neighbors = 3
embedding_dim = 4
num_classes = 5

proto_layer = ProtoLayer(embedding_dim, num_neighbors)

# query: (batch_size, embedding_dim)
query = torch.randn(batch_size, embedding_dim)

# neighbors: (batch_size, num_neighbors, embedding_dim)
neighbors = torch.randn(batch_size, num_neighbors, embedding_dim)

# query_label: (batch_size, num_classes) - one-hot encoded
query_label = torch.zeros(batch_size, num_classes)
query_label[0, 1] = 1
query_label[1, 3] = 1

# neighbor_labels: (batch_size, num_neighbors, num_classes) - one-hot encoded
neighbor_labels = torch.zeros(batch_size, num_neighbors, num_classes)
neighbor_labels[0, 0, 1] = 1
neighbor_labels[0, 1, 2] = 1
neighbor_labels[0, 2, 1] = 1
neighbor_labels[1, 0, 3] = 1
neighbor_labels[1, 1, 4] = 1
neighbor_labels[1, 2, 3] = 1

ARGS = {
    'proto_layer': proto_layer,
    'query': query,
    'neighbors': neighbors,
    'query_label': query_label,
    'neighbor_labels': neighbor_labels,
    'method': 'deterministic'
}
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 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
seed_everything Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/_shared_imports.py
code served (permissive licence) · get_code("29afa4ebe6fffe82")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 random
import numpy as np
import torch

class Args:
    def __init__(self, seed_global, tags):
        self.seed_global = seed_global
        self.tags = tags

ARGS = {
    'args': Args(seed_global=42, tags=['dev', 'training'])
}
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 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
spearman_distance Ran
ran on a synthesized input
SilenceX12138/ProtoGate/src/_shared_imports.py
code served (permissive licence) · get_code("049998fcfb7fb86f")
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 torch
import numpy as np
from scipy.stats import pearsonr, spearmanr

torch.manual_seed(0)

# The function spearman_distance takes two arguments x and y
# and computes 1 - spearmanr(x, y)[0]
# spearmanr expects array-like inputs (1D or 2D)
# We'll create two small 1D arrays of distinct values

x = np.array([1.0, 2.0, 3.0, 4.0])
y = np.array([2.0, 4.0, 5.0, 7.0])

ARGS = {
    'x': x,
    'y': y,
}
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 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
compute_all_metrics Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/utils.py
code served (permissive licence) · get_code("bebc20d13e6f240c")
How it ran

no invocation recorded.

create_wandb_logger Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/run_experiment.py
code served (permissive licence) · get_code("80b33ca8bcabbd77")
How it ran

no invocation recorded.

detach_tensors Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from andreimargeloiu/wpfs, is pointer only (licence: NONE) · get_code("ffdfda6bfc1ce5a8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from andreimargeloiu/wpfs, and GitHub detected no licence in that repository when it was checked. 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.

load_cohort Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/dataset.py
code served (permissive licence) · get_code("07d380ea45c24645")
How it ran

no invocation recorded.

load_csv_data Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/dataset.py
code served (permissive licence) · get_code("6e369ec9defcbdf3")
How it ran

no invocation recorded.

param_tune_experiment Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/param_tune.py
code served (permissive licence) · get_code("3b83a3059263cacc")
How it ran

no invocation recorded.

proto_predict Not yet run
unverified (harvested, no recorded run)
SilenceX12138/ProtoGate/src/custom_models/protogate/ProtoGate.py
code served (permissive licence) · get_code("f65d0fd16c1fefea")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 12 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
detach_tensors 2 other papers
2 dated earlier
2211.06302 (2022-11)
GCondNet: A Novel Method for Improving Neural Networks on Small High-Dimensional Tabular Data
2211.15616 (2022-11)
Weight Predictor Network with Feature Selection for Small Sample Tabular Biomedical Data
get_labels_lists 2 other papers
2 dated earlier
2211.06302 (2022-11)
GCondNet: A Novel Method for Improving Neural Networks on Small High-Dimensional Tabular Data
2211.15616 (2022-11)
Weight Predictor Network with Feature Selection for Small Sample Tabular Biomedical Data

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

Tabular biomedical data poses challenges in machine learning because it is often high-dimensional and typically low-sample-size (HDLSS). Previous research has attempted to address these challenges via local feature selection, but existing approaches often fail to achieve optimal performance due to their limitation in identifying globally important features and their susceptibility to the co-adaptation problem. In this paper, we propose ProtoGate, a prototype-based neural model for feature selection on HDLSS data. ProtoGate first selects instance-wise features via adaptively balancing global and local feature selection. Furthermore, ProtoGate employs a non-parametric prototype-based prediction mechanism to tackle the co-adaptation problem, ensuring the feature selection results and predictions are consistent with underlying data clusters. We conduct comprehensive experiments to evaluate the performance and interpretability of ProtoGate on synthetic and real-world datasets. The results show that ProtoGate generally outperforms state-of-the-art methods in prediction accuracy by a clear margin while providing high-fidelity feature selection and explainable predictions. Code is available at https://github.com/SilenceX12138/ProtoGate.

For agents

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

get_harvested_code_for_paper("2306.12330")
get_code_for_paper("2306.12330")
have("2306.12330")

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

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

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

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

Connect an agent — have() is free.