SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.11170 · NeurIPS · 2022

Coordinates Are NOT Lonely -Codebook Prior Helps Implicit Neural 3D Representations

Fukun Yin, Wen Liu, Zilong Huang, Pei Cheng, Tao Chen, Neural Renderer, Concat, 𝑅

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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 3 have no contract verdict; 1 failure of our instrument; 2 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/2210.11170.json · badge: /api/ran/2210.11170.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
fukunyin/coco-nerf canonical (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("dd67080fe3389024")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 5, 16) 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
from einops import rearrange, repeat

def default(val, d):
    return val if exists(val) else d

def exists(val):
    return val is not None

class Attention(nn.Module):

    def __init__(self, query_dim, context_dim=None, heads=8, dim_head=64):
        super().__init__()
        inner_dim = dim_head * heads
        context_dim = default(context_dim, query_dim)
        self.scale = dim_head ** (-0.5)
        self.heads = heads
        self.to_q = nn.Linear(query_dim, inner_dim, bias=False)
        self.to_kv = nn.Linear(context_dim, inner_dim * 2, bias=False)
        self.to_out = nn.Linear(inner_dim, query_dim)

    def forward(self, x, context=None, mask=None):
        h = self.heads
        q = self.to_q(x)
        context = default(context, x)
        k, v = self.to_kv(context).chunk(2, dim=-1)
        q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h), (q, k, v))
        sim = torch.einsum('b i d, b j d -> b i j', q, k) * self.scale
        if exists(mask):
            mask = rearrange(mask, 'b ... -> b (...)')
            max_neg_value = -torch.finfo(sim.dtype).max
            mask = repeat(mask, 'b j -> (b h) () j', h=h)
            sim.masked_fill_(~mask, max_neg_value)
        attn = sim.softmax(dim=-1)
        out = torch.einsum('b i j, b j d -> b i d', attn, v)
        out = rearrange(out, '(b h) n d -> b n (h d)', h=h)
        return self.to_out(out)


INIT_ARGS = {
    'query_dim': 16,
    'context_dim': 20,
    'heads': 4,
    'dim_head': 8,
}

ARGS = {
    'x': torch.randn(2, 5, 16),
    'context': torch.randn(2, 7, 20),
    'mask': torch.ones(2, 7, dtype=torch.bool),
}

if __name__ == '__main__':
    attention = Attention(**INIT_ARGS)
    output = attention(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 5, 16)")
    assert output.shape == (2, 5, 16), f"Shape mismatch: {output.shape}"
    print("Success!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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, 16) — shape (2, 5, 16) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
CodebookAttention Ran
ran on a synthesized input
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("70d7745c9567cb54")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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
from scipy import linalg

INIT_ARGS = {
    'codebook_dim': 4,
    'depth': 2,
    'num_latents': 8,
    'latent_dim': 6,
    'latent_heads': 2,
    'latent_dim_head': 3,
    'cross_heads': 1,
    'cross_dim_head': 4
}

ARGS = {
    'codebook': torch.randn(2, 10, 4)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, numpy, scipy, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FeedForward Ran
ran on a synthesized input
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("a89949a92957709d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import torch.nn as nn
import torch.nn.functional as F

class GEGLU(nn.Module):

    def forward(self, x):
        x, gates = x.chunk(2, dim=-1)
        return x * F.gelu(gates)

class FeedForward(nn.Module):

    def __init__(self, dim, mult=4):
        super().__init__()
        self.net = nn.Sequential(nn.Linear(dim, dim * mult * 2), GEGLU(), nn.Linear(dim * mult, dim))

    def forward(self, x):
        return self.net(x)

INIT_ARGS = {
    'dim': 4,
    'mult': 4,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = FeedForward(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
create_activation Ran
ran; our contract draft was wrong, not the code
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("9c5da28292cfa2f8")
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 ReLU. 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
import torch.nn.functional as F

torch.manual_seed(0)

class GEGLU(nn.Module):
    def forward(self, x):
        x, gates = x.chunk(2, dim=-1)
        return x * F.gelu(gates)

def create_activation(name, **kwargs):
    if name == 'relu':
        act = nn.ReLU(inplace=True)
    elif name == 'softplus':
        beta = kwargs.get('beta', 100)
        act = nn.Softplus(beta=beta)
    elif name == 'gelu':
        act = nn.GELU()
    elif name == 'GEGLU':
        act = GEGLU()
    else:
        raise ValueError(f'{name} is invalid. Currently, it only supports [`relu`, `softplus`, `sine`, `gaussian`]')
    return act

ARGS = {
    'name': 'relu',
    'beta': 100
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
CoordinateAttention Not yet run
unverified (harvested, no recorded run)
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("fd5a9c0c42154239")
How it ran

no invocation recorded.

ImplicitAttentionNetwork Not yet run
unverified (harvested, no recorded run)
fukunyin/coco-nerf/code/model/coco.py
code served (permissive licence) · get_code("67ae5e25999bc542")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 5 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
FeedForward
brick of this paper's assembly: model
2 other papers
1 dated earlier, 1 later
2107.14795 (2021-07)
Perceiver IO: A General Architecture for Structured Inputs & Outputs
2303.15555 (2023-03)
Object Discovery from Motion-Guided Tokens

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

Implicit neural 3D representation has achieved impressive results in surface or scene reconstruction and novel view synthesis, which typically uses the coordinatebased multi-layer perceptrons (MLPs) to learn a continuous scene representation. However, existing approaches, such as Neural Radiance Field (NeRF) [15], and its variants [16,26,29], usually require dense input views (i.e. 50-150) to obtain decent results. To relive the over-dependence on massive calibrated images and enrich the coordinate-based feature representation, we explore injecting the prior information into the coordinate-based network and introduce a novel coordinate-based model, CoCo-INR, for implicit neural 3D representation. The cores of our method are two attention modules: codebook attention and coordinate attention. The former extracts the useful prototypes containing rich geometry and appearance information from the prior codebook, and the latter propagates such prior information into each coordinate and enriches its feature representation for a scene or object surface. With the help of the prior information, our method can render 3D views with more photo-realistic appearance and geometries than the current methods using fewer calibrated images available. Experiments on various scene reconstruction datasets, including DTU [9] and BlendedMVS [28], and the full 3D head reconstruction dataset, H3DS [19], demonstrate the robustness under fewer input views and fine detail-preserving capability of our proposed method.

For agents

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

get_harvested_code_for_paper("2210.11170")
get_code_for_paper("2210.11170")
have("2210.11170")

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

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

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

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

Connect an agent — have() is free.