SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.07954 · 2025

Perception-R1: Pioneering Perception Policy with Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2504.07954.json · badge: /api/ran/2504.07954.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
linkangheng/pr1 canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_iou Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
linkangheng/pr1/eval/evaluate_grounding.py
code served (permissive licence) · get_code("96d8ce55eedcc334")
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 float, 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)

# box1 and box2 are expected to be sequences/arrays with 4 elements: [x_left, y_top, x_right, y_bottom]
# The function accesses them by index: box1[0], box1[1], box1[2], box1[3]
# and performs arithmetic operations on these values

box1 = [10.0, 20.0, 50.0, 80.0]
box2 = [30.0, 40.0, 70.0, 90.0]

ARGS = {
    "box1": box1,
    "box2": box2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
extract_bbox_answer Ran
ran; our contract draft was wrong, not the code
linkangheng/pr1/eval/evaluate_grounding.py
code served (permissive licence) · get_code("a64d39c4fd2ee2dc")
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 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 re

def parse_float_sequence_within(input_str):
    """Extract the first sequence of four floating-point numbers from the string"""
    patterns = ['\\[\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\]', '\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\)', '\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\)\\s*,\\s*\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\)']
    for pattern in patterns:
        match = re.search(pattern, input_str)
        if match:
            return [float(match.group(i)) for i in range(1, 5)]
    return [0.0, 0.0, 0.0, 0.0]

def extract_bbox_answer(content):
    """Extract bounding box from model output"""
    is_qwen2vl = '<|box_start|>' in content
    bbox = parse_float_sequence_within(content)
    return (bbox if is_qwen2vl else [int(x * 1000) for x in bbox], is_qwen2vl)


# Test case 1: content with qwen2vl marker and bbox in brackets
content_qwen = "The box is <|box_start|>[0.1, 0.2, 0.3, 0.4]<|box_end|>"

# Test case 2: content without qwen2vl marker and bbox in parentheses
content_other = "Bounding box: (0.5, 0.6, 0.7, 0.8)"

ARGS = {
    "content": content_qwen
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — 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
extract_boxes Ran
ran, honoured the contract we drafted
linkangheng/pr1/eval/evaluate_counting.py
code served (permissive licence) · get_code("d5d2cbcc026b705c")
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 list, ndim 2, 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 re

def extract_boxes(s):
    res = []
    pattern = '<\\|box_start\\|>(.*?)<\\|box_end\\|>'
    bboxs = re.findall(pattern, s)
    for bbox in bboxs:
        try:
            (x1, y1), (x2, y2) = eval(bbox)
            res.append(((x1 + x2) / 2, (y1 + y2) / 2))
        except Exception:
            pass
    return res

# Construct a valid string argument with box markers and coordinate tuples
test_string = '<|box_start|>((10, 20), (30, 40))<|box_end|><|box_start|>((0, 0), (100, 100))<|box_end|>'

ARGS = {
    's': test_string
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
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
parse_float_sequence_within Ran
ran, honoured the contract we drafted
linkangheng/pr1/eval/evaluate_grounding.py
code served (permissive licence) · get_code("a00db88497f19ef2")
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 list, ndim 1, 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 re

def parse_float_sequence_within(input_str):
    """Extract the first sequence of four floating-point numbers from the string"""
    patterns = ['\\[\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\]', '\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\)', '\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\)\\s*,\\s*\\(\\s*(-?\\d+\\.?\\d*),\\s*(-?\\d+\\.?\\d*)\\s*\\)']
    for pattern in patterns:
        match = re.search(pattern, input_str)
        if match:
            return [float(match.group(i)) for i in range(1, 5)]
    return [0.0, 0.0, 0.0, 0.0]

ARGS = {
    "input_str": "[1.5, 2.3, -3.7, 4.2]"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
parse_output Ran
ran; our contract draft was wrong, not the code
linkangheng/pr1/eval/evaluate_counting.py
code served (permissive licence) · get_code("779b00437fd21789")
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 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
import re

torch.manual_seed(0)

# Analyze the function:
# parse_output takes:
# 1. output: a string that may contain '<|endoftext|>' and box patterns
# 2. data_item: a dict with keys 'question' and 'ground_truth'

# The function:
# - Removes '<|endoftext|>' from output string
# - Extracts boxes using extract_boxes (which finds patterns like <|box_start|>((x1, y1), (x2, y2))<|box_end|>)
# - Returns a dict with 'question', 'ground_truth', 'model_output', 'extracted_answer'

# Create sample data
output = "The answer is <|box_start|>((10, 20), (30, 40))<|box_end|> and <|box_start|>((50, 60), (70, 80))<|box_end|><|endoftext|>"

data_item = {
    'question': 'Where is the object?',
    'ground_truth': 'top-left corner'
}

ARGS = {
    'output': output,
    'data_item': data_item
}
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 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Inspired by the success of DeepSeek-R1, we explore the potential of rule-based reinforcement learning (RL) in MLLM post-training for perception policy learning. While promising, our initial experiments reveal that incorporating a thinking process through RL does not consistently lead to performance gains across all visual perception tasks. This leads us to delve into the essential role of RL in the context of visual perception. In this work, we return to the fundamentals and explore the effects of RL on different perception tasks. We observe that the perceptual complexity is a major factor in determining the effectiveness of RL. We also observe that reward design plays a crucial role in further approching the upper limit of model perception. To leverage these findings, we propose Perception-R1, a scalable RL framework using GRPO during MLLM post-training. With a standard Qwen2.5-VL-3B-Instruct, Perception-R1 achieves +4.2% on RefCOCO+, +17.9% on PixMo-Count, +4.2% on PageOCR, and notably, 31.9% AP on COCO2017 val for the first time, establishing a strong baseline for perception policy learning.

For agents

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

get_harvested_code_for_paper("2504.07954")
get_code_for_paper("2504.07954")
have("2504.07954")

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

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

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

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

Connect an agent — have() is free.