SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.18906 · 2025

VEM: Environment-Free Exploration for Training GUI Agent with Value Environment Model

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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, 1 violated it and 8 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2502.18906.json · badge: /api/ran/2502.18906.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
microsoft/gui-agent-rl community (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
action_dict_to_class Ran
ran on a synthesized input
microsoft/gui-agent-rl/data_preprocess/utils.py
code served (permissive licence) · get_code("bfea191ff4c26791")
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 AndroidAction. 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 enum import Enum
from typing import Tuple
from dataclasses import dataclass

class ActionType(Enum):
    Idle = 0
    DualPoint = 1
    Type = 2
    GoBack = 3
    GoHome = 4
    Enter = 5
    TaskComplete = 6
    TaskImpossible = 7
    Up = 8
    Down = 9
    Left = 10
    Right = 11

@dataclass
class AndroidAction:
    action_type: ActionType
    touch_point: Tuple[float, float] = None
    lift_point: Tuple[float, float] = None
    typed_text: str = None

def action_dict_to_class(action_dict):
    action_type = action_dict['action_type']
    if action_type == 'DUAL_POINT':
        action_class = AndroidAction(action_type=ActionType.DualPoint, touch_point=action_dict['touch_point'][::-1], lift_point=action_dict['lift_point'][::-1])
    elif action_type == 'TYPE':
        action_class = AndroidAction(action_type=ActionType.Type, typed_text=action_dict['typed_text'])
    elif action_type == 'SCROLL_UP':
        return AndroidAction(action_type=ActionType.Up, touch_point=(0.5, 0.5), lift_point=(0.5, 0.2))
    elif action_type == 'SCROLL_DOWN':
        return AndroidAction(action_type=ActionType.Down, touch_point=(0.5, 0.2), lift_point=(0.5, 0.5))
    elif action_type == 'SCROLL_LEFT':
        return AndroidAction(action_type=ActionType.Left, touch_point=(0.8, 0.5), lift_point=(0.2, 0.5))
    elif action_type == 'SCROLL_RIGHT':
        return AndroidAction(action_type=ActionType.Right, touch_point=(0.2, 0.5), lift_point=(0.8, 0.5))
    elif action_type == 'PRESS_HOME':
        action_class = AndroidAction(action_type=ActionType.GoHome)
    elif action_type == 'PRESS_BACK':
        action_class = AndroidAction(action_type=ActionType.GoBack)
    elif action_type == 'PRESS_ENTER':
        action_class = AndroidAction(action_type=ActionType.Enter)
    elif action_type == 'STATUS_TASK_COMPLETE':
        action_class = AndroidAction(action_type=ActionType.TaskComplete)
    elif action_type == 'STATUS_TASK_IMPOSSIBLE':
        action_class = AndroidAction(action_type=ActionType.TaskImpossible)
    else:
        print(f'Action {action_dict} not supported yet.')
        action_class = AndroidAction(action_type=ActionType.Idle)
    return action_class

# Test with DUAL_POINT action
ARGS = {
    'action_dict': {
        'action_type': 'DUAL_POINT',
        'touch_point': [100, 200],
        'lift_point': [150, 250]
    }
}
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 AndroidAction — a AndroidAction output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AndroidAction 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
check_actions_match Ran
ran on a synthesized input
microsoft/gui-agent-rl/eval_tools/metrix.py
code served (permissive licence) · get_code("6021d081bc8737c4")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small test data for the arguments
action_1_touch_yx = jnp.array([0.5, 0.5])
action_1_lift_yx = jnp.array([0.51, 0.51])
action_1_action_type = 'SINGLE_POINT'

action_2_touch_yx = jnp.array([0.5, 0.5])
action_2_lift_yx = jnp.array([0.51, 0.51])
action_2_action_type = 'SINGLE_POINT'

# annotation_positions: shape (num_bboxes, 4) where each row is (y, x, height, width)
# normalized coordinates in range [0, 1]
annotation_positions = jnp.array([
    [0.4, 0.4, 0.2, 0.2],
    [0.7, 0.7, 0.15, 0.15]
])

tap_distance_threshold = 0.14
annotation_width_augment_fraction = 1.4
annotation_height_augment_fraction = 1.4

ARGS = {
    'action_1_touch_yx': action_1_touch_yx,
    'action_1_lift_yx': action_1_lift_yx,
    'action_1_action_type': action_1_action_type,
    'action_2_touch_yx': action_2_touch_yx,
    'action_2_lift_yx': action_2_lift_yx,
    'action_2_action_type': action_2_action_type,
    'annotation_positions': annotation_positions,
    'tap_distance_threshold': tap_distance_threshold,
    'annotation_width_augment_fraction': annotation_width_augment_fraction,
    'annotation_height_augment_fraction': annotation_height_augment_fraction,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
encode_image Ran
ran on a synthesized input
microsoft/gui-agent-rl/data_preprocess/gpt.py
code served (permissive licence) · get_code("7802770e6818ba35")
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 tempfile
import os
from PIL import Image
import numpy as np

# Create a temporary image file
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple test image
img_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
img = Image.fromarray(img_array)
img.save(image_path)

ARGS = {
    'image_path': image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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_scroll Ran
ran on a synthesized input
microsoft/gui-agent-rl/data_preprocess/utils.py
code served (permissive licence) · get_code("4057e0b6782bb278")
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 Action. 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 enum import Enum

class ActionType(Enum):
    Idle = 0
    DualPoint = 1
    Type = 2
    GoBack = 3
    GoHome = 4
    Enter = 5
    TaskComplete = 6
    TaskImpossible = 7
    Up = 8
    Down = 9
    Left = 10
    Right = 11

class Action:
    def __init__(self, touch_point, lift_point, action_type=ActionType.Idle):
        self.touch_point = touch_point
        self.lift_point = lift_point
        self.action_type = action_type

# Test case 1: touch_point == lift_point (no drag)
action_no_drag = Action(
    touch_point=(100, 200),
    lift_point=(100, 200),
    action_type=ActionType.DualPoint
)

# Test case 2: horizontal drag left (negative x delta)
action_horizontal_left = Action(
    touch_point=(150, 300),
    lift_point=(50, 300),
    action_type=ActionType.DualPoint
)

# Test case 3: horizontal drag right (positive x delta)
action_horizontal_right = Action(
    touch_point=(50, 300),
    lift_point=(150, 300),
    action_type=ActionType.DualPoint
)

# Test case 4: vertical drag up (negative y delta)
action_vertical_up = Action(
    touch_point=(200, 400),
    lift_point=(200, 200),
    action_type=ActionType.DualPoint
)

# Test case 5: vertical drag down (positive y delta)
action_vertical_down = Action(
    touch_point=(200, 200),
    lift_point=(200, 400),
    action_type=ActionType.DualPoint
)

ARGS = {
    "action": action_no_drag
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Action — a Action output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Action 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
get_message Ran
ran on a synthesized input
microsoft/gui-agent-rl/data_preprocess/gpt.py
code served (permissive licence) · get_code("9c771dc2b4ad47bd")
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 base64
import tempfile
import os
from PIL import Image
import io

# Create a temporary directory for test images
temp_dir = tempfile.mkdtemp()

# Create a small test image and save it
def create_test_image(path):
    img = Image.new('RGB', (10, 10), color='red')
    img.save(path, 'PNG')

# Create test image files
image_path_1 = os.path.join(temp_dir, 'test_image_1.png')
image_path_2 = os.path.join(temp_dir, 'test_image_2.png')
create_test_image(image_path_1)
create_test_image(image_path_2)

# Define arguments for get_message function
text_list = ['First text with image', 'Second text with image', 'Third text without image']
image_path_list = [image_path_1, image_path_2]

ARGS = {
    'text_list': text_list,
    'image_path_list': image_path_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — 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
is_tap_action Ran
ran, violated the contract we drafted
microsoft/gui-agent-rl/eval_tools/metrix.py
code served (permissive licence) · get_code("41f6e1b0feaded2f")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# The function takes two parameters: normalized_start_yx and normalized_end_yx
# Both are used as array-like inputs to jnp.array() and subtracted from each other
# They represent normalized coordinates (y, x) in a 2D space
# For a tap action, they should be very close together (within _SWIPE_DISTANCE_THRESHOLD = 0.04)

# Create two coordinate pairs that are close together (representing a tap)
normalized_start_yx = [0.5, 0.5]  # Starting position in normalized coordinates
normalized_end_yx = [0.51, 0.51]  # Ending position very close (distance ~0.014)

ARGS = {
    "normalized_start_yx": normalized_start_yx,
    "normalized_end_yx": normalized_end_yx,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
parse_response Ran
ran on a synthesized input
microsoft/gui-agent-rl/utils.py
code served (permissive licence) · get_code("ff74d412d9163765")
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 json

def parse_response(response):
    try:
        response = response.replace('```', '').replace('json', '')
        return json.loads(response)
    except:
        return -1

# The function takes a string parameter 'response' and attempts to:
# 1. Remove '```' substrings
# 2. Remove 'json' substrings
# 3. Parse the result as JSON
# 4. Return the parsed object or -1 on failure

# Valid test case: a string with markdown code blocks containing JSON
response_with_markdown = '```json\n{"key": "value", "number": 42}\n```'

ARGS = {
    'response': response_with_markdown
}
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 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
read_json Ran
ran on a synthesized input
microsoft/gui-agent-rl/utils.py
code served (permissive licence) · get_code("bf2b970192f06b31")
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 json
import tempfile
import os

# Create a temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.json")

sample_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "object"}
}

with open(temp_file, 'w', encoding='utf-8') as f:
    json.dump(sample_data, f)

ARGS = {
    "rpath": temp_file
}
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 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
str_2_format Ran
ran on a synthesized input
microsoft/gui-agent-rl/eval_tools/metrix.py
code served (permissive licence) · get_code("1fea86da69ed788a")
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 re
import ast

# The function str_2_format takes a single parameter 'output' which is a string
# It extracts action decision information from the output string

# Create test outputs for different action types
output_dual_point = """
Some prefix text here.
Action Decision: {'action_type': 'DUAL_POINT', 'touch_point': [100, 200], 'lift_point': [150, 250]}
"""

output_type = """
Some prefix text here.
Action Decision: {'action_type': 'TYPE', 'typed_text': 'Hello World'}
"""

output_other = """
Some prefix text here.
Action Decision: {'action_type': 'CLICK'}
"""

output_invalid = """
No action decision here
"""

# Valid test case with DUAL_POINT action
ARGS = {
    'output': output_dual_point
}
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 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
build_prompt_general Not yet run
unverified (harvested, no recorded run)
microsoft/gui-agent-rl/data_preprocess/prompt.py
code served (permissive licence) · get_code("d5a7ab5e7ead7d94")
How it ran

no invocation recorded.

get_gpt_4o Not yet run
unverified (harvested, no recorded run)
microsoft/gui-agent-rl/data_preprocess/gpt.py
code served (permissive licence) · get_code("d6133035efb0d990")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 10 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
is_tap_action 3 other papers
2 dated earlier, 1 later
2309.11436 (2023-09)
You Only Look at Screens: Multimodal Chain-of-Action Agents
2024.findings-acl.186 (2024 (year only))
You Only Look at Screens: Multimodal Chain-of-Action Agents
2505.12632 (2025-05)
Scalable Video-to-Dataset Generation for Cross-Platform Mobile Agents

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

Training Vision-Language Models (VLMs) for Graphical User Interfaces (GUI) agents via Reinforcement Learning (RL) faces critical challenges: environment-based RL requires costly interactions, while environment-free methods struggle with distribution shift and reward generalization. We propose an environment-free RL framework that decouples value estimation from policy optimization by leveraging a pretrained Value Environment Model (VEM). VEM predicts state-action values directly from offline data, distilling human-like priors about GUI interaction outcomes without requiring next-state prediction or environmental feedback. This avoids compounding errors and enhances resilience to UI changes by focusing on semantic reasoning (e.g., Does this action advance the user's goal?). The framework operates in two stages: (1) pretraining VEM to estimate long-term action utilities and (2) guiding policy exploration with frozen VEM signals, enabling layout-agnostic GUI automation. Evaluated on Android-in-the-Wild benchmarks, VEM achieves state-of-the-art performance in both offline and online settings, outperforming environment-free baselines significantly and matching environment-based approaches without interaction costs. Importantly, VEM demonstrates that semantic-aware value estimation can achieve comparable performance with online-trained methods.

For agents

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

get_harvested_code_for_paper("2502.18906")
get_code_for_paper("2502.18906")
have("2502.18906")

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

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

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

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

Connect an agent — have() is free.