[Paper Review] SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive Tasks
SwiftSage combines a fast Swift module (small LM trained offline) with a slow Sage module (LLM-based planning and grounding) to achieve state-of-the-art performance on 30 ScienceWorld tasks, outperforming SayCan, ReAct, and Reflexion while being more cost-efficient.
We introduce SwiftSage, a novel agent framework inspired by the dual-process theory of human cognition, designed to excel in action planning for complex interactive reasoning tasks. SwiftSage integrates the strengths of behavior cloning and prompting large language models (LLMs) to enhance task completion performance. The framework comprises two primary modules: the Swift module, representing fast and intuitive thinking, and the Sage module, emulating deliberate thought processes. The Swift module is a small encoder-decoder LM fine-tuned on the oracle agent's action trajectories, while the Sage module employs LLMs such as GPT-4 for subgoal planning and grounding. We develop a heuristic method to harmoniously integrate the two modules, resulting in a more efficient and robust problem-solving process. In 30 tasks from the ScienceWorld benchmark, SwiftSage significantly outperforms other methods such as SayCan, ReAct, and Reflexion, demonstrating its effectiveness in solving complex interactive tasks.
Motivation & Objective
- Motivate building agents capable of complex interactive reasoning in open-world environments.
- Integrate fast, imitation-learned action selection with slow, deliberative subgoal planning and grounding.
- Evaluate the dual-process agent on a comprehensive ScienceWorld benchmark and compare to existing baselines.
Proposed method
- Swift module: a small encoder-decoder LM (T5-large style, 770M parameters) trained offline on oracle trajectories to encode long action histories and predict the next action (System 1).
- Sage module: GPT-4 based planning and grounding with a two-stage prompt (planning and grounding) to generate subgoals and convert them into executable action sequences (a buffered action plan).
- Integration: a heuristic controller switches between Swift and Sage based on conditions (stick when reward is nonzero, switch on invalid or exceptional predictions, or critical decisions).
- Swift training uses multi-hop imitation learning with a sliding window of the 10 most recent actions and a visited-rooms history to reduce bias and improve early-step accuracy.
- Grounding stage uses a formal action-grammar and an action buffer to convert long-horizon subgoals into a sequence of executable actions.
Experimental results
Research questions
- RQ1Can a dual-process agent combining fast imitation learning and slow, deliberate LLM planning outperform existing interactive-task agents?
- RQ2Does planning-grounding with a two-stage Sage module improve exception handling and long-horizon task completion over single-stage prompting methods?
- RQ3Is it possible to achieve higher task completion with lower LLM inference cost by triggering deliberation only when needed?
- RQ4How does SwiftSage perform across tasks of varying length and complexity within ScienceWorld compared to baselines like SayCan, ReAct, and Reflexion.
Key findings
- SwiftSage achieves an overall score of 84.68 on the ScienceWorld benchmark, outperforming SayCan (33.82), ReAct (36.43), and Reflexion (45.34).
- The Swift-only configuration reaches 49.26, but the full SwiftSage system attains higher performance by leveraging Sage’s planning and grounding.
- The Sage module reduces to about 5 actions per plan and delivers lower cost per action than other LLM-based methods, with SwiftSage incurring 757.07 tokens per action (tpa).
- SwiftSage demonstrates better efficiency and robustness in handling environment-specific exceptions than prior methods like SayCan, ReAct, and Reflexion.
- A two-stage planning-grounding approach enables long-horizon planning and converting subgoals into executable action sequences, improving grounding stability over single-action LLM generations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.