SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.09662 · ICML · 2026

TreeCUA: Efficiently Scaling GUI Automation with Tree-Structured Verifiable Evolution

Jing Huang, Lei Chen, Peng Shi, Xuanle Zhao, Zhixiong Zeng, Liming Zheng, Haibo Qiu, Deyang Jiang, Fanfan Liu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2602.09662.json · badge: /api/ran/2602.09662.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
UITron-hub/TreeCUA canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
find_json_files Ran
ran; our contract draft was wrong, not the code
UITron-hub/TreeCUA/exploration/traj_score_agent.py
code served (permissive licence) · get_code("0b4e6c094f970221")
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 os
import tempfile
import json

# Create a temporary directory structure with some JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create subdirectories
subdir1 = os.path.join(temp_dir, "subdir1")
subdir2 = os.path.join(temp_dir, "subdir2")
os.makedirs(subdir1, exist_ok=True)
os.makedirs(subdir2, exist_ok=True)

# Create some test JSON files
test_files = [
    os.path.join(temp_dir, "file1.json"),
    os.path.join(temp_dir, "file2.json"),
    os.path.join(subdir1, "nested1.json"),
    os.path.join(subdir1, "nested2.json"),
    os.path.join(subdir2, "deep.json"),
]

# Create thinking JSON files that should be excluded
excluded_files = [
    os.path.join(temp_dir, "ignored_thinking.json"),
    os.path.join(subdir1, "data_thinking.json"),
]

# Write dummy content to all files
for file_path in test_files + excluded_files:
    with open(file_path, 'w') as f:
        json.dump({"test": "data"}, f)

# Also create a non-JSON file that should be ignored
non_json_file = os.path.join(temp_dir, "readme.txt")
with open(non_json_file, 'w') as f:
    f.write("This is not JSON")

ARGS = {
    "root_path": temp_dir
}
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_api_config Ran
ran; our contract draft was wrong, not the code
UITron-hub/TreeCUA/exploration/config.py
code served (permissive licence) · get_code("a94ee9f32e2fce8f")
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 ApiConfig. 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 os

# Set up environment variables for the function
os.environ['LLM_API_URL'] = 'https://api.example.com/v1'
os.environ['LLM_API_KEY'] = 'sk-test-key-12345'
os.environ['LLM_MODEL'] = 'gpt-4'
os.environ['LLM_MAX_TOKENS'] = '8192'

ARGS = {
    'api_url': None,
    'api_key': None,
    'model': None,
    'max_tokens': None,
}
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 ApiConfig — a ApiConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ApiConfig 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_max_candidates Ran
ran, honoured the contract we drafted
UITron-hub/TreeCUA/exploration/exploration_agent.py
code served (permissive licence) · get_code("4c1db174027ab5c2")
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 int, ndim 0, dtype family int, 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 as nn

torch.manual_seed(0)

# Construct arguments for get_max_candidates
# The function takes only one parameter: current_step (int)

ARGS = {
    "current_step": 5
}
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 int, ndim 0, dtype family int, 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_postprocess_config Ran
ran; our contract draft was wrong, not the code
UITron-hub/TreeCUA/exploration/config.py
code served (permissive licence) · get_code("d399825861ba6f87")
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 ApiConfig. 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 os
from dataclasses import dataclass

@dataclass
class ApiConfig:
    """Configuration for an LLM API endpoint."""
    api_url: str
    api_key: str
    model: str
    max_tokens: int = 4096

ENV_POSTPROCESS_API_URL = 'POSTPROCESS_API_URL'
ENV_POSTPROCESS_API_KEY = 'POSTPROCESS_API_KEY'
ENV_POSTPROCESS_MODEL = 'POSTPROCESS_MODEL'

def _get_env(key: str, default: str='') -> str:
    """Get an environment variable, raising an error if missing and no default."""
    value = os.environ.get(key, default)
    return value

def get_postprocess_config(api_url=None, api_key=None, model=None):
    """
    Get API configuration for post-processing agents: trajectory scoring,
    overall summarization, stage breakdown, and reason synthesis
    (OpenAI-compatible format).

    Does NOT fall back to LLM_API_* because those are Anthropic-native format
    and are incompatible with the OpenAI format used by post-processing.
    """
    return ApiConfig(api_url=api_url or _get_env(ENV_POSTPROCESS_API_URL), api_key=api_key or _get_env(ENV_POSTPROCESS_API_KEY), model=model or _get_env(ENV_POSTPROCESS_MODEL, 'gpt-4o-mini'), max_tokens=1024)

# Set up environment variables for fallback behavior
os.environ[ENV_POSTPROCESS_API_URL] = 'https://api.example.com/v1'
os.environ[ENV_POSTPROCESS_API_KEY] = 'sk-test-key-12345'
os.environ[ENV_POSTPROCESS_MODEL] = 'gpt-4o'

ARGS = {
    'api_url': None,
    'api_key': None,
    'model': None,
}
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 ApiConfig — a ApiConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ApiConfig 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_verifier_config Ran
ran; our contract draft was wrong, not the code
UITron-hub/TreeCUA/exploration/config.py
code served (permissive licence) · get_code("236d2fda040dd4bb")
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 ApiConfig. 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 os
from dataclasses import dataclass
from typing import Optional

