SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.13744 · ICCV · 2021

KiloNeRF: Speeding up Neural Radiance Fields with Thousands of Tiny MLPs

Andreas Geiger, Songyou Peng, Yiyi Liao, Christian Reiser

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2103.13744.json · badge: /api/ran/2103.13744.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
openxrlab/xrnerf community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
MaximeVandegar/Papers-in-100-Lines-of-Code community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
KiloNerf Ran
ran on a synthesized input · constructed an object; no result was computed
MaximeVandegar/Papers-in-100-Lines-of-Code/KiloNeRF_Speeding_up_Neural_Radiance_Fields_with_Thousands_of_Tiny_MLPs/kilo_nerf.py
code served (permissive licence) · get_code("aca74fa1f05f53a8")
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, KiloNerf: 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 numpy as np
import torch.nn as nn

torch.manual_seed(0)

class KiloNerf(nn.Module):

    def __init__(self, N, embedding_dim_pos=10, embedding_dim_direction=4, scene_scale=3):
        super(KiloNerf, self).__init__()
        self.layer1_w = torch.nn.Parameter(torch.zeros((N, N, N, 63, 32)).uniform_(-np.sqrt(6.0 / 85), np.sqrt(6.0 / 85)))
        self.layer1_b = torch.nn.Parameter(torch.zeros((N, N, N, 1, 32)))
        self.layer2_w = torch.nn.Parameter(torch.zeros((N, N, N, 32, 33)).uniform_(-np.sqrt(6.0 / 64), np.sqrt(6.0 / 64)))
        self.layer2_b = torch.nn.Parameter(torch.zeros((N, N, N, 1, 33)))
        self.layer3_w = torch.nn.Parameter(torch.zeros((N, N, N, 32, 32)).uniform_(-np.sqrt(6.0 / 64), np.sqrt(6.0 / 64)))
        self.layer3_b = torch.nn.Parameter(torch.zeros((N, N, N, 1, 32)))
        self.layer4_w = torch.nn.Parameter(torch.zeros((N, N, N, 27 + 32, 32)).uniform_(-np.sqrt(6.0 / 64), np.sqrt(6.0 / 64)))
        self.layer4_b = torch.nn.Parameter(torch.zeros((N, N, N, 1, 32)))
        self.layer5_w = torch.nn.Parameter(torch.zeros((N, N, N, 32, 3)).uniform_(-np.sqrt(6.0 / 35), np.sqrt(6.0 / 35)))
        self.layer5_b = torch.nn.Parameter(torch.zeros((N, N, N, 1, 3)))
        self.embedding_dim_pos = embedding_dim_pos
        self.embedding_dim_direction = embedding_dim_direction
        self.N = N
        self.scale = scene_scale

    @staticmethod
    def positional_encoding(x, L):
        out = [x]
        for j in range(L):
            out.append(torch.sin(2 ** j * x))
            out.append(torch.cos(2 ** j * x))
        return torch.cat(out, dim=1)

    def forward(self, x, d):
        color = torch.zeros_like(x)
        sigma = torch.zeros(x.shape[0], device=x.device)
        mask = (x[:, 0].abs() < self.scale / 2) & (x[:, 1].abs() < self.scale / 2) & (x[:, 2].abs() < self.scale / 2)
        idx = (x[mask] / (self.scale / self.N) + self.N / 2).long().clip(0, self.N - 1)
        emb_x = self.positional_encoding(x[mask], self.embedding_dim_pos)
        emb_d = self.positional_encoding(d[mask], self.embedding_dim_direction)
        h = torch.relu(emb_x.unsqueeze(1) @ self.layer1_w[idx[:, 0], idx[:, 1], idx[:, 2]] + self.layer1_b[idx[:, 0], idx[:, 1], idx[:, 2]])
        h = torch.relu(h @ self.layer2_w[idx[:, 0], idx[:, 1], idx[:, 2]] + self.layer2_b[idx[:, 0], idx[:, 1], idx[:, 2]])
        h, density = (h[:, :, :-1], h[:, :, -1])
        h = h @ self.layer3_w[idx[:, 0], idx[:, 1], idx[:, 2]] + self.layer3_b[idx[:, 0], idx[:, 1], idx[:, 2]]
        h = torch.relu(torch.cat((h, emb_d.unsqueeze(1)), dim=-1) @ self.layer4_w[idx[:, 0], idx[:, 1], idx[:, 2]] + self.layer4_b[idx[:, 0], idx[:, 1], idx[:, 2]])
        c = torch.sigmoid(h @ self.layer5_w[idx[:, 0], idx[:, 1], idx[:, 2]] + self.layer5_b[idx[:, 0], idx[:, 1], idx[:, 2]])
        color[mask] = c.squeeze(1)
        sigma[mask] = density.squeeze(1)
        return (color, sigma)


# Create arguments for KiloNerf.__init__
ARGS = {
    'N': 2,
    'embedding_dim_pos': 10,
    'embedding_dim_direction': 4,
    'scene_scale': 3
}
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 KiloNerf — 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 KiloNerf 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
calculate_error_metrics Ran
ran on a synthesized input
openxrlab/xrnerf/xrnerf/core/hooks/save_distill_results_hook.py
code served (permissive licence) · get_code("5b7c24da82bbed8a")
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
from torch import nn

torch.manual_seed(0)

# Create a simple config object with required attributes
class Config:
    def __init__(self):
        self.outputs = 'color_and_density'
        self.quantile_se = 0.5

