SafeBranch: Branch-Pair Safety Alignment for Embodied Agents

Hyunse Lee, Jiwoo Jeong, Haneul Lee, Kyochul Jang, Youngjae Yu, Woojin LeearXiv 2026

TL;DR

SafeBranch is a novel training framework that internalizes interactive safety directly into vision-language-model-based embodied agents, eliminating the need for expensive runtime guardrails. By rolling back unsafe execution traces to the exact step where a violation occurred, SafeBranch creates tightly aligned "branch pairs" that teach the agent exactly what to avoid and how to correct its course. This method achieves up to a 10x increase in safe task successes on out-of-distribution tasks with completely critic-free deployment.

What Problem Does This Paper Address?

When vision-language models (VLMs) act as embodied agents in household environments, completing a task is not the same as completing it safely. An agent might successfully fetch an item but leave a stove burner on, or try to wipe a powered electronic fan with a wet cloth. This challenge is known as interactive safety.

Standard training methods struggle with safety for two main reasons:

  1. Imitation Learning (SFT) teaches agents what safe trajectories look like, but it doesn't explain why they are safe or what actions to avoid, often causing agents to get stuck in repetitive loops.
  2. Trajectory-level Preference Optimization (like standard DPO) compares entirely different paths. Because safety hazards usually hinge on just one or two critical steps, the safety signal gets diluted across the whole trajectory, leading to overly cautious agents that stop making task progress altogether.

To circumvent this, prior approaches rely on external safety checkers or search-based planners at inference time. However, these add massive computational overhead and leave the underlying agent fundamentally unchanged. SafeBranch aims to train the agent to be inherently safe without any external runtime critics.

Figure 1: Branch-pair supervision for interactive safety. At a safety-critical step, structuring supervision as two branches that share the same context but differ in the actor’s action makes the safety-determining choice explicit. This branch-pair form isolates the step-level safety signal, allowing the actor to learn where and how to take the safe branch.

Methods

SafeBranch introduces a data-collection and alignment pipeline that focuses entirely on safety-critical steps—the specific moments where a trajectory branches into a safe or unsafe outcome.

The framework operates in three main phases:

  1. Rollback and Critic-Guided Repair: The agent rolls out a trajectory. If it commits a safety violation, an external critic (GPT-4o) flags the error and provides a brief corrective feedback cue ($f_k$). The environment is then rolled back to that exact anchor step, and the agent is prompted with the feedback to sample a successful, safe alternative action ($y^+$).
  2. Hindsight Relabeling: To ensure the agent doesn't become dependent on the critic at deployment, the corrective feedback cue is stripped away. This creates a clean branch pair where both the unsafe action ($y^-$) and the safe action ($y^+$) share the exact same context.
  3. Branch Preference Optimization (BranchPO): The agent is trained on these pairs using a step-level preference optimization objective. This directly maximizes the log-probability margin between the safe and unsafe actions at that specific decision point.
Constructing Same-State Branch Pairs

Datasets

The authors evaluated SafeBranch on two primary interactive safety benchmarks:

  • IS-Bench: A high-fidelity simulator benchmark containing 161 household tasks.
  • SafetyALFRED: An extension of the ALFRED dataset featuring 222 hazard-bearing trajectories across a five-category risk taxonomy.

To rigorously test out-of-distribution (OOD) generalization, the authors also introduced two new controlled variants of IS-Bench:

  • OOD-ObjectShift: Injects a distractor hazard object into the scene without changing the task goal (147 tasks).
  • OOD-TaskShift: Substitutes the target object in the instruction with an entirely unseen object category (138 tasks).

Key Insights and Ideas

  • Safety is a Step-Level Problem: Treating safety as a trajectory-level metric fails. Isolating the exact branching point ensures the model learns the local causal relationship between an action and a hazard.
  • The Necessity of Hindsight Relabeling: If the critic's feedback remains in the training prompt, the agent learns to rely on it as a crutch. Stripping the feedback forces the agent to derive the safety constraints purely from the environmental context.
  • Rollback Efficiency: Generating branch pairs via environment rollback is highly efficient. Instead of searching blindly for safe and unsafe trajectories that happen to match (via Best-of-N sampling), rolling back an unsafe rollout allows the pipeline to synthesize usable pairs 5.2x faster under matched compute.

Key Results

SafeBranch achieves state-of-the-art safety performance across all tested benchmarks while running entirely critic-free at deployment:

  • IS-Bench Performance: SafeBranch raised the Safe Success Rate (SSR) from a baseline of 0.031 to 0.281, outperforming inference-time verification methods.
  • Out-of-Distribution Robustness: On the challenging OOD-TaskShift benchmark (unseen objects), SafeBranch boosted the SSR from 0.048 to 0.469—roughly a 10x improvement over the untrained baseline.
  • Cross-Simulator Transfer: When ported to SafetyALFRED, overall hazard accuracy improved from 0.274 to 0.438, proving the recipe generalizes across different action spaces and risk taxonomies.
Learning and Inference with SafeBranch

Limitations and Future Work

While SafeBranch successfully removes the critic at deployment, it still requires an expensive LLM critic during the training phase to generate the initial feedback and repairs. Furthermore, the framework relies heavily on simulators that support perfect environment rollback. Extending this method to physical robotic systems where state restoration is difficult or impossible remains an open challenge, potentially requiring approximate world models or human-in-the-loop resets. Finally, certain complex hazard categories (like food spoilage or fall/trip hazards) yielded zero training pairs because the automated repair recipe struggled to synthesize valid alternatives.

Summary updated

Abstract

Vision-language-model-based embodied agents can complete instructed tasks but often violate safety constraints in the process, a problem recently framed as interactive safety. Training such agents to act safely is difficult, since safety and task success are distinct objectives, and safety arises only at a small number of safety-critical steps within a trajectory. Standard supervision is insufficient: imitating safe trajectories teaches behavior without explaining why it is safe, and contrasting arbitrary safe and unsafe trajectories mixes the safety signal with unrelated differences. We propose SafeBranch, a framework that aligns an embodied actor on safety through branch pairs constructed from the actor's own unsafe rollouts via environment rollback. SafeBranch rolls each unsafe rollout back to the safety-critical step that caused the violation, queries the actor for a safe alternative, and pairs the original action with the alternative so that the two branches differ only at that step. The trained actor acts safely at deployment with no critic in the loop. On IS-Bench, SafetyALFRED, and out-of-distribution variants with unseen tasks and objects, it handles safety reliably without sacrificing task success, achieving roughly ten times more safe successes than the untrained baseline on the unseen-object variant.
BibTeX
@misc{lee2026safebranch,
  author = {Hyunse Lee and Jiwoo Jeong and Haneul Lee and Kyochul Jang and Youngjae Yu and Woojin Lee},
  title = {{SafeBranch: Branch-Pair Safety Alignment for Embodied Agents}},
  year = {2026},
  eprint = {2608.19729},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.19729},
}
Figure