BTGenBot-2: Efficient Behavior Tree Generation with Small Language Models
Riccardo Andrea Izzo, Gianluca Bardaro, Matteo Matteucci
TL;DR
BTGenBot-2 introduces a 1B parameter open-source small language model that directly converts natural language task descriptions and robot action primitives into executable ROS2 compatible behavior trees encoded in XML. It leverages a compute-efficient QLoRA fine-tuning workflow on a synthetic 5204 BT dataset and implements inference-time and runtime validators to ensure robustness on resource-constrained robots. A first standardized 52-task BTBenchmark evaluated in NVIDIA Isaac Sim demonstrates that BTGenBot-2 outperforms larger models and the previous BTGenBot across functional and non-functional metrics, with up to 16x faster inference and strong zero-shot and one-shot performance. Real-robot validation on navigation and manipulation tasks confirms practical deployment viability, highlighting the approach as a scalable and reproducible solution for on-device LLM-driven BT generation in ROS2 ecosystems.
Abstract
Recent advances in robot learning increasingly rely on LLM-based task planning, leveraging their ability to bridge natural language with executable actions. While prior works showcased great performances, the widespread adoption of these models in robotics has been challenging as 1) existing methods are often closed-source or computationally intensive, neglecting the actual deployment on real-world physical systems, and 2) there is no universally accepted, plug-and-play representation for robotic task generation. Addressing these challenges, we propose BTGenBot-2, a 1B-parameter open-source small language model that directly converts natural language task descriptions and a list of robot action primitives into executable behavior trees in XML. Unlike prior approaches, BTGenBot-2 enables zero-shot BT generation, error recovery at inference and runtime, while remaining lightweight enough for resource-constrained robots. We further introduce the first standardized benchmark for LLM-based BT generation, covering 52 navigation and manipulation tasks in NVIDIA Isaac Sim. Extensive evaluations demonstrate that BTGenBot-2 consistently outperforms GPT-5, Claude Opus 4.1, and larger open-source models across both functional and non-functional metrics, achieving average success rates of 90.38% in zero-shot and 98.07% in one-shot, while delivering up to 16x faster inference compared to the previous BTGenBot.