cfg = Config()

# Create small test tensors
# Shape: (batch_size=2, num_points=3, channels=4)
# channels: 3 for color (RGB) + 1 for density
out = torch.randn(2, 3, 4)
test_targets = torch.randn(2, 3, 4)

# Ensure values are in reasonable range for the saturation check
out[:, :, :3] = torch.rand(2, 3, 3) * 0.5  # color channels between 0-0.5
test_targets[:, :, :3] = torch.rand(2, 3, 3) * 0.5
out[:, :, 3] = torch.rand(2, 3)  # density channel
test_targets[:, :, 3] = torch.rand(2, 3)

ARGS = {
    'out': out,
    'test_targets': test_targets,
    'cfg': cfg
}
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 — 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
get_equal_error_split_threshold Ran
ran on a synthesized input
openxrlab/xrnerf/xrnerf/core/hooks/save_distill_results_hook.py
code served (permissive licence) · get_code("eace43d407ab948b")
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 float32, 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
import numpy as np

torch.manual_seed(0)

# Create test_points as a torch tensor with shape (2, 4) representing 2 test examples with x,y,z coordinates
# We need at least 3 dimensions (x,y,z) but use 4 for distinctness
test_points = torch.tensor([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=torch.float32)

# Create errors as a torch tensor with shape (2,) representing error values for each test point
errors = torch.tensor([1.5, 2.5], dtype=torch.float32)

# split_axis is the axis along which to split (0, 1, 2, or 3 for our 4D points)
split_axis = 1

ARGS = {
    "test_points": test_points,
    "errors": errors,
    "split_axis": split_axis
}
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 float32, 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
img2mse Ran
ran on a synthesized input
openxrlab/xrnerf/xrnerf/core/hooks/utils.py
code served (permissive licence) · get_code("799ef0d5be1ff671")
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 float32, 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 numpy as np

# img2mse computes mean squared error between two arrays
# It needs two array-like inputs x and y that support subtraction and squaring

x = np.random.randn(2, 4).astype(np.float32)
y = np.random.randn(2, 4).astype(np.float32)

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
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
kilo_replace Ran
ran on a synthesized input
openxrlab/xrnerf/xrnerf/core/apis/helper.py
code served (permissive licence) · get_code("ca73dfb7dc91e7a7")
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 Config. 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
from functools import partial, reduce

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.resolution_table = {
            'dataset1': (2, 3, 4),
            'dataset2': (2, 2)
        }
        self.phase = 'pretrain'
        self.build_occupancy_tree_config = {}
        self.fix_resolution = None
        self.total_num_networks = None
        self.data = {
            'train': type('obj', (object,), {'cfg': {}}),
            'val': type('obj', (object,), {'cfg': {}})
        }
        self.model = {
            'mlp': {}
        }

cfg = Config()

ARGS = {
    'dataname': 'dataset1',
    'cfg': cfg
}
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 Config — a Config output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Config 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
mse2psnr Ran
ran on a synthesized input
openxrlab/xrnerf/xrnerf/core/hooks/utils.py
code served (permissive licence) · get_code("d624064efa822827")
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 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 numpy as np

# The function mse2psnr takes a single parameter x
# It computes: -10.0 * np.log(x) / np.log(np.array([10.0]))
# So x should be a numeric value (scalar or array) that can be used with np.log()
# Typically MSE (mean squared error) is a small positive number

# Create a small positive scalar MSE value
mse_value = 0.01

ARGS = {
    "x": mse_value
}
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 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
to8b Ran
ran, honoured the contract we drafted
openxrlab/xrnerf/xrnerf/core/hooks/utils.py
code served (permissive licence) · get_code("296c0fb1df017e00")
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 2, dtype family int, 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 numpy as np

def to8b(x):
    """to8b."""
    return (255 * np.clip(x, 0, 1)).astype(np.uint8)

# Create test input: a numpy array with values in [0, 1] range
# Using various values to test clipping and scaling
x = np.array([
    [0.0, 0.5, 1.0, 1.5],
    [-0.5, 0.25, 0.75, 0.99]
], dtype=np.float32)

ARGS = {
    "x": x
}
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 2, dtype family int, 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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, 1 later) and 6 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
to8b 3 other papers
1 dated earlier, 2 later
2003.08934 (2020-03)
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
2109.15271 (2021-09)
TöRF: Time-of-Flight Radiance Fields for Dynamic Scene View Synthesis
aaai_27908 (2024 (year only))
Aleth-NeRF: Illumination Adaptive NeRF with Concealing Field Assumption

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

NeRF synthesizes novel views of a scene with unprecedented quality by fitting a neural radiance field to RGB images. However, NeRF requires querying a deep Multi-Layer Perceptron (MLP) millions of times, leading to slow rendering times, even on modern GPUs. In this paper, we demonstrate that real-time rendering is possible by utilizing thousands of tiny MLPs instead of one single large MLP. In our setting, each individual MLP only needs to represent parts of the scene, thus smaller and faster-to-evaluate MLPs can be used. By combining this divide-and-conquer strategy with further optimizations, rendering is accelerated by three orders of magnitude compared to the original NeRF model without incurring high storage costs. Further, using teacher-student distillation for training, we show that this speed-up can be achieved without sacrificing visual quality.

For agents

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

get_harvested_code_for_paper("2103.13744")
get_code_for_paper("2103.13744")
have("2103.13744")

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

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

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

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

Connect an agent — have() is free.