SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.19850 · 2026

Neural Additive and Basis Models with Feature Selection and Interactions

Shinichi Shirakawa, Yasutoshi Kishimoto, Kota Yamanishi, Takuya Matsuda

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2606.19850.json · badge: /api/ran/2606.19850.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
shiralab/NAM-FS community
Papers with Code archive
14 ran · 2 no recorded run
FunctionStatusWhere it lives
ChannelWiseLinear Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("7ec5dc9910a677d7")
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, ChannelWiseLinear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Define ARGS dict with all parameters for ChannelWiseLinear
ARGS = {
    'nn_in_dim': 4,
    'nn_out_dim': 3,
    'channel_num': 2,
    'bias': True
}

# Optionally, test the module to verify it works
if __name__ == "__main__":
    module = nn.ChannelWiseLinear(**ARGS)
    # Create a test input: (batch_size=2, channel_num=2, nn_in_dim=4)
    test_input = torch.randn(2, 2, 4)
    output = module(test_input)
    print(f"Input shape: {test_input.shape}")
    print(f"Output shape: {output.shape}")
    print("Setup successful!")
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 ChannelWiseLinear — 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 ChannelWiseLinear 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
Entmax15Function Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("503b8234d7ccab6f")
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, Entmax15Function: 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

torch.manual_seed(0)

# Create a small input tensor for testing
# Shape: (batch_size=2, feature_dim=4)
X = torch.randn(2, 4, requires_grad=True)

# Define the parameters for Entmax15Function.forward
# The forward method signature is: forward(cls, ctx, X, dim=0, k=None)
# ctx is handled internally by Function, so we only need X, dim, and k

ARGS = {
    "X": X,
    "dim": -1,
    "k": None,
}
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 Entmax15Function — 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 Entmax15Function 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
Entmax15SelectorLayer Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("2a82ccde6d996754")
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, Entmax15SelectorLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Function

torch.manual_seed(0)

class Entmax15Function(Function):

    @classmethod
    def forward(cls, ctx, X, dim=0, k=None):
        ctx.dim = dim
        max_val, _ = X.max(dim=dim, keepdim=True)
        X = X - max_val
        X = X / 2
        tau_star, _ = _entmax_threshold_and_support(X, dim=dim, k=k)
        Y = torch.clamp(X - tau_star, min=0) ** 2
        ctx.save_for_backward(Y)
        return Y

    @classmethod
    def backward(cls, ctx, dY):
        Y, = ctx.saved_tensors
        gppr = Y.sqrt()
        dX = dY * gppr
        q = dX.sum(ctx.dim) / gppr.sum(ctx.dim)
        q = q.unsqueeze(ctx.dim)
        dX -= q * gppr
        return (dX, None, None)

def _entmax_threshold_and_support(X, dim=-1, k=None):
    if k is None or k >= X.shape[dim]:
        Xsrt, _ = torch.sort(X, dim=dim, descending=True)
    else:
        Xsrt, _ = torch.topk(X, k=k, dim=dim)
    rho = _make_ix_like(Xsrt, dim)
    mean = Xsrt.cumsum(dim) / rho
    mean_sq = (Xsrt ** 2).cumsum(dim) / rho
    ss = rho * (mean_sq - mean ** 2)
    delta = (1 - ss) / rho
    delta_nz = torch.clamp(delta, 0)
    tau = mean - torch.sqrt(delta_nz)
    support_size = (tau <= Xsrt).sum(dim).unsqueeze(dim)
    tau_star = tau.gather(dim, support_size - 1)
    if k is not None and k < X.shape[dim]:
        unsolved = (support_size == k).squeeze(dim)
        if torch.any(unsolved):
            X_ = _roll_last(X, dim)[unsolved]
            tau_, ss_ = _entmax_threshold_and_support(X_, dim=-1, k=2 * k)
            _roll_last(tau_star, dim)[unsolved] = tau_
            _roll_last(support_size, dim)[unsolved] = ss_
    return (tau_star, support_size)

def _make_ix_like(X, dim):
    d = X.size(dim)
    rho = torch.arange(1, d + 1, device=X.device, dtype=X.dtype)
    view = [1] * X.dim()
    view[0] = -1
    return rho.view(view).transpose(0, dim)

