SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.01178 · 2022

Discretization Invariant Networks for Learning Maps between Neural Fields

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 0 failures of our instrument; 1 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/2206.01178.json · badge: /api/ran/2206.01178.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
clintonjwang/di-net canonical (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
FunctionStatusWhere it lives
Conv2 Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/classifier.py
code served (permissive licence) · get_code("33dfd14c28e8f4f4")
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 Sequential. 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)

# Conv2 takes in_channels, out_dims, and optional C parameter
# Based on the function body:
# - in_channels: int, number of input channels
# - out_dims: int, number of output dimensions (final linear layer output)
# - C: int, base channel count (default 64)

ARGS = {
    'in_channels': 3,
    'out_dims': 10,
    'C': 64
}
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 Sequential — a Sequential 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
Conv4 Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/classifier.py
code served (permissive licence) · get_code("026bed8688ab8bca")
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 Sequential. 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)

# Conv4 takes in_channels, out_dims, and optional C parameter
# in_channels: number of input channels for the first conv layer
# out_dims: number of output dimensions (final linear layer output)
# C: base channel multiplier (default 32)

ARGS = {
    "in_channels": 3,
    "out_dims": 10,
    "C": 32
}
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 Sequential — a Sequential 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
conv3d_bn_relu Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/seg.py
code served (permissive licence) · get_code("43fb14fcef7c191d")
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 Sequential. 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 = {
    'in_': 3,
    'out_': 16,
    'k': 3,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
conv_bn_relu Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/classifier.py
code served (permissive licence) · get_code("0deb0609b7cd252c")
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 Sequential. 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 = {
    'in_': 3,
    'out_': 16,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
decomposed_siren Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/hypernets.py
code served (permissive licence) · get_code("1b0eed42d48ac4ef")
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, 7) 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 to determine required shapes
# coords: used in einsum 'Ni,Boi->BNo' where N is spatial points, i is input dim
# params: indexed and reshaped throughout
#   - First layer: n=256*2=512, n2=n+256=768, params[:, 0:512].reshape(-1, 256, 2) and params[:, 512:768]
#   - Subsequent layers: n=256*256=65536, n2=n+256=65792
#   - Final layer: params[:, ix:].reshape(-1, 7, 256)
#
# Let's trace through:
# - B: batch size (use 2)
# - N: number of spatial points (use 4)
# - Input coord dim: 2 (from first reshape -1, 256, 2)
# - Hidden dim: 256
# - Output dim: 7 (from final reshape -1, 7, 256)
#
# Total params needed:
# Layer 1: 256*2 + 256 = 768
# Layer 2: 256*256 + 256 = 65792
# Layer 3: 256*256 + 256 = 65792
# Layer 4: 256*256 + 256 = 65792
# Layer 5: 7*256 = 1792
# Total: 768 + 65792*3 + 1792 = 200128

B = 2  # batch size
N = 4  # number of spatial points
input_dim = 2
hidden_dim = 256
output_dim = 7

# coords: shape (N, input_dim) for use with batch dimension B in einsum
coords = torch.randn(N, input_dim)

# params: shape (B, total_param_count)
layer1_weights = 256 * 2
layer1_bias = 256
layer2_3_4_weights = 256 * 256
layer2_3_4_bias = 256
layer5_weights = 7 * 256

total_params = (layer1_weights + layer1_bias + 
                3 * (layer2_3_4_weights + layer2_3_4_bias) + 
                layer5_weights)

params = torch.randn(B, total_params)

ARGS = {
    'coords': coords,
    'params': params
}
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, 7) — shape (2, 4, 7) 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_convnext_block Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/convnext.py
code served (permissive licence) · get_code("c2bc0cbdf4022748")
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 CNBlock. 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)

# Parameters for get_convnext_block
in_channels = 4
mid_channels = 8
height = 16
width = 16

# Create a state_dict with all required keys
state_dict = {
    'pointwise_conv1.weight': torch.randn(mid_channels, in_channels),
    'pointwise_conv1.bias': torch.randn(mid_channels),
    'pointwise_conv2.weight': torch.randn(in_channels, mid_channels),
    'pointwise_conv2.bias': torch.randn(in_channels),
    'depthwise_conv.weight': torch.randn(in_channels, 1, 7, 7),
    'depthwise_conv.bias': torch.randn(in_channels),
    'norm.weight': torch.randn(in_channels),
    'norm.bias': torch.randn(in_channels),
    'gamma': torch.randn(in_channels),
}

ARGS = {
    'state_dict': state_dict,
}
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 CNBlock — a CNBlock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CNBlock 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
interpolate_gt_seg Ran
ran on a synthesized input
clintonjwang/di-net/dinet/experiments/segment.py
code served (permissive licence) · get_code("f7e9c30ec4cad6e4")
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, 3, 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 as nn