ENV_VERIFIER_API_URL = 'VERIFIER_API_URL'
ENV_VERIFIER_API_KEY = 'VERIFIER_API_KEY'
ENV_VERIFIER_MODEL = 'VERIFIER_MODEL'
ENV_VERIFIER_MAX_TOKENS = 'VERIFIER_MAX_TOKENS'

@dataclass
class ApiConfig:
    """Configuration for an LLM API endpoint."""
    api_url: str
    api_key: str
    model: str
    max_tokens: int = 4096

def _get_env(key: str, default: str='') -> str:
    """Get an environment variable, raising an error if missing and no default."""
    value = os.environ.get(key, default)
    return value

def get_verifier_config(api_url: Optional[str]=None, api_key: Optional[str]=None, model: Optional[str]=None, max_tokens: Optional[int]=None) -> ApiConfig:
    """
    Get API configuration for the verification agent (OpenAI-compatible format).

    Does NOT fall back to LLM_API_* because those are Anthropic-native format
    and are incompatible with the OpenAI format used by the verifier.
    """
    return ApiConfig(api_url=api_url or _get_env(ENV_VERIFIER_API_URL), api_key=api_key or _get_env(ENV_VERIFIER_API_KEY), model=model or _get_env(ENV_VERIFIER_MODEL, 'gpt-4o-mini'), max_tokens=max_tokens or int(_get_env(ENV_VERIFIER_MAX_TOKENS, '512')))


ARGS = {
    'api_url': 'https://api.openai.com/v1',
    'api_key': 'sk-test-key-12345',
    'model': 'gpt-4o-mini',
    'max_tokens': 1024
}
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 ApiConfig — a ApiConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ApiConfig 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
is_screenshot_consistent Ran
ran, violated the contract we drafted
UITron-hub/TreeCUA/exploration/trajectory_utils.py
code served (permissive licence) · get_code("ffae446d2916009c")
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 bool, 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 io
import os
import tempfile
from PIL import Image

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

# Create a reference screenshot image and save it
ref_img = Image.new('RGB', (800, 600), color=(100, 150, 200))
ref_img_path = os.path.join(temp_dir, 'reference.png')
ref_img.save(ref_img_path)

# Create current screenshot bytes (nearly identical to reference)
current_img = Image.new('RGB', (800, 600), color=(100, 150, 200))
current_img_bytes = io.BytesIO()
current_img.save(current_img_bytes, format='PNG')
current_img_bytes = current_img_bytes.getvalue()

ARGS = {
    'current_img_bytes': current_img_bytes,
    'saved_img_path': ref_img_path,
    'threshold': 10.0
}
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 bool, 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
resize_image_to_1024_768 Ran
ran; our contract draft was wrong, not the code
UITron-hub/TreeCUA/exploration/exploration_agent.py
code served (permissive licence) · get_code("6239584f58ef829f")
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 tuple, 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 io
from PIL import Image
import numpy as np

# Create a simple test image as bytes
def create_test_image_bytes(width=800, height=600):
    """Create a simple PIL image and convert to bytes."""
    img = Image.new('RGB', (width, height), color=(73, 109, 137))
    buffer = io.BytesIO()
    img.save(buffer, format='PNG')
    return buffer.getvalue()

# Generate test image bytes
test_image_bytes = create_test_image_bytes(width=800, height=600)

ARGS = {
    "image_bytes": test_image_bytes,
}
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 tuple, ndim 1, dtype family float — a tuple 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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-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

Effectively scaling GUI automation is essential for computer-use agents (CUAs); however, existing work primarily focuses on scaling GUI grounding rather than the more crucial GUI planning, which requires more sophisticated data collection. In reality, the exploration process of a CUA across apps/desktops/web pages typically follows a tree structure, with earlier functional entry points often being explored more frequently. Thus, organizing large-scale trajectories into tree structures can reduce data cost and streamline the data scaling of GUI planning. In this work, we propose TreeCUA to efficiently scale GUI automation with tree-structured verifiable evolution. We propose a multi-agent collaborative framework to explore the environment, verify actions, summarize trajectories, and evaluate quality to generate high-quality and scalable GUI trajectories. To improve efficiency, we devise a novel tree-based topology to store and replay duplicate exploration nodes, and design an adaptive exploration algorithm to balance the depth (i.e., trajectory difficulty) and breadth (i.e., trajectory diversity). Moreover, we develop world knowledge guidance and global memory backtracking to avoid low-quality generation. Finally, we naturally extend and propose the TreeCUA-DPO method from abundant tree node information, improving GUI planning capability by referring to the branch information of adjacent trajectories. Experimental results show that TreeCUA and TreeCUA-DPO offer significant improvements, and out-of-domain (OOD) studies further demonstrate strong generalization. All trajectory node information and code will be available at https://github.com/UITron-hub/TreeCUA.

For agents

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

get_harvested_code_for_paper("2602.09662")
get_code_for_paper("2602.09662")
have("2602.09662")

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

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

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

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

Connect an agent — have() is free.