SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.02402 · NeurIPS · 2024

RG-SAN: Rule-Guided Spatial Awareness Network for End-to-End 3D Referring Expression Segmentation

Qi Chen, Rongrong Ji, Xiaoshuai Sun, Hao Fei, Jiayi Ji, Gen Luo, Changli Wu, Haowei Wang, Yiwei Ma, You Huang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 17 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 1 has no contract verdict; 9 failures of our instrument; 6 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/2412.02402.json · badge: /api/ran/2412.02402.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
ScanNet/ScanNet canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
sosppxo/RG-SAN canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
referit3d/referit3d unrelated (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ReferIt3DNet Ran
ran on a synthesized input
referit3d/referit3d/referit3d/models/referit3d_net.py
code served (permissive licence) · get_code("4eb011ca450d1d87")
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 defaultdict. 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

# Create simple stand-in modules for the encoders and classifiers

# Object encoder: takes B x N x object_dim -> B x N x object_feat_dim
class SimpleObjectEncoder(nn.Module):
    def __init__(self, in_dim, out_dim):
        super().__init__()
        self.net = nn.Linear(in_dim, out_dim)
    
    def forward(self, x):
        return self.net(x)

# Language encoder: takes B x seq_len -> B x lang_feat_dim
class SimpleLanguageEncoder(nn.Module):
    def __init__(self, vocab_size, embed_dim, out_dim):
        super().__init__()
        self.embed = nn.Embedding(vocab_size, embed_dim)
        self.net = nn.Linear(embed_dim, out_dim)
    
    def forward(self, tokens):
        # tokens: B x seq_len
        embedded = self.embed(tokens)  # B x seq_len x embed_dim
        pooled = embedded.mean(dim=1)  # B x embed_dim
        return self.net(pooled)  # B x out_dim

# Graph encoder: takes B x N x in_dim -> B x N x out_dim
class SimpleGraphEncoder(nn.Module):
    def __init__(self, in_dim, out_dim):
        super().__init__()
        self.net = nn.Linear(in_dim, out_dim)
    
    def forward(self, x):
        return self.net(x)

# Object classifier: takes B x object_feat_dim -> B x num_classes
class SimpleObjectClassifier(nn.Module):
    def __init__(self, in_dim, num_classes):
        super().__init__()
        self.net = nn.Linear(in_dim, num_classes)
    
    def forward(self, x):
        return self.net(x)

# Language classifier: takes B x lang_feat_dim -> B x num_classes
class SimpleLanguageClassifier(nn.Module):
    def __init__(self, in_dim, num_classes):
        super().__init__()
        self.net = nn.Linear(in_dim, num_classes)
    
    def forward(self, x):
        return self.net(x)

# Object-language classifier: takes B x final_dim -> B x 1
class SimpleObjectLanguageClassifier(nn.Module):
    def __init__(self, in_dim):
        super().__init__()
        self.net = nn.Linear(in_dim, 1)
    
    def forward(self, x):
        return self.net(x)

# Create args namespace
class Args:
    def __init__(self):
        self.language_fusion = 'both'  # Options: 'before', 'after', 'both', or None

args = Args()

# Dimensions
batch_size = 2
n_objects = 5
object_dim = 8
object_feat_dim = 6
lang_feat_dim = 7
graph_out_dim = 9
num_object_classes = 10
num_lang_classes = 12
vocab_size = 50
embed_dim = 11
seq_len = 15

# When language_fusion is 'both':
# graph_in_features = object_feat_dim + lang_feat_dim
# final_features = graph_out_dim + lang_feat_dim

object_encoder = SimpleObjectEncoder(object_dim, object_feat_dim)
language_encoder = SimpleLanguageEncoder(vocab_size, embed_dim, lang_feat_dim)
graph_encoder = SimpleGraphEncoder(object_feat_dim + lang_feat_dim, graph_out_dim)
object_clf = SimpleObjectClassifier(object_feat_dim, num_object_classes)
language_clf = SimpleLanguageClassifier(lang_feat_dim, num_lang_classes)
object_language_clf = SimpleObjectLanguageClassifier(graph_out_dim + lang_feat_dim)

INIT_ARGS = {
    'args': args,
    'object_encoder': object_encoder,
    'language_encoder': language_encoder,
    'graph_encoder': graph_encoder,
    'object_language_clf': object_language_clf,
    'object_clf': object_clf,
    'language_clf': language_clf
}

# Create batch data
batch = {
    'objects': torch.randn(batch_size, n_objects, object_dim),
    'tokens': torch.randint(0, vocab_size, (batch_size, seq_len))
}

ARGS = {
    'batch': batch
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
batch_dice_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sosppxo/RG-SAN/rg_san/model/loss.py
pointer only (licence: NONE) · get_code("89f8d423e0baf041")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

computeStatistics Ran
ran; our contract draft was wrong, not the code
ScanNet/ScanNet/Server/compute_annotation_stats.py
pointer only (licence: NOASSERTION) · get_code("3d9e947fd92c0bda")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getRecord Ran
ran; our contract draft was wrong, not the code
ScanNet/ScanNet/Server/compute_timings.py
pointer only (licence: NOASSERTION) · get_code("2c035a1645e66b12")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

loadAllAnnotations Ran
ran; our contract draft was wrong, not the code
ScanNet/ScanNet/Server/compute_annotation_stats.py
pointer only (licence: NOASSERTION) · get_code("a53bc63ebec0ee7f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

point_indices_from_group Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ScanNet/ScanNet/BenchmarkScripts/ScanNet200/utils.py
pointer only (licence: NOASSERTION) · get_code("faa9acfe80c86398")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

random_sampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sosppxo/RG-SAN/rg_san/model/pc_util.py
pointer only (licence: NONE) · get_code("b91d93c29e979019")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_plymesh Ran
ran; our contract draft was wrong, not the code
ScanNet/ScanNet/BenchmarkScripts/ScanNet200/utils.py
pointer only (licence: NOASSERTION) · get_code("94aecc61e6227dca")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

scale_points Ran
ran, honoured the contract we drafted
sosppxo/RG-SAN/rg_san/model/pc_util.py
pointer only (licence: NONE) · get_code("c2546a46c7f63930")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

shift_scale_points Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sosppxo/RG-SAN/rg_san/model/pc_util.py
pointer only (licence: NONE) · get_code("818099bdffc93897")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

splitall Ran
ran; our contract draft was wrong, not the code
ScanNet/ScanNet/BenchmarkScripts/convert2panoptic.py
pointer only (licence: NOASSERTION) · get_code("3904d5900b0ebdfe")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Scene_graph_parse Not yet run
unverified (harvested, no recorded run)
sosppxo/RG-SAN/rg_san/dataset/scannetv2.py
pointer only (licence: NONE) · get_code("a5185a973691110d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

batch_sigmoid_bce_loss Not yet run
unverified (harvested, no recorded run)
sosppxo/RG-SAN/rg_san/model/loss.py
pointer only (licence: NONE) · get_code("2815d6704af5fb9c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

batch_sigmoid_focal_loss Not yet run
unverified (harvested, no recorded run)
sosppxo/RG-SAN/rg_san/model/loss.py
pointer only (licence: NONE) · get_code("5ce41ce149ac0278")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

getTotal Not yet run
unverified (harvested, no recorded run)
ScanNet/ScanNet/Server/compute_timings.py
pointer only (licence: NOASSERTION) · get_code("ab111a546696519e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

multi_head_attention_forward Not yet run
unverified (harvested, no recorded run)
sosppxo/RG-SAN/rg_san/model/attention.py
pointer only (licence: NONE) · get_code("a4a324f1b49cd7c6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sosppxo/RG-SAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

voxelize_pointcloud Not yet run
unverified (harvested, no recorded run)
ScanNet/ScanNet/BenchmarkScripts/ScanNet200/utils.py
pointer only (licence: NOASSERTION) · get_code("b72c338d0b80682b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ScanNet/ScanNet (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 0 later) and 9 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
shift_scale_points 11 other papers
9 dated earlier, 1 the same month, 1 same year, order not determinable · 1 only as an assembly brick
2109.08141 (2021-09)
An End-to-End Transformer Model for 3D Object Detection
2210.03105 (2022-10)
Mask3D: Mask Transformer for 3D Semantic Instance Segmentation
2301.02508 (2023-01)
End-to-End 3D Dense Captioning with Vote2Cap-DETR
and 8 more not named here
batch_dice_loss 5 other papers
4 dated earlier, 1 same year, order not determinable
aaai_25335 (2023 (year only))
Superpoint Transformer for 3D Scene Instance Segmentation
2308.16632 (2023-08)
3D-STMN: Dependency-Driven Superpoint-Text Matching Network for End-to-End 3D Referring Expression Segmentation
2309.01692 (2023-09)
Mask-Attention-Free Transformer for 3D Instance Segmentation
and 2 more not named here
batch_sigmoid_bce_loss 5 other papers
4 dated earlier, 1 same year, order not determinable
aaai_25335 (2023 (year only))
Superpoint Transformer for 3D Scene Instance Segmentation
2308.16632 (2023-08)
3D-STMN: Dependency-Driven Superpoint-Text Matching Network for End-to-End 3D Referring Expression Segmentation
2309.01692 (2023-09)
Mask-Attention-Free Transformer for 3D Instance Segmentation
and 2 more not named here
batch_sigmoid_focal_loss 5 other papers
4 dated earlier, 1 same year, order not determinable
aaai_25335 (2023 (year only))
Superpoint Transformer for 3D Scene Instance Segmentation
2308.16632 (2023-08)
3D-STMN: Dependency-Driven Superpoint-Text Matching Network for End-to-End 3D Referring Expression Segmentation
2309.01692 (2023-09)
Mask-Attention-Free Transformer for 3D Instance Segmentation
and 2 more not named here
scale_points 3 other papers
3 dated earlier · 1 only as an assembly brick
2109.08141 (2021-09)
An End-to-End Transformer Model for 3D Object Detection
2301.02508 (2023-01)
End-to-End 3D Dense Captioning with Vote2Cap-DETR
2309.01692 (2023-09)
Mask-Attention-Free Transformer for 3D Instance Segmentation
random_sampling 2 other papers
2 dated earlier
2307.10316 (2023-07)
CPCM: Contextual Point Cloud Modeling for Weakly-supervised Point Cloud Semantic Segmentation
2309.01692 (2023-09)
Mask-Attention-Free Transformer for 3D Instance Segmentation
read_plymesh 1 other paper
1 dated earlier
2312.11269 (2023-12)
Spherical Mask: Coarse-to-Fine 3D Point Cloud Instance Segmentation with Spherical Representation
splitall 1 other paper
1 dated earlier
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural 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

3D Referring Expression Segmentation (3D-RES) aims to segment 3D objects by correlating referring expressions with point clouds. However, traditional approaches frequently encounter issues like over-segmentation or mis-segmentation, due to insufficient emphasis on spatial information of instances. In this paper, we introduce a Rule-Guided Spatial Awareness Network (RG-SAN) by utilizing solely the spatial information of the target instance for supervision. This approach enables the network to accurately depict the spatial relationships among all entities described in the text, thus enhancing the reasoning capabilities. The RG-SAN consists of the Text-driven Localization Module (TLM) and the Rule-guided Weak Supervision (RWS) strategy. The TLM initially locates all mentioned instances and iteratively refines their positional information. The RWS strategy, acknowledging that only target objects have supervised positional information, employs dependency tree rules to precisely guide the core instance's positioning. Extensive testing on the ScanRefer benchmark has shown that RG-SAN not only establishes new performance benchmarks, with an mIoU increase of 5.1 points, but also exhibits significant improvements in robustness when processing descriptions with spatial ambiguity. All codes are available at https://github.com/sosppxo/RG-SAN.

For agents

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

get_harvested_code_for_paper("2412.02402")
get_code_for_paper("2412.02402")
have("2412.02402")

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

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

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

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

Connect an agent — have() is free.