[Paper Review] BTGenBot-2: Efficient Behavior Tree Generation with Small Language Models
BTGenBot-2 is a 1B-parameter open-source LLM fine-tuned to convert natural language task descriptions and robot action primitives into executable ROS2-compatible behavior trees, with on-device deployment, zero-shot generation, runtime error recovery, and a standardized BT benchmark showing strong performance against larger models.
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.
Motivation & Objective
- Address the need for open, efficient, and deployable LLM-based robotic task planning beyond closed APIs and large models.
- Develop a lightweight SLM that directly outputs ROS2-compatible XML Behavior Trees from natural language and action primitives.
- Provide robust error handling at inference and runtime to improve reliability on real robots.
- Introduce a standardized benchmark for LLM-based BT generation spanning navigation and manipulation tasks in simulation and on real hardware.
Proposed method
- Fine-tune a 1B-parameter Llama-3.2-1B-Instruct model using QLoRA (PEFT) on a synthetic instruction-following dataset of 5,204 BTs paired with natural language descriptions and action primitives.
- Curate a dataset from the TSE BT collection, generate synthetic variants with GPT-based tools, and produce training targets where BTs are XML-compatible and use only allowed actions.
- Enforce strict XML and action-primitives validation at inference to avoid malformed outputs.
- Implement runtime error recovery through a lightweight in-process logger that can trigger subtree regeneration when failures propagate.
- Deploy a ROS2-compatible BT generation workflow with BehaviorTree.CPP validation and an inline logger for stack traces and blackboard states.
Experimental results
Research questions
- RQ1Can a 1B-parameter open-source LLM be fine-tuned to reliably generate executable ROS2-compatible behavior trees from natural language and a given action primitive set?
- RQ2Does a lightweight, on-device BT generator with explicit inference-time and runtime validations outperform larger closed-source models in BT quality and execution reliability?
- RQ3How does the proposed ER (error recovery) mechanism impact zero-shot and one-shot performance across easy, medium, and hard tasks in a standardized BT benchmark?
- RQ4What is the impact of dataset scale and curation strategy on BT generation quality for instruction-following agents in robotics?
Key findings
- BTGenBot-2 achieves higher average functional/non-functional scores than GPT-5 variants, Claude Opus 4.1, and the original BTGenBot across zero-shot and one-shot settings.
- Zero-shot average success rate (SR) is 84.61% for BTGenBot-2, outperforming strong baselines; one-shot SR rises to 92.38%.
- BTGenBot-2–ER (with error recovery) reaches 90.38% zero-shot and 98.07% one-shot SR, with 100% XML syntax and perfect action coherency in many cases.
- Inference time for BTGenBot-2 is around 11 seconds (zero-shot) and remains competitive in one-shot settings, with ER adding minimal overhead.
- The authors release the first standardized BT benchmark (52 tasks in NVIDIA Isaac Sim) and demonstrate real-robot validation achieving 17/18 success in navigation tasks, 18/18 with ER.
- Fine-tuning with QLoRA on a curated 5,204-sample BT dataset substantially improves performance compared to the pre-trained baseline and prior BT generators.
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.