SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_32483 · AAAI · 2025

FNIN: A Fourier Neural Operator-based Numerical Integration Network for Surface-form-gradients

Zuxuan Wu, Jiaqi Leng, Yakun Ju, Yuanxu Duan, Jiangnan Zhang, Qingxuan Lv, Hao Fan

Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/aaai_32483.json · badge: /api/ran/aaai_32483.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
nailwatts/FNIN canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
L1_loss Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/training_utils/loss_functions.py
code served (permissive licence) · get_code("f80abdde5c903d6b")
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

torch.manual_seed(0)

# Create small tensors with distinct dimensions for clarity
batch_size = 2
spatial_dim = 4
height = 3
width = 3

# a and b: tensors that will be compared (L1 loss)
# Shape: (batch, spatial_dim, height, width)
a = torch.randn(batch_size, spatial_dim, height, width)
b = torch.randn(batch_size, spatial_dim, height, width)

# mask: binary mask for filtering elements
# Shape: (batch, 1, height, width) - will broadcast with a and b
mask = torch.randint(0, 2, (batch_size, 1, height, width), dtype=torch.float32)

# attention: attention weights
# Shape: (batch, spatial_dim, height, width)
attention = torch.randn(batch_size, spatial_dim, height, width).abs()

ARGS = {
    'a': a,
    'b': b,
    'mask': mask,
    'attention': attention
}
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
format_mem Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/models/debug_tools.py
code served (permissive licence) · get_code("9506d112d0afa096")
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 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 math

torch.manual_seed(0)

# The function format_mem takes a single parameter 'x' which should be an integer in bytes
# Let's test with various byte sizes to cover different unit ranges

ARGS = {
    'x': 512  # 512 bytes - will return value in B
}
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 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
format_tensor_size Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/models/debug_tools.py
code served (permissive licence) · get_code("f5b5c0df26d7730d")
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 math

torch.manual_seed(0)

# The function format_tensor_size takes a single parameter 'x' which is an integer in bytes
# Looking at the function body:
# - format_mem(x) is called with x
# - format_mem expects an integer representing bytes
# - It uses abs(x), math.log2(abs(x)), and arithmetic operations on x

# Test with a few different byte sizes
x_small = 512  # Less than 1024 bytes
x_medium = 1024 * 512  # 512 KiB
x_large = 1024 * 1024 * 256  # 256 MiB

ARGS = {
    'x': x_medium
}
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
getInput Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/models/model_utils.py
code served (permissive licence) · get_code("dfed4cbf7c171dff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a minimal args object with the necessary attributes
class Args:
    def __init__(self, in_light=False, in_mask=False):
        self.in_light = in_light
        self.in_mask = in_mask

# Create sample data dict with required keys
data = {
    'img': torch.randn(2, 3, 4, 4),  # batch=2, channels=3, height=4, width=4
    'dirs': torch.randn(2, 6),        # batch=2, direction features=6
    'm': torch.randn(2, 1, 4, 4),     # batch=2, mask channels=1, height=4, width=4
}

# Define ARGS dict
ARGS = {
    'args': Args(in_light=True, in_mask=True),
    'data': data,
}
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 list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getInputChanel Ran
ran, honoured the contract we drafted
nailwatts/FNIN/models/model_utils.py
code served (permissive licence) · get_code("912f19d27a1a69c2")
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. 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

class MockLogger:
    def printWrite(self, message):
        pass

class MockArgs:
    def __init__(self):
        self.log = MockLogger()
        self.in_light = False
        self.in_mask = False

ARGS = {
    'args': MockArgs()
}
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 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
masked_mean Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/training_utils/loss_functions.py
code served (permissive licence) · get_code("cd3f4dd6be0e3dd3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create tensors with distinct dimensions
# x: (batch=2, features=4, spatial=3) - will be flattened to (2, 12)
x = torch.randn(2, 4, 3)

# mask: (batch=2, features=4, spatial=3) - binary mask, will be flattened to (2, 12)
mask = torch.randint(0, 2, (2, 4, 3)).float()

# attention: (batch=2, features=4, spatial=3) - attention weights, will be flattened to (2, 12)
attention = torch.randn(2, 4, 3).abs()

ARGS = {
    "x": x,
    "mask": mask,
    "attention": attention,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize Ran
ran; our contract draft was wrong, not the code
nailwatts/FNIN/models/multiscale_fno.py
code served (permissive licence) · get_code("8e14bb3870a3d574")
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 (6,) 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 attention map tensor
# The function indexes into it with a mask, so we need it to be at least 1D
attention_map = torch.randn(6)

# Create a mask tensor with the same shape
# mask > 0 selects which elements to normalize
mask = torch.tensor([1.0, 1.0, 0.0, 1.0, 0.0, 1.0])

ARGS = {
    "attention_map": attention_map,
    "mask": mask,
}
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 (6,) — shape (6,) 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
angular_err Not yet run
unverified (harvested, no recorded run)
nailwatts/FNIN/training_utils/loss_functions.py
code served (permissive licence) · get_code("4e310b315d673be2")
How it ran

no invocation recorded.

load_checkpoint Not yet run
unverified (harvested, no recorded run)
nailwatts/FNIN/models/save_load_checkpoint.py
code served (permissive licence) · get_code("b3e489bd0c2e85f9")
How it ran

no invocation recorded.

parseData Not yet run
unverified (harvested, no recorded run)
nailwatts/FNIN/models/model_utils.py
code served (permissive licence) · get_code("4fea8296248fc517")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
getInput 1 other paper
1 dated earlier
1903.07366 (2019-03)
Self-calibrating Deep Photometric Stereo Networks
getInputChanel 1 other paper
1 dated earlier
1903.07366 (2019-03)
Self-calibrating Deep Photometric Stereo Networks
parseData 1 other paper
1 dated earlier
1903.07366 (2019-03)
Self-calibrating Deep Photometric Stereo Networks

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

Surface-from-gradients (SfG) aims to recover a threedimensional (3D) surface from its gradients. Traditional methods encounter significant challenges in achieving high accuracy and handling high-resolution inputs, particularly facing the complex nature of discontinuities and the inefficiencies associated with large-scale linear solvers. Although recent advances in deep learning, such as photometric stereo, have enhanced normal estimation accuracy, they do not fully address the intricacies of gradient-based surface reconstruction. To overcome these limitations, we propose a Fourier neural operator-based Numerical Integration Network (FNIN) within a two-stage optimization framework. In the first stage, our approach employs an iterative architecture for numerical integration, harnessing an advanced Fourier neural operator to approximate the solution operator in Fourier space. Additionally, a self-learning attention mechanism is incorporated to effectively detect and handle discontinuities. In the second stage, we refine the surface reconstruction by formulating a weighted least squares problem, addressing the identified discontinuities rationally. Extensive experiments demonstrate that our method achieves significant improvements in both accuracy and efficiency compared to current state-of-the-art solvers. This is particularly evident in handling high-resolution images with complex data, achieving errors of fewer than 0.1 mm on tested objects.

For agents

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

get_harvested_code_for_paper("aaai_32483")
get_code_for_paper("aaai_32483")
have("aaai_32483")

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

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

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

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

Connect an agent — have() is free.