SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.08748 · 2021

Input Invex Neural Network

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 7 have no contract verdict; 1 failure of our instrument; 3 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.08748.json · badge: /api/ran/2106.08748.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
tsumansapkota/Input-Invex-Neural-Network canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
get_children Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/classes.py
code served (permissive licence) · get_code("e1a3bf8a0feda324")
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)

# Create a simple nested module structure
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)

class NestedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.child1 = SimpleModule()
        self.child2 = nn.Linear(3, 2)
        self.child3 = SimpleModule()

class DeepNestedModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.nested = NestedModule()
        self.simple = SimpleModule()

# Create a module instance
module = DeepNestedModule()

ARGS = {
    "module": module
}
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
jacobian Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/res_flow.py
code served (permissive licence) · get_code("7bfb70b8bf7c94bb")
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 3, dtype family float, shape (2, 4, 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)

# Create Y: output tensor with shape (batch_size=2, output_dim=3)
# This needs to be derived from X so gradients can flow
Y_base = torch.randn(2, 3, requires_grad=True)

# Create X: input tensor with shape (batch_size=2, input_dim=4)
X = torch.randn(2, 4, requires_grad=True)

# For a realistic setup, Y should depend on X
# Create a simple function: Y = X @ W where W is (4, 3)
W = torch.randn(4, 3, requires_grad=True)
Y = X @ W

