SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.14540 · 2022

NAF: Neural Attenuation Fields for Sparse-View CBCT Reconstruction

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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 7 have no contract verdict; 0 failures of our instrument; 4 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/2209.14540.json · badge: /api/ran/2209.14540.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
ruyi-zha/naf_cbct canonical (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
FunctionStatusWhere it lives
calc_mse_loss Ran
ran on a synthesized input
ruyi-zha/naf_cbct/src/loss/loss.py
code served (permissive licence) · get_code("fa777c40b3e81297")
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 dict. 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 small tensors for x and y
x = torch.randn(2, 4)
y = torch.randn(2, 4)

# Create loss dict with 'loss' key initialized
loss = {'loss': torch.tensor(0.0)}

ARGS = {
    'loss': loss,
    'x': x,
    'y': y
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
convert_to_attenuation Ran
ran on a synthesized input
ruyi-zha/naf_cbct/dataGenerator/generateData.py
code served (permissive licence) · get_code("a3454a245c09bd37")
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 ndarray, ndim 3, dtype family float, shape (4, 3, 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 numpy as np

# Create a small 3D CT data array
data = np.random.randn(4, 3, 2).astype(np.float32)

# Define rescaling parameters
rescale_slope = 1.2
rescale_intercept = -1024.0

ARGS = {
    "data": data,
    "rescale_slope": rescale_slope,
    "rescale_intercept": rescale_intercept,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 3, 2) — shape (4, 3, 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
get_psnr Ran
ran on a synthesized input
ruyi-zha/naf_cbct/src/utils/util.py
code served (permissive licence) · get_code("1c7554fa67b54a72")
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 (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)

# Create two small tensors with distinct shapes for x and y
x = torch.randn(2, 4)
y = torch.randn(2, 4)

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 (1,) — shape (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
get_psnr_3d Ran
ran on a synthesized input
ruyi-zha/naf_cbct/src/utils/util.py
code served (permissive licence) · get_code("052d9eed2a8c761f")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Create two small 3D arrays in NDHW format (or DHW which will be expanded to NDHW)
# Using distinct dimensions: D=2, H=3, W=4
arr1_np = np.random.rand(2, 3, 4).astype(np.float32)
arr1_np = np.clip(arr1_np, 0, 1)

arr2_np = np.random.rand(2, 3, 4).astype(np.float32)
arr2_np = np.clip(arr2_np, 0, 1)

# Convert to torch tensors
arr1_torch = torch.from_numpy(arr1_np)
arr2_torch = torch.from_numpy(arr2_np)

ARGS = {
    "arr1": arr1_torch,
    "arr2": arr2_torch,
    "size_average": True,
    "PIXEL_MAX": 1.0
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
loadImage Ran
ran on a synthesized input
ruyi-zha/naf_cbct/dataGenerator/generateData.py
code served (permissive licence) · get_code("63b7e78616925c1c")
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 ndarray, ndim 3, dtype family float, shape (128, 128, 128) 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 numpy as np
import scipy.io
import scipy.ndimage.interpolation
import tempfile
import os

# Create a temporary .mat file with dummy CT image data
temp_dir = tempfile.mkdtemp()
mat_file = os.path.join(temp_dir, "test_image.mat")

# Create a small 3D CT image (64x64x64) with realistic HU values
dummy_image = np.random.randint(-1000, 100, size=(64, 64, 64)).astype(np.float32)
scipy.io.savemat(mat_file, {'img': dummy_image})

ARGS = {
    'dirname': mat_file,
    'nVoxels': np.array((128, 128, 128)),
    'convert': True,
    'rescale_slope': 1.0,
    'rescale_intercept': -1024.0,
    'normalize': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (128, 128, 128) — shape (128, 128, 128) 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
load_config Ran
ran on a synthesized input
ruyi-zha/naf_cbct/src/config/configloading.py
code served (permissive licence) · get_code("841fbf5dbee0286c")
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 dict. 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 tempfile
import os
import yaml

# Create temporary YAML files for testing
temp_dir = tempfile.mkdtemp()

# Create a default config file
default_config_path = os.path.join(temp_dir, 'default_config.yaml')
with open(default_config_path, 'w') as f:
    yaml.dump({
        'learning_rate': 0.001,
        'batch_size': 32,
        'model': {
            'hidden_dim': 128,
            'num_layers': 2
        }
    }, f)

# Create a main config file that inherits from default
main_config_path = os.path.join(temp_dir, 'config.yaml')
with open(main_config_path, 'w') as f:
    yaml.dump({
        'inherit_from': default_config_path,
        'learning_rate': 0.01,
        'model': {
            'hidden_dim': 256
        }
    }, f)

# Create a standalone config file (no inheritance, no default)
standalone_config_path = os.path.join(temp_dir, 'standalone.yaml')
with open(standalone_config_path, 'w') as f:
    yaml.dump({
        'param1': 'value1',
        'param2': 42,
        'nested': {
            'key': 'val'
        }
    }, f)

ARGS = {
    'path': main_config_path,
    'default_path': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
run_network Ran
ran on a synthesized input
ruyi-zha/naf_cbct/src/render/render.py
code served (permissive licence) · get_code("96dead70c16319a1")
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, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network function that takes inputs and produces outputs
class SimpleNetwork(nn.Module):
    def __init__(self, input_dim=4, output_dim=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the network
network = SimpleNetwork(input_dim=4, output_dim=3)

# Create input tensor with shape that will be reshaped
# inputs has shape [..., 4] where 4 is the last dimension (feature dimension)
# Using shape (2, 5, 4) to have batch dimensions (2, 5) and feature dim 4
inputs = torch.randn(2, 5, 4)

# netchunk is the chunk size for processing
netchunk = 3

ARGS = {
    "inputs": inputs,
    "fn": network,
    "netchunk": netchunk
}
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, 5, 3) — shape (2, 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
calc_tv_loss Not yet run
unverified (harvested, no recorded run)
ruyi-zha/naf_cbct/src/loss/loss.py
code served (permissive licence) · get_code("a0edcfb5a9a8d656")
How it ran

no invocation recorded.

get_ssim_3d Not yet run
unverified (harvested, no recorded run)
ruyi-zha/naf_cbct/src/utils/util.py
code served (permissive licence) · get_code("86dbd9d9f15f81dc")
How it ran

no invocation recorded.

raw2outputs Not yet run
unverified (harvested, no recorded run)
ruyi-zha/naf_cbct/src/render/render.py
code served (permissive licence) · get_code("597380d2039f9950")
How it ran

no invocation recorded.

render Not yet run
unverified (harvested, no recorded run)
ruyi-zha/naf_cbct/src/render/render.py
code served (permissive licence) · get_code("87fd34174db9e7e9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 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.

FunctionAlso present inEarliest-datedOthers named
load_config 1 other paper
1 dated earlier
1912.07372 (2019-12)
Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision

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

This paper proposes a novel and fast self-supervised solution for sparse-view CBCT reconstruction (Cone Beam Computed Tomography) that requires no external training data. Specifically, the desired attenuation coefficients are represented as a continuous function of 3D spatial coordinates, parameterized by a fully-connected deep neural network. We synthesize projections discretely and train the network by minimizing the error between real and synthesized projections. A learning-based encoder entailing hash coding is adopted to help the network capture high-frequency details. This encoder outperforms the commonly used frequency-domain encoder in terms of having higher performance and efficiency, because it exploits the smoothness and sparsity of human organs. Experiments have been conducted on both human organ and phantom datasets. The proposed method achieves state-of-the-art accuracy and spends reasonably short computation time.

For agents

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

get_harvested_code_for_paper("2209.14540")
get_code_for_paper("2209.14540")
have("2209.14540")

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

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

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

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

Connect an agent — have() is free.