Table of Contents
Fetching ...

Leveraging Dual Process Theory in Language Agent Framework for Real-time Simultaneous Human-AI Collaboration

Shao Zhang, Xihuai Wang, Wenhao Zhang, Chaoran Li, Junru Song, Tingyu Li, Lin Qiu, Xuezhi Cao, Xunliang Cai, Wen Yao, Weinan Zhang, Xinbing Wang, Ying Wen

TL;DR

This work addresses the challenge of real-time simultaneous human-AI collaboration by integrating Dual Process Theory into a language agent framework. DPT-Agent combines a fast System 1 using a Finite-state Machine with a System 2 driven by LLMs that incorporate Theory of Mind and asynchronous reflection, enabling autonomous, real-time decision making. Through Overcooked-based experiments including rule-based partners and real human participants, it demonstrates improvements over ReAct and Reflexion and shows that ToM enhances collaboration with humans. The study provides open-source code and environment, marking a step toward broader real-world deployment of autonomous, real-time human-AI teams.

Abstract

Agents built on large language models (LLMs) have excelled in turn-by-turn human-AI collaboration but struggle with simultaneous tasks requiring real-time interaction. Latency issues and the challenge of inferring variable human strategies hinder their ability to make autonomous decisions without explicit instructions. Through experiments with current independent System 1 and System 2 methods, we validate the necessity of using Dual Process Theory (DPT) in real-time tasks. We propose DPT-Agent, a novel language agent framework that integrates System 1 and System 2 for efficient real-time simultaneous human-AI collaboration. DPT-Agent's System 1 uses a Finite-state Machine (FSM) and code-as-policy for fast, intuitive, and controllable decision-making. DPT-Agent's System 2 integrates Theory of Mind (ToM) and asynchronous reflection to infer human intentions and perform reasoning-based autonomous decisions. We demonstrate the effectiveness of DPT-Agent through further experiments with rule-based agents and human collaborators, showing significant improvements over mainstream LLM-based frameworks. DPT-Agent can effectively help LLMs convert correct slow thinking and reasoning into executable actions, thereby improving performance. To the best of our knowledge, DPT-Agent is the first language agent framework that achieves successful real-time simultaneous human-AI collaboration autonomously. Code of DPT-Agent can be found in https://github.com/sjtu-marl/DPT-Agent.

Leveraging Dual Process Theory in Language Agent Framework for Real-time Simultaneous Human-AI Collaboration

TL;DR

This work addresses the challenge of real-time simultaneous human-AI collaboration by integrating Dual Process Theory into a language agent framework. DPT-Agent combines a fast System 1 using a Finite-state Machine with a System 2 driven by LLMs that incorporate Theory of Mind and asynchronous reflection, enabling autonomous, real-time decision making. Through Overcooked-based experiments including rule-based partners and real human participants, it demonstrates improvements over ReAct and Reflexion and shows that ToM enhances collaboration with humans. The study provides open-source code and environment, marking a step toward broader real-world deployment of autonomous, real-time human-AI teams.

Abstract

Agents built on large language models (LLMs) have excelled in turn-by-turn human-AI collaboration but struggle with simultaneous tasks requiring real-time interaction. Latency issues and the challenge of inferring variable human strategies hinder their ability to make autonomous decisions without explicit instructions. Through experiments with current independent System 1 and System 2 methods, we validate the necessity of using Dual Process Theory (DPT) in real-time tasks. We propose DPT-Agent, a novel language agent framework that integrates System 1 and System 2 for efficient real-time simultaneous human-AI collaboration. DPT-Agent's System 1 uses a Finite-state Machine (FSM) and code-as-policy for fast, intuitive, and controllable decision-making. DPT-Agent's System 2 integrates Theory of Mind (ToM) and asynchronous reflection to infer human intentions and perform reasoning-based autonomous decisions. We demonstrate the effectiveness of DPT-Agent through further experiments with rule-based agents and human collaborators, showing significant improvements over mainstream LLM-based frameworks. DPT-Agent can effectively help LLMs convert correct slow thinking and reasoning into executable actions, thereby improving performance. To the best of our knowledge, DPT-Agent is the first language agent framework that achieves successful real-time simultaneous human-AI collaboration autonomously. Code of DPT-Agent can be found in https://github.com/sjtu-marl/DPT-Agent.

Paper Structure

This paper contains 67 sections, 2 equations, 8 figures, 10 tables.

Figures (8)

  • Figure 1: How DPT-Agent Collaborates with Human Simultaneously.
  • Figure 2: LLM as Independent System 1 and System 2 in Overcooked. Mean score means the inter-quartile mean score of 20 games. We define score efficiency as the average score gained per macro action. The size of each model's circle represents latency, which is the time taken from the request to the output of a macro action.
  • Figure 3: DPT-Agent Framework. In System 2, the historical states from the history buffer periodically trigger the ToM module to infer human behaviors. The reflection module then analyzes the belief output from the ToM module, along with game score feedback and other historical state information, to summarize its own behaviors and generate guidelines. Within System 1, the code-as-policy generator utilizes the current state, belief and guidelines to generate code-as-policy when necessary, enabling control over the FSM. When no specific input is provided, the FSM continues operating autonomously, generating macro actions to ensure the agent maintains continuous action output, thereby guaranteeing real-time responsiveness in simultaneous collaboration.
  • Figure 4: Two Layouts in Overcooked Challenge for Real-time Simultaneous Human-AI Collaboration. Left is Map 1 - New Counter Circuit with brief introduction of the item and game mechanism. Right is Map 2 - New Asymmetric Advantages
  • Figure 5: Results of LLM with ReAct, Reflexion and DPT-Agent w/o ToM in the Single Agent Game.
  • ...and 3 more figures