FaSTA*: Fast-Slow Toolpath Agent with Subroutine Mining for Efficient Multi-turn Image Editing
Authors: Advait Gupta
Rishie Raj
Dang Nguyen
Tianyi Zhou
Venue: ICLR 2026 Poster (2026)
Keywords: Multi-turn Image Editing
Neurosymbolic Agent
Fast-Slow Planning
Subroutine Mining
Toolpath Optimization
Cost-Efficient
Primary area: applications to computer vision, audio, language, and other modalities
TL;DR: FaSTA*: neurosymbolic agent for multi-turn image editing. Learns reusable LLM subroutines for its "fast plan"; uses "slow" A* search if needed. Cuts computational cost, keeps high success rates.

Abstract: We develop a cost-efficient neurosymbolic agent to address challenging multi-turn image editing tasks such as "Detect the bench in the image while recoloring it to pink. Also, remove the cat for a clearer view and recolor the wall to yellow." It combines the fast, high-level subtask planning by large language models (LLMs) with the slow, accurate, tool-use, and local A* search per subtask to find a cost-efficient toolpath---a sequence of calls to AI tools. To save the cost of A* on similar subtasks, we perform inductive reasoning on previously successful toolpaths via LLMs to continuously extract/refine frequently used subroutines and reuse them as new tools for future tasks in an adaptive fast-slow planning, where the higher-level subroutines are explored first, and only when they fail, the low-level A* search is activated. The reusable symbolic subroutines considerably save exploration cost on the same types of subtasks applied to similar images, yielding a human-like fast-slow toolpath agent ``FaSTA*'': fast subtask planning followed by rule-based subroutine selection per subtask is attempted by LLMs at first, which is expected to cover most tasks, while slow A* search is only triggered for novel and challenging subtasks. By comparing with recent image editing approaches, we demonstrate FaSTA* is significantly more computationally efficient while remaining competitive with the state-of-the-art baseline in terms of success rate.

Published as a conference paper at ICLR 2026
FASTA*: : FAST-SLOW TOOLPATH AGENT WITH SUB- ROUTINE MINING FOR EFFICIENT MULTI-TURN IMAGE EDITING
Advait Gupta, Rishie Raj. Dang Nguyen University of Maryland, College Park
Tianyi Zhou
MBZUAI tianyi. zhougmbzuai. ac. ae
(advait25, rra traj27, dangmn ) @und. edu
ABSTRACT
We develop cost-efficient neurosymbolic agent to address challenging multi-turn image editing tasks such as "Detect the bench in the image while recoloring to pink. Also, remove the cat for clearer view and recolor the wall to yellow." It com- bines the fast, high-level subtask planning by large language models (LLMs) with the slow, accurate, tool-use, and local A search per subtask to find cost-efficient toolpath-a sequunee sequence of calls to AI tools. To save the cost of A on similar subtasks, we perform inductive reasoning on previously successful toolpaths via LLMs continuously extract/refine frequently used subroutines and reuse them as new tools for future tasks in an adaptive fast-slow planning. where the higher-level subrou- tines are explored first, and only when they fail, the low-level A* search is activated. The reusable symbolic subroutines considerably save exploration cost on the same types of subtasks applied to similar images, yielding human-like fast-slow tool- path agent "FaSTA"" " fast subtask planning followed by rule-based subroutine selection per subtask is attempted by LLMs first, which is expected to cover most tasks, while slow A search is only triggered for novel and challenging subtasks. By demonstrate FaSTA* is signif-
comparing with recent image editing approaches, icantly more computationally efficient while remaining competitive with the state- of-the-art baseline in terms of success rate. Our code and data can be accessed here.
INTRODUCTION
Various practical applications require multi-turn image editing, which demands applying a sequence of heterogeneous oberat detection, segmentation, inpainting, recoloring, and more-each ideally handled by a specialized AI tool. While it is challenging for existing sxxt-to-image mod- els (Rombach et al., 2022; Isola et al., 2018; Brooks et al., 2023; Zhang et al., 2024a) to tackle these long-horizon tasks directly, they can be broken down into sequence of easier subtasks. Hence, a tool-using agent (Wang et al., 2024; Gao et al., 2024; Huang et al., 2023) has the potential to address each subtask by careful planning of a toolpath. i.c., a sequence of tool calls. Since AI tools' output quality and cost can vary drastically across different tasks and even samples, the planning often heavily depends on accurate estimation of the quality and cost of all applicable tools per step. This raises challenges to the exploration efficiency due to the great number of possible toolpaths and expensive computation of AI tools.
Large language model (LLM) agents usually excel at "fast" planning (Yao et al., 2023; Wei et al., 2023; Huang et al., 2022) that breaks down an image-editing task into sequence of high-level subtasks without extensive exploration, thanks to their strong prior. However, they often misestimate AI tools' cost and quality due to a lack of up-to-date knowledge and the specific propertics of each subtask. Moreover, they also suffer from hallucinations, e.g., choosing an expensive diffusion model instead of simple filter when the latter suffices to complete the subtask. Compared to LLM agents, classical A search requires "slow", expensive exploration on dependency graph of tools, which in return can accurately produce an optimal, verifiable toolpath.
Can we combine the strengths of LLM agents in planning efficiency and A search in editing accuracy to achieve an efficient, cost-sensitive solution for multi-turn image editing? A recent work,

---

Published as a conference paper at ICLR 2026
Table 1:
Top-5 frequently used subroutines extracted by inductive reasoning FaSTA" from 100
CoSTA* toolpaths, ranked by their total selection frequency irrespective of the corresponding subtask.
Subroutine
Subtask
Frequency
YOLO- SAM- SD Inpaint
Object Removal
57/100
Grounding DINO + SAM- SD Inpaint
Object Recoloration
49/100
YOLO- SAM-+ SD Inpaint
Object Recoloration
48/100
YOLO - SAM-> Inpaint
Object Replacement
25/100
Grounding DINO -+ SAM-> SD Erase
Object Removal
22/100
CoSTA" (Gupta al., 2025), proposes leverage LLM agent for high-level subtask planning, producing pruned subgraph of tools on which an A search can be performed efficiently to find cost-quality balanced toolpath. Despite its effectiveness in challenging image editing tasks and advantages over other baselines, the A search remains a computational bottleneck.
Unlike humans who can learn reusable actions or create tools from past experiences and accumulate such knowledge over time. CoSTA is test-time only approach, so its exploration on previous tasks cannot be reused to improve or accelerate the planning for future tasks. In this paper, we study how to further reduce the cost of toolpath search by reusing the knowledge learned from explored tasks, a common feature of human learning. Inspired by photo editing applications that allow users record their frequently used actions for future reuse, propose to extract the repeatedly incurred subroutines tool calls from the successful toolpaths explored tasks. This is achieved automatically by performing inductive reasoning LLMs given previous toolpaths. Each subroutine represented by a symbolic rule under identifiable conditions, e.g..
if object area < 0 and mask_ratio > 6, then YOLO (Wang et al., 2C22) SAM (Kirillov et al., 2023) SD Inpaint (Rombach et al., 2022) for Object Recoloration.
63.0%
100
Success Rate on held-out Test Tet
91%
80
Fast Plan Success Rotes
Reuse Rate (%)
60
40.0%
39.0%
60
24.0%
40
20-
10
5R10
SR1
5H3
Si6
5R7
(cument)
Top Learned Subroutines
Explored Tasks (subroutines are updated every 20 tasks)
Figure I: Inductive Reasoning of Reusable Subroutines. Left: Reuse rate (% of applicable subtasks where a subroutine was utilized) the top-5 learned subroutines. Right: Success rate (%) fast planning (subroutines only, without A search) subtasks for held-out test set of tasks. It increases exponentially as more reusable subroutines are extracted from an increasing number of explored tasks.
Table summarizes the top five subroutines extracted by LLMS from CoSTA" toolpaths on 100 tasks, while Figure illustrates their reuse rates. They show an unexplored reusability of subroutines for image editing tasks. Motivated by this observation, we propose a neurosymbolic LLM agent with learnable memory, "Fast-Slow Toolpath Agent (FaSTA*)", that keeps mining symbolic subroutines from previous experiences and reuses them in the exploration and planning for future tasks. Its exploration stage can be explained reinforcement learning (ICRL): instead of recording all previous tools (Wang et al., 2022; Kirillov al., 2023; Rombach al., 2022; Liu et al., 2024) and paths and drawing contexts from them
novel and critical improvement to existing in-context
2

---

Published as a conference paper at ICLR 2026
Subtast's Correspor ding Subroucins
Tools colored by thair subtisks
Oifferenc Suboasis colors
FuS TA" Selected Path
Subroutine Induction Refinement
Mosl Recert Execution
Succenn of
Refine Subrautine P. C.
Validate
Propose Subroutine
C..) Reary
Suscessi of
FalEX
Adaptive Slow Planning
VM
Check Falid
Check Pooked
Chack Potoed
nokii remoon
Free
LUM
SUbtEA Chan
SM
Peplocamene
Restanation
Satruneehhp Tofee
High
SFD
112
STR
VLV-Qwliy
Check Parsed
Check
Figure 2: Top: Online learning (induction) and refinement of reusable subroutines from explored toolpaths for previous tasks. Bottom: Adaptive flst--low planning framework in FaSTA", Given a new task, FaSTA* first uses an LLM to generate a high-level plan of subtasks and then select subroutine per subtask, yielding fast plan. Only when the subroutine's 's output does not pass the quality check by VLMs, slow planning by A search on the subtask's 's tool subgraph will produce a toolpath for the subtask.
for future exploration, FaSTA" condenses these paths to a few reusable subroutines by inductive reasoning and uses these principles to guide future tasks more effectively.
As an imitation of the fast-slow planning in human cognition, the reusable subroutines enable "fast planning" of FaSTA" in the planning stage. In addition to the subtask-level planning in CoSTA* the LLM agent in FaSTA" further chooses subroutine for each subtask. Only when there does not exist any subroutine for the subtask, or when the subroutine's output fails to pass the quality check by VLMs, FaSTA* will resort to the "slow planning"" i.e., A search on a low-level subgraph of tools for the subtask. Hence, FaSTA* can entirely avoid the expensive low-level A search the fast plan succeeds. Moreover, more tasks have been explored and more subroutines collected, most incoming tasks can be handled by fast planning, and only very unique or rare tasks require slow planning, Our main contributions can be summarized as:
1. A memory of Symbolic Subroutine learned by LLMs:
We extract reusable subroutines as symbolic rules from explored tasks' toolpaths by inductive reasoning on LLMs. They serve as high-level actions and significantly reduce the exploration cost for future tasks.
2. Fast-Slow Planning of Toolpaths: We develop a neurosymbolic toolpath agent FaSTA* that benefits from fast planning (LLMs' subtask planning and selection of symbolic subroutines) to produce toolpath efficiently. and only invokes slow A search when the fast planning fails.
3. FaSTA' achieves better cost- qust-tyality trade-offs across diverse tasks than most basclines. Compared to CoSTA", it can save the cost by 49.3% % with the price of merely 3.2% quality degradation.
3

---

Published as a conference paper at ICLR 2026
2 RELATED WORK
Multi-turn Image Editing. Generative models excel at image synthesis and single-edits (Sordo al., 2025; Saharia et al., 2022; Nichol et al., 2022; Hertz et al., 2022), (e.g., (Rombach et al., 2022); (Ramesh et al., 2021); (Isola et al., 2018); (Chen et al., 2023a)), but multi-turn editing from composite instructions presents unique challenges. Controllability techniques (e.g., ControlNet (Zhang et al., 2023), sketch-guiee gunidnee (Voynov et al., 2022), layout-synthest (Chen et al., 2023b; Li et al., 2023)) improve short-sequence precision. Recent unified multimodal models, such as BLIP-3o (Chen et al., 2025a) and BLIP (Chen et al., 2025b), have shown promise by tackling generation and editing natively within a single autoregressive and diffusion architecture. However, iteratively applying standard models like InstructPix2Pix (Brooks et al., 2023) or those from MagicBrush (Zhang et al., 2024a) often lacks long-sequence coherence without sophisticated planning. Agentic systems (e.g., GenArtist (Wang et al., 2024), CLOVA (Gao et al., 2024)) decompose tasks for tool use. Nevertheless, efficient execution, especially for recurrent operation patterns, is a key challenge, with lack of learning from past patterns causing redundant computational effort.
Tool-use Agent and Planning. I.LMs as reasoning agents coordinating tools show broad im- pact (Zhang et al., 2024b; Gou et al., 2024; Qu et al., 2025; Li, 2024), especially in image editing for orchestrating specialized tools (Gupta et al., 2025; Gao et al., 2024; Wang et al., 2024; Shen et al., 2024). Closely related to our approach, MuLan (Li et al., 2024) uses LLM decomposition and iterative VLM feedback to progressively generate complex multi-object images. MLLM agents (e.g., CoSTA' (Gupta et al., 2025), GenArtist (Wang et al., 2024), SmartEdit (Huang al., 2023)) plan by decomposing goals: yet, others like Visual ChaiGPT (Wu et al., 2023) and MM-REACT (Yang al., 2023) often explore tool calls greedily, ignoring budgets, while dialog systems enable iterative refinement (Huang et al., 2024a). Agent planning often leverages L.M emergent reasoning (Yao al., 2023; Huang al., 2022: 2024b; Gupta & Kembhavi. 2023), sometimes augmented by explicit reasoning steps (Yao et al.. 2023; Wei et al., 2023). However, generating efficient, optimal low-level tool sequences for complex image editing is challenging. as LLMs may falter without further guidance or search (Huang et al., 2024b; Fu et al., 2024). CoSTA (Gupta et al., 2025) improves this with LLM-planned A search, but intensive search costs persist without experience reuse. Robust learning and symbolic reuse of common, successful tool sequences are largely missing, hindering efforts to reduce planning costs and build scalable, adaptive image editing agents.
PRELIMINARIES: COSTA* AND EFFICIENT TOOLPATH SEARCH
We build FaSTA* based upon recent framework, CoSTA' (Gupta al., 2025), to find cost-efficient toolpaths for multi-turn image editing. CoSTA" uses an LLM agent to prune a high-level subtask graph which low-level A search is performed to determine the final toolpath. We provide brief overview of CoSTA" below. More comprehensive details are available in Appendix E.
Foundational Components of COSTA'. CoSTA" utilizes three pre-defined knowledge structures:
A Tool Dependency Graph (TDG) to map prerequisite input/output dependency relationships between Al tools. It can be automatically generated or human-crafted.
A Model Description Table (MDT) to catalog AI tools, their supported subtasks (e.g.. object detection, recoloration). and input/output.
A Benchmark Table (BT) with cost/quality data for (subtask, tool) pairs collected from published works. It is used to initialize the heuristics in A search.
These elements collectively enable mapping from high-level task requirements to specific tool sequences and their predicted performance.
CoSTA Planning Stages. The planning in CoSTA' unfolds in three main stages:
Subtask- Tree Generation: An LLM interprets the user's natural language instruction and input image to produce a subtask tree, G..- This tree decomposes the overall task into smaller subtasks. CoSTA* allowed this tree to have parallel branches representing alternative subtask plans.
We found that single branch is sufficient in practice and reduces CoSTA" 's complexity (see Appendix F).
4

---

Published as a conference paper at ICLR 2026
2. Tool Subgraph Construction: The subtask tree is then used to identify relevant tools from the MDT and their dependencies from the TDG. This forms a final Tool Subgraph for each task, Gta which contains all tools for all subtasks required to accomplish the final editing task.
3. Cost-Sensitive A Search: CoSTA* performs an A search on Gts to find an optimal toolpath. The search is guided by a cost function f()) = g(x) + h(x),, where g(x) is the accumulated actual cost (considering time and VLM-validated quality) and h(x)) is the estimated heuristic value (derived from the BT), estimating the cost-to-go till leaf node. VLM checks after tool executions allow for dynamic updates and path corrections upon failure.
FAST-SLOW TOOLPATH AGENT (FASTA*)
4.1 FROM COSTA* TO FASTA
While CoSTA* (Gupta et al., 2025) offers solid foundation for tackling multi-turn image editing, its reliance on A search, especially for complex tasks with large Tool Subgraphs, can be computa- tionally intensive. Moreover, CoSTA* is test-time planning method that cannot learn from existing experiences to accelerate future tasks' planning. This may lead to inefficient, repeated A* search of the same subroutines, given our observation of many recurring ones across tasks.
To further reduce the cost of CoSTA" on A search and avoid exploring the same subroutines repeatedly, equip CoSTA*'s hierarchical planning with online learning of symbolic subroutines frequently used in explored tasks' toolpaths, and choose from them to address similar subtasks in later tasks, resulting in novel, efficient In- In-Context Reinforcement Learning (ICRL) (Monea et al., 2025) framework. FaSTA" still follow CoSTA" "s initial step of decomposing each task into a chain of subtasks, but saves considerable computation by a novel fast-slow planning that lazily triggers A* search for each subtask only when the selected subroutine fails.
First, we introduce a system for online inductive reasoning of subroutines (Section 4.2), where FaSTA' learns from past successful (and unsuccessful) editing experiences. It identifies frequently used, effective subsequences of tool calls for subtasks (subroutines) and the general conditions under which they perform well. Second, these learned subroutines form the backbone of an adaptive fast-slow execution strategy (Section 4.3). Instead of immediately resorting to a detailed A search, FaSTA* first attempts to apply a "Fast Plan" composed of these proven subroutines. If this fast plan is unsuitable for a subtask or fails a quality check, FaSTA* * then dynamically engages a more meticulous "slow plamning" of tool calls for each subtask by A search.
This fast-slow planning allows FaSTA to handle many tasks rapidly by selecting from learned subroutines. However, it retains the ability to perform deeper, more complex searches when faced with novel or challenging scenarios. The goal is to achieve a better balance of computational cost and high-quality, making complex image editing more practical and efficient.
4.2 ONLINE LEARNING AND REFINEMENT OF REUSABLE SUBROUTINES
Our first core contribution is a neurosymbolic method for automatically discovering and refining reusable subroutines from execution data (i.e., traces representing the detailed execution data logged for each subtask) during online operation. A subroutine P. = (f1, .i..t,..,,4, 44) represents a frequently observed, ordered sequence of tool calls f; Via that effectively accomplish a specific subtask s under certain conditions C.. The goal is to learn and maintain a dynamic library of rules R (P..C,. 8,) }/ mapping subtasks and context features cost-effective subroutines, stored in a Subroutine Rule Table (see Appendix for the structure).
Our approach diverges from standard ICRL,, which often grapples with cumbersome raw experience logs and inefficient generalization. FaSTA* employs an LLM for an explicit inductive reasoning step, analyzing execution traces not just to sample past experiences, but to synthesize compact, symbolic (subroutine, activation rule, subtask) knowledge leading to more interpretable and generalizable rules. Crucially, to ensure the generalizability of subroutines and a fair evaluation, the inductive reasoning of subroutines is performed a held-out set of new diverse tasks (e.g.. random internet images with new complex prompts) excluded from the benchmark. This online learning of symbolic rules and subroutines aims create interpretable and off-the-shelf library of action rules R. that can
5

