SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.03853 · ICML · 2025

UGround: Towards Unified Visual Grounding with Unrolled Transformers

Dejing Dou, Rui Qian, Wei Zhai, Xin Yin, Chuanhang Deng, Zhiyuan Peng, Jian Xiong

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2510.03853.json · badge: /api/ran/2510.03853.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
rui-qian/UGround canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
dice_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rui-qian/UGround/model/UGround.py
code served (permissive licence) · get_code("a1c2083ec2eaeb22")
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 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 for inputs and targets
# inputs: predictions (arbitrary shape, will be flattened to (batch, features))
# targets: binary labels with same shape as inputs
batch_size = 2
height = 4
width = 3

inputs = torch.randn(batch_size, height, width)
targets = torch.randint(0, 2, (batch_size, height, width)).float()

# num_masks: number of masks (used for normalization)
num_masks = 2.0

# scale: scaling factor for normalization
scale = 1000

# eps: small epsilon for numerical stability
eps = 1e-06

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
    "scale": scale,
    "eps": eps,
}
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 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
dice_loss Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/model/GSVA.py
code served (permissive licence) · get_code("6ec47ecac3fe27fc")
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 test tensors
# inputs: shape (batch=2, height=4, width=3) - will be flattened to (2, 12)
inputs = torch.randn(2, 4, 3, requires_grad=True)

# targets: shape (batch=2, height=4, width=3) - will be flattened to (2, 12)
targets = torch.randint(0, 2, (2, 4, 3), dtype=torch.float32)

# num_masks: number of masks in the batch
num_masks = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
    "scale": 1000,
    "eps": 1e-06,
}
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
iou_loss Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/model/GSVA.py
code served (permissive licence) · get_code("af6fc3d42a9de09a")
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 for the function parameters
# pred_iou: should be a tensor of predicted IoU scores (batch of predictions)
pred_iou = torch.randn(2, 1, dtype=torch.float32)

# pred_mask: predicted mask tensor
pred_mask = torch.randn(2, 4, dtype=torch.float32)

# target_mask: ground truth mask tensor
target_mask = torch.randn(2, 4, dtype=torch.float32)

# num_masks: number of masks (scalar)
num_masks = 2.0

ARGS = {
    "pred_iou": pred_iou,
    "pred_mask": pred_mask,
    "target_mask": target_mask,
    "num_masks": num_masks,
}
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
overlap_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
rui-qian/UGround/model/PixelLM.py
code served (permissive licence) · get_code("e098b877e1d246a5")
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 Tensor, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn.functional as F

torch.manual_seed(0)

# Create inputs tensor: (num_total_tokens, height, width)
# This represents logits for mask predictions
inputs = torch.randn(10, 4, 5)

# Create targets tensor: (num_total_tokens, height, width)
# This represents binary target masks
targets = torch.randint(0, 2, (10, 4, 5)).float()

# num_masks: number of mask instances
num_masks = 3.0

# batch_seg_token_count: cumulative token counts per batch segment
# Should be a 1D tensor indicating how many tokens belong to each segment
batch_seg_token_count = torch.tensor([3, 4, 3])

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
    "batch_seg_token_count": batch_seg_token_count,
}
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 Tensor, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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
preprocess Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/chat.py
code served (permissive licence) · get_code("77ff24f1cbcb4f2d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (3, 1024, 1024) 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 input tensor with shape (C, H, W)
# Using distinct dimensions: 3 channels, height=5, width=7
x = torch.randn(3, 5, 7)

# Default pixel_mean and pixel_std are already provided in the function signature
# They have shape (3, 1, 1) for broadcasting
pixel_mean = torch.Tensor([123.675, 116.28, 103.53]).view(-1, 1, 1)
pixel_std = torch.Tensor([58.395, 57.12, 57.375]).view(-1, 1, 1)

# img_size is the target square size
img_size = 1024

ARGS = {
    'x': x,
    'pixel_mean': pixel_mean,
    'pixel_std': pixel_std,
    'img_size': img_size
}
Setup block drafted by
a language model, Claude Sonnet 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 Tensor, ndim 3, dtype family float, shape (3, 1024, 1024) — shape (3, 1024, 1024) 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
sigmoid_ce_loss Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/model/UGround.py
code served (permissive licence) · get_code("3face96ac23ae5bc")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# inputs: predictions (logits), shape (batch=2, height=4, width=3)
inputs = torch.randn(2, 4, 3, dtype=torch.float32)

# targets: binary labels with same shape as inputs
targets = torch.randint(0, 2, (2, 4, 3), dtype=torch.float32)

# num_masks: normalization factor
num_masks = 2.0

ARGS = {
    'inputs': inputs,
    'targets': targets,
    'num_masks': num_masks,
}
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
sigmoid_ce_loss Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/model/GSVA.py
code served (permissive licence) · get_code("13c0bb91f8009d9c")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Construct tiny tensors for inputs and targets
# inputs: logits tensor, shape (batch=2, height=4, width=3)
inputs = torch.randn(2, 4, 3)

# targets: binary targets, shape (batch=2, height=4, width=3)
targets = torch.randint(0, 2, (2, 4, 3)).float()

# num_masks: a float representing the number of masks
num_masks = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
}
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
sigmoid_focal_loss Ran
ran; our contract draft was wrong, not the code
rui-qian/UGround/model/READ.py
code served (permissive licence) · get_code("5e032c86b35b7a19")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create tiny tensors for inputs and targets
# inputs: raw logits, shape (2, 4, 3) - batch=2, spatial dims 4x3
inputs = torch.randn(2, 4, 3, requires_grad=True)

