Real-Time Anomaly Detection and Reactive Planning with Large Language Models

Real-Time Anomaly Detection and Reactive Planning with Large Language Models

11 Jul 2024 | Rohan Sinha, Amine Elhafsi, Christopher Agia, Matthew Foutter, Edward Schmerling, Marco Pavone
This paper presents a two-stage reasoning framework for real-time anomaly detection and reactive planning using large language models (LLMs). The first stage is a fast binary anomaly classifier that analyzes observations in an LLM embedding space, triggering a slower fallback selection stage that utilizes the reasoning capabilities of generative LLMs. This framework is integrated into a model predictive control (MPC) strategy to maintain the joint feasibility of various fallback plans, ensuring safety even when the slow reasoner is delayed. The authors demonstrate that their fast anomaly classifier outperforms autoregressive reasoning with state-of-the-art GPT models, even with relatively small language models. The approach is evaluated across synthetic text-based domains, simulated and real-world quadrotor experiments, and real-world failure modes of autonomous vehicles in the CARLA simulator. The results show that the use of foundation models (FMs) can significantly improve the robustness of autonomous robotic systems to out-of-distribution scenarios and that real-time integration within dynamic, agile robotic systems is practically feasible.This paper presents a two-stage reasoning framework for real-time anomaly detection and reactive planning using large language models (LLMs). The first stage is a fast binary anomaly classifier that analyzes observations in an LLM embedding space, triggering a slower fallback selection stage that utilizes the reasoning capabilities of generative LLMs. This framework is integrated into a model predictive control (MPC) strategy to maintain the joint feasibility of various fallback plans, ensuring safety even when the slow reasoner is delayed. The authors demonstrate that their fast anomaly classifier outperforms autoregressive reasoning with state-of-the-art GPT models, even with relatively small language models. The approach is evaluated across synthetic text-based domains, simulated and real-world quadrotor experiments, and real-world failure modes of autonomous vehicles in the CARLA simulator. The results show that the use of foundation models (FMs) can significantly improve the robustness of autonomous robotic systems to out-of-distribution scenarios and that real-time integration within dynamic, agile robotic systems is practically feasible.
Reach us at info@study.space