---

Published as a conference paper at ICLR 2026
be periodically augmented and refined based on new experiences (Algorithm 1, Appendix G). The online learning and adaptation cycle in FaSTA" involves the following key stages:
1. Data Logging: FaSTA* continuously records detailed execution data (or traces) from each subtask. The motivation is to capture rich, contextualized data about what paths were taken, under what conditions (e.g.. object size from YOLO, mask details from SAM, LLM-iinerred context like background complexity), and with what outcomes (cost, quality, failures). This logged data serves the raw experiences for subroutine learning. Full details are provided in Appendix M.
2. Periodic Refinement: To balance continuous learning with operational stability, the refinement process is triggered periodically (every K = 20 tasks), using the most recent batch of accumu- lated traces (Trecent). This ensures the system adapts evolving patterns without excessive computational overhead.
3. Inductive Reasoning by LLM: This is the core knowledge synthesis step. The LLM is prompted with Trecent and the current rule set R to perform inductive reasoning, which analyzes these experiences, identifies recurring successful subroutines, and infers the contextual conditions (activation rules C,) determined via robust semantic bucketing instead of numerical values under which they are effective, proposes modifications to existing rules. This allows FaSTA* to generate new hypotheses about efficient strategies. Appendix S provided the detailed prompts.
Verification and Selection of Subroutines: Recognizing LLM- -roppood rules as hypotheses, this stage rigorously validates each change A before integrate it into R. ensure beneficial, robust subroutines and prevent degradation from flawed rules. Validation uses specialized test datasets against baseline (CoSTA* or current FaSTA*), ). "Net Benefit" score (balancing cost/quality) determines acceptance, with an LLM-based retry mechanism for refinement. Further details and evaluation protocols are provided Appendix G.4 and Appendix I., respectively.
More details of inductive reasoning can be found in Appendix G. This online adaptation loop allows FaSTA* to continuously learn from its operational data, building and refining a library of cost- effective, validated subroutines that enhance its "fast planning" capabilities. Figure shows the reuse rate of learned subroutines and how they improve the success rate of fast planning with increasing experiences. More details are provided Appendix H.
4.3 ADAPTIVE SLOW PLANNING
Following the generation of the subtask chain (Section 3) and the online refinement of the subroutine rule library R (Section 4.2), FaSTA* employs its second main contribution: adaptive fast-slow planning and execution strategy. This approach aims to drastically reduce execution cost by prioritizing an efficient "fast plan" of learned subroutines, while retaining the robustness of A search for novel or failed subtasks via a localized "slow plan" fallback. Figure illustrates this process, and Algorithm P.2 details the execution flow. The process involves two key phases: fast plan generation and the adaptive fast-slow execution.
Table 2: Adaptive Fast-Slow Planning Fallback Statistics. It shows the percentage of subtasks that can be addressed by subroutines vs. those requiring fallback to low-level A search.
Exccution Path
Percentage
High-Level (Subroutine Success)
91%
Low-Level Fallback (No Subroutine or Check Fails)
9%
1. Fast Planning. Initially, FaSTA* generates high-level "Fast Plan" Maubeey without search. An LLM (GPT-4o, with prompt in Appendix R) takes an input image, user prompt, subtask plan 81:N, and the subroutine rule set R. to select optimal subroutine Ps, E R or "None" for each subtask s, The selection considers the activation rules C, associated with each potential subroutine Py and the current image context. If the context satisfies Bi-Directional Block Self-Attention for Fast and -efory-Efficient Sequence Modeling activation rules for multiple subroutines Py applicable to s;, the one minimizing the cost-quality tradeoff score (Pv) x (2 - Qave (P2))²- 22 is chosen, where Cavg (Pú) and Qavg (P)) the averaged cost and quality of subroutine P, in different existing

---

Published as a conference paper at ICLR 2026
toolpaths, and is used-defined trade-off coefficient in CoSTA' (Gupta et al., 2025). This process yields the fast plan Maubsey = (P....... Pex).
2. Adaptive Fast-Slow Execution. The fast plan Mouusey is then executed sequentially.
For each planned subtask s;, FaSTA* calls the tools within Ps, sequentially and check the quality of each tool execution using a VLM in CoSTA" ((Gupta et al., 2025, Appendix I, Fig. 12) lists details regarding the VLM check criteria).
Fast Plan Attempt:
Slow Planning Trigger: the fast plan cannot find any subroutine for s; (i.e., 5; =None), or any tool execution in Ps, fails to pass the quality check, FaSTA' switches to the "slow planning" for the current subtask 8;. Hereby, the detailed low-level subgraph Glow (s;) for 8; is first constructed per CoSTA* (Gupta al., 2025, Sec. 4.2). Subsequently, an A search is performed on this Giow(8: to find an optimal path to complete si. employing the same cost function and search algorithm as defined in CoSTA (Gupta al., 2025, Sec. 4.3-4.5).
This adaptive fast-slow planning ensures that the more efficient fast plan is executed by default. In contrast, the robust but more expensive slow planning by A is invoked lazily only for those subtasks where the fast plan fails. The fallhack statistics of fast-slow planning is reported in Table 2.
5 EXPERIMENTS
We conduct extensive experiments to evaluate the effectiveness of FaSTA* We aim to answer: (I) How does our method compare to the state-of-the-arr CoSTA* in terms of execution cost and output quality? (2) How robust is the fast-slow planning approach, and what is the impact of its core components? All experiements have been conducted on a single NVIDIA A100 GPU.
5.1 EXPERIMENTAL SETUP
65.16
65,75
67
Dataset. We evaluate method the benchmark dataset curated and released alongside CoSTA" (Gupta et al., 2025)).
25
Average Execution (Seconda)
This dataset comprises 121 image-promph pairs, featuring complex multi-turn editing instructions involving 1-8 subtasks per im- age (amounting to 550 total image manip- ulations or turns across the dataset), cov- ering both image-only and mixed image- and-text manipulations (Gupta et al., 2025, Appendix D). Its diversity and complex- ity make it suitable for assessing the cost- saving potential and robustness our adap- tive planner. To further ensure generaliz-
FasTA" (Our)) CeSTA
CLOWA
Magesruah
CenAri: Instucc X2PX
Figure 3: Execution time (seconds) per image. FaSTA" and CoSTA* costs vary with tradeoff coefficient a.
Baseline costs are from CoSTA' (Gupta al., 2025). ability, we also evaluate FaSTA* on the Complex-Ean Editt benchmark, with results in Table
Baselines. Our primary baseline is the original CoSTA" algorithm (Gupta et al., 2025), which represents the state-of-the-arr cost-sensitive planner using A search on a pruned tool subgraph. In ablation studies and discussions, we refer this the "Low-Level Only" approach. We also acknowledge other agentic and non-agentic baselines evaluated in the CoSTA* paper (e.g.. GenArtist (Wang et al., 2024). CLOVA (Gao al., 2024), InstructPix2Pix (Brooks et al., 2023), MagicBrush (Zhang et al., 2024a)), primarily to contextualize the Parcto optimality results, while noting their limitations in handling the full range of tasks or performing cost-sensitive optimization.
Evaluation Metries. We adopt the evaluation scheme from CoSTA* (Gupta et al., 2025):
Quality (Human Evaluation): Task success measured by human evaluation. Following (Gupta et al., 2025), each subtask s; within task 7 is assigned score A(s;) {0, x, 1). where (0. 1) represents partial correctness based on predefined rules. The task accuracy A(T)) ) is the average of its subtask scores, and the overall accuracy is the average A(T) across the dataset (Gupta et al.,
7

---

Published as a conference paper at ICLR 2026
Table 3: Detailed Quality Comparison (Average Human Evaluation Score) across Task Types and Complexities. Baseline results are from CoSTA* (Gupta et al., 2025). Both FaSTA* and CoSTA* adopt a balanced cost-quality trade-off by setting 1.
Task Type
Task Category
FaStA (Ours)
CoSTA
VisProg
CLOVA
GenArtist
Instruct Pix2Pix
MagicBrush
1-2 subinsks
0.92
0.94
0.88
0.91
0.93
0.87
0.92
Image-Only Tasks
suhtnoks
091
0.9
0.76
0.85
0.74
0.78
5-6 subtasks
0.92
0,93
0.62
0.63
0.71
0.55
0.51
subtasks
0.95
0.46
0:45
0.61
0.38
0.46
2-3 subtnsks
0.91
0.93
0.61
0.63
0.67
0.48
0.62
Text+Image Tasks
4-5 subiasks
0.92
0,94
0.50
0.51
0.61
0.42
0.40
subtasks
0.91
0.94
0.38
0.36
0.56
0.31
0.26
Image Tasks
0.91
0.94
0.69
0.70
0.78
0.64
0.67
Overall Accurney
Texts Image
0.93
0.40
0.43
All Tisks
0.91
0.94
0.62
0.63
0.73
0.56
0.59
2025). We rely human evaluation due to the limitations of automated metrics like CLIP (Radford et al., 2021) in capturing nuanced errors in complex, multi-step, multimodal editing tasks. More details about the reasons for resorting human evaluation can be found in Sec. 5.2 of (Gupta et al., 2025). More details about the evaluation process and rules for assigning partial scores are mentioned in Appendix K.
Efficiency is measured by the total execution time in seconds for each inference, including any necessary retries.
Cost (Execution Time):
5.2 MAIN RESULTS
Performance Analysis. As shown in Table 3 and Figure 3, FaSTA achieves average qual- ity remarkably close to the original CoSTA method, with only a minimal drop of approxi- mately 3.2% in accuracy. However, the benefits in efficiency are substantial. Our approach re- duces the average execution cost by over 49.3%, achieving costs nearly half of CoSTA* This demonstrates the effectiveness of the adaptive slow-fast strategy: by leveraging learned sub- routines for common cases ("fast planning")) we drastically cut down on expensive A* explo- ration within low-level tool subgraphs, while the fallback mechanism ("slow planning") ensures that quality is not significantly compromised when subroutines are unsuitable or fail. Confirming these gains generalize, evaluations on the independent Complex- -diit benchmark (Table 4) demonstrate ~30% cost reduction with comparable qual- ity. More details on quantitative results on comparisons with other methodologies and models are available in Appendix J.
Table 4: Performance comparison subset of Complex-Edit benchmark. FaSTA* achieves con- sistent cost reductions while maintaining quality across varying task complexities.
Task Complexity
Metric
CoSTA
FaSTA" (Ours)
1-3 Subtasks
Cost (s)
46.75
35.87
Accuracy
0.88
0,86
4-5 Suhtasks
Cost (s)
27.25
54.17
Accuracy
0.90
0.89
Subtasks
Cost Accuracy
105.60
73.20
0.90
0.88
Overall
Avg. Cost 78.27
S5.12
Avg. Accuracy
0.89
0.87
Pamcoforn Or 11 OutTer
Oara la 2
CESTA
indhact Richh
Pareto Optimality Analysis. Figure 5 illus- trates the Pareto frontiers achieved by varying the cost-quality tradeoff coefficient a. FaSTA consistently achieves a superior frontier com- pared to CoSTA* (Low-Level Only) and domi- nates the other baselines evaluated in (Gupta al., 2025). For any given quality level achieved by CoSTA*, our method offers a sig- nificantly lower cost, and for any given cost bud- get, our method yields comparable or slightly lower quality. This highlights the adaptability of our approach in catering to different user prefer- ences regarding the balance between execution speed and output fidelity, while consistently op- erating at more efficient frontier than searching the lewelevel graph alone. Like we had already
Conkrrttt
004
Quality
0.5
304
26
Cost (seconds)
Figure 5: Cost-Quality Pareto Frontier, FaSTA with various values against CoSTA* and other baselines. FaSTA* x achieves a superior frontier, offering better cost-quality trade-offs.
8

---