# targets: binary labels with same shape as inputs
targets = torch.randint(0, 2, (2, 4, 3)).float()

# num_masks: normalizing factor, a positive float
num_masks = 2.0

# alpha: weighting factor for positive/negative samples
alpha = 0.25

# gamma: focusing parameter
gamma = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
    "alpha": alpha,
    "gamma": gamma,
}
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
get_model_config Not yet run
unverified (harvested, no recorded run)
rui-qian/UGround/configs/model_config.py
code served (permissive licence) · get_code("62c7b02d97a929b3")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
rui-qian/UGround/merge_lora_weights_and_save_hf_model.py
code served (permissive licence) · get_code("bfb6ea6413f9abf5")
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 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 2 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
sigmoid_ce_loss 17 other papers
15 dated earlier, 2 same year, order not determinable · 1 only as an assembly brick
2312.02228 (2023-12)
PixelLM: Pixel Reasoning with Large Multimodal Model
2312.10103 (2023-12)
GSVA: Generalized Segmentation via Multimodal Large Language Models
2312.15715 (2023-12)
Segment Every Reference Object in Spatial and Temporal Spaces
and 14 more not named here
dice_loss 16 other papers
14 dated earlier, 2 same year, order not determinable · 1 only as an assembly brick
2311.05348 (2023-11)
u-LLaVA: Unifying Multi-Modal Tasks via Large Language Model
2312.02228 (2023-12)
PixelLM: Pixel Reasoning with Large Multimodal Model
2312.10103 (2023-12)
GSVA: Generalized Segmentation via Multimodal Large Language Models
and 13 more not named here
preprocess 4 other papers
4 dated earlier
2312.17240 (2023-12)
LISA++: An Improved Baseline for Reasoning Segmentation with Large Language Model
2407.17035 (2024-07)
Q-Ground: Image Quality Grounding with Large Multi-modality Models
2409.19603 (2024-09)
One Token to Seg Them All: Language Instructed Reasoning Segmentation in Videos
and 1 more not named here
iou_loss 2 other papers
2 dated earlier
2312.10103 (2023-12)
GSVA: Generalized Segmentation via Multimodal Large Language Models
overlap_loss 1 other paper
1 dated earlier
2312.02228 (2023-12)
PixelLM: Pixel Reasoning with Large Multimodal Model
sigmoid_focal_loss 1 other paper
1 same year, order not determinable
Qian_Reasoning_to_Attend_Try_to_Understand_How_SEG_Token_Works_CVPR_2025_paper (2025 (year only))
Reasoning to Attend: Try to Understand How <SEG> Token Works

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

We present UGround, a Unified visual Grounding paradigm that dynamically selects intermediate layers across Unrolled transformers as "mask as prompt," diverging from the prevailing pipeline that leverages the fixed last hidden layer as "<SEG> as prompt." UGround addresses two primary challenges posed by the prevailing paradigm: (1) its reliance on the fixed last hidden layer, which sequentially amplifies cumulative errors arising from layer-by-layer propagation without intermediate correction, and (2) its use of <SEG> as a prompt, which implicitly projects textual embeddings into visual space without explicit spatial cues (e.g., coordinates). Central to UGround is Policy-Prompted Masking, which comprises two key components: Stochastic Skip Connection (SSC) and Mask as Prompt (MasP). SSC is a reinforcement learning policy that, via stochastic sampling, allows each <SEG> token to slide across unrolled transformer layers, enabling dynamic layer selection at which it connects to the vision model (e.g., SAM) in a skip-connection fashion. Given the selected hidden layer, MasP uses the similarity map derived from the <SEG> token and image tokens as a soft logit mask to prompt SAM for mask generation, offering explicit spatial cues through its activation regions. To validate the effectiveness of UGround, we, for the first time, have unified visual grounding within a single framework from an attribute perspective, spanning from traditional refer expression segmentation to newly proposed reasoning segmentation, single-target to multi-target, positive query to false premise (empty target). All code and models are publicly available at https://github.com/ruiqian/UGround.

For agents

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

get_harvested_code_for_paper("2510.03853")
get_code_for_paper("2510.03853")
have("2510.03853")

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

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

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

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

Connect an agent — have() is free.