Research
Auto-HSI: Personalized human control of a robot swarm on demand by using LLMs for online automatic code generation
Controlling many robots with only one or a few inputs is a core problem in human–swarm interaction, and existing interfaces are usually predefined, limited in the behaviors they allow, and designed…

- arXiv
- 2609.16346 · Preprint · not peer-reviewed
- Published
- 2026-09-14
- Authors
- Alessandro Nazzari, Nathan Cerisara, Dorian Tonnis, Raina Zakir, Lorenzo Labarile, Weixu Zhu, Marco Dorigo, Mary Katherine Heinrich
In plain words
Controlling many robots with only one or a few inputs is a core problem in human–swarm interaction, and existing interfaces are usually predefined, limited in the behaviors they allow, and designed for trained operators.
AI summary
Overview
- Research area: Human–swarm interaction (HSI), swarm robotics, and LLM-based automatic code generation.
- Technical level: Intermediate. The paper is readable with a general grasp of state machines, gesture recognition, and LLM tool-calling, but it assumes familiarity with swarm teleoperation concepts.
- Scope (one sentence): The paper presents and evaluates Auto-HSI, a prototype that lets an untrained operator define a personalized gesture-based control interface for a robot swarm by demonstrating gestures and describing desired collective behaviors in natural language, with an LLM generating the robot-executable state machine code on demand.
What This Paper Is About
Controlling many robots with only one or a few inputs is a core problem in human–swarm interaction, and existing interfaces are usually predefined, limited in the behaviors they allow, and designed for trained operators. Auto-HSI instead generates the interface on demand: the user shows a gesture, explains in natural language what the swarm should do when it sees that gesture, and an external LLM writes (or edits) the state machine registry and the Lua code blocks that the robots then execute. The goal is personalized, open-ended human control of a swarm without the operator ever writing code, while keeping the LLM out of the real-time control loop.
Key Contributions
- An on-demand personalization pipeline for HSI. Auto-HSI turns a demonstrated gesture plus a natural-language description into generated state machines (SM) whose nodes contain generated Lua code, and whose transitions are triggered by recognized gestures. The LLM participates only in the personalization phase and never issues commands to the robots; the robots execute the compiled code at 10 Hz.
- Gesture tracking and recognition designed for this loop. The system extracts 21 hand points per hand with the Mediapipe hand-landmark model, classifies fist versus non-fist to segment gestures, builds each gesture as a sequence of 4-dimensional two-hand palm-center vectors relative to the first frame, and matches live gestures to a stored gesture database using dynamic time warping (DTW) against an acceptance threshold.
- An LLM-agnostic code generation layer with validation and repair. Requests go through OpenRouter's API so different external LLMs can be interchanged; the registry manager verifies and compiles the generated Lua before committing, returns rejected fragments to the LLM for correction without involving the operator, and reports robot runtime errors back to a server that issues an automatic repair request. Updated state machines are serialized to JSON and pushed over open sockets to each robot's local copy.
- Benchmarks and live-operation evidence. The paper reports a gesture-recognition benchmark (164 ground-truth recordings, 656 test recordings), a code-generation benchmark (15 baseline SMs, 270 trials, three LLMs), 18 live teleoperation trials by three real operators controlling 50 simulated robots in ARGoS under nominal and noisy conditions, a demonstration of re-triggering personalization mid-operation, and demonstrations on real e-puck robots.
Main Findings
- Gesture recognition is strong overall but weaker for shapes: Across all 656 test samples matched against all 164 ground-truth samples, recall and precision were both 94.4% (95% CI [92.3, 95.9]), with 619 of 656 samples classified correctly. One-hand swipes reached 99.2% recall, two-hand swipes 95.0%, one-hand shapes 90.6%, and two-hand shapes 86.6% — the lowest value reported.
- Code generation usually reproduces the intended behavior: In 91.4% of the 270 trials, the robot behaviors from generated SMs were judged sufficiently visually similar to those from the manually designed baselines. Basic motion (72 trials) and SM modification (36 trials) succeeded in 100% of trials across all three prompt-detail levels and all three LLMs.
- Shape creation is the hardest generation category: With medium and low prompt detail, the desired behaviors were produced in only 68.75% of trials. The authors attribute this to shape creation involving far more degrees of freedom than setting motion or editing an existing shape.
- Prompt detail and LLM choice matter only in places: For shape deformation, high and mid detail reached 100% for DeepSeek v4 Pro and DeepSeek v4 Flash (Gemma 4 31B reached 80% at mid detail), while low detail gave 90%, 90%, and 77.8% respectively. For shape creation at high detail the results were 100%, 75%, and 100%; at mid detail 62.5%, 50%, and 87.5%; at low detail 75%, 62.5%, and 75%.
- All 18 live teleoperation trials were completed: Three operators each used their own personalized interface to control 50 simulated e-puck-like differential-drive robots in three tasks (score a goal, traverse a maze with narrow gaps, score two goals with a split formation), with and without wheel-speed noise at e = 1.5.
- Nominal performance was comparable across operators: Completion times ranged from 123 s to 241 s and gesture counts from 22 to 54, with no operator notably outperforming the others.
- Noise hurts tasks that involve grasping balls, not the maze: Performance under noise was similar or slightly better in Task-2, but notably worse in Task-1 and Task-3, because corrective actions in those tasks must also manage balls that may need to be retrieved. Degradation varied strongly by operator in Task-1: User-1 needed 1.5× the time and 2.1× the gestures, User-3 2.0× and 3.7×, and User-2 2.3× and 4.6×.
- One operator degraded sharply in the split-formation task: In Task-3 under noise, User-1 and User-2 required 1.8× to 1.9× the nominal time, while User-3 required 720 s and 205 gestures against 125 s and 26 gestures in the nominal condition.
- Personalization genuinely differs between operators: The same shape deformation was produced by a "swipe right" gesture for one operator and a "swipe outwards" gesture for another, illustrating that the generated interfaces are individualized rather than fixed.
- Interfaces can be repaired mid-operation: In the re-personalization demo, the first update produced 1 new SM and 3 new nodes and took 62 s in total; after the operator observed that two gestures produced the same behavior and described the correction in natural language, the second update modified one line of code and took 25 s.
- Real robots were demonstrated: 4 e-puck robots were formed into an approximately square shape and navigated through an arena, and 6 e-puck robots were formed into an approximately circular shape and deformed by changing its overall size. No quantitative metrics are reported for these two demos.
Methodology in Plain English
The interaction has two phases. In the personalization phase, the operator demonstrates a gesture — bounded by closed fists to mark its start and end — and explains in natural language the swarm behavior it should trigger. Auto-HSI assembles a request containing the user's description, a static baseline prompt, and the current state of the SM registry, plus the full interaction history, and sends it to an external LLM. The LLM uses tool calls to inspect existing state machines, decide whether to modify one or create a new one, register the gesture in a gesture database, and add or edit shape definitions and code blocks. Each generated node carries code executed on entry, on every control step, and on exit; transitions are triggered either by a gesture event or automatically after a fixed number of control steps, and are routed through a neutral base node. Every fragment is compiled and validated before being committed, so syntactically invalid code never reaches the robots.
In the live operation phase, no LLM calls occur. Detected gestures are compared by DTW to the stored database, and if the best match is below the acceptance threshold, its identifier is broadcast to the robots; each robot checks the outgoing transitions of its active node and fires any transition tied to that identifier, independently per state machine, so one gesture can affect several SMs.
For evaluation, the authors first benchmarked the two internal components. The gesture benchmark had 41 ground-truth gestures performed 4 times by 4 operators (164 recordings) and a test set of the same 41 gestures performed 16 times (656 recordings), with every test sample matched against every ground-truth sample and scored by recall and precision. The code-generation benchmark compared generated and manually authored SMs numerically, using a motion tracking error between formation centroids and a formation error based on sorted pairwise inter-robot distances (in a normalized variant, d_shape^λ), across four categories, three prompt-detail levels, two prompt formats, and three LLMs. They then ran live trials with real operators driving 50 simulated robots in a physics-based simulator, adding independent uniform noise to each of the 100 wheel speeds to test robustness, and finished with a mid-operation re-personalization demo and two real-robot demos.
Why This Matters
The paper shows that the interface between a human and a swarm does not have to be fixed at design time, and that an LLM can be confined to an offline code-generation role while the real-time loop stays deterministic, validated, and LLM-free — a pattern relevant to any system where generative models must be kept out of safety-critical control paths. It also provides an unusually complete evaluation stack, from component-level benchmarks to live human trials under noise.
Real-world applications:
- Search and rescue and disaster response, where operators need to quickly reshape and split a robot team for gaps, debris, or multiple targets without waiting for custom software.
- Field robotics and inspection, where the same platform is used for different missions and each operator may prefer different control gestures.
- Education and rapid prototyping of swarm behaviors, allowing non-programmers to specify collective behaviors conversationally.
- Human–robot teaming in dynamic settings, where mission requirements change mid-task and the interface must be updated on the fly rather than redeployed.
Industry relevance: the work speaks directly to organizations deploying multi-robot fleets that want configurable, operator-specific control without bespoke engineering for each site or user, and to teams building LLM-assisted robotics toolchains that require validation and automatic repair before generated code reaches hardware.
Future Directions
- Moving from central control to self-organized coordination. The authors identify the reliance on external motion tracking and a central base station as the major current limitation, and propose integrating with the Self-organizing Nervous System (SoNS) architecture, which already gives an operator a single access point and has been demonstrated communicating with an off-board LLM.
- Running Auto-HSI onboard. Transitioning to platforms with onboard cameras, microphones, and processing so no base station is needed, letting an operator stay within view of any robot rather than a pre-allocated one; longer term, running the LLM onboard if small-model and onboard compute capabilities improve.
- Broadening beyond formation control. Extending the state machine generation mechanism to actuation beyond formation control, and allowing users to describe both individual-robot and swarm-wide behaviors in natural language.
- Addressing real-world operator conditions. Improving gesture tracking and audio processing, adding an emergency intervention mode, and developing feedback mechanisms about swarm state, performance, and environment, since real operators are unlikely to have the bird's-eye view available in this study.
Target Audience
Researchers and practitioners in swarm robotics and human–robot interaction, especially those working on teleoperation interfaces and on LLM-assisted robot programming; engineers building validated LLM code-generation pipelines for hardware; and readers interested in how generative models can be safely scoped to design-time tasks while control remains conventional.
Authors’ abstract
This paper presents Auto-HSI, a method for generating personalized human-swarm interaction (HSI) interfaces on demand. The objective is to enable untrained operators to use natural language descriptions and gesture demonstrations to explain how they want the robots to collectively behave in response to their gestures. Based on these inputs, the code should automatically be generated for personalized state machines that will control the robots as desired, in response to the…
The full abstract on arXivRelated papers
- Coding Agents with Harness for Safe Robot Control 2026-09-17 · cs.RO · Key terms of the title in common
- Generative Action-Chunk Sampling for Adaptive Stiffness Control in Physical Human-Robot Collaboration 2026-08-26 · cs.RO · Key terms of the title in common
- Co${}^{2}$Skill: Whole-Body Control via Skill Composition for Long-Horizon Human-Environment Interaction 2026-10-07 · cs.RO · Key terms of the title in common
- VioLA: Learning Generalist Humanoid Control Policies from Human Data 2026-10-08 · cs.RO · Key terms of the title in common
- DexCast: Learning Real-World Dexterous Control from Human Videos 2026-10-10 · cs.RO · Key terms of the title in common