ARGS = {
    "Y": Y,
    "X": X,
    "create_graph": 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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
line_search Ran
ran; our contract draft was wrong, not the code
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/broyden.py
code served (permissive licence) · get_code("2e551f7f67056cb3")
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 torch
import numpy as np

torch.manual_seed(0)

# The function `line_search` uses:
# - update: a tensor, used in arithmetic operations (x0 + s * update)
# - x0: a tensor, used in arithmetic and norm operations
# - g0: a tensor, used in norm operations
# - g: a callable that takes x_est (a tensor) and returns a gradient tensor
# - nstep: an integer (not used in function body)
# - on: a boolean flag

# Create small tensors
x0 = torch.randn(4)
update = torch.randn(4)
g0 = torch.randn(4)

# Create a simple gradient function
# g should take an estimated x and return a gradient tensor
def g(x_est):
    # Simple quadratic function gradient: g = 2*x
    return 2.0 * x_est

ARGS = {
    "update": update,
    "x0": x0,
    "g0": g0,
    "g": g,
    "nstep": 0,
    "on": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — 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
normalize_u Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/mixed_lipschitz.py
code served (permissive licence) · get_code("51fae1159c4f5c74")
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 (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
import torch.nn.functional as F

torch.manual_seed(0)

# Test with different codomain values
# Case 1: codomain = 2 (uses F.normalize)
u_1 = torch.randn(4)
codomain_1 = 2
out_1 = None

# Case 2: codomain = float('inf') (uses projmax_)
u_2 = torch.randn(4)
codomain_2 = float('inf')
out_2 = None

# Case 3: codomain = 1 (uses vector_norm with inf)
u_3 = torch.randn(4)
codomain_3 = 1
out_3 = None

# Case 4: codomain > 1 and != 2 (uses vector_norm with codomain/(codomain-1))
u_4 = torch.randn(4)
codomain_4 = 3
out_4 = None

# Use the most comprehensive case
ARGS = {
    'u': torch.randn(4),
    'codomain': 2,
    'out': 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 1, dtype family float, shape (4,) — shape (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
normalize_v Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/mixed_lipschitz.py
code served (permissive licence) · get_code("a37b263718447216")
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 (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
import torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: domain=2 (uses F.normalize)
v1 = torch.randn(4)
domain1 = 2
out1 = None

# Test case 2: domain=1 (uses projmax_)
v2 = torch.randn(4)
domain2 = 1
out2 = None

# Test case 3: domain as tensor (custom normalization path)
v3 = torch.randn(4)
domain3 = torch.tensor(3.0)
out3 = None

ARGS = {
    "v": v1,
    "domain": domain1,
    "out": out1
}
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 (4,) — shape (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
projmax_ Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/mixed_lipschitz.py
code served (permissive licence) · get_code("4174ba4ef5147b9a")
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 (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)

# The function projmax_ takes a single parameter v which is a tensor.
# It performs an inplace argmax on absolute value.
# The function calls:
# - torch.argmax(torch.abs(v)) - needs a tensor
# - v.zero_() - inplace operation on tensor
# - v[ind] = 1 - indexing and assignment on tensor
# So v must be a torch.Tensor

v = torch.randn(4)

ARGS = {
    "v": v
}
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 (4,) — shape (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
rmatvec Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/broyden.py
code served (permissive licence) · get_code("54f0bd531896cb01")
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)

# Analyze the function:
# - part_Us: used with .nelement(), and indexed as 'bij' in einsum (3D tensor: batch, i, j)
# - part_VTs: used as 'bji' in einsum (3D tensor: batch, j, i)
# - x: used as 'bi' in einsum (2D tensor: batch, i)

# Create small tensors with distinct dimensions for clarity
batch_size = 2
dim_i = 4
dim_j = 3

# part_Us: shape (batch, i, j)
part_Us = torch.randn(batch_size, dim_i, dim_j)

# part_VTs: shape (batch, j, i)
part_VTs = torch.randn(batch_size, dim_j, dim_i)

# x: shape (batch, i)
x = torch.randn(batch_size, dim_i)

ARGS = {
    'part_Us': part_Us,
    'part_VTs': part_VTs,
    'x': x
}
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
scalar_search_armijo Ran
ran, honoured the contract we drafted
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/broyden.py
code served (permissive licence) · get_code("b2b5022f654ee4d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 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

torch.manual_seed(0)

# The function expects:
# - phi: a callable that takes a scalar alpha and returns a scalar value
# - phi0: a scalar (initial function value)
# - derphi0: a scalar (initial derivative value)
# - c1: a scalar (default 0.0001)
# - alpha0: a scalar (default 1)
# - amin: a scalar (default 0)

# Create a simple quadratic function as phi
# phi(alpha) = (alpha - 0.5)^2 + 0.1
def phi(alpha):
    return (alpha - 0.5) ** 2 + 0.1

# Evaluate at alpha=1 to get phi0
phi0 = phi(1.0)

# Derivative of phi at alpha=1: d/d_alpha[(alpha - 0.5)^2 + 0.1] = 2(alpha - 0.5)
# At alpha=1: 2(1 - 0.5) = 1.0
derphi0 = 1.0

ARGS = {
    "phi": phi,
    "phi0": phi0,
    "derphi0": derphi0,
    "c1": 0.0001,
    "alpha0": 1.0,
    "amin": 0.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
spectral_norm_fc Ran
ran on a synthesized input
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/spectral_norm_fc.py
code served (permissive licence) · get_code("c64ab1070035ae31")
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 SimpleModule. 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
from torch.nn.functional import normalize

torch.manual_seed(0)

# Create a simple module with a weight parameter
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a weight tensor with distinct dimensions (4x3)
        self.weight = nn.Parameter(torch.randn(4, 3))
    
    def forward(self, x):
        return x

# Instantiate the module
module = SimpleModule()

# Define arguments for SpectralNorm
ARGS = {
    'module': module,
    'name': 'weight',
    'coeff': 1.0,
    'n_power_iterations': 1,
    'dim': 0,
    'eps': 1e-12
}
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 SimpleModule — a SimpleModule output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModule 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
remove_spectral_norm Not yet run
unverified (harvested, no recorded run)
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/spectral_norm_fc.py
code served (permissive licence) · get_code("40af90ae6f78dcfb")
How it ran

no invocation recorded.

remove_spectral_norm_conv Not yet run
unverified (harvested, no recorded run)
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/spectral_norm_conv_inplace.py
code served (permissive licence) · get_code("1ec532cf64021e4b")
How it ran

no invocation recorded.

spectral_norm_conv Not yet run
unverified (harvested, no recorded run)
tsumansapkota/Input-Invex-Neural-Network/nflib/utils/spectral_norm_conv_inplace.py
code served (permissive licence) · get_code("b52f59af0c419a22")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 9 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
scalar_search_armijo 13 other papers
1 dated earlier, 1 the same month, 11 later · 4 only as an assembly brick
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2106.00553 (2021-06)
SHINE: SHaring the INverse Estimate from the forward pass for bi-level optimization and implicit models
2109.14247 (2021-09)
Training Feedback Spiking Neural Networks by Implicit Differentiation on the Equilibrium State
and 10 more not named here
line_search 11 other papers
1 dated earlier, 10 later · 3 only as an assembly brick
2006.08656 (2020-06)
Multiscale Deep Equilibrium Models
2109.14247 (2021-09)
Training Feedback Spiking Neural Networks by Implicit Differentiation on the Equilibrium State
2110.10249 (2021-10)
Neural Stochastic PDEs: Resolution-Invariant Learning of Continuous Spatiotemporal Dynamics
and 8 more not named here
remove_spectral_norm 6 other papers
3 dated earlier, 3 later
1911.07532 (2019-11)
Graph Neural Ordinary Differential Equations
2003.00378 (2020-03)
Understanding the Intrinsic Robustness of Image Distributions using Conditional Generative Models
2007.10247 (2020-07)
Learning Joint Spatial-Temporal Transformations for Video Inpainting
and 3 more not named here

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

Connected decision boundaries are useful in several tasks like image segmentation, clustering, alpha-shape or defining a region in nD-space. However, the machine learning literature lacks methods for generating connected decision boundaries using neural networks. Thresholding an invex function, a generalization of a convex function, generates such decision boundaries. This paper presents two methods for constructing invex functions using neural networks. The first approach is based on constraining a neural network with Gradient Clipped-Gradient Penality (GCGP), where we clip and penalise the gradients. In contrast, the second one is based on the relationship of the invex function to the composition of invertible and convex functions. We employ connectedness as a basic interpretation method and create connected region-based classifiers. We show that multiple connected set based classifiers can approximate any classification function. In the experiments section, we use our methods for classification tasks using an ensemble of 1-vs-all models as well as using a single multiclass model on small-scale datasets. The experiments show that connected set-based classifiers do not pose any disadvantage over ordinary neural network classifiers, but rather, enhance their interpretability. We also did an extensive study on the properties of invex function and connected sets for interpretability and network morphism with experiments on toy and real-world data sets. Our study suggests that invex function is fundamental to understanding and applying locality and connectedness of input space which is useful for various downstream tasks.

For agents

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

get_harvested_code_for_paper("2106.08748")
get_code_for_paper("2106.08748")
have("2106.08748")

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

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

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

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

Connect an agent — have() is free.