def _roll_last(X, dim):
    if dim == -1:
        return X
    elif dim < 0:
        dim = X.dim() - dim
    perm = [i for i in range(X.dim()) if i != dim] + [dim]
    return X.permute(perm)

def entmax15(X, dim=-1, k=None):
    return Entmax15Function.apply(X, dim, k)

class Entmax15SelectorLayer(nn.Module):

    def __init__(self, sel_num, in_dim):
        super(Entmax15SelectorLayer, self).__init__()
        self.sel_logit = nn.init.uniform_(nn.Parameter(torch.zeros((sel_num, in_dim))))

    def get_index(self):
        return torch.argmax(self.sel_logit, dim=1)

    def forward(self, x, temperature):
        m = entmax15(self.sel_logit / temperature, dim=1)
        return F.linear(x, m)


sel_num = 3
in_dim = 5
batch_size = 2

layer = Entmax15SelectorLayer(sel_num=sel_num, in_dim=in_dim)

x = torch.randn(batch_size, in_dim)
temperature = torch.tensor(1.0)

ARGS = {
    "sel_num": sel_num,
    "in_dim": in_dim
}
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 Entmax15SelectorLayer — 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 Entmax15SelectorLayer 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
ExU Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("d32a6fc8da6802c3")
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, ExU: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'nn_in_dim': 4,
    'nn_out_dim': 3,
    'nn_num': 2,
    'init_weight_mean': 4.0,
}
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 ExU — 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 ExU 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
GAMOutputLayer Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("e6bbfa01382c9094")
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, GAMOutputLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math
import torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: out_dim = 1 (weight is None)
ARGS = {
    "shape_func_num": 4,
    "out_dim": 1,
}
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 GAMOutputLayer — 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 GAMOutputLayer 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
GumbelSelectorLayer Ran
ran on a synthesized input
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("ffaa749a9a669b31")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, 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 torch
import torch.nn as nn
import torch.nn.functional as F

class GumbelSelectorLayer(nn.Module):

    def __init__(self, sel_num, in_dim):
        super(GumbelSelectorLayer, self).__init__()
        self.sel_logit = nn.init.uniform_(nn.Parameter(torch.zeros((sel_num, in_dim))))

    def get_index(self):
        return torch.argmax(self.sel_logit, dim=1)

    def forward(self, x, temperature):
        m = F.gumbel_softmax(self.sel_logit, tau=temperature, dim=1)
        return F.linear(x, m)


INIT_ARGS = {
    'sel_num': 3,
    'in_dim': 4,
}

ARGS = {
    'x': torch.randn(2, 4),
    'temperature': 0.5,
}

if __name__ == '__main__':
    layer = GumbelSelectorLayer(**INIT_ARGS)
    output = layer(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
NAMBatchNorm1d Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("159804ef2f8f9c8d")
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, NAMBatchNorm1d: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function NAMBatchNorm1d.__init__ takes num_features as a parameter
# Looking at the forward method, it reshapes input to (batch_size, -1),
# applies BatchNorm1d, then reshapes back to (batch_size, num_features, -1)
# So num_features should be a positive integer representing feature dimension

num_features = 4

ARGS = {
    "num_features": num_features,
}
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 NAMBatchNorm1d — 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 NAMBatchNorm1d 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
NAMLayer Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("df9f7325d9ee8574")
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, NAMLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'one_input_nn_num': 2,
    'two_input_nn_num': 3,
    'hidden_dims': (64, 32, 16),
    'use_exu': False,
    'dropout_rate': 0.1,
    'batch_norm': True
}
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 NAMLayer — 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 NAMLayer 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
RandomSelectorLayer Ran
ran on a synthesized input · constructed an object; no result was computed
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("cecd4be4a4b96d6d")
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, RandomSelectorLayer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class RandomSelectorLayer(nn.Module):

    def __init__(self, sel_num, in_dim):
        super(RandomSelectorLayer, self).__init__()
        self.fea_idx = torch.randint(low=0, high=in_dim, size=(sel_num,))

    def get_index(self):
        return self.fea_idx

    def forward(self, x, temperature):
        return x[:, self.fea_idx]


# Construct valid arguments for RandomSelectorLayer
ARGS = {
    "sel_num": 3,
    "in_dim": 8
}
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 RandomSelectorLayer — 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 RandomSelectorLayer 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
_entmax_threshold_and_support Ran
ran; our contract draft was wrong, not the code
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("9a114356aeeb0ba1")
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

torch.manual_seed(0)

# Create a small input tensor
# Shape: (2, 4) - batch size 2, dimension 4
X = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "X": X,
    "dim": -1,
    "k": None,
}
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 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
_make_ix_like Ran
ran; our contract draft was wrong, not the code
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("6ac396d9e4692c05")
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 4, dtype family float, shape (1, 3, 1, 1) 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)

# Construct a small tensor with distinct dimensions
X = torch.randn(2, 3, 4, 5)  # batch=2, distinct dims for probing

# The function takes X and dim as parameters
# dim should be a valid dimension index for X (0 to 3 in this case)
dim = 1

ARGS = {
    "X": X,
    "dim": dim
}
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 4, dtype family float, shape (1, 3, 1, 1) — shape (1, 3, 1, 1) 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
_roll_last Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("69bf6a5faa8d1de9")
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 4, dtype family float, shape (2, 4, 5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function _roll_last takes a tensor X and a dimension dim
# It permutes the tensor so that the specified dimension is moved to the last position

# Create a small tensor with distinct dimensions for probing
X = torch.randn(2, 3, 4, 5)  # batch=2, distinct dims: 3, 4, 5

# Test with a valid dimension
dim = 1

ARGS = {
    "X": X,
    "dim": dim
}
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 4, dtype family float, shape (2, 4, 5, 3) — shape (2, 4, 5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
entmax15 Ran
ran; our contract draft was wrong, not the code
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("599b492ddf87de3f")
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 (2, 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 torch

torch.manual_seed(0)

# Create a small input tensor for testing
# Shape: (batch_size=2, features=4)
X = torch.randn(2, 4)

# Define arguments for entmax15 function
ARGS = {
    'X': X,
    'dim': -1,
    'k': None,
}
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 2, dtype family float, shape (2, 4) — shape (2, 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_nam_hidden_layer_list Ran
ran; our contract draft was wrong, not the code
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("89ca8e5cd6a521bd")
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, 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)

ARGS = {
    "nn_in_dim": 4,
    "nn_out_dim": 3,
    "nn_num": 2,
    "use_exu": False,
    "dropout_rate": 0.0,
    "batch_norm": True,
}
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 list, ndim 1, dtype family float — a list 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
NAMFS Not yet run
unverified (harvested, no recorded run)
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("5fc93cbd2b9c2e69")
How it ran

no invocation recorded.

get_selector_layer Not yet run
unverified (harvested, no recorded run)
shiralab/NAM-FS/nam_family/nam.py
code served (permissive licence) · get_code("1e56f67f2a8c0545")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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
entmax15
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2404.03830 (2024-04)
BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Model
2601.22990 (2026-01)
Self-Supervised Slice-to-Volume Reconstruction with Gaussian Representations for Fetal MRI

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

Deep neural networks (DNNs) exhibit attractive performance in various fields but often suffer from low interpretability. The neural additive model (NAM) and its variant called the neural basis model (NBM) use neural networks (NNs) as nonlinear shape functions in generalized additive models (GAMs). Both models are highly interpretable and exhibit good performance and flexibility for NN training. NAM and NBM can provide and visualize the contribution of each feature to the prediction owing to GAM-based architectures. However, when using two-input NNs to consider feature interactions or when applying them to high-dimensional datasets, training NAM and NBM becomes intractable due to the increase in the computational resources required. This paper proposes incorporating the feature selection mechanism into NAM and NBM to resolve computational bottlenecks. We introduce the feature selection layer in both models and update the selection weights during training. Our method is simple and can reduce computational costs and model sizes compared to vanilla NAM and NBM. In addition, it enables us to use two-input NNs even in high-dimensional datasets and capture feature interactions. We demonstrate that the proposed models are computationally efficient compared to vanilla NAM and NBM, and they exhibit better or comparable performance with state-of-the-art GAMs.

For agents

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

get_harvested_code_for_paper("2606.19850")
get_code_for_paper("2606.19850")
have("2606.19850")

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

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

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

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

Connect an agent — have() is free.