torch.manual_seed(0)

# Analyze the function:
# - seg: indexed with [..., coo[:, 0], coo[:, 1]], then transposed(1, 2)
#   This means seg needs at least 3 dimensions where last two are spatial
#   Indexing with long indices suggests shape like (batch, channels, height, width)
# - coords: used as coords[:, 0] and coords[:, 1], so shape (N, 2)
#   Values are floored then used as long indices, so need to be in valid range

# Create seg tensor: shape (batch=2, channels=4, height=5, width=6)
seg = torch.randn(2, 4, 5, 6)

# Create coords tensor: shape (num_points=3, 2)
# Values should be valid indices for the spatial dimensions (height, width)
# height index in [0, 4], width index in [0, 5]
coords = torch.tensor([
    [1.2, 2.3],
    [3.1, 4.5],
    [0.9, 1.8]
], dtype=torch.float32)

ARGS = {
    "seg": seg,
    "coords": coords
}
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, 3, 4) — shape (2, 3, 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
to_seg_siren Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/hypernets.py
code served (permissive licence) · get_code("97416b45ddb6851c")
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 SIRENBatch. 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 on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal SIREN module that matches how it's used in the function
class MinimalSIREN(nn.Module):
    def __init__(self):
        super().__init__()
        self.net = nn.ModuleList([
            nn.Linear(4, 256),
            nn.ReLU(),
            nn.Linear(256, 256),
            nn.ReLU(),
            nn.Linear(256, 256),  # Will be replaced in the function
        ])
    
    def forward(self, x):
        for layer in self.net:
            x = layer(x)
        return x

# Create a container for siren instances with an evaluator list
class SIRENBatch:
    def __init__(self, num_sirens):
        self.evaluator = [MinimalSIREN() for _ in range(num_sirens)]

# Create param_batch: list of parameter vectors
# Each vector should have the right size to match all parameters in a SIREN
batch_size = 2
siren_batch = SIRENBatch(batch_size)

# Get the total parameter count from one SIREN
sample_siren = MinimalSIREN()
total_params = sum(p.numel() for p in sample_siren.parameters())

# Create parameter vectors for each siren in the batch
param_batch = [torch.randn(total_params) for _ in range(batch_size)]

ARGS = {
    "param_batch": param_batch,
    "siren_batch": siren_batch,
}
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 SIRENBatch — a SIRENBatch output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SIRENBatch 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
vectorize_siren Ran
ran on a synthesized input
clintonjwang/di-net/dinet/baselines/hypernets.py
code served (permissive licence) · get_code("490542f18fdb2fb4")
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, 23) 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)

# Create a small stand-in SIREN network
class SimpleNet(nn.Module):
    def __init__(self, input_dim=4, hidden_dim=3):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, hidden_dim)
        self.linear2 = nn.Linear(hidden_dim, 2)
    
    def forward(self, x):
        x = torch.sin(self.linear1(x))
        x = self.linear2(x)
        return x

# Create a batch container with an evaluator attribute
class SirenBatch:
    def __init__(self, evaluator):
        self.evaluator = evaluator

# Create multiple SIREN networks for the batch
siren1 = SimpleNet(input_dim=4, hidden_dim=3)
siren2 = SimpleNet(input_dim=4, hidden_dim=3)

# Create the batch object with evaluator containing the networks
siren_batch = SirenBatch(evaluator=[siren1, siren2])

ARGS = {
    "siren_batch": siren_batch
}
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, 23) — shape (2, 23) 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
translate_convnext_block Not yet run
unverified (harvested, no recorded run)
clintonjwang/di-net/dinet/baselines/convnext.py
code served (permissive licence) · get_code("25c08cdc853c7c75")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

With the emergence of powerful representations of continuous data in the form of neural fields, there is a need for discretization invariant learning: an approach for learning maps between functions on continuous domains without being sensitive to how the function is sampled. We present a new framework for understanding and designing discretization invariant neural networks (DI-Nets), which generalizes many discrete networks such as convolutional neural networks as well as continuous networks such as neural operators. Our analysis establishes upper bounds on the deviation in model outputs under different finite discretizations, and highlights the central role of point set discrepancy in characterizing such bounds. This insight leads to the design of a family of neural networks driven by numerical integration via quasi-Monte Carlo sampling with discretizations of low discrepancy. We prove by construction that DI-Nets universally approximate a large class of maps between integrable function spaces, and show that discretization invariance also describes backpropagation through such models. Applied to neural fields, convolutional DI-Nets can learn to classify and segment visual data under various discretizations, and sometimes generalize to new types of discretizations at test time. Code: https://github.com/clintonjwang/DI-net.

For agents

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

get_harvested_code_for_paper("2206.01178")
get_code_for_paper("2206.01178")
have("2206.01178")

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

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

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

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

Connect an agent — have() is free.