Published as a conference paper at ICLR 2026
53.85 vs 28.7s
INPUT
CoSTA FaSTA*
GenArtist
MagicBrush
InstructPix2Pix
CLOVA
Hipdteemt dioedd egrapest open prddpaaptiiin oecoring cring for bentr scee soderttnniing
mage rusubrrng
to pen, Abos conooce the yerelion..
rot wlat cet for your
Adl what de 1i6
Adk
repaoign contant to 1AA2 ZONET replice with
Figure 4: Comparison of FaSTA* with CoSTA* (Gupta et al., 2025) and other leading image editing agents for complex multi-turn tasks. FaSTA achieves visual results identical to CoSTA and significantly surpasses other baselines in accuracy and coherence, Notably, FaSTA delivers this high quality roughly half the execution cost of CoSTA*, highlighting its superior efficiency.
mentioned earlier, FaSTA* becomes increasingly optimal with more subroutine experience. This cost- quality tradeoff compared to CoSTA" w.r.t. number of subroutines mined is explained in Appendix C.I in greater detail.
Qualitative Analysis Figure 4 provides qualitative comparisons of FaSTA" against baselines, illus- trating its ability to handle complex multi-turn editing tasks effectively. These examples showcase the practical benefits of our adaptive fast-slow approach in achieving desired edits. For more detailed qualitative analysis, including specific case studies demonstrating subroutine effectiveness, and com- parisons different tool paths under specific conditions, please refer to Appendix We also similar qualitative comparison of FaSTA* with the very recent Gemini 2.0 Flash Preview Image Gen- eration on some tasks from the CoSTA* benchmark dataset. These results can be seen in Figure 14.
5.3 ABLATION STUDIES
Impact of Subroutine Verification. To evaluate the significance of our subroutine verification step (Section 4.2, Step 4), we compared FaSTA"'s performance with and without this validation. We first used an LLM to propose subroutine changes based on initial task traces. These proposals were then either inducted directly or only after passing our full verification process. The outcomes are in Table 5. The verification step proved crucial: FaSTA* with verified subroutines yielded much fewer fallbacks to low-level A search. This improvement stems from ensuring only reliable subroutines adopted, which prevents wasted execution on flawed proposals and avoids misdirecting the agent when low-level search is genuinely needed.
Table 5: (Left) Impact of Subroutine Verification; (Right) Fast/Slow planning only vs. FaSTA
Lew-Level Fallback (%)
Method
Avg. Quality
Avg, Cost (s)
Method
Fast plan Only
0.84
27.5
F (w/o Verification) 28% 9%
Slow plan Only
0.93
46.8
F (w/ Verification)
FaSTA" (Ours)
0.91
29.5
Fast planning only vs. FaSTA* planning"), evaluated variant that uses only the high-level subroutines for subtasks where
To demonstrate the importance of the low-level fallback ("slow

---

Published as a conference paper at ICLR 2026
subroutines possible. If a subroutine failed its VLM check or if no subroutine was selected ('None"), ) the planner simply failed for that subtask, without activating the low-level graph.
As shown in Table 5, relying solely the high-level subroutines leads to significant drop in quality compared to our full adaptive fast-slow planning approach. While the cost is slightly lower (due to avoiding any low-level search), the brittleness is unacceptable. Figure 6 illustrates typical failure case. While the High-Level Only approach fails the task, FaSTA successfully recovers by falling back the low-level A search, demonstrating the critical role of the "slow planning" component for robustness and overall task success.
Slow planning only FaSTA" This ablation represents the original CoSTA" algorithm (using the refined single-path prompt). As shown in Table 5, CoSTA* achieves marginally higher output quality than FaSTA* However, this slight quality gain comes at the expense of significantly higher average execution costs. The broader performance comparison, detailed in Table 3 and Figures 3 and 5, further highlights our superior sost-efficiency.
Impact of LLM Size. We evaluated a smaller model (Qwen 2.5VL 3B) for subroutine selection on subset of tasks. The model selected incorrect subroutines 440% of the time, frequently triggering the fallback to the low-level A* search. Consequently, despite negligible API costs, the total execution cost increased by 20% due the additional cost incurred by the fallback mechanism. However, the final output quality remained consistent, confirming the robustness of the slow-plan slow-planning safety net against planner errors.
5.4 SUMMARY AND LIMITATIONS
Our results indicate that FaSTA" "'s adaptive fast-slow execution strategy significantly improves computational efficiency while largely maintaining the high quality of the original CoSTA* approach. Ablation studies confirm the necessity of both the low-level fallback mechanism and the subroutine verification process for robustness and efficiency. Despite its promising performance, FaSTA has few limitations. Its initial performance experiences are gathered for effective subroutine learning (cold start). These limitations and a quantitative analysis of failure cases have been provided in Appendix C. Furthermore, overall performance and the ability to capture nuanced rules for complex tasks remain dependent on the evolving capabilities of the underlying LLMs.
entirely new tasks may be suboptimal until sufficient
6 CONCLUSION
In this paper, we introduced FaSTA', neurosymbolic agent designed to significantly enhance the efficiency of complex, multi-turn image editing tasks. By integrating an online subroutine mining mechanism that leverages LLM-based inductive reasoning in modified version of In-Context Reinforcement Learning, FaSTA* learns and refines a library effective tool-use sequences and their activation conditions from experiences. This learned knowledge underpins adaptive fast- slow execution strategy, where a "Fast Plan" of subroutines made by LLMs is prioritized, with a localized A search ("Slow Plan") serving robust fallback for novel challenging subtasks. Our experiments demonstrate that FaSTA* achieves image quality comparable to the state-of-the-ant CoSTA" but substantially reduced computational cost, effectively addressing key bottleneck in prior methods. We believe that FaSTA "ss approach of combining learned symbolic shortcuts with principled search offers a promising direction for developing more agile, cost-sensitive, and continually improving AI agents for complex tasks.
REFERENCES
Youngmin Baek, Bado Lee, Dongyoon Han, Sangdoo Yun, and Hwalsuk Lee. Character region awareness for text detection. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pp. 9365-9374, Computer Vision Foundation / IBBE, 2019, doi: 10. 10.1109//VPR.200 2019.0099,
Tim Brooks, Aleksander Holynski, and Alexei A. Efros. Instructpix2pix: Learning to follow image editing instructions, 2023.
10

---

Published as a conference paper at ICLR 2026
Jiuhai Chen, Zhiyang Xu, Xichen Pan, Yushi Hu, Can Qin, Tom Goldstein, Lifu Huang, Tianyi Zhou, Saining Xie, Silvio Savarese, Le Xue, Caiming Xiong, and Ran Xu. Blip3-o: A family of fully open unified multimodal archiesar training and dataset, 2025a. URL https: //arxiv. org/ abs/ /205 0 09568.
Jiuhai Chen, Le Xue, Zhiyang Xu, Xichen Pan, Shusheng Yang, Can Qin, An Yan, Honglu Zhou, Zeyuan Chen, Lifu Huang, Tianyi Zhou, Junnan Li, Silvio Savarese, Caiming Xiong, and Ran Xu. Blip3o-next: Next frontier of native image generation, 2025b. URL http:::////// /taxxiivvv.oo org/ abs/25100 22t.//210... 15857.
Junsong Chen, Jincheng Yu, Chongjian Ge, Lewei Yao, Enze Xie, Yue Wu, Zhongdao Wang, James Kwok, Ping Luo, Huchuan Lu, and Zhenguo Li. Pixart-o: Fast training of diffusion transformer for photorealistic text-to-image synthesis, 2023a.
Minghao Chen, Iro Laina, and Andrea Vedaldi. Training-free layout control with cross-attention guidance, 2023b.
Xiaohan Fu, Shuheng Li, Zihan Wang, Yihao Liu, Rajesh K. Gupta, Taylor Berg-Kirkpatrick, and Earlence Fernandes. Imprompter: Tricking Ilm agents into improper tool use, 2024. URL https::/aaat //axivv./rrvvvv///a////a/ http/aaxvvvrgg./e/////// org/ htgg//b////// abbs/241010 2410. 14923.
Zhi Gao, Yuntao Du, Xintong Zhang, Xiaojian Ma, Wenjuan Han, Song- Coog-Chun Zhu, and Qing Li. CLOVA: A closed-loop visual assistant with tool usage and update. In JEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2024, Seattle, WA, USA, June 16-22, 2024, pp. 13258-13268. IEEE, 2024. doi: 10. 20W.CCVPPR2233..22.0102222
Zhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen, Yujiu Yang, Minlie Huang, Nan Duan, and Weizhu Chen. Tora: A tool-integrated reasoning agent for mathematical problem solving, 2024.
URL www.tttps///mm //tp:v/aavvviv//aa///a org/ abs/ 22099.309.30 17452.
Advait Gupta, NandaKiran Velaga, Dang Nguyen, and Tianyi Zhou. Costa#: Cost-sensitive toolpath agent for multi-turn image editing, 2025. URL https: //tpr/aaaavv.///aa//aa/eaaeaaaia org/ abs 22003 10613.
Tanmay Gupta and Aniruddha Kembhavi. Visual programming: Compositional visual reasoning without training. In JEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 14953-14962. IEEE, 2023, doi: 10.1 CVPP52279.2023.0111
Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt- to-prompt image editing with cross attention control, 2022. URL https: //apai///////v////aae/aeeaaiamva http:///wwwwww...a.aa./a wrg//bs//////.o 2208. 01 626.
Minbin Huang, Yanxin Long, Xinchi Deng, Ruihang Chu, Jiangfeng Xiong, Xiaodan Liang, Hong Cheng, Qinglin Lu, and Wei Liu. Dialoggen: Multi-modal interactive dialogue system for multi- turn text-to-image generation, 2024a.
Wenlong Huang, Pieter Abbeel, Deepak Pathak, and Igor Mordatch. Language models as zero-shot planners: Extracting actionable knowledge for embodied agents, 2022. URL https: //axxiv. Btg/abs/220 07207.
Xu Huang, Weiwen Liu, Xiaolong Chen, Xingmei Wang. Hao Wang, Defu Lian, Yasheng Wang, Ruiming Tang, and Enhong Chen. Understanding the planning of Ilm agents: A survey, 2024b.
URL https: /ttp:///axvvvvv/a org/ ats///bs/2222 02716.
Yuzhou Huang, Liangbin Xie, Xintao Wang, Ziyang Yuan, Xiaodong Cun, Yixiao Ge, Jiantao Zhou, Chao Dong. Rui Huang. Ruimao Zhang, and Ying Shan. Smartedit: Exploring complex instruction-based image editing with multimodal large language models, 2023.
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks, 2018
JaidedAI. Easyoer. https: httphu/.ccommtaaaeeee///////aa 2024.
11

---

Published as a conference paper at ICLR 2026
Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan- Yen Lo, Piotr Dollár, and Ross Girshick. Segment anything, 2023.
Sen Li, Ruochen Wang, Cho-Jui Hsieh, Minhao Cheng, and Tianyi Zhou. Mulan: Multimodal-INl agent for progressive and interactive multi-object diffusion, 2024. URL htttttsss///xii// abs/2402. 12741.
Xinzhe Li. A review of prominent paradigms for Ilm-based agents: Tool use (including rag), planning, and feedback learning, 2024. URL
org/ abs 2406. 05804.
Yuheng Li, Haotian Liu, Qingyang Wu, Fangzhou Mu, Jianwei Yang, Jianfeng Gao, Chunyuan Li, and Yong Jae Lee. Gligen: Open-set grounded text-to-image generation, 2023.
Shilong Liu, Zhaoyang Zeng. Tianhe Ren, Feng Li. Hao Zhang, Jie Yang. Qing Jiang, Chunyuan Li, Jianwei Yang. Hang Su, Jun Zhu, and Lei Zhang. Grounding dino: Marrying dino with grounded pre-training for open-set object detection, 2024.
Giovanni Monea, Antoine Bosselut, Kianté Brantley, and Yoav Artzi. Lims are in-context bandit reinforcement learners, 2025. URL htwp::ttt////e http:/:///xxvvvaaaeeeeo http:/bb//2410 05362.
Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models, 2022. URL httpt::/tta....ttootttttt
Changle Qu, Sunhao Dai, Xiaochi Wei, Hengyi Cai, Shuaiqiang Wang. Dawei Yin, Jun Xu, and Ji-rong Wen. Tool learning with large language models: a survey. Frontiers of Computer Science, 19(8), January 2025, ISSN 2095-2236. doi: doi. 100 1007 s11770 024-024400 40678-62222
URL http: //dx.
oro.orr/00..100
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 2021.
Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. CoRR, abs/2102.12092. 2021.
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High- resolution image synthesis with latent diffusion models, 2022.
Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily Denton, Seyed Kamyar Seyed Ghasemipour, Burcu Karagol Ayan, S. Sara Mahdavi, Rapha Gontijo Lopes, Tim Salimans, Jonathan Ho, David Fleet, and Mohammad Norouzi. Photorealistic text-to-image diffusion models with deep language understanding, 2022.
Weizhou Shen, Chenliang Li, Hongzhan Chen, Ming Yan, Xiaojun Quan, Hehong Chen, Ji Zhang, and Fei Huang. Small 1ims are weak tool learners: A multi-lim agent, 2024. URL https: //arxivv. hwt./oorg/abaa.... 2201 073244.
Zineb Sordo, Eric Chagnon, and Daniela Ushizima. A review on generative ai for text-to-image and image-to-image generation and implications to scientific images, 2025. URL https://aaaae //arxiv. org//bs/ 22502 21151.
Andrey Voynov, Kfir Aberman, and Daniel Cohen-Or. Sketch-guided text-to-image diffusion models, 2022.
Chien-Yar Wang, Alexey Bochkovskiy, and Hong-Yure Yuan Mark Liao. Yolov7: Trainable bag-of- freebies sets new state-of-the-art for real-time object detectors, 2022.
Zhangyang Wang. Jianchao Yang, Hailin Jin, Eli Shechtman, Aseem Agarwala, Jonathan Brandt, and Thomas S. Huang. Deepfont: Identify your font from image, 2015.
12

---

Published as a conference paper at ICLR 2026
Zhenyu Wang, Aoxue Li, Zhenguo Li, and Xihui Liu. Genartist: Multimodal Ilm agent for unified image generation and editing, 2024.
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoe Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning large language models, 2023. URL https: http://axxvvv.rroe 2200 11903.
Chenfei Wu, Shengming Yin, Weizhen Qi, Xiaodong Wang, Zecheng Tang, and Nan Duan. Visual chatgpt: Talking, drawing and editing with visual foundation models, 2023. URL https:
//axxxv.org//ab//230000 04671.
Zhengyuan Yang, Linjie Li, Jianfeng Wang, Kevin Lin, Ehsan Azarnasab, Faisal Ahmed, Zicheng Liu, Ce Liu, Michael Zeng, and Lijuan Wang. Mm-react: Prompting chatgpt for multimodal reasoning and action, 2023. URL https: / arxiv. org
11381.
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models, 2023. URL pesttss://aatt org/abs/ 2210. 03629.
Kai Zhang, Lingho Mo, Wenhu Chen, Huan Sun, and Su. Magicbrush: manually annotated dataset for instruction-guided image editing, 2024a.
Kechi Zhang, Jia Li, Ge Li, Xianjie Shi, and Zhi Jin. Codeagent: Enhancing code generation with tool-integrated agent systems for real-world repo-level coding challenges, 2024b. URL
https://arxils org/ alos .201233311.......
Lvmin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control text-to-image diffusion models, 2023.
13

---

Published as a conference paper at ICLR 2026
Instruction
High Level Only
FaSTA*
Replace the cat with rabbit
Figure 6: Failure case for "High-Level Only" execution versus FaSTA* For the task "Replace the cat with rabbit", the initially selected high-level subroutine fails to produce a satisfactory result, leading failed output for the "High-Lew Level Only" approach. In contrast, FaSTA detects this failure, activates its low-level fallback mechanism for the "Object Replacement" subtask, and performs A search to find correct tool sequence, successfully completing the task.
Input Prompt
What if ha was with a bacispack?
Make the donut an
Change the banana to microphame.
away
Input Image
Edited Image
Figure Qualitative examples of FaSTA's "s performance on sample tasks from the MagicBrush dataset (Zhang et al., 2024a). These tasks processed using the Subroutine Rule Table learned from non non-beno non-benchmark data. Notably, all examples shown were successfully completed by FaSTA* relying entirely its "fast plan" composed of learned subroutines, without needing to resort the "slow planning" via A search for any subtask.
A GENERALIZATION TO EXTERNAL DATASETS
A. QUALITATIVE GENERALIZATION TO MAGICBRUSH DATASET
To assess the generalizability of FaSTA"'s learned subroutines and its adaptive plamning strategy, we tested it on set of sample tasks derived from a different benchmark, the MagicBrush dataset (Zhang al., 2024a). The Subroutine Rule Table (R) used for these evaluations was the one learned through the online inductive reasoning process described in Section 4.2, which utilized diverse non-benchmatt image/prompt pairs, ensuring no direct exposure to MagicBrush data during the subroutine learning phase.
Our objective here was to observe the subroutines and the Fast Plan generation logic could effectively handle tasks from dataset with potentially different characteristics and prompt styles without requiring immediate fallback to low-level * search for every step. Figure presents qualitative results for several such tasks.
14

---

Published as a conference paper at ICLR 2026
As illustrated in Figure 7 and noted in its caption, FaSTA" able to successfully complete these diverse editing tasks from the MagicBrush dataset. Significantly, for all the examples shown, the tasks were accomplished entirely through the "Fast Plan" execution. This indicates that the learned subroutines and their activation rules, derived from different data sources, were sufficiently general to apply effectively these new instances, and the L.M able compose successful Fast Plan without needing to trigger the low-level A* search fallback for any subtask. This provides positive evidence towards the generalizability of our subroutine learning and adaptive planning approach beyond the specific characteristics of the data used during the online refinement cycles.
B BENCHMARK DATASET RATIONALE: COSTA* * vs. MAGICBRUSH
For evaluating FaSTA", we primarily utilized the benchmark dataset introduced with CoSTA* (Gupta al., 2025). While the MagicBrush dataset (Zhang et al., 2024a) is a prominent benchmark for instruction-guided image editing, the CoSTA dataset was chosen due to its specific characteristics that better align with the capabilities we aim demonstrate with FaSTA", particularly its efficiency in handling complex, multi-step tasks.
The key distinctions motivating our choice are:
Task Complexity and Depth:
To best showcase FaSTA advantages in cost-saving through learned subroutines and adaptive planning, complex examples involving greater number of sequential subtasks are essential. The CoSTA* dataset was specifically curated to include such multi-turn editing instructions. In contrast, many tasks in the MagicBrush benchmark, while diverse, often involve simpler, more direct edits that might not fully stress or benefit from a sophisticated fast-slow planning approach to the same extent.
Multimodal Capabilities: A significant aspect of modern image editing involves text-in-image manipulation. The CoSTA* dataset includes a substantial portion of tasks requiring multimodal processing (e.g., text replacement, text removal within an image context). The MagicBrush benchmark, as per its original release, primarily focuses on visual edits and does not extensively cover these text-in-image editing scenarios. FaSTA*, like CoSTA, is designed to handle such multimodal tasks, making the CoSTA* dataset more suitable for comprehensive evaluation of its capabilities.
Number of Manipulations/Turis While the CoSTA* dataset has 121 image- pairs, which might be fewer than the test set size of some other benchmarks like MagicBrush, the tasks in the CoSTA* dataset are designed to be multi-turn. As noted in Section 5, these tasks involve 1-8 subtasks per image, amounting to 550 total distinct image manipulations (or "turns") across the dataset. This provides a rich set of complex sequences for evaluating planning efficiency.
Table 6: Conceptual Comparison of Dataset Characteristics Relevant to FaSTA"
Characteristic
CoSTA * Dataset
MagicBrush Dataset
Primary Focus
Complex, Multi-Tum, Multimodal
Instruction Visual Edits
Max Subtasks per Task
Max Tool Subgraph Depth
22 Supported
Text-in- Image Editing
Not supported
Table 6 provides a conceptual comparison of key characteristics relevant to our evaluation goals. While MagicBrush is invaluable for evaluating general instruction-following in image editing models, the CoSTA* * dataset's 's emphasis on longer, multi-faceted tasks involving a broader range of subtask types (including multimodal ones) makes it a more fitting benchmark to demonstrate the specific cost-saving and adaptive planning strengths of FaSTA' The goal of FaSTA" is not just perform an edit, but to do so efficiently by learning and reusing common multi-step patterns, a capability best tested by complex sequential decision-making problems.
15

---

Published as a conference paper at ICLR 2026
YOLO-SAM SDM-S Inpaint
(ours)
Inpaint
Search&Recalor
CoSTA
Recover the ball
Rocovar
to
back
Rearrrr bal
green
Figure 8: Example demonstrating FaSTA*'s subroutine effectiveness. FaSTA * uses learned rules to select optimal paths (e.g., SD Seaach&&ecoloe for the small ball in row 1, avoiding SD Inpa nt' potential failure), achieving results identical to CoSTA* at significantly lower average cost (15.21s vs. 25.32s for these examples) by preventing unnecessary exploration of suboptimal paths.
C DETAILED QUALITATIVE ANALYSIS AND SUBROUTINE EFFECTIVENESS
This section provides a more in-depth qualitative examination FaSTA" performance, focusing on the benefits of learned subroutines and the efficiency gains of the adaptive fast-slow execution strategy.
Demonstrating Subroutine Relevance and Efficiency. To illustrate why learning subroutines is beneficial and how FaSTA* achieves cost savings, we examined specific cases where input image and prompt conditions matched learned activation rules C for particular subroutines P. Figure 8 depicts such scenarios for recoloring tasks, comparing the outcomes and behavior of FaSTA* CoSTA and all potential tool paths for recoloration. Under specific conditions, certain tool paths are prone to failure or are suboptimal. FaSTA' by leveraging its learned activation rules, can preemptively select an effective subroutine, thus avoiding unnecessary exploration of these less suitable paths.
For instance, consider the first row in Figure 8, where the task is to recolor a small ball to blue. Paths involving SD Inpa nt. (such
Inpaint (Rombach et al., 2022)or Inpaint) often exhibit poor performance or fail VLM quality checks when the target object very small. FaSTA* incorporates an activation rule for its chosen subroutine (in this case, one that selects SD employs SD Search&Recolor and successfully recolors the ball. In contrast, CoSTA* lacking this specific leamed rule for this context, might explore an SD iappant--brt general applicability or heuristic score. Upon fallure of this path (indicated by a failed VLM check), CoSTA* would then use its A search to backtrack and explore alternative paths, eventually finding the SD Sear tearch& Reco or sequence and completing the task, but at the cost the initial failed attempt and additional search time.
R-DINO-SSMM-A
werrchh&Reolloo that accounts for this factor. Thus, FaSTA" directly
path first due to its
This pattern, where FaSTA" makes a more informed initial path choice due to its learned subroutine rules, is key to its efficiency. The figure shows that while both FaSTA* and CoSTA" can arrive at the same high-quality final output, FaSTA* does so more directly. For the examples presented in Figure 8, this translated FaSTA" achieving the correct edits at average execution cost of 15.21s, whereas CoSTA' took an average of 25.32s. This highlights how FaSTA*, by encoding successful, context-dependent tool sequences subroutines and applying them based learned activation
16

---

Published as a conference paper at ICLR 2026
rules, effectively halves the execution cost in these scenarios by minimizing costly trial-and-ema exploration of paths known to be suboptimal or likely to fail under specific conditions.
50
FaSTA* Leaming Trajectory
CoSTA* Baseline
Average Execution Cost (Seconds)
Learning Trajectory
80 tasks
40
120 tasks
160 tasks
30
25 0.70
0.75
0.80
0.85
0.90
0.95
1.00
Average Quality (Score)
Figure 9: Learning trajectory of FaSTA" showing the relationship between Average Execution Cost and Average Quality as more tasks are explored (from 0 to 200). FaSTA* rapidly converges toward the Pareto frontier, significantly reducing cost while maintaining high quality.
C.I COST/QUALITY TRADE-OFF W.R.T. SUBROUTINE MINING
FaSTA* is designed to get optimal in terms of execution cost more tasks executed and subroutines are learnt. There however, no degradation of final quality in any case. At "cold start" (0 explored tasks), FaSTA "'s cost and quality identical the CoSTA" baseline. FaSTA" begins to outperform FaSTA* in average efficiency as soon as the first effective subroutine is learned and successfully applied. The table below illustrates how performance evolves, showing rapid decrease in cost while quality remains high and stable. This learning dynamics is visualized in Figure 9, demonstrating how the agent converges toward the Pareto frontier as it gains experience.
Table 7: Performance evolution of FaSTA* Execution cost rapidly decreases as more subroutines are learned from explored tasks, while maintaining high quality comparable to CoSTA baseline.
Avg. Exec. Cost (s) (CoSTA* w/ Subtask Chain) (const.)
Avg. Quality (CoSTA" w/ Subtask Chain) (const.
No. of Explored Tasks
Avg. Quality (FaSTA")
Avg. Exec. Cost (s) (FaSTA*)
(Cold Start)
0.93
0.93
46.8
40
0.92
42.75
0.93
46.8
80
0.92
41.59
0.93
46.8
120
0.92
39.71
0.93
46.8
160
0.91
35.32
0.93
46.8
200 (Warmed Up)
0.91
29.25
0.93
46.8
We recognize that while FaSTA* covers most editing tasks, there might be novel OOD test cases where no subroutine applies. In such cases, FaSTA* gracefully defaults its "slow path". This makes its performance for that specific task identical to CoSTA 's, ensuring that output quality is not compromised, while the overall execution cost across all tasks is either identical significantly better.
17

---

Published as a conference paper at ICLR 2026
Total Cost Analysis including LLM Overhead. We further analyze the total inference cost to confirm that our reported efficiency gains hold even when accounting for LLM API overheads. Our comparisons with baselines conducted under identical conditions, including and excluding specific factors uniformly. The primary computational bottleneck in agentic image editing is vision model inference (e.g., Stable Diffusion), which is orders of magnitude By avoiding 10-20 exploratory image generation steps via Fast Planning, FaSTA* achieves net savings that vastly outweigh the cost of LLM tokens. The only unique overhead in our framework is the Inductive Reasoning phase; however, this cost is amortized over the agent's 's lifespan. As the system reaches optimal performance after ~20 tasks (the "warm-up" phase), the reasoning overhead becomes negligible in long-term deployment. For instance, when amortized over just 2,000 tasks, the average cost reduction adjusts only slightly from 49.3% to 455.2%% maintaining a substantial efficiency advantage over baselines.
expensive than text processing.
C.2 FASTA FAILURE CASE ANALYSIS
Overall, our adaptive "fast plan" highly successful, handling % subtasks efficiently. The more robust but costly "slow path" (A* search) is only triggered in the remaining 9% of cases. This fallback rate can be broken down as follows:
Table 8: Fallback reasons and their frequency.
Fallback Reason
Percentage of Subtasks
Selected Subroutine Failed VL.M Quality Check
7%
No Applicable Subroutine Found
2%
The 7% of subroutine failures typically occur on novel tasks where the image context satisfies subroutine's 's learned activation rules but contains unforeseen complexities, leading to VLM quality check failure. The contribution to 9% fallback rate varies by the complexity of the subtask category, as detailed below:
Table 9: Per-category contribution to fallback rate.
Subtask Category
Contribution to Total Fallback Rate
Text Removal
2.5%
Object Removal
2.0%
Text Replacement
1.8%
Object Replacement
1.5%
Object Recoloration
1.2%
Even in these fallback scenarios, the system defaults to the robust A search, ensuring that the final output quality is not compromised.
Table 10:
Fair comparison of FaSTA* with VisProg and CLOVA using restricted toolset and subtask list. Performance difference (Diff. w/ FaSTA") calculated as the average baselines vs. FaSTA*
Subtasks
CoSTA
FaSTA
VisProg
CLOVA
Diff. w/ FaSTA"
1-2 Subtasks
0.510
0.509
0.498
0.504
-1.6%
3-4 Subtasks
0.551
0.549
0.489
0,496
-10.3%
5-6 Sublasks
0.573
0.571
0.446
0.451
-21.4%
7-8 Subtasks
0.460
0.456
0.301
0.310
-33.0%
Overall Accuracy
0.525
0.521
0.436
0.446
-15.4%
18

---

Published as a conference paper at ICLR 2026
Table 11: Fair comparison FaSTA* with GenArtist using restricted toolset and subtask list. Performance difference (Diff. w/ FaSTA*) ") is calculated as GenArtist vs. FaSTA*.
Subtasks
CoSTA
FaSTA
GenArtist
Diff. w/ FaSTA* *
1-2 Subtasks
0.508
0.507
0.506
-0.2%
3-4 Subtasks
0.578
0.575
0.548
-4.7%
5-6 Subtasks
0.606
0.602
0.503
-16.4%
7-8 Subtasks
0.515
0.505
0.392
-22.4%
Overall Accuracy
0.553
0.547
0.495
-9.5%
D FAIR COMPARISON WITH RESTRICTED TOOLSET AND SUBTASKS
To strictly address concerns regarding equitable comparison due to toolset differences, performed additional ablation studies where FaSTA* and CoSTA* were restricted to the exact same toolsets and subtasks available to the basclines. This ensures that any observed performance difference is primarily due to the planning and execution strategy (Fast-Slow architecture and Inductive Learning) rather than the breadth of available tools.
As shown in Table 10 and Table 11, even when handicapped with the restricted toolset, FaSTA achieves performance comparable to CoSTA" and significantly outperforms the baselines. This confirms that the performance gains stem from our architectural contributions rather than simply having access more powerful tools.
E DETAILED OVERVIEW OF COSTA* COMPONENTS AND PLANNING
This appendix provides a more detailed explanation of the core components and planning stages of the CoSTA* agent (Gupta et al., 2025), which form the foundation upon which FaSTA* builds and modifies. The descriptions here are rephrased from the original CoSTA* paper to ensure clarity and avoid direct repetition.
E.1 FOUNDATIONAL KNOWLEDGE STRUCTURES IN COSTA*
CoSTA" leverages three primary pre-defined knowledge structures inform planning and search processes:
Model Description Table (MDT) The MDT serves comprehensive catalog of all AI tools available to the agent. For each tool (e.g.. YOLO (Wang et al., 2022), SAM (Kirillov et al., 2023), Stable Diffusion (Rombach al., 2022)), the MDT specifies:
The types of subtasks Recoloration"). CoSTA* considered 24 tools supporting 24 distinct subtasks. Its input requirements (e.g., an image, bounding boxes, segmentation masks). The outputs it produces (e.g.. bounding boxes, edited image, extracted text).
perform (c.g.. "Object Detection", "Image Segmentation", "Object
This structured information is essential for mapping abstract subtasks to concrete tool invocations and for constructing the Tool Dependency Graph. An excerpt of CoSTA* "ss MDT structure is shown in (Gupta et al., 2025, Table 1), with the full table their appendix.
Tool Dependency Graph (TDG) The TDG, denoted Gtd = (Vi, Eua). is a directed graph that captures the operational dependencies between the Al tools listed in the MDT.
Via is the set of all available Al tools.
An edge (w) U2) E Ena exists if the output of tool i1 can serve as a valid input for tool 82 in the context of certain subtasks.
19

---

Published as a conference paper at ICLR 2026
The TDG represents the potential workflow sequences. CoSTA" automatically construct this graph by analyzing the input/output specifications of tools in the MDT, reducing manual effort and facilitating updates new tools are added (Gupta et al., 2025, Appendix C). A visualization of the TDG used in CoSTA" is provided in (Gupta et al., 2025, Fig. 4).
Benchmark Table (BT) The BT is critical resource for the A search's heuristic function, It stores pre-computed or empirically measured performance data for tool-subtask pairs (2,, 8y). For each pair, the BT typically includes:
Execution Time C(e,, sy): The average time taken by tool v, to perform subtask sj. Quality Score (u,, 8y]: An objective measure of the typical output quality of tool e for subtask 8j, normalized to a [0,1] scale for comparability across different subtasks.
This data is sourced from existing benchmarks where available, or through dedicated offline evalua- tions if necessary, as detailed in (Gupta et al., 2025, Sec 3.3). The complete BT for CoSTA" is shown in (Gupta et al., 2025, Table 11).
E.2 COSTA* PLANNING AND EXECUTION STAGES
The CoSTA' agent follows three-stage process to address given multi-turn image editing task:
Task Decomposition and Subtask-Tree Generation Given an input image z and natural language instruction u, CoSTA* employs an LLM to decompose the complex request into sequence of more manageable subtasks. This decomposition results in a subtask tree, Gss = (Vss, Exs).
Each node U/ E V.a corresponds to a specific subtask 8 (e.g., "remove car," "recolor bench to pink").
Edges (Vi, 0j) E E.s represent dependencies, indicating that subtask 8; must be completed before
8j.
The LLM uses prompt template fplan u, SS which includes the image, instruction, and list of supported subtasks S. The original CoSTA' framework allowed for the generation trees with multiple parallel paths if subtasks were independent, representing different valid execution orders.
This subtask tree provides high-level plan for addressing the user's request.
Tool Subgraph Construction The abstract subtask tree G.s is then translated into a concrete Tool Subgraph Gt. = (Vis, E.s), which is the actual graph the A search will operate on.
For each subtask node s; in Gee, the MDT is consulted to find all tools M (s:) capable of performing
8i-
The TDG is then used backtrack from these tools include all necessary prerequisite tools and their interconnections, forming a minimal tool subgraph G for that subtask.
The final Gts is formed by taking the union all such G and connecting them according to the dependencies specified in G.s- This subgraph contains all feasible tool sequences for the given task.
This construction prunes the global tool graph to smaller, task-relevant search space.
3. Cost-Sensitive A Search for Optimal Toolpath CoSTA* employs an A search algorithm the Tool Subgraph Gt to find an optimal toolpath that balances execution cost and output quality, according a user-defined trade-off parameter a.
Priority Function: The A search prioritizes nodes (representing tool executions) based on the function fxx = g(z) + h(x)).
Actual Execution Cost g(x): This term represents the cumulative cost-quality score of the path
taken so far to reach node x. is computed in real-time the execution progresses. For path of
k tool-subtask executions (uz, $5), g(x) is defined as:
g(x)= =
Σ cley, 83)
2
II 1=1
g(1y, ((ly,,s) 85)
20

---

Published as a conference paper at ICLR 2026
where 8,) is the actual measured exccution time of tool 8j for subtask 8j, and q(v,, 8y) is the real-time quality score of its output, validated by a VLM. The parameter a controls the emphasis cost versus quality (higher prioritizes lower cost). These values include only the nodes in the current path and each node is initialized with g(x) = oo and updated if lower values is found.
The start node is initialized with g(x)) O.
Heuristic Cost h(z):: This term is an admissible estimate of the cost-to-go from the current node x (representing a tool-task pair (v4, si)) goal/leaf node in Gts. It is pre-calculated using values from the Benchmark Table (BT) and considers the trade-off parameter a. For node z, h(x) is recursively defined based on its neighbors y:
min h(x)) VENeighbors(s)
((hc(v) + C(v))" x (2 Q(v) x hQ(1))2-0)
where hr) and (v) are the cost and quality components of the heuristic for neighbor (initialized to 0 and respectively for leaf nodes), and Cly) and Qvy) are the benchmark time and quality for tool
After each tool exccution, its output is evaluated by a VLM. If the quality score falls below predefined threshold, CoSTA can trigger retry mechanism (c.g.. by adjusting the tool's hyperparameters) and updates g(x) with any additional costs. If retries fail, the A search naturally explores alternative paths with better f(x) scores, allowing robust recovery from tool mispredictions or failures.
VLM Feedback and Retries:
This A search process aims to find a toolpath that optimally satisfies the user's preference for cost versus quality.
F RATIONALE FOR USING SUBTASK CHAIN GENERATION
The original CoSTA* agent (Gupta et al., 2025) utilized an LLM prompt that could generate subtask tree G.s- This tree structure allowed for multiple parallel branches, representing alternative valid execution orders for subtasks that were independent of each other. While flexible, exploring these multiple branches during the subsequent A search phase could potentially increase computational cost, especially for tasks with many independent subtasks.
We hypothesized that current Large Language Models (LLMs) and Vision-Language Models (VLMs) might possess improved reasoning capabilities to determine single, logical sequence of subtasks based on the user prompt and image context directly. This improved reasoning could potentially determine a single, optimal, or at least highly plausible, logical sequence for the required subtasks upfront. Such a linear sequence, which we term a "subtask chain," would simplify the initial planning structure compared a branching tree.
To validate the feasibility of using a simpler chain structure without sacrificing outcome quality, we conducted preliminary experiment. We compared the performance of the original CoSTA* algorithm using two different prompts: the original prompt generating multi-path subtask trees, and a modified prompt designed to generate only a single-path subtask chain. We ran both versions representative subset of 50 diverse tasks from the benchmark dataset (Gupta et al., 2025). covering a range of subtask counts and types. The final output quality, assessed using human evaluation metrics defined in (Gupta et al., 2025), was found to he consistently very similar between the two approaches, with scores varying by only 1.08 % on average across the tested examples.
Given this negligible impact on final quality, we adopted the simpler single-path prompt to generate a subtask chain for FaSTA* aiming to potentially reduce planning complexity. The specific prompt used for subtask chain generation in FaSTA* can be found in Appendix Q.
Further analysis focused on quantifying the cost impact of this prompt change within the CoSTA* framework itself, independent of FaSTA "s subroutine mechanism. We compare the average execution cost of CoSTA* using the old (multi-path tree) prompt versus the new (single-path chain) prompt across full dataset.
Table 12 presents these cost results. Using the single-path path (chain) prompt yielded a noticeable reduction in CoSTA'ss average execution time (from 58.2 to 46.8 seconds). This confirms that leveraging the LLM to generate a more constrained initial plan structure offers some efficiency benefits even for the original A search approach.
21

---

Published as a conference paper at ICLR 2026
Table 12: Impact of Subtask Tree Prompt on CoSTA".
CoSTA" Variant
Avg. Cost (s)
CoSTA" (Old Prompt- Multi-Path)
58.2
CoSTA (New Prompt Single Path)
46.8
However, it is crucial to contextualize these savings. While the refined prompt contributes to efficiency, the primary driver the substantial cost reduction observed the full FaSTA' system (29.5s) compared the baseline CoSTA" (even with the prompt, 46.8s) is the adaptive fast-slow execution strategy (Section 4.3) that effectively utilizes learned subroutines.
G DETAILED ONLINE SUBROUTINE INDUCTION AND REFINEMENT PROCESS
This appendix provides a detailed technical breakdown of the online adaptation and refinement loop used by FaSTA" to learn and update its Subroutine Rule Table (R), as introduced in Section 4.2.
G.1 STEP 1: DATA LOGGING
For every subtask execution where multiple paths/tools possible, FaSTA" logs comprehensive trace т. Each trace is structured to capture critical information necessary for subsequent learning. The components of a trace typically include:
Subtask Identification (sy): The specific type of subtask being addressed (e.g., 'Object Recol-
oration', "Text Removal").
Final Executed Tool Path (Py): ) The actual sequence tools (f1,12, t ,, (x) that was executed by the planner (either a pre-existing subroutine or a path found via A search during a "slow planning" phase) complete 8j.
Context Features: A rich set of features describing the state of the image and relevant objects at the time of executing $j. These gathered from various sources:
Outputs from perception tools like YOLO (Wang et al., 2022) (e.g.. 'object_size" and SAM (Kirillov et al., 2023) (c.g., 'mask properties', 'color detti_dctaiss)...
Higher-level semantic features inferred by an LLM query at the start of the task for relevant objects (e.g., Bacckrounddcoonerr _type', 'overlapping_ cetetricaleeeeeenntt 'object_clarity".
(Further details trace composition in Appendix M).
Aggregated Path Cost (Cpath): The total execution cost (e.g., sum tool runtimes) for the path
Pj.
Aggregated Path Quality (Qpath): The overall quality of the outcome from Pj, typically average of VLM scores for the constituent tools.
Failure Information: Details of any intermediate tool failures or VLM quality check failures encountered during the execution of Py, including the specific context features present at the moment of failure.
These traces are stored in buffer B.
G.2 STEP 2: PERIODIC REFINEMENT TRIGGER
The learning process is continuous but triggered periodically manage computational load. After a predefined number of task inferences, K (e.g., K = 20), the system initiates a refinement cycle. The K most recent traces. Trecent {T K+ are retrieved from the buffer B to serve as the input for the learning phase.
G.3 STEP 3: INDUCTIVE REASONING BY LLM
The core of the learning process involves an LLM (OpenAl ol) performing inductive reasoning. The L.M is prompted with:
22

---

Published as a conference paper at ICLR 2026
The set of recent traces, Trecents which provide examples of successful and failed tool path executions under various contexts.
The current Subroutine Rule Table, R.
The LLM's task (guided by the prompt in Appendix S) is analyze these inputs identify patterns. It looks for correlations between context features, specific tool sequences (potential subroutines), and their observed execution outcomes (cost, quality, success/failure). Based on these identified patterss, the L.M proposes set of potential changes, A Apropsaass {Ai, A2. ), to the rule set R.. Each proposed change A can be one of the following:
Adding new subroutine P3 along with its inferred activation rule C, for specific subtask 8,.
Modifying the tool sequence Pj of an existing subroutine.
Modifying the activation conditions Cj of an existing subroutine.
G.4 STEP 4: VERIFICATION AND SELECTION OF NEW/MODIFIED SUBROUTINES
Each proposed change A A proposals undergoes rigorous verification process before being accepted into the active Subroutine Rule Table R. This ensures that only genuinely beneficial and robust rules adopted. The verification for single proposed change Á (related subtask sA)
proceeds as follows:
Subtask-Specific Test Datasets: To evaluate A, a specialized test dataset D.a is used. This dataset, constructed from the CoSTA" benchmark images (Gupta et al., 2025), contains diverse tasks where all constituent subtask instances are exclusively type $a. (Details in Appendix L...
Baseline Performance Establishment: A baseline performance pair (Coases Quase) is determined by executing a baseline system on randomly sampled test set T C DDs..
If this is the first refinement cycle (i.e., t K), the bascline system is CoSTA* For subsequent cycles, the baseline is FaSTA* operating with its current, pre-change rule set R.
The proposed change A is provisionally applied the current rule set to create a candidate rule set R'. FaSTA* is then executed with R' on the same sampled test set T' to obtain new performance metries (Cnews Qnew).
Evaluation of Proposed Change:
Performance Metries Calculation: The percentage changes in cost and quality are computed:
Cnew -Cbsse
AC%
x 100
Obase
AQ% Qnew
Qbase 100
Qbase
Acceptance Criterion (Net Benefit): A Net Benefit score B(A) is calculated to quantify the overall impact of the change:
B(A) A0% AQ%
A change A is considered beneficial and is provisionally accepted if ((A) 0. This criterion prioritizes changes that yield a greater percentage improvement in cost than any percentage degradation in quality, or improve quality with cost increase, etc.
Retry Mechanism for Refinement: If the initial proposed change A does not meet the Net Benefit criterion (B(A) > 0), it is not immediately discarded. Instead, feedback detailing the failure (c.g.. specific test cases where underperformed, the nature of Cnew vs. Chase and Qnew vs. Qaase) provided to the LLM. The LLM is then prompted to refine its initial proposal, yielding modified change A' This eeinement-evaluatton cycle (using a new random test sample T Dea for
re-evaluation) can be repeated up to Nretries times (e.g., Nretries 2).
The proposed change (either the original A refined A') is permanently accepted and integrated into the main Subroutine Rule Table R only if it satisfies the B(A) < 0 criterion within the allowed number of retries. If, after all retries, the criterion still not met, the proposed change is discarded for this refinement cycle.
Final Decision:
This comprehensive verification loop ensures that the Subroutine Rule Table evolves with high-quality, empirically validated rules.
23

---

Published as a conference paper at ICLR 2026
H EFFICACY OF ONLINE SUBROUTINE LEARNING
To demonstrate the progressive effectiveness of our online subroutine induction and refinement process (Section 4.2), we analyzed how the performance of FaSTA"s "Fast Plan" improved over time. This involved tracking the success rate of the high-level Fast Plan when applied to the main benchmark dataset various stages of the learning process.
The learning itself was driven by execution traces from tasks distinct from this benchmark dataset. Specifically, the data fed to the LLM for inductive reasoning (at K 40, 80, 120.... cumulative external task intervals) was generated from a continuously expanding set of diverse, newly created prompts or random samples from broader image collections. This separation of "training/leaming" tasks from the "monitoring" benchmark tasks was crucial to ensure that the observed improvements in Fast Plan success were due to genuine generalization of learned subroutines and not overfitting to the benchmark data itself.
Figure/ illustrates this learning efficacy. shows the percentage of applicable subtasks within the held-out benchmark portion for which FaSTA successfully utilized learned subroutine (i.c., the Fast Plan step was not 'None' and did not require a fallback to the Slow Path due to VLM failure). This success rate is plotted against the cumulative number of non-benchmart "training" task executions that had been processed to refine the Subroutine Rule Table up to that point. The analysis focuses subtasks where multiple tool paths are typically possible, making them prime candidates for subroutine mining. The bar chart displays the Fast Plan success rate at discrete intervals (e.g., after the Rule Table was updated based on 40, 80, 120, 160, and 200 external task evaluations), with an overlaid curve highlighting the improvement trend. The final Subroutine Rule Table used for the main benchmark evaluations reported in Section is the one achieved after a substantial number of such online learning and refinement iterations.
The increasing trend observed in Figure/ demonstrates that as FaSTA* processes more diverse external tasks and iteratively refines its Subroutine Rule Table, its ability to successfully apply efficient, learned "fast plans" to unseen benchmark tasks improves. This, in turn, reduces the frequency of needing to resort to the more computationally intensive "slow path" A search for subtask types amenable to subroutine learning, contributing to the overall efficiency reported in our main results.
1 COMPLETE SUBROUTINE RULE TABLE
The complete Subroutine Rule Table (R) used by FaSTA* is detailed below. This table stores the Icarned subroutines (Pj), their symbolic activation rules (C₂) based on context features, the associated subtask (sz), and the empirically measured average execution cost and quality observed during execution of evaluation tasks (Section 4.2). It is important to note that the inductive reasoning process for mining subroutines focuses primarily subtasks where multiple viable tool sequences or configurations exist (e-g., object replacement, object recoloration, text re- moval), offering potential for optimization via learned rules. Subtasks typically solved by single, fixed tool path (e.g.. depth estimation using MiDaS, basic text detection using CRAFT (Baek et al., 2019)) are generally not subjected to this mining process and thus may not appear with complex rules or multiple subroutine options in this table. It should also be noted while most information used in traces used for inductive reasoning is obtained as inputs from outputs of intermediate tools along the path (eg. Object Size from YOLO (Wang et al., 2022), etc.), some information like the laggrouud_ootteen type, etc. is obtained by prompting the LLM separately on the image. This table is dynamically updated during the online refinement process.
J COMPARISON WITH OTHER STRATEGIES
J.1 WITH DIRECT CACHING
While LLM-based subroutine induction the most suitable approach to learn symbolic rules in a generalizable manner, the high-level similarity with direct caching might raise the question to which is this a better approach than the latter. A "direct cache" or memorization-bast baseline is too brittle. It would require a new task to have nearly identical conditions previously seen one to be
24

---

Published as a conference paper at ICLR 2026
Table 13: Complete Learned Subroutine Rule Table (R). Contains all mined subroutines, activation rules, and performance metrics used in the Fast Plan generation.
Sabiuls
Sabresike
Naaw
Acticcation Palks
Ang. Cos
Anp. Quality
Uiject Rectleakke
Gooading UDO Blast d. 3124 SAM Nortoon cia., 2013- 5D lapar: (Roctadd a.s. 2020)
5811
Sait, No. Tea Steui
Some wrilii anodleett andd tirs
Ugji Restleake
5D Scavi & Rooker (lenbach a 2002
5012
oolor Eoanalsson Ba CutATIc Tammunnc
12.52
435
Opject Recekeabbo
VOLO (Rbag it 3000 - SAM Sirdke mall 2001 5D lquart (Beoback 2001)
58.3
class Lo pwoppottt Okjict appisted pola
Tea
Noan Saae witte oogest recn Bicstee
10:66
0.33
Upgact Aeplactnco
Givendang USMO Slanet at, 3124) SAM Domiierr di 28120 30 Iepertt Otombar 2211)
Sect al1e stull
Eeeeenneee tigect obgece) boi but Icg as,
www.ddeeeeeeeo wec.eneelrttttaatt. objecte Nie snall contenngyy atsiai os brack
1042
001
Raphic 203)
High png. consiian opapp.
chore iife cogiigedd segett Nar Vey Lags
D.D
099
Ugjac Acpacctac
YOUCI (Wing a 3820 - SAM Sortae asl 201 3D lepans Oilebaarctt 2201)
5019
-polo_ctaan www.siaananeepeeeeeeeeee prippeets Ohpcc
Nor undl
twilig in dpsipial sugge objecni
weel net onde semiie hench and
Ogjac Reneva
Govending UDOO (lasct 3124-- SAM Nortonn cid., 2013- SD Brane (ltoetacicc di. 2322)
5007
Swes aise Pee jue Ny OR Desugesn Art da Ropassng Pullin feat. backigcuud an cocutt pact iicu iseed TEI-
11.5
WEE Wfegge 5800-- SAM prsiiiirie Nitipie Forto (honlacc (000)
520
not support Oppetcap centeeppint appladd poks
sent re whe
OR Benageann, Art OR Ropustng Potai Siat. backut in recount incuussed TEI- Aupheuee
11.55
0.94
Oigec Kenewe
Groenktgg IPNO al Milii SAM (oriio endd M0 Iqgert mtll, 1005
oo Sent ve whs lewt
Oicktt Nee dhyare
taptormna: Dompltee (v. PibepTepaaee clan
Oijact Reneval
VOLO (Mbag atal, 2022 SAM Oltitor 2022 lapaba (Bontlect 2002)
50.00
Objectr
Not wall
ieffereei Creelaic Fllagleuette
Reeeral
CHAFT mal beytK. UladeAA 31000theppht LLM
MI11
Mha dike Stepte Lnnker UM Seople (Nt Comple, Jeage Spac 2K.
035
uughliueiigg (o Divalla
Renevel
CHAFT 2000 BaytK Bellopeer (Win 2015 LLM DALL-E
5M12
bachground art Fact
Ing. cheth loumes abseuct palore anopeakk)
purrovnding, consessn www.nnaddleyy teot! Luee watt Inc peacrn)
Ban Reneval
GRAFT (aak mal. 2000 BayDCholuggfee... -LMM Paiska
5815
coda posteot, jostinn cost junn
(Sogll sidt to be (ili will lear
Har Cake Cil Sergec Lnakee UM beople, Tenour backgezund ceconntt euct Len. need
PEI-
1120
CRAFT -1 EayoCCriluffeer 11M BALL-E Tee Widday
50.15 backgeouss East colacasc car live are ancpette)
Lowe legi soett untte doe senam obbe ani
CRAFT EayOCko Displtes -s 1LM Painiig Tea Wilday
50300
surtggronnd.no wet jestiiitt Lost Exp feon, junt
or
(Sagll sold dilk uifiiees
effective, which is rare. We ran a preliminary study on such a baseline, which reused a toolpath if a new task's context features (c.g., object size) were within tight 5% tolerance of cached example.
The results show that even with this tolerance, the fallback rate remains extremely high, as it struggles to generalize. The table below compares the fallback rate of this direct cache baseline against FaSTA*'s, "s, clearly illustrating the significant benefit of our inductive reasoning approach.
This comparison demonstrates that FaSTA* 's ability to learn generalized, symbolic rules is far more effective than simple memorization, allowing it to successfully handle a much broader range of unseen tasks.
25

---

Published as a conference paper at ICLR 2026
Table 14: Fallback rates vs. explored tasks.
Explored Tasks
Direct Cache Fallback Rate (%)
FaSTA* Fallback Rate (%)
40
98%
79%
80
98%
73%
120
97%
62%
160
96%
43%
200
95%
9%
J.2 WITH END-TO-END MODELS
We compared FaSTA' with state-of-the-arr closed-source model, the Gemini 2.0 Flash Preview Image Generation, on a few tasks from our benchmark. The qualitative results, which highlight FaSTA*'s ability adhere to complex instructions, presented in Figure 13, We have also conducted further quantitative comparisons on our evaluation benchmark with both Gemini and GPT-4o. The results are summarized below:
Table 15: Comparison of Quality Scores with End-to-end Models
Method
Average Quality Score
Ours
0.91
Gemini 2.0
0.78
GPT-40 (with image editing)
0.74
K HUMAN EVALUATION METHODOLOGY FOR ACCURACY
To ensure robust and reliable assessment of model performance, particularly for complex, multi-step. and multimodal editing tasks where automated metrics like CLIPP (Radford et al., 2021) similarity can be insufficient (Gupta al., 2025), employ human evaluation to measure accuracy. Automated metrics often fail to capture nuanced errors, semantic inconsistencies, or critical local changes within complex edits (Gupta al., 2025, Sec 5.2, Appx J). Our structured human evaluation process provides more accurate measure of task success. The variance in scores among evaluators was 0.07, indicating strong inter-evaluator consistency.
K.1 SESTASK-LEVER ACCURACY SCORING
Human evaluators manually assess the output of each individual subtask s; within larger task T. Each subtask is assigned a correctness score, denoted as A(s;), based on the following scale:
A(si) 1, if the subtask is completed fully and correctly.
A(s;) = 0, if the subtask execution failed entirely or produced an unusable result. {0.1, 0.3, 0.5, 0.7, 0.8, 0.9). if the subtask is partially correct (Gupta et al., 2025, Eq. 4).
A(s,) x. where
The specific score z for partial correctness is determined using predefined rules tailored different types of editing operations, ensuring consistency in evaluation. These rules, adapted from (Gupta al., 2025), are outlined in Table 16.
K.2 TASK-LEVEL ACCURACY CALCULATION
The accuracy for complete task T, denoted A(T), is calculated the arithmetic mean of the correctness scores of all its constituent subtasks ST (Gupta et al., 2025, Eq. 5):
A(T)
1
Σ
A(s:)
SST
STEST
26

---

Published as a conference paper at ICLR 2026
Table 16: Predefined Rules (adapted from (Gupta al., 2025, Table 8)) for Assigning Partial
Correctness Scores in Human Evaluation.
Task Type
Evaluation Criteria
Assigned Score
Minor artifacts, barely noticeable distortions
0.9
Some visible artifacts, but main content unaffected
0.8
Noticeable distortions, but retains basic correctness Significant artifacts or blending issues Major distortions loss of key content
0.7
Image-Only Tasks
0.5
0.3
Output almost unusable, but some attempt is visible
0.1
Text is correctly placed but slightly misaligned Font or color inconsistencies. but legible Noticcable alignment or formatting issues Some missing or incorrect words but mostly readable Major formatting errors or loss of intended meaning Text placement is incorrect, missing, unreadable
0.9
0.8
0.7
Text+Image Tasks
0.5
0.3
0.1
This approach ensures that the task-level accuracy reflects the performance across all required steps.
K.3 OVERALL SYSTEM ACCURACY
To evaluate the overall performance the system across the entire benchmark dataset, the overall accuracy Aoveralt is computed by averaging the task-level accuracies A(T)) for all evaluated tasks T3 (Gupta et al., 2025, Eq. 6):
T
A Aoverall
1
Σ A(T))
where [T'] represents the total number of tasks evaluated in the dataset.
L SUBROUTINE VERIFICATION DATASETS AND EVALUATION PROTOCOL
This section provides further details on the datasets and evaluation procedure used for verifying proposed subroutine changes (A) during the online refinement process described Section G.4.
L.I SUBTASK-SPECIFIC TEST DATASETS (D.a)
To rigorously evaluate proposed change A (which typically relates to specific subtask type SA. e.g., Object Replacement), we created specialized test datasets, one for each subtask type supported by the system (D.g).
Image Source: These datasets reuse the base images from the original CoSTA* benchmark dataset (Gupta al., 2025). Image-based subtask datasets (e.g., Dobject Replacement- Dobject Recoloration) utilize all 121 images. Text-related subtask datasets (e.g., Drext Removal) utilize the subset of 40 images from the original benchmark that contain relevant text elements.
For each base image and each target subtask type sA. we generated new prompts focused exclusively performing operations of that type. For example, using image containing a cat, the prompt for the Dobject Replucement dataset might be "replace the cat with a dog." " while the prompt for the same image in the Dobjea Recoloration dataset could be "recolor the cat to pink." This ensures that when testing change related to Object Replacement subroutines, the evaluation focuses solely on the performance of that subtask type.
Prompt Generation:
Varying Complexity: Within each subtask-specific dataset DzA the generated tasks feature varying complexity. For instance, in Dobject Removal- tasks might involve removing only one object, while others might require removing six or seven different objects from the same image. This ensures that subroutines are tested across different levels of difficulty for their specific function.
27

---

Figure 10: Distribution of total manipulations (subtask occurrences) across the specialized test Published as a conference paper at ICLR 2026
Distribution of Total Manipulations in Subtask Subtask-Speciffc Datasets
158
Total Manipulations (Subtask Decurrences)
175
150
132
125
31
25-
Object
Replocement
Subtask Type
datasets (D.a) used for subroutine verification.
Dataset Statistics: Figure 10 shows the distribution of total manipulations (subtask occurrences) for each subtask-specific dataset. While image-based datasets share the same base images, the total number of manipulations can differ based on the number of relevant objects/regions suitable for that subtask type within each image and the varying complexity levels introduced in the prompts.
L.2 EVALUATION PROTOCOL FOR SUBROUTINE CHANGES
When evaluating proposed change A for subroutine related to subtask sa, we follow the procedure outlined in Section G.4:
Test Set Sampling (T'; A random subset of tasks is sampled from the corresponding subtask- specific dataset PAs- We sample 25 tasks for image-based subtasks and 20 tasks for text-based subtasks for each evaluation task (both baseline and candidate evaluation, including retries).
Quality Evaluation (Qbase, Qnew): The quality score used for calculating the Net Benefit B(A) relies on automated VI.M checks. For each task in the sampled test set T' (or T"), we execute the respective system (baseline CoSTA /FaSTA* or FaSTA* with the candidate rule change R'). During execution, the VLM quality check is applied after relevant tool steps, using the same methodology as used in CoSTA* The quality score for a single task is computed as the average of the VLM quality scores obtained for all its constituent subtasks (which are all of type in these specialized datasets). The final quality metric (Qinse or Quew) used in the Net Benefit calculation is the average of these task-level quality scores across all tasks sampled in T' (or T").
Cost Evaluation (Cbaser Cnew): The cost metric is the average total execution time (in seconds) across all tasks sampled in the test set T' (or T
This detailed dataset construction and evaluation protocol allows for focused and rigorous assess- ment of the impact proposed subroutine changes on performance for the specific subtask type they target.
28

---

Published as a conference paper at ICLR 2026
Freedom
Ask not you country can for you Boe
STORM WARNING
Input Image
Object
Replace camera mobile and also replace the liberty eiffist Tower
Replace the cat dog, plant pot with bucket and
Replace the lighthouse with aiffall
Replace the cat with dog.
Replacement
Object Recoloration
Recolor the camera to blue and the statue of liberty to yallow
Recolor the call to pinit, the yellow the to green.
Recolor the lighthouse to signioaar groen.
Recolor the car to pink and the signiboard to yellow.
Object Removal
Remove the statue of ilberty from image.
Remove and bench from image.
signboard image
the signboard.
Text Removal
text from image
Remove the text from image
Remove "Storn" text image.
Remove the text From image
Replace "Frendom" text with "Liberty"
Roplace "Your Country" with Country"
Heplace "Storm" text with "Tide".
Replace "Annual" coxt with "Weekly".
Replacement
Figure 11: Illustration of subtask-specific dataset generation. A single base image from the CoSTA* benchmark used with different prompts, each targeting distinct subtask type, to create evaluation instances for different datasets (e.g., Dobject Replacements DObject Recoloration.
M TRACE DATA FOR INDUCTIVE REASONING
The online subroutine induction and refinement process (Section 4.2) relies on analyzing execution traces to identify patterns and propose subroutine rules. This appendix details the composition of these traces and provides an example.
M. TRACE COMPOSITION AND DATA GATHERING
For each task processed by FaSTA", a detailed trace 7 is logged. This trace is crucial for the LLM to perform inductive reasoning during the periodic refinement phase. The key information captured in trace for each subtask within a completed task includes:
Subtask (sy): The specific subtask being performed (c.g.. Object Recoloration, Text Removal),
Chosen Tool Path (P,): The sequence of tools that actually executed to complete the subtask (this could be a selected subroutine or path found via low-level A search).
Context Features: A set of relevant features extracted from the image context and the state of the objects being manipulated. This information can be gathered upfront for the relevant objects in the image or also during the execution of different tools along the path depending the specific detail.
Object-Speciffe Features (List not exhaustive):
ob ject size: Derived from bounding boxes provided by object detection tools like YOLO (Wang et al., 2022) (or Grounding DINO (Liu et al., 2024) if YOLO (Wang et al., 2022)class is not supported for primary object).
29

---

Published as a conference paper at ICLR 2026
mask properties: Such mask area mask ratio, obtained from segmentation tools like SAM (Kirillov et al., 2023).
color_detail The color of the original object, also derived from the mask output by SAM.
Text-Specific Features:
text_box_se si ze: Obtained from text detection tools like CRAFT (Baek et al., 2019). Relational/Global Features (Queried from LLM)); For each primary object involved in the task, we also query an LLM at the beginning of the task to infer higher-level contextual attributes based on the image and prompt. This is done once for all objects. Examples include:
Describes the area surrounding or behind an object (e.g., "Simple_Textuue Texture", @Homogenous_Arcee Area", "Complex Seappeee_Seee"..... sarepping_rriticll__.. e::ntt:::: A boolean indicating if an object overlaps with other elements (text, other objects) that are targets subsequent subtasks. cejjj___claitt""" (e.g., "High", "Medium", "Low" indicating how clearly visible and unambiguous the object is).
bockgrroud__contentt..oo
Path Cost (Cpath): The aggregated exccution cost (c.g., time) for the chosen tool path Pj.
Path Quality patth):: The aggregated quality score for P.. an average of VLM scores for the tools in the path.
Failures: Information about any tool failures or VLM quality check failures encountered during the execution of p, along with the specific context features active the time of failure.
This comprehensive trace data, particularly the context features gathered from tools like YOLO. SAM, CRAFT (Baek et al., 2019), and initial L.M queries, allows the inductive reasoning L.LM (Section 4.2, Step 3) to correlate observed conditions with the success or failure of different tool paths, thereby proposing or refining subroutines and their activation rules.
Path: Grounding DINO SAM SD Inpaint
Path: Search&Recolor
Subtask Objest Recoloration
Subtask: Object Recoloration
Object: Cup
Object: Cup
Object
VOLO)
Object
YOLO)
Mask Size: x2 (From SAM)
Mask Size: x2 (From SAM)
Original Color: <RGB Values> (From SAM)
Original Color: <RGB Values> (From SAM)
Target Color: (From Prompt)
Target Color: (From Prompt)
Overlapping Critical Elements: None (From LLM
Overlapping Critical Elements: None (From LLM
YOLO Class Support: Yes
YOLO Class Support: Yes
Fail
Input Image
Initial Failed Toolpath
Final Successful Toolpath
Figure 12: Visual example for the object recoloration trace detailed in Appendix M.2. Left: Input image. Right: Conceptual representation of the initial failed toolpath trace and the subsequent successful toolpath trace with key context features noted.
M.2 EXAMPLE TRACE FOR AN OBJECT RECOLORATION SUBTASK
Consider an input image and prompt as shown in Figure 12. The task is "Recolor the cup to blue." The subtask chain might simply be 'Object Recoloration (ball -> blue ball)' with initial path (Grounding DINO (Liu et al., 2024) -> SAM (Kirillov et al., (023)-> SD Inpaint (Rombach et al., 2022)) where 'SD Inpaint' failed quality check so path was retraced and a final path (SD Search&Recolor (Rombach et al., 2022)) which passed all quality checks.
The logged traces for this subtask are shown on right side in Figure 12. All details extracted from various tools used along the path, such as YOLO (Wang et al., 2nd SAM, are included along with the status of the path. Some extra details which are not possible to be extracted from these tools extracted with the help of an LLM which is called at the start of the task for all related objects (in this case only the ball). In case the paths where tools like the YOLO (Wang et al., 2022)or SAM (Kirillov et al., 2023)are not included like in of 'SD Search&Recolor' extract an approximation size, color, etc. information as well along with the other extra details for which this L.M already needed.
the LLM to
30

---

Published as a conference paper at ICLR 2026
This structured trace provides rich data for the LLM to analyze during the subroutine induction and refinement phase.
N SUBROUTINE REUSE RATE
Figure 13 illustrates the reuse rate for each of the learned subroutines. The reuse rate is critical metric that quantifies the utility and applicability of each mined subroutine. Specifically, for each subroutine, this rate is calculated as the percentage of applicable subtasks where that particular subroutine was selected for execution and was also executed successfully. This means the calculation considers only those instances where a subtask was of a type that the subroutine could address. For example, if subroutine is designed for "Object Recoloration" its often it was chosen when an "Object Recoloration" subtask was encountered, irrespective of the total number of other subtask types (e.g.. "Object Removal", "Text Replacement") processed. A higher reuse rate indicates that a subroutine frequently chosen when is relevant, underscoring its effectiveness and the successful learning of its activation rules. The figure displays these rates for all sixteen subroutines (SRI through SRI6), providing insight into their individual contributions to the agent's efficiency.
rate is determined by how
63.0%
Reuse Rate (%6
41.0%
39.0%
41.0% 41.0%
30
24.0%
26.0%
20
11.7%
10
5.0%
5830
SR1
5933
SR6
Sii SkB
SA11
SR12
SR13
SH14
SR35
SM16
Learned Subroutines
Figure 13: Reuse rate (%) for all learned subroutines. The rate for each subroutine is calculated based on the percentage of applicable subtasks where it was selected for execution.
31

---

Published as a conference paper at ICLR 2026
O USE OF LARGE LANGUAGE MODELS (LLMS)
must noted that LLMs were not used for writing this paper from scratch. However, we use LLMs polish the content. Also, they do make up fundamental components of the FaSTA" architecture. Their roles are integral to the methodology as has been explained below:
1. Subtask Chain Generation: The initial stage of our flan-planning pipeline relies on an LLM to interpret the user's multimodal input (an image and a natural language prompt). We use GPT-4o for this purpose. The L.LM decomposes the user's complex, high-level instruction into logical sequence of discrete editing operations, which we call a subtask chain. This process transforms high-level user request into structured, executable plan. The specific prompt used to guide the LLM in this task decomposition stage is provided in Appendix Q.
2. Subroutine Selection: The second stage of the "fast planning" mechanism uses GPT-ol. For each step in the subtask chain, the LLM refers to the Subroutine Rule Table, which is dynamically updated and the current image context to select the most appropriate, cost- effective subroutine. If no suitable subroutine found, the system falls back to the "slow planning" A search. The prompt used for this process is provided in Appendix R.
3. Online Subroutine Induction: One of the core contributions of FaSTA* is its ability to learn from past experiences. This learning is driven by an LLM that performs inductive reasoning execution traces from previously completed tasks. The LLM analyzes logs of successful and failed tool paths, along with their associated contextual features, to identify recurring, efficient patterns. From these patterns, it synthesizes compact, symbolic rules that define reusable subroutines and their activation conditions. This process is detailed in Section 4.2, and the prompt for this symbolic reasoning task be found in Appendix S.
4. Quality Verification:
used to assess the success failure status of an execution is calculated using VLMs. The VLM check is applied after each tool step, where the VLM is asked score the editing operation for particular tool. If this quality check fails, FaSTA" falls back to the slow-planning A search.
The quality
Update dioaed
Dibectt the coedee while
'sperr and dettect trash perdest fan creesing Remove
Segment the dlg, desect peoples recolor the lnaved to rect and rapand the image
Detect the remove the cows, recotor cookkokkng to green and repand the Imaga.
Itamove the dlgg, recoior Wite pink, segmeett the chird and eapand the imagg.
replacing comennt "SATE ZONE wloo repiace the in the image with dng.
the people for diarity
INPUT
CoSTA* (52.7s)
FaSTA* (30.2s)
Gemini 2.0 Flash Preview Image Generation
OPEN
Figure 14: Qualitative comparison of FaSTA* against CoSTA* (Gupta et al., 2025) and Gemini 2.0 Flash Preview for complex multi-turn editing tasks (inputs on top). FaSTA* produces high-quality outputs visually identical to CoSTA" and superior to Gemini. Notably, FaSTA* achieves this CoSTA level quality at a significantly reduced execution cost, demonstrating its enhanced efficiency.
32

---

Published as a conference paper at ICLR 2026
P ALGORITHMS
P.I. FASTA* ONLINE SUBROUTINE INDUCTION
Algorithm 1: High-Level Overview of Online Subroutine Learning.
Log execution traces (data, paths, outcomes, context) continuously
After K = 20 task executions, using recent traces:
LLM analyzes traces to propose/refine subroutines & activation rules
Validate proposals test data for net cost-quality benefit
validation fails then L.M refines proposal with feedback (max Nyetries = attempts) else if validation succeeds then Update Subroutine Rule Table R. with beneficial change
Repeat indefinitely to adapt and improve
Algorithm 2: FaSTA" Online Subroutine Induction (Modified ICRL). Teal steps are specific additions/modiffcatioo for FaSTA'
Input:
LLM TLLM, Planner FaSTA*, Initial Rule Set Ro. Trace Buffer B, Update Freq. K, Max Retries Nretries. Subtask Test Datasets {Da]ses
Output: Continuously Updated Rule Set R
R
Ro:
0:
t + 0:
while True do
Receive new task input (Iz, uz);
Execute FaSTA' with current rules to get trace
Ti (subtask, Prinat, ContextFeatures, Cpain Qpat. Failures):
Add 7, to Buffer B B (Tr):
t +-++ 1+
if Dand (mod K) == then Trecent + Get last K traces from B;
A proposals + TLLM ("Propose changes to rules R based on recent traces Trecent") ");
11
foreach proposed cccangeeeaeeeeeeeeeeeeee A in Aproposats do
8A + GeeSubbaskType(()):
accepted <- False;
15
current delta t A;
for retry + 0 Neetries do
Trest <- SampleeandonSSusse((...
ift then
(Chase: Qbase) <- EvaluateCCoSTA', Trest); else
L (Crase: Qbase) Evaluate(FaSTA (R), Trest);
Reandidate f- ApplyChange(R, delta);
23
(Cnew, Qnew) + Evaluaat(FaaSTA (Reandidate), Trest):
A0%= (Cnew Obase ) Cbase X 100;
AQ% +- (Quem - -baan)) (Qasee X 100;
25
B B(Devat) A0% AQ%;
27
if B(A Avaa)) < tthhn
R Reondidatei accepted + True;
Break:
else if retry Nretries then
feedback < AnalyzeFailureccurentt.o delta, Cnews Qnear Chaser Qbase:
Trest);
current_delta +- TLLMM""Rfine change A based on feedback: feedback");
// Standard ICRL might sample past episodes here to build context for next action (e.g.. Algo 1/2 in (Monea et al., 2025)). FaSTA" replaces this with explicit rule update.
33

---

Published as a conference paper at ICLR 2026
P.2 FASTA* ADAPTIVE FAST-SLOW EXECUTION
Algorithm High-Level Overview of Adaptive Fast-Slow Planning. Detailed Algorithm be found in Appendix P.2.
Subtask chain, Subrout ine Rule Table LLM generates "Fast Plan" (sequence of subroutines or 'None') ) for the subtask chain foreach step in the Fast Plan do if Fast Plan step a valid subroutine then Attempt to execute the subroutine
// Input:
subroutine fails VLM quality check then trigger Slow Path for this subtask
else
Trigger Slow Path for this subtask
Slow Path was triggered then
Perform localized A' search the subtask's low-level subgraph
10
Proceed to next step upon successful completion of current subtask
Algorithm 4: FaSTA" Adaptive Fast-Slow Execution
Input: Input image zo, Prompt u, Subtask Chain Gee, Subroutine Rule Table R, L.M TLLM, VLM,, Quality Threshold Qihreah. Cost params a. BT, MDT, TDG
Output: Final Edited Image Lino!!
Generate Fast Plan Mauberg +- TLLM (2v, u, Gse, R);;
Current Image Zeurr t- Toi
Path Trace Tpath + -]:
foreach subtask 8; in sequence from Gac do
plan_ step <- (Mebbeeq(:)):
subtask_sucee Lattassssssccssssss False;
plan_ster is a Subroutine P then
/ Attempt Fast Plan
temp_ine temp_image t- Zearr: fesst_path__ae ok +- True; subroutine_ trace +- foreach tool tu in Pt, do
Exccute on temp_image get Tints cost Ge;
11
Append (fq. 6&) to subroutine_traee _trace
+ VLMQualityChccc(r.. 85, tx)
11 Per (Gupta et al., 2025)
if qu Qsbresh then
fast, Botu_pathh__e ok False; Break;
15
cemp_image + Zinti
if fast hast_path____e ok then
Teurr teempimmage image;
18
Append subroutinc_tran trace to Tpathi
+ True;
29
else
L /. plan_step is 'None'
+/
if not subtask_success success then
/x Execute Slow Path (Local )")
x/
22
(s,)(ss) t- ConstructSubgraahiss MDT, TDG);
// Per (Gupta et al., 2025)
23
slow_trace trace +- LocalASttarSarchh (GaieaaarrrGGGaoooooo Teurys a. BT. VLM, Qtbrest):
Teurr .oouti
Append slow_ _tw_rrcce Tpath:
26
subtask_ss subtask_success successssssssss +- True;
Return Teurrs Tpath;
34

---

Published as a conference paper at ICLR 2026
Q LLM PROMPT FOR GENERATING SUBTASK CHAIN
You are an advanced reasoning model responsible for decomposing a given image editing task into structured subtask chain. Your fask is to generate well-formed subtask chain that logically organizes all necessary steps to fulfill the given user prompt. Below are key guidelines and expectations:
Q.1 UNDERSTANDING THE SUBTASK CHAIN
A subtask chain is structured representation of how the given image editing task should be broken down into smaller, logically ordered subtasks. Each node in the chain represents a subtask which is involved in the prompt, and edges represent the ordering like which subtask needs to be completed before or after which.
Each node of the chain represents the subtasks required to complete the task. The chain ensures that all necessary operations are logically ordered, meaning a subtask that depends on another must appear after its dependency.
Q.2 STEPS TO GENERATE THE SUBTASK CHAIN
Step 1: Identify all relevant subtasks needed fulfill the given prompt.
Step 2: Ensure that each subtask is logically ordered, meaning operations dependent another should be placed later in the path.
Step 3: Each subtask should uniquely labeled based on the object applies to and the format (Obj1 + Obj2) where objl is to be replaced with obj2 and in case of recoloring (obj + new color) while with removal just include (obj) which to be removed. Example: two objects require replacement, the subtasks should be labeled distinctly, such Object Replacement (Objl -> jb)
Step 4: There also might be multiple possible subtasks for particular requirement like if a part of task is to replace the cat with a pink dog then the two possible ways are Object Replacement (cat-> pink dog) and another is Object Replacement (cat->dog) -> Object Recoloration (dog->pink)
Q.3 LOGICAL CONSTRAINTS & DEPENDENCIES
When constructing the chain, keep in mind that you take care of the order well like if task involves replacing an object with something and then doing some operation on the new object then this operation should always be after the object replacement for this object since we cannot do the operation on the new object till actually created and the image.
Q.4 INPUT FORMAT
The LLM will receive:
1. An image.
2. A text prompt describing the editing task.
3. A predefined list of subtasks the model supports (provided below).
Q.5 SUPPORTED SUBTASKS
Here is the complete list subtasks available for constructing the subtask chain: Object Detection, Object Segmentation, Object Addition, Object Removal, Background Removal, Landmark Detection, Object Replacement, Image Upscaling, Image Captioning, Changing Scenery, Object Recoloration, Outpainting, Depth Estimation, Image Deblurring, Text Extrac- tion, Text Replacement, Text Removal, Text Addition, Text Redaction. Question Answering based on text, Keyword Highlighting, Sentiment Analysis, Caption Consistency Check, Text Detection
You must strictly use only these subtasks when constructing the chain.
Q.6 EXPECTED OUTPUT FORMAT
The model should output the subtask chain in structured JSON format, with each node having:
35

---

Published as a conference paper at ICLR 2026
Subtask Name (with object label if applicable)
Parent Node (Parent node of that subtask)
Execution Order (logical flow of tasks)
Q.7
EXAMPLE INPUTS & EXPECTED OUTPUTS
Q.7.1
EXAMPLE 1
Input Prompt: "Detect the pedestrians, remove the car and replacement the cal with rabbit and recolor the dog to pink." " Expected Subtask chain:
"task": "Detect the pedestrians, remove the car and replacement the cat with rabbit and recolor the dog to pink",
"subtask_chain"" [
"subtask"; "Object Detection (Pedestrian) (1)"
"parent": []
"subtask"; "Object Removal (Car) (2)",
"parent": [ ["Object Detection (Pedestrian) (1)"
{
"subtask": "Object Replacement (Cat -> Rabbit) (3) ",
"parent": ("Object Removal (Car) (2)
"subtask": "Object Recoloration (Dog Pink Dog) (4)", "parent": ["Object Replacement (Cat -> Rabbit) (3) "]
Q.7.2 EXAMPLE: 2
Input Prompt: "Detect the text in the image. Update the closed signage open while detecting the trash can and pedestrian crossing for better scene understanding. Also, remove the people for clarity.
Expected Subtask chain:
"task": "Detect the text the image. Update the closed signage to open while detecting the trash can and pedestrian crossing for better scene understanding. Also, remove the people for clarity.",
"subtask_char [
"subtask"; "Text Replacement (CLOSED -> OPEN) (1)",
"parent": []
"subtask": "Object Detection (Pedestrian Crossing ng) (2)
"parent": ["Text Repl aeplacement. (CLOSED -> OPEN) (1)")
36

---

Published as a conference paper at ICLR 2026
"subtask": "Object Detection (Trash Can) (3)
"parent": ["Object Detection (Pedestrian Crossing) (2) "]
"subtask"; "Object Removal (People) (4)",
"parent": ["Object Detection (Trash Can) (3)
(
"subtask"; "Text Detection () (5)", "parent": ["Object Removal (People) (4) "]
You can observe in the second example since there was a subtask related to replacement, made sense to detec the text at last after all changes to text had been made. You should always be mindful that ordering is logical and if there is a subtask whose output or input mig might change based on some other subtask's operation then it is always after this subtask on whose operation depends. eg- "recolor the car to pink and replace the truck with car" so in this one the recoloration of car always depends on the replecement of truck with car the recoloration should always be done after replacement so you should think logically and is not necessary that the sequence of subtasks in subtask chain is same as they are mentioned in the imput prompt as was in this case the recoloration was mentioned before replacement in input prompt but logically replacement will come first.
Q.8
YOUR TASK
Now, using the given input image and prompt, generate well-structured subtask chain that adheres to the principles outlined above.
Ensure logical ordering and clear dependencies.
Label subtasks by object name where needed.
Structure the output as ISON-formatted subtask chain.
Input Details
Image: input image
Prompt: ["prompt"]
Supported Subtasks: (See the list above)
Now, generate the correct subtask chain. Before you generate the chain you need make sure that for every path possible in the subtask chain all the subtasks that chain are covered and none are skipped. Also if a prompt involves something related to object replacement then just have that you dont need to think about its prerequisites like detecting or anything bez it already covers it.
37

---

Published as a conference paper at ICLR 2026
R
LLM PROMPT FOR SUBROUTINE SELECTION
So we have this image: <image> and also have the following input prompt:
<prempt>>
So we got the following subtask chain: <subtask chain>
Note that the subtask chain within a particular node there a bracket which tell us about the object from and target and if there is only from then target is not mentioned like in removal only from object is needed no target is required while for replasemenn/recolorttio target is also required.
Now we have the following subroutines list for each subtask and each of the subroutines have some observations related to them which specify under which conditions they be used or not. So you need to read those subroutines and their observations then check the corresponding object for that subtask within the image like if its Object Removal (Cat. then check the cat in image and then from the subroutines list check that if for that particular subtask there is any subroutine in which the observation conditions are satisfied and if so give the list of those subroutines for that subtask and you need to do this for all subtasks subtask chain.
Subroutine list and the details:
(Subrouting ine Rule Table}
EXAMPLE:
Suppose we have an image which has lots of objects along with very large car which has background with lots of objects and also brown wooden board with some text written on it. Now we have prompt that remove the car and recolor the wooden board to pink and detect
the text and get the following subtask chain:
Ob Object Removal (Car) -> Ob jeet Recoloration (Wooden Board Pink Wooden Board) -> Text Detection ()
Now we see the subroutine list and find that for removal since the object is too big sub7 and sub8 not possible. Now in sub9 and sub10 so eventually we choose subl0 for this subtask. For recoloration we see that it has object (text) which is imp and involved in subsequent subtask subl and sub3 aren't 't possible and we see that the color of board is light brown so light brown and pink dont have too much difference so we choose sub2. For text detection there not subroutine available so we leave it like that.
that the 'car' class is supported by yolo
So output will
Object Removal (Car) : [sub10]
Object Recoloration (Wooden Board -> P Pink Wooden Board) Text Detection () [None]
[sub2]
Now lets say the wooden board black in color and had to be recolored to white. In this case the subl and sub3 are not possible because of the text as before but now sub2 also not possible because the color difference too much. So we do not choose any subroutine for this subtask and output is as follows:
Object Removal (Car) : [sub10]
Object Recoloration (Wooden Board -> Pink Wooden Board) Text Detection () [None]
[None]
Now lets change the details further. Lets say that the wooden board does not have any text written it and has to be recolored from pink to yellow and the text detection subtask wasn't t present so in this case for recoloration all subroutines are possible except sub3 bcz wooden board isnt class supported by yolo.
New output:
Object Removal (Car) : [sub10]
Ob ject Recoloration (Wooden Board -> Pink Wooden Board) [subl,
sub2]
38

---

Published as a conference paper at ICLR 2026
Now lets change it bit assume that all conditions behind the car only some walls, grass, etc are present some basic stuff and not lot of objects like occluded people, cats, elc so in this case we will choose sub8 and sub10 for it too plain that sub10 cannot be used and it is not way too complex that sub8 cannot be used. New output:
original but the car is small and
Object: Removal (Car) : [sub8, sub10]
Object aocoloration (Wooden Board -> Pink Wooden Board) Text Detection
[sub2
[None]
Now you need to do the same things for the current where the input prompt is <prompt>> Subtask chain: <subtask chain>
Also multiple options are possible if they satisfy all the conditions it is not necessary that only one is chosen and it is also possible that no subroutine fulfills all conditions so in that case choose None so that we can do A search and find the correct output. Also keep in mind that only look at the details relevant say you need to check subroutine for some object which be removed and for some activation condition you need or plain, etc so you only see the background relevant like near that object and not for the entire image.
if the background busy
So you need to extract all relevant details related to all relevant objects from the image given to you then check the subroutine list if anyone matches and give the output.
39

---

Published as a conference paper at ICLR 2026
S
LLM PROMPT FOR INDUCTIVE REASONING ON SUBROUTINES
Goal: Analyze the provided experimental run data for specific task (c.g.. Object Recol- oration) to infer initial, potentially qualitative, activation rules (preference conditions) for each distinct execution path employed.
<A11 Logged Data (The Traces)
So different models and tools for different same image editing tasks and the observations including what path was finally used and what were the conditions of objects, etc. and this data provided to you. Now we wish infer some subroutines or commonly used paths and their activation rules under which they are commonly activated. Can you find some commonly used subroutines or paths and infer some rules for these paths using the status of these cases and other factors and give the rules for both paths and they need not be too specific but bit vague is fine like if you observe that some particular path always fails in case object size is less then you can give the rule that this path should be used when object not too small and not give any specific values so activation rule will include like ob jejjctt__ size not Ioo small, etc like this based on all factors like object size, color transitions, etc and also it is possible that for some path it failed bez some specific condition like its not necessary all conditions led to failure so you need check which is the condition which always leads to failures or which always leads to success and that will constitute rule if some condition leads to both failures and success with same value then it means that this is not the contributing factorand there's 's something else that's causing the failure success and keep in mind that output rules should be of activation format like in what cases this should be used and not negative ones so there is some path which always fails when object size is big then your activation rule will have ob ject cec_ssize size small and not some deactivation rules which has ob abjjet__ pincttsieeee ze = big You should also include some explanatory examples the rule which can help some person or LLM understand them better when referring to these rules. eg. if there is rule where you want to say that this path will only succeed when the difference between size of objects not too big then you can have rule like
teeeedifffreenee (original, target objectss Not too big (eg. hen to car, etc) where you include some example. You should focus activation rules which are like in what case this particular path will always succeed and some activation rules should also include kind of deactivation rule with not like in case you observe that some path always fails when there some condition where can be like object is too small or color difference is huge then you should infer an activation rule that is negate of this like the rule can object "not" small color difference is "not" huge so that these activation rules can act as kind of deactivation rules as well and prevent the path from getting activated in cases where know for sure it'll fail.
AN EXAMPLE:
Experimental Data:
Subtask: si, Object Size: 0. 7px, Original Object Color: Yellow,
Target Object Color: Black
Path used: P1
Status: Fail
Subtask: s1, Object Size: 0.2px, Original Object Color: Yellow,
Target Object Color: Green
Path used: P1
Status: Success
Subtask: s1, Object Size: 5px, Original Object Color: White,
Target Object Color: Black
Path used:
Status: Fail
40

---

Published as a conference paper at ICLR 2026
Subtask: si, Object Size: 5px, Original Object Color: White,
Target Object Color: Yellow
Path used: P1
Status: Success
Subtask: si, Object Size: 0. 7px, Original Object Color: Black,
Target Object Color: White
Path used: P1
Status: Fail
Subtask: s1, Object Size: 3px, Original Object Color: Black,
Target Object Color: Yellow
Path used:
Status: Success
Subtask: si, Object Size: 0. 9px, Original Object Color: Black,
Target Object Color: Blue
Path used: P2
Status: Fail
Subtask: si, Object Size: 0.2px, Original Object Color: White,
Target Object Color: Yellow
Path used: P2
Status: Fail
Subtask: s1, Object Size: 0. 6px, Original Ob ject Color: White,
Target Object Color: Blue
Path used:
Status: Success
So that paths Pl and P2 are very commonly used these will be subroutines commonly used paths and now our goal is to infer some rules under which these subroutines paths commonly activated. So by observing the data you that in P2 it always fails when object size is small while the color transitions doesn't matter so for P2 you can infer an activation rule which is "object_siiz" siiz not observe that the object size doesn't really matter bez is able to succeed in both small and big object sizes and also fail in both cases but you observe that when the color transition is huge like white to black or black to white always fails while when color transition is not extreme like white to yellow or yellow green able to succeed even under same size conditions so you can infer rule that it depends on color transition and give rule with example for better understanding like: ccolor_transitiin
small 1 and while for PI you
not too extreme
(eg. not white <~> black, etc.)"
The real experimental data will include much more info and is your job to infer what data is useful and find patterns in it and give corresponding rules. Also you should not mix the observations from different paths or subtasks and treat all paths and subtasks independently so while infering rules for some path P1 for some subtask sl then only look at the experimental data of that path P1 and subtask s and infer rules and patterns from that bez observations of P2 doesn't 't affect P1 and neither do observations for P1 but related to s2 affect P1 for s1. So you should know that same path can be used for different subtasks and can have different activation rules for different subtasks so while inferring these rules you should see that you compare the object conditions for the same subtask and same path and then reach final conclusion like example you have some path pl which used subtasks and s2
41

---

Published as a conference paper at ICLR 2026
and based observations there multiple failure cases for pl where object size is small and subtask is sl while there are some success cases for same pl where object size is big and subtask is s2 if you combine them you won't be infer any rule bcz nothing's 's epeific but you need to treat both the pl's independently one is pl with s and another is pl with s2 and so for pl with you can infer rule that oonly works when object size is not small. The output format for each path for which you can infer some rule/s will be following:
Path: {path1}
Subtask: (subtask)
Activation Rules:
Rule al with some explanatory example if needed
Rule a2 with some explanatory example if needed
Rule aN with some explanatory example if needed
Path: (path2)
Subtask: (subtask)
Activation Rules:
Rule bl with some explanatory example if needed
Rule b2 with some explanatory example if needed
Rule bN with some explanatory example if needed
42


Reviews:
[{"review_id": "2wuotVb1cH", "reviewer": "Reviewer_KYws", "summary": "The paper proposes FaSTA*, a Fast-Slow Toolpath Agent that builds upon CoSTA* (Cost-Sensitive Toolpath Agent) to enhance efficiency in multi-turn image editing tasks. The core idea is to mine frequently used subroutines (i.e., reusable sequences of tool calls) from prior editing experiences using large language model (LLM)-based inductive reasoning. These symbolic subroutines are stored and reused for similar future tasks, allowing the system to perform a “fast plan” by recalling suitable subroutines, with fallback to a slower A*-based search (“slow plan”) if no appropriate rule exists or the quality check fails. Experiments show that FaSTA* reduces computational cost by roughly 49% compared to CoSTA* while maintaining comparable quality.", "questions": "NA", "limitations": "", "rating": 4, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "- The idea of leveraging reusable subroutines for planning efficiency is a logical extension of CoSTA*. It introduces an experience-based learning mechanism that mimics human procedural reuse and contributes to more scalable agentic workflows.\n- The fast-slow execution strategy and subroutine mining pipeline are well described, supported by detailed diagrams and ablations. The authors conduct a careful comparison with CoSTA* and show meaningful runtime reductions.\n- Representing toolpath knowledge as symbolic rules rather than black-box model weights improves transparency and offers a potential bridge between LLM-based reasoning and symbolic planning.", "weaknesses": "- Despite its engineering refinement, FaSTA* is largely an incremental enhancement of CoSTA*. The “subroutine mining” mechanism mainly involves clustering or pattern extraction of successful tool sequences using an LLM prompt, without introducing new algorithmic insights or theoretical guarantees. The resulting “fast-slow” hybrid is conceptually intuitive but not methodologically groundbreaking.\n- The reported efficiency gains (≈49%) are based on the same dataset and evaluation setting as CoSTA, limiting generalizability.  The comparison to baselines (MagicBrush, GenArtist, CLOVA) is inherited from CoSTA*, with no new external benchmark validation. Human evaluation of image quality lacks standardized metrics or reproducibility details, and visual examples (Fig. 4–8) are mostly qualitative.\n- The “subroutine mining” uses CoSTA’s outputs for initialization, meaning FaSTA* effectively benefits from pre-computed search traces, inflating its efficiency advantage. The cold-start performance (on unseen domains or without prior CoSTA* traces) is underexplored and acknowledged as a limitation but not quantified.\n- The inductive reasoning step is described as “in-context reinforcement learning,” but in practice it is a rule-extraction procedure with periodic prompt-based updates—no reward modeling or policy improvement is performed. This weakens the conceptual link to ICRL and exaggerates the claimed neurosymbolic contribution.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "lCst9ncCwr", "reviewer": "Reviewer_LasF", "summary": "This paper proposes FaSTA* (Fast-Slow Toolpath Agent), an efficient neuro-symbolic agent designed for multi-turn image editing tasks. FaSTA* combines the fast, high-level subtask planning capabilities of large language models (LLMs) with slow, precise tool usage and local A* search.", "questions": "Please explain in detail how an LLM performs inductive reasoning to extract symbolic rules, particularly how it determines the quantification conditions in the rules (such as object_area ≤ θ). How are these threshold values determined?", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The agent effectively integrates the symbolic reasoning capabilities of large language models (for subroutine mining and high-level planning) with the precision of localized A* search (for low-level tool path optimization), resulting in a robust and efficient system.", "weaknesses": "The extraction of subroutines relies on the inductive reasoning capabilities of LLMs, and is represented in the form of symbolic rules (for example, conditions based on object area and mask ratio). The generalization ability and robustness of these rules may be challenged when faced with changes in the toolset or with complex and ambiguous editing tasks.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "SnTtiLr6r4", "reviewer": "Reviewer_wGeb", "summary": "This paper introduces FaSTA, a neurosymbolic agent designed to significantly improve the computational efficiency of complex, multi-turn image editing. The work addresses the key bottleneck of its predecessors like e.g CoSTA, which rely on computationally expensive A* search for every task without learning from past experiences.\n\nFaSTA*'s core innovation is a novel planning framework that automatically analyzes successful execution traces from previous tasks, using LLMs for inductive reasoning to extract frequently used sequences of tool calls as reusable \"subroutines.\" These subroutines are generalized into symbolic rules with activation conditions (e.g., object size, background complexity).\n\nDuring execution, FaSTA* first generates a cost-effective \"Fast Plan\" by having an LLM select appropriate learned subroutines for each subtask. When a subroutine is unavailable or fails a quality check, it triggers a localized A* search for that specific subtask. This adaptive strategy mimics human-like reasoning, prioritizing efficient, learned shortcuts while retaining robust search for novel challenges.\n\nThe results demonstrate that FaSTA* achieves a paradigm shift in cost-efficiency. It reduces average execution cost compared to CoSTA* at the price of a slightly reduced output quality. By transitioning from a test-time-only planner to a continuously learning agent, FaSTA* offers a more scalable and practical solution for complex, tool-based image editing, effectively combining the speed of LLM planning with the guaranteed performance of heuristic search.", "questions": "1. The paper states performance improves with more tasks, but could you provide a concrete curve or table showing the relationship between the number of \"warm-up\" tasks and the resulting cost savings/success rate? How many tasks are required to reach, for example, 80% of the maximum efficiency gain?\n\n2. Have you explored any strategies to mitigate the cold-start problem, such as pre-populating the subroutine library with a set of manually defined or \"common-sense\" rules from a small seed dataset to bootstrap the learning process?\n\n3. While execution cost (time) is reported, could you provide an analysis of the total inference cost, including the API calls to the LLMs (GPT-4o, GPT-o1) used for planning, subroutine selection, and induction? Does the 49% savings in execution time still hold when these substantial LLM costs are factored in?\n\n4. The system relies heavily on powerful, expensive LLMs (GPT-o1 for induction). Were any ablations performed using smaller, open-source LLMs for any of the components (e.g., subroutine selection) to assess the trade-off between performance and cost/dependency?\n\n5. The paper builds upon the complex CoSTA* framework. Beyond code availability, what are the minimum system requirements (e.g., GPU memory) and estimated engineering effort to set up and run the full FaSTA* pipeline? Is there a containerized environment or a more detailed setup guide to facilitate replication?\n\n6. How reliant is FaSTA* on the specific, pre-defined structures of CoSTA* (the Tool Dependency Graph, Model Description Table, Benchmark Table)? How much manual effort is required to adapt FaSTA* to a new set of AI tools not in the original CoSTA* setup?\n\n7. The paper mentions a verification step for new subroutines, but what happens when a \"bad\" rule is nonetheless learned and passes verification? Could you provide an example of such a case and its impact on subsequent task performance? How often does the inductive reasoning propose rules that are later found to be flawed?\n\n8. The learned rules seem effective for tasks similar to those in the training distribution. How does FaSTA* perform on a task that requires a genuinely novel combination of tools or operates on image types (e.g., medical imagery, technical diagrams) far outside its experience? Does the fallback to A* search reliably recover quality in these OoD scenarios?\n\n9. Key details for understanding the methodology—such as the full structure of a trace, the exact prompts for inductive reasoning, and the complete Subroutine Rule Table—are in the appendices. Would you consider moving the most critical elements (e.g., the rule table structure, a trace example) to the main paper to make it self-contained?\n\n10. The reviewers note the code is available for review. We strongly recommend you explicitly state in the paper the commitment to make the code and model weights (if applicable) publicly available upon acceptance, to ensure the community can build upon this work.", "limitations": "", "rating": 8, "confidence": 3, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "The main strengths of the paper lie in:\n-  The proposed approach exhibits a good efficiency at the price of a small reduction of the quality of the output.\n\n- The \"fast-slow\" planning paradigm is intuitive and powerful, effectively mimicking human problem-solving.\n\n-  Moves beyond one-off planning to a continuously learning system, turning past costly searches into future time savings.\n\n- Comprehensive experiments and ablations validation of the approach, clearly demonstrating the contribution of each component.\n\n- Provides a clear path towards more affordable and scalable AI tool-use agents for complex tasks.", "weaknesses": "The main weaknesses of this work are the following:\n- The performances are suboptimal initially, requiring a \"warm-up\" period of task execution before the subroutine library becomes effective.\n\n- The entire framework hinges on capable (and often expensive) LLMs for planning, subroutine selection, and induction, creating a dependency and potential cost center.\n\n- Builds upon the already complex CoSTA* framework, making the overall system sophisticated and potentially challenging to reproduce, although the code is avaiable at least for reviewing purposes.\n\n- The success of the \"Fast Plan\" relies on the generality of the learned symbolic rules, which may not capture all edge cases or nuanced visual contexts, and if the learning is bad, the results are properly of bad quality.\n\n- The paper is too short and not self contained. Indeed, without the additional material it is very hard to understand and assess the details. From reading the paper it is also difficult to reproduce the results. For reviewing purposes the code is available, and we recommend to make t availabe if the paper will be accepted.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "HdZ8Bxxjkc", "reviewer": "Reviewer_39Yj", "summary": "This paper introduces an AI agent called FaSTA* designed to handle multi-step image editing tasks based on a previous work \"CoSTA*\". The agent works by combining an LLM, which quickly plans the high-level subtasks, with a more detailed A* search that finds the best sequence of AI tools to accomplish each individual step. The key idea is that the system learns from its successful past actions. It uses an LLM to identify common sequences of tools that work well and saves them as reusable subroutines. This creates a \"fast-slow\" system where the agent first tries to solve a new task quickly by using these pre-saved subroutines. If these shortcuts don't work for a novel or difficult task, the agent then switches to the slower, more methodical A* search to find a custom solution. The authors show that this approach makes FaSTA* significantly more computationally efficient while maintaining a success rate that is competitive with CoSTA*.", "questions": "See weaknesses.", "limitations": "", "rating": 4, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1. Despite intuitive, the proposed \"fast-slow\" strategy is a successful attempt to save inference time.\n2. The writing and figures ease the understanding of the motivation and method.\n3. The editing results are impressive, and the coverage of editing types is comprehensive.", "weaknesses": "1. Limited Technical Contribution. The paper's technical contributions to both the neurosymbolic and agent planning fields appear limited. From the neurosymbolic aspect, the mechanism for learning symbolic \"rules\" is a straightforward process of summarizing and retrieving successful execution paths. While functional, this approach offers limited insights for rule induction and program synthesis explored in the broader neurosymbolic literature. From the agent planning perspective, the core innovation can be viewed as augmenting the A* search with a retrieval-augmented generation (RAG) step to recall past solutions. While this is a practical engineering choice, it offers limited new insight into the fundamental challenges of agentic planning. I also suggest the authors conduct a more comprehensive review of agents' learning capability and memory, which is very relevant to this work but was unfortunately missed.\n\n2. Potentially Inequitable Experimental Comparison. The experimental comparisons may not provide a fair assessment. The baseline methods were not specifically optimized for the custom multi-turn editing benchmark introduced in CoSTA∗, potentially placing them at a significant disadvantage. A more informative comparison would involve a well-engineered ReAct agent equipped with the exact same toolset and effective prompt engineering. Such a baseline would help isolate whether the observed performance gains stem truly from the proposed fast-slow planning mechanism or from factors common to most modern agentic frameworks. The core logic of CoSTA*, FaSTA*, and a ReAct agent is fundamentally similar.\n\n3. Questionable Problem Framing and Motivation. The paper frames its primary contribution around optimizing for \"cost\" in multi-turn image editing. However, it is questionable whether inference time is the most critical bottleneck that needs addressing in this domain. Furthermore, as an incremental work building upon the CoSTA* framework, the added contribution, i.e., the learning and reuse of subroutines, feels like a modest step forward rather than a significant leap. The novelty seems insufficient for a standalone publication at ICLR.\n\n4. Minor Point on Formatting. As a minor note, the excessive use of vspace throughout the paper negatively impacts readability. Not sure if this should be desk rejected.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)