Abstract
The integration of Large Language Models (LLMs) into autonomous driving systems demonstrates strong common sense and reasoning abilities, effectively addressing the pitfalls of purely data-driven methods. Current LLM-based agents require lengthy inference times and face challenges in interacting with real-time autonomous driving environments. A key open question is whether we can effectively leverage the knowledge from LLMs to train an efficient and robust Reinforcement Learning (RL) agent. This paper introduces RAPID, a novel Robust Adaptive Policy Infusion and Distillation framework, which trains specialized mix-of-policy RL agents using data synthesized by an LLM-based driving agent and online adaptation. RAPID features three key designs: 1) utilization of offline data collected from an LLM agent to distil expert knowledge into RL policies for faster real-time inference; 2) introduction of robust distillation in RL to inherit both performance and robustness from LLM-based teacher; and 3) employment of a mix-of-policy approach for joint decision decoding with a policy adapter. Through fine-tuning via online environment interaction, RAPID reduces the forgetting of LLM knowledge while maintaining adaptability to different tasks. Extensive experiments demonstrate RAPID's capability to effectively integrate LLM knowledge into scaled-down RL policies in an efficient, adaptable, and robust way.
Introduction
Autonomous driving requires a delicate balance between high-level common-sense reasoning and split-second execution. While Large Language Models (LLMs) possess remarkable reasoning abilities, their high inference latency makes them unsuitable for direct real-time control. Conversely, standard Reinforcement Learning (RL) agents are fast but often fragile, lacking the robustness to handle adversarial noise or the adaptability to generalize to unseen "corner cases."
This paper presents RAPID (Robust Adaptive Policy Infusion and Distillation), a framework designed to bridge these gaps. RAPID aims to give RL agents the "brains" of an LLM without sacrificing the "speed" required for real-time driving by distilling high-level reasoning and robustness into lightweight policies.
Methodology: The RAPID Framework
The RAPID framework operates in three distinct phases to ensure efficient knowledge transfer and adaptation:
- LLM-Driven Data Synthesis: An LLM-based agent (GPT-3.5 with a "ReAct" reasoning framework) generates a high-quality dataset of expert driving behaviors in a simulator, providing both actions and the reasoning behind them.
- Robust Knowledge Distillation: A student RL policy is trained on this synthesized data. A novel Robustness Regularized Distillation loss forces the student to maintain consistent outputs even under data perturbations, allowing it to inherit the LLM's natural stability.
- Mixture-of-Policies (MoP) & Online Adaptation: RAPID employs a Transformer-based architecture where a "Router" network dynamically balances a frozen LLM-distilled policy with a trainable Online Adapter. This allows the agent to rely on common sense for standard scenarios while learning specific maneuvers for new environments.
Experimental Evaluation
Evaluation was conducted in the HighwayEnv simulator across scenarios of increasing complexity (LANE-3 to LANE-5). A key finding in the data preparation phase was the existence of a "sweet spot": mixing 25% LLM-synthesized expert data with 75% random data provided the best balance for training offline RL agents, enhancing generalization beyond what pure expert data could achieve.
Results and Discussion
RAPID demonstrates significant improvements over baseline methods in two critical areas: robustness and adaptation speed.
Superior Robustness
Under heavy adversarial attacks (such as PGD or FGSM), the performance of standard DQN agents typically collapses, with rewards dropping precipitously. In contrast, the RAPID agent maintains nearly its full performance, demonstrating that the robust distillation process successfully transfers the teacher's resilience to the student model.
Efficient Adaptation
In zero-shot transfer tasks—moving to higher-density traffic without prior training—RAPID significantly outperforms vanilla RL. Its distilled prior knowledge allows it to reach high reward levels much faster, effectively bypassing the slow initial exploration phase typical of standard RL.
Conclusion
RAPID successfully distills the reasoning capabilities and robustness of LLMs into efficient, real-time RL policies. By combining offline distillation with online adaptation, the framework creates agents that are both "smart" and "fast." Future research will focus on testing in high-fidelity 3D environments like CARLA and integrating Visual Language Models to process raw sensor data directly.
Summary updated