arXiv:2610.12866cs.CVOct 2026

Manuscript Offprint

arXiv:2610.12866

CaptchaAgent: Verifiable Visual Reasoning for CAPTCHA Solving

Shangquan Sun, Ruoyu Chen, Zhirui Liu, Xiang Liu, Chenghao Qian, Wenqi Ren, Xiaochun Cao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Shangquan Sun, Ruoyu Chen, Zhirui Liu, Xiang Liu, Chenghao Qian, Wenqi Ren, and Xiaochun Cao

Abstract—Modern reasoning CAPTCHAs require fine-grained perception, compositional relation reasoning, and grounded browser interaction. End-to-end vision-language model agents remain brittle in this setting because a missed object, incorrect count, or confused relation can propagate directly to the final action. To address this problem, we present CaptchaAgent, a structured visual reasoning framework for interactive CAPTCHA solving. Instead of predicting an action directly from a screenshot, CaptchaAgent first constructs a visual intermediate representation (V-IR) that explicitly records entities, attributes, and spatial or topological relations. A symbol-only ASCII protocol further requires the parser to commit to a concrete object set and count. Building on this global representation, localized evidence refinement revisits ambiguous regions at higher effective resolution, while counterfactual consistency verification tests whether the resulting action remains stable under task-preserving transformations. Across three proprietary backbones on Open CaptchaWorld, CaptchaAgent improves Pass@1 by 21.3–25.8 percentage points over a commercially available browser agent baseline evaluated with the same backbones. On the separate offline Oedipus-data benchmark, it further improves average Pass@1 by 9.2–12.3 percentage points over the Oedipus solver across three matched backbones. The intermediate traces show that exact counting, continuous geometry, and ordered execution remain major sources of automation difficulty for the evaluated agents, providing practical guidance for designing more resilient compositional CAPTCHAs.

Index Terms—CAPTCHA security, multimodal agents, web automation, structured visual reasoning, counterfactual consistency.

I. INTRODUCTION

CAPTCHAs (Completely Automated Public Turing tests to tell Computers and Humans Apart) are a long-standing security mechanism against automated abuse and have also been studied as a building block for graphical authentication [1]–[3]. Their security margin has repeatedly narrowed with advances in optical character recognition (OCR), deep visual recognition, and data-driven CAPTCHA solving [4]–[6]. Recent CAPTCHA-style puzzles therefore combine cluttered layouts, object relations, counting, rotation, and interactive actions rather than relying on single-object recognition. Solving them requires not only recognizing visible content, but also constructing a coherent visual state, reasoning over relations, and converting the result into a valid browser action. CAPTCHA provides a security-relevant and objectively checked environment in which errors at any of these stages directly determine success or failure.

Current vision-language model (VLM) and graphical user interface (GUI) agents commonly predict actions directly from pixels or interleave action prediction with an unconstrained natural-language chain of thought (CoT) [7]–[9]. Recent CAPTCHA solvers likewise combine multimodal prompting with structured action spaces, repeated model calls, or task-specific decomposition [10]–[12]. These approaches can describe a scene or revise an action, but they do not generally require an explicit, count-committed list of task-relevant entities and their relations to persist across perception, correction, and execution. This distinction matters for reasoning CAPTCHAs: one omitted object, wrong count, or confused spatial relation can invalidate the interaction, while an unconstrained CoT need not expose the visual state on which the action depends. The technical gap is therefore not merely stronger visual recognition, but an explicit intermediate state that supports global relational reasoning, targeted correction of local evidence, and action-level verification before execution.

To address this gap, we propose CaptchaAgent, a structured visual reasoning framework for interactive CAPTCHA solving with three components. First, it converts the puzzle image into a visual intermediate representation (V-IR) that enumerates entities, attributes, and spatial or topological relations. The V-IR is expressed as a symbol-only ASCII box diagram whose legend commits to an exact object inventory and makes missing or inconsistent relations visible. Second, localized evidence refinement re-observes high-resolution regions around candidate actions without replacing the global inventory. Third, counterfactual consistency verification checks action signatures under task-preserving transformations such as color permutations, shifts, and instruction-aware flips. We operationalize verification as signature-level consistency under these transformations. Together, these components retain a structured scene state from perception through grounded browser execution. As illustrated in Fig. 1, CaptchaAgent differs from direct and CoT-based agents by placing an explicit V-IR between page observation and action prediction, rather than relying on an implicit visual state or a free-form textual rationale.

Across 20 Open CaptchaWorld task families, CaptchaAgent improves Pass@1 by 21.3–25.8 percentage points over BU-Agent, a commercially available browser automation agent adopted as the benchmark baseline [12], [13], when both systems use the same proprietary VLM backbone. On the separate offline Oedipus-data benchmark, CaptchaAgent also improves average Pass@1 by 9.2–12.3 percentage points over the reported Oedipus solver across three matched backbones. Component ablations show complementary gains from explicit representation, local refinement, and consistency checking.

Shangquan Sun is with Nanyang Technological University, Singapore.

Ruoyu Chen is with the School of Cyber Security, University of Chinese Academy of Sciences, China.

Zhirui Liu, Wenqi Ren, and Xiaochun Cao are with the School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University, No. 66, Gongchang Road, Guangming District, Shenzhen, Guangdong 518107, P.R. China.

Xiang Liu is with Beihang University, Beijing, China.

Chenghao Qian is with the University of Leeds, Leeds, U.K.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

Figure

Fig. 1. Comparison of action-generation paradigms. Direct agents map observations to actions, chain-of-thought (CoT) agents introduce a free-form textual rationale, and CaptchaAgent instead constructs an explicit V-IR before action prediction. Unlike direct prediction or free-form CoT, the V-IR commits the agent to an explicit object set and relation structure that can be checked before execution.

The resulting traces reveal a security-relevant pattern: discrete relational and interaction-heavy puzzles are more amenable to structured solving, whereas exact counting, continuous geometry, and ordered execution remain persistent bottlenecks. These observations identify which challenge properties current agents can externalize and which continue to preserve automation difficulty. Behavioral web-bot detection, webpage-level security analysis, and rate limits remain complementary defense layers [14], [15].

In summary, this work makes the following contributions:

  1. We propose a structured visual reasoning framework that converts CAPTCHA scenes into an explicit entity–relation representation before grounded action prediction.

  2. We introduce an exact-count-committed ASCII V-IR together with localized evidence refinement and task-preserving counterfactual verification, enabling global-local reasoning and action-level consistency checking.

  3. We demonstrate consistent improvements across three proprietary VLM backbones on 20 interactive CAPTCHA families and three backbones on Oedipus-data. Component ablations and intermediate traces further identify complementary method gains and security-relevant failure modes.

  4. We identify a practical distinction among CAPTCHA families: discrete entity–relation structures are increasingly amenable to automation, while metric geometry, exact counting, and ordered interaction remain more resistant for the evaluated agents, offering guidance for challenge design.