TL;DR
FaSTA is a neurosymbolic agent for multi-turn image editing that mimics human "fast-slow" cognition to drastically reduce computational costs. By using LLMs to mine successful tool sequences into reusable symbolic subroutines, it handles up to 91% of tasks via an efficient "fast path," resorting to expensive A search only when novel or complex challenges arise.
What Problem Does This Paper Address?
Complex, multi-turn image editing—such as "remove the cat, recolor the bench pink, and replace the background"—requires a sequence of specialized AI tools (e.g., YOLO for detection, SAM for segmentation, Stable Diffusion for inpainting).
Existing state-of-the-art agents use A search to find the optimal "toolpath" for these tasks. While accurate, A search is computationally expensive because it explores many possible tool combinations for every single subtask. Furthermore, these agents are often "test-time only," meaning they don't learn from experience; they re-calculate the same tool sequences every time they encounter a similar subtask, leading to significant redundant computation.
Methods
FaSTA introduces a Fast-Slow Toolpath Agent* framework that combines high-level LLM planning with low-level search and a learnable memory of subroutines.
- Subroutine Mining (Inductive Reasoning): The system continuously logs "traces" of successful and failed toolpaths. Periodically, an LLM performs inductive reasoning over these traces to extract frequently used, effective tool sequences—called subroutines. These are stored as symbolic rules.
- Adaptive Fast-Slow Planning:
- The Fast Path (System 1): For a new task, the LLM first attempts to select a pre-learned subroutine from the Rule Table. If a match is found, it executes that sequence immediately.
- Verification: A Vision-Language Model (VLM) checks the output quality.
- The Slow Path (System 2): If no subroutine exists or if the "fast" execution fails the VLM quality check, the agent triggers a localized A* search to find a new, reliable toolpath.
- Neurosymbolic Architecture: It bridges the gap between the flexible, prior-heavy reasoning of LLMs and the rigorous, verifiable search of classical algorithms.
Datasets
The authors evaluated FaSTA* using:
- CoSTA* Benchmark: 121 complex image-prompt pairs involving 550 total subtasks (1-8 subtasks per image).
- Complex-Edit Benchmark: An independent dataset used to verify the generalizability of the learned subroutines.
- MagicBrush: A standard instruction-guided image editing benchmark.
- Subtask-Specific Test Datasets: Newly created datasets used specifically to validate and "stress-test" newly proposed subroutines before they are added to the permanent memory.
Key Insights and Ideas
- Learning from Experience: Unlike previous agents that start from scratch for every query, FaSTA* treats toolpath generation as a learning problem. The more tasks it performs, the more efficient it becomes.
- Symbolic Rules > Raw Caching: Instead of just caching specific results, FaSTA extracts symbolic rules*. This allows the agent to generalize a tool sequence learned on one image to a completely different image with similar contextual features.
- The "Cold Start" to "Warmed Up" Transition: The success rate of the "fast plan" grows exponentially as the agent mines more subroutines, eventually reaching 91% success after 200 tasks.
Key Results
- Efficiency: FaSTA reduces average execution cost by 49.3%* compared to the baseline.
- Quality: This massive speedup comes at a negligible cost to quality, with only a 3.2% drop in human-evaluated accuracy.
- Pareto Optimality: FaSTA* achieves a superior cost-quality trade-off, dominating other baselines.
Limitations and Future Work
- Cold Start: The agent's initial performance on entirely new task types is identical to the slower baseline until it gathers enough "experience" to mine subroutines.
- LLM Dependency: The quality of the mined rules and the initial subtask decomposition is heavily dependent on the underlying LLM's reasoning capabilities.
- VLM Bottleneck: The "fast path" relies on VLM checks for verification; if the VLM misjudges quality, the agent might fail to trigger the necessary "slow path" fallback.
- Future Direction: The authors suggest exploring how this "fast-slow" tool-use paradigm could be applied to other domains beyond image editing, such as robotic planning or software engineering agents.
Summary updated