SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.15810 · 2025

GUI-G1: Understanding R1-Zero-Like Training for Visual Grounding in GUI Agents

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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 failures of our instrument; 2 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/2505.15810.json · badge: /api/ran/2505.15810.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
yuqi-zhou/gui-g1 canonical (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
FunctionStatusWhere it lives
evaluate_answer_similarity Ran
ran, honoured the contract we drafted
yuqi-zhou/gui-g1/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("252870f138f5203f")
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 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 os
from unittest.mock import Mock, patch, MagicMock

# Setup for the evaluate_answer_similarity function
# The function takes student_answer and ground_truth as parameters

student_answer = "The capital of France is Paris, and it is located in northern France."
ground_truth = "Paris is the capital of France."

ARGS = {
    'student_answer': student_answer,
    'ground_truth': ground_truth,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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_choice Ran
ran; our contract draft was wrong, not the code
yuqi-zhou/gui-g1/src/open-r1-multimodal/src/open_r1/grpo_jsonl.py
code served (permissive licence) · get_code("317605c76a72fc89")
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 str. 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 extract_choice(text):
    text = text.upper()
    text = re.sub('\\s+', ' ', text)
    choices = re.findall('(?<![A-Z])([A-Z])(?=[\\.\\,\\?\\!\\:\\;]|$)', text)
    if not choices:
        return None
    if len(choices) == 1:
        return choices[0]
    choice_scores = {choice: 0 for choice in choices}
    keywords = ['答案', '选择', '正确', '是', '对', 'answer', 'correct', 'choose', 'select', 'right', '认为', '应该', '觉得', 'think', 'believe', 'should']
    for choice in choices:
        pos = text.find(choice)
        context = text[max(0, pos - 20):min(len(text), pos + 20)]
        for keyword in keywords:
            if keyword.upper() in context:
                choice_scores[choice] += 1
        if pos > len(text) * 0.7:
            choice_scores[choice] += 2
        if pos < len(text) - 1 and text[pos + 1] in '。.!!,,':
            choice_scores[choice] += 1
    return max(choice_scores.items(), key=lambda x: x[1])[0]


# Test case 1: Simple text with single choice
test_text_1 = "The answer is A."

# Test case 2: Text with multiple choices, should pick based on keywords
test_text_2 = "Options are A, B, C. The correct answer is B!"

# Test case 3: Text with choice near end
test_text_3 = "Choose between A, B, or C. I think the answer should be C."

# Test case 4: Text with no valid choices
test_text_4 = "This has no choices here."

ARGS = {
    "text": test_text_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
extract_problem_solution Ran
ran; our contract draft was wrong, not the code
yuqi-zhou/gui-g1/src/open-r1-multimodal/local_scripts/prepare_hf_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AMAP-ML/Q-Hawkeye, is pointer only (licence: NONE) · get_code("41c548a25e90eb39")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AMAP-ML/Q-Hawkeye, and GitHub detected no licence in that repository 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.

format_reward Ran
ran, honoured the contract we drafted
yuqi-zhou/gui-g1/src/open-r1-multimodal/src/open_r1/grpo.py
code served (permissive licence) · get_code("e89f2eec0a18d4c2")
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 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 format_reward(completions, **kwargs):
    """Reward function that checks if the completion has a specific format."""
    pattern = '<think>.*?</think>\\s*<answer>.*?</answer>'
    completion_contents = [completion[0]['content'] for completion in completions]
    matches = [re.match(pattern, content) for content in completion_contents]
    return [1.0 if match else 0.0 for match in matches]


# Set up valid arguments for format_reward
completions = [
    [
        {
            'content': '<think>This is a thinking block</think>\n<answer>This is the answer</answer>'
        }
    ],
    [
        {
            'content': '<think>Another thought</think>  <answer>Another answer</answer>'
        }
    ],
    [
        {
            'content': 'This does not match the pattern'
        }
    ],
    [
        {
            'content': '<think>Incomplete'
        }
    ]
]

ARGS = {
    'completions': completions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
get_image_data_url Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yuqi-zhou/gui-g1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from minglllli/cls-rl, is pointer only (licence: NONE) · get_code("3f31b48fd862935d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from minglllli/cls-rl, and GitHub detected no licence in that repository 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.

iou_reward Ran
ran on a synthesized input
yuqi-zhou/gui-g1/src/open-r1-multimodal/src/open_r1/grpo_rec.py
code served (permissive licence) · get_code("306cc7b9dc8f750e")
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 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 torch
import ast
from datetime import datetime

torch.manual_seed(0)

ARGS = {
    'completions': [
        [
            {
                'content': "```json\n[{\"bbox_2d\": [10, 20, 50, 60]}]\n```"
            }
        ],
        [
            {
                'content': "```json\n[{\"bbox_2d\": [15, 25, 55, 65]}]\n```"
            }
        ]
    ],
    'solution': [
        [12, 22, 52, 62],
        [14, 24, 54, 64]
    ],
}
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 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_json Ran
ran on a synthesized input
yuqi-zhou/gui-g1/src/open-r1-multimodal/src/open_r1/grpo_rec.py
code served (permissive licence) · get_code("c7446a6215a66f72")
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 str. 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

def parse_json(json_output):
    lines = json_output.splitlines()
    for i, line in enumerate(lines):
        if line == '```json':
            json_output = '\n'.join(lines[i + 1:])
            json_output = json_output.split('```')[0]
            break
    return json_output

# Test case 1: JSON output with markdown code fence
json_with_fence = """Some text before
json
{"key": "value", "number": 42}

Some text after"""

# Test case 2: Plain JSON without fence
plain_json = '{"key": "value", "number": 42}'

# Test case 3: JSON with fence but no trailing text
json_fence_only = """```json
{"result": true}
"""

ARGS = {
    "json_output": json_with_fence
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
process_single_item Ran
ran; our contract draft was wrong, not the code
yuqi-zhou/gui-g1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
code served (permissive licence) · get_code("f029d6b5f19d2885")
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 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 numpy as np
from PIL import Image
from io import BytesIO

# Create a small test image
def create_test_image():
    img = Image.new('RGB', (10, 10), color='red')
    return img

# Save image to bytes and get path-like reference
test_image = create_test_image()
img_buffer = BytesIO()
test_image.save(img_buffer, format='JPEG')
img_buffer.seek(0)

# Create a simple example dict matching the structure expected by process_single_item
example = {
    'image_path': test_image,  # Can be PIL Image, file path, or data URL
    'question': 'What color is the square in the image?',
    'answer': 'Red'
}

ARGS = {
    'example': example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, openai, 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
gpt4o_query Not yet run
unverified (harvested, no recorded run)
yuqi-zhou/gui-g1/src/open-r1-multimodal/local_scripts/create_vision_cot_data.py
code served (permissive licence) · get_code("58ab41ce28a94c62")
How it ran

no invocation recorded.

load_image_from_path Not yet run
unverified (harvested, no recorded run)
yuqi-zhou/gui-g1/src/open-r1-multimodal/local_scripts/prepare_hf_data.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from AMAP-ML/Q-Hawkeye, is pointer only (licence: NONE) · get_code("bdcc94560fb87f30")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from AMAP-ML/Q-Hawkeye, and GitHub detected no licence in that repository 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.

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 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 6 the same month, 8 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
get_image_data_url 8 other papers
2 dated earlier, 1 the same month, 5 later
2503.16188 (2025-03)
To Think or Not To Think: A Study of Thinking in Rule-Based Visual Reinforcement Fine-Tuning
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
and 5 more not named here
extract_problem_solution 7 other papers
1 dated earlier, 1 the same month, 5 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 4 more not named here
load_image_from_path 7 other papers
1 dated earlier, 1 the same month, 5 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 4 more not named here
gpt4o_query 5 other papers
1 dated earlier, 1 the same month, 3 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 2 more not named here
process_single_item 5 other papers
1 dated earlier, 1 the same month, 3 later
2503.21620 (2025-03)
UI-R1: Enhancing Efficient Action Prediction of GUI Agents by Reinforcement Learning
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
and 2 more not named here
format_reward 3 other papers
1 the same month, 2 later
2505.14460 (2025-05)
VisualQuality-R1: Reasoning-Induced Image Quality Assessment via Reinforcement Learning to Rank
2510.14605 (2025-10)
Knowledge-based Visual Question Answer with Multimodal Processing, Retrieval and Filtering
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach
evaluate_answer_similarity 1 other paper
1 later
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach
extract_choice 1 other paper
1 later
2601.00388 (2026-01)
Vision-Language Reasoning for Geolocalization: A Reinforcement Learning Approach

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

Recent Graphical User Interface (GUI) agents replicate the R1-Zero paradigm, coupling online Reinforcement Learning (RL) with explicit chain-of-thought reasoning prior to object grounding and thereby achieving substantial performance gains. In this paper, we first conduct extensive analysis experiments of three key components of that training pipeline: input design, output evaluation, and policy update-each revealing distinct challenges arising from blindly applying general-purpose RL without adapting to GUI grounding tasks. Input design: Current templates encourage the model to generate chain-of-thought reasoning, but longer chains unexpectedly lead to worse grounding performance. Output evaluation: Reward functions based on hit signals or box area allow models to exploit box size, leading to reward hacking and poor localization quality. Policy update: Online RL tends to overfit easy examples due to biases in length and sample difficulty, leading to under-optimization on harder cases. To address these issues, we propose three targeted solutions. First, we adopt a Fast Thinking Template that encourages direct answer generation, reducing excessive reasoning during training. Second, we incorporate a box size constraint into the reward function to mitigate reward hacking. Third, we revise the RL objective by adjusting length normalization and adding a difficulty-aware scaling factor, enabling better optimization on hard samples. Our GUI-G1-3B, trained on 17K public samples with Qwen2.5-VL-3B-Instruct, achieves 90.3% accuracy on ScreenSpot and 37.1% on ScreenSpot-Pro. This surpasses all prior models of similar size and even outperforms the larger UI-TARS-7B, establishing a new state-of-the-art in GUI agent grounding. The project repository is available at https://github.com/Yuqi-Zhou/GUI-G1.

For agents

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

get_harvested_code_for_paper("2505.15810")
get_code_for_paper("2505.15810")
have("2505.15810")

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

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

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

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

Connect an agent — have() is free.