Skip to content
Robotics.world

Research

SABER: Learning Attention-based Semantic Affordance for Legged Locomotion

Perceptive locomotion policies have become good at reading terrain geometry — where a foothold physically exists — but they remain blind to terrain meaning: a pipe, a patch of grass, or a fragile box…

The paper’s first page · arXiv:2609.21572
arXiv
2609.21572 · Preprint · not peer-reviewed
Published
2026-09-18 · revised · 2026-10-02
Authors
Hari Prasanth Palanivelu, Samuel Sze, Kennard Garrison Johannes, Albertus Hendrawan Adiwahono, Meng Yee Michael Chuah

In plain words

Perceptive locomotion policies have become good at reading terrain geometry — where a foothold physically exists — but they remain blind to terrain meaning: a pipe, a patch of grass, or a fragile box may be perfectly traversable yet inappropriate to step on.

AI summary

Overview

Research area: Perceptive legged locomotion — reinforcement learning policies for quadruped robots that combine terrain geometry with semantic "contact permission."

Technical level: Advanced. The paper assumes familiarity with PPO, asymmetric actor-critic training, massively parallel simulation, transformer cross-attention, and elevation mapping.

Scope: The paper introduces SABER, a planner-free RL policy that consumes a per-cell terrain-affordance map carrying both 3D geometry and a binary semantic contact cost, and uses a learned, signed, foot-distance-structured bias on attention logits to keep a Unitree B2's feet off flagged terrain.

What This Paper Is About

Perceptive locomotion policies have become good at reading terrain geometry — where a foothold physically exists — but they remain blind to terrain meaning: a pipe, a patch of grass, or a fragile box may be perfectly traversable yet inappropriate to step on. Because this distinction is absent from a geometry-only observation, two scenes with identical geometry, robot state, and commands can demand different contact decisions, and no amount of reward shaping can recover the missing information. SABER's goal is to bring semantic contact permission directly into the low-level policy, so the controller chooses footholds on permitted support rather than leaving that decision to a navigation stack or an external foothold search.

Key Contributions

  1. Semantic contact-affordance formulation: A unified per-cell terrain-affordance map [x, y, z, r], where r = 0 marks steppable terrain and r = 1 marks terrain that must not be contacted ("flagged"). This lets a low-level controller separate where the robot can step from where it should, at foothold resolution.
  2. Structured semantic attention: A multi-head cross-attention terrain encoder (eight heads, d_h = 8) whose pre-softmax logits carry a learned, signed, distance-structured bias gated by the contact cost, B_{t,h,i} = β_h · ρ_h(d_{t,i}) · r̄_{t,i}, so each head weighs flagged cells by their distance to the nearest foot.
  3. Contact-cost-aware training terrains: Terrain suites that deliberately decorrelate geometry from permission — pipes and rails that are geometrically identical to flagged ones but safe to step on, and grass rings and lava tiles that are flagged with no geometric signature at all.
  4. Sim-to-real deployment and validation: Deployment on a Unitree B2 indoors and outdoors across four semantic obstacle classes, using off-the-shelf perception (LiDAR, elevation mapping, a fine-tuned segmentation model) in place of simulator ground truth.

Main Findings

  • Removing the cost channel is catastrophic: The "SABER w/o semantics, w/o bias, w/o u^ℓ" variant records 13.51 contacts per episode — thirteen times the full model's 1.04 — at essentially the same success rate (0.905) and distance (6.11 m vs. 6.15 m). A policy that cannot see the cost simply walks through flagged regions. The paper notes that this variant's low velocity error (0.178) is not a merit, since the policy is never required to avoid anything.
  • The bias alone accounts for a 55% contact reduction: Removing the semantic bias (β_h = 0), so the cost reaches the policy only through the CNN tokens, raises contacts from 1.04 to 1.61 per episode — a 55% increase — while velocity error (0.185), success (0.905), and distance (6.18 m) are unchanged. Fusing geometry and semantics at the CNN input is necessary but not sufficient.
  • The benefit comes from distance structure, not a generic gain: A static-bias variant with a uniform prior on flagged cells (B_{t,h,i} = β_h · r̄_{t,i}, no distance term) reaches 1.71 contacts, worse than the full model, indicating the learned foot-relative profile is what makes the policy selective.
  • The learned bias is heterogeneous and inspectable: Six of the eight heads retain a small gain (|β_h| < 0.2). The stronger of the remaining two learns an effective bias slightly positive near the foot, reaching approximately −9 logits at 0.45 m and decaying toward zero beyond 1 m. Replaying identical observations with and without the learned bias across 64 robots and 1200 steps per terrain shows the bias removes about three percentage points of attention mass from flagged cells on every terrain, whether or not the hazard has a geometric signature.
  • Attention behaves as a prior, not a mask: Head-averaged attention over the N = 231 tokens concentrates on cells under the stance feet and on the swing foot's impending landing cell, while flagged cells still receive a small amount of attention (uniform attention would be 1/231 = 0.004). The pattern is phase dependent: early in a swing, attention is spread out and includes flagged cells; toward touchdown it collapses onto the landing cell, leaving almost none on flagged terrain.
  • Head width trades off semantics against agility: Sixteen heads of dimension four give the lowest velocity error (0.173) and longest traverse (6.23 m) in the table, but touch flagged geometry 7% more often than eight heads (1.11 vs. 1.04). Thirty-two heads of dimension two is the weakest semantic variant, with 85% more contacts than the full model (1.92) and the lowest success rate (0.860). The authors conclude a two-dimensional projection is too small to carry geometry and semantics at once.
  • Hardware demonstrations are qualitative, not quantified: The paper reports no contact counts or success metrics for the physical B2 trials — only descriptive outcomes. Indoors, the robot traverses stepping stones using concrete rails while avoiding cardboard boxes of similar height and footprint, clears a 30 cm pipe with foot and shank, avoids turf while moving forward, backward, and sideways, and crosses three low pipes (tallest 11 cm) in both directions. Outdoors, on a tiled walkway with narrow grass gaps, disabling segmentation makes the same policy step onto the grass — a controlled comparison isolating the cost channel as the cause.

Methodology in Plain English

The representation. The robot builds a small map of its surroundings — 2.0 m by 1.0 m, at 5 cm resolution, or 41×21 cells — aligned with its heading and centered 0.2 m ahead of its body. Each cell stores where the ground is (three geometry numbers) plus one extra number: a contact cost. A second ray caster looks only at flagged objects, using the same frame and ray ordering as the geometric scan, so the two channels line up cell by cell by construction. In simulation, the cost comes from ground-truth object identity; on the robot, it comes from projected segmentation fused into a semantic elevation map.

The encoder. A small convolutional network turns the four-channel map into 231 tokens of 64 dimensions each. Because the cell's in-plane x and y are already input features, the design needs no separate positional encoding — attention can reason about where a cell is from the token itself. Each token covers a 9×9-cell (0.45 m) neighborhood, so it can represent combinations like "a height discontinuity that is also flagged."

The attention trick. A single proprioceptive observation forms one query, which attends over all terrain tokens across eight heads. The paper's key mechanism is an extra additive term on the attention scores, added before the softmax. This term is the product of three things: a per-head gain that the network learns (initialized at zero, so training starts from standard attention), a per-head piecewise-linear radial profile with six control points spanning zero to the map diagonal (all starting at one, so heads begin distance-independent), and the contact cost. Each map cell is assigned to its nearest foot in the ground plane, which gives the bias a foot-centric structure despite there being only a single query. The cost is max-pooled from cells to tokens so thin flagged objects are not averaged away. The whole mechanism amounts to eight gains and eight six-point curves, which makes the learned behavior directly readable.

Training. The policy is trained with PPO in mjlab across 4096 parallel environments for 23k iterations, with an asymmetric actor-critic setup: the actor sees only what the real robot can measure, while the critic additionally gets privileged simulator state (base linear velocity and per-foot clearance, air time, contact state, and force). Reward terms penalize foot–flagged contact (−2.5) and shank–flagged contact (−5.0) alongside velocity tracking and gait shaping. Crucially, the training terrain never lets shape predict permission: some pipes and rails are flagged and geometrically identical ones are safe, flagged and safe stepping stones differ only in the cost channel, and no two flagged stones are adjacent so a valid path always exists. A single NVIDIA H200 takes approximately 34 hours per policy.

Why This Matters

Impact on research. The paper reframes a problem the field has largely handled above the controller. Prior systems either route paths around forbidden regions in a navigation layer while the underlying policy stays geometric, or select speed and gait from semantics, or — in SemLoco, the closest prior work — let a Raibert-heuristic grid search pick the foothold for the policy to track. SABER's claim is that permission can be a first-class input to the low-level policy itself. Its second contribution is mechanistic: additive logit biases are standard in sequence models for encoding position, but the paper argues no locomotion policy has previously placed a learned, signed, spatially structured bias on its attention scores, or used one to carry semantics. Replacing sequence position with distance-to-nearest-foot and position with contact cost is a transferable design pattern.

Real-world applications:

  • Industrial inspection: Legged robots increasingly operate in plants where a single misplaced step can damage fragile equipment, destabilize the robot, or endanger the site — the motivating scenario in the paper.
  • Indoor service and logistics: The stepping-stone experiment is a proxy for cluttered floors where rails are load-bearing but cardboard boxes are not, and where geometry alone cannot distinguish them.
  • Outdoor grounds maintenance and patrol: Keeping feet on pavement rather than turf or vegetation, including along irregular natural boundaries under natural lighting.
  • Infrastructure with thin obstacles: Crossing pipes and cables that are traversable but should not be loaded, on decks and walkways.

Industry relevance. The pipeline runs entirely onboard: a RoboSense Helios-32 LiDAR with Direct LiDAR Odometry for base pose, forward- and rear-facing RoboSense Airy LiDARs for elevation mapping, an Intel RealSense D435i RGB camera, and a YOLO26s-seg model fine-tuned on more than 6,000 annotated images, fused via elevation_mapping_cupy and thresholded at τ = 0.5. The global map accumulates at 3 Hz while the local affordance crop is re-extracted at 20 Hz. Critically, the policy consumes contact permission, not class identity — grass, vegetation, pipes, and cardboard boxes all collapse into a single cost channel — so retargeting to a new hazard class is a perception problem, not a retraining problem. All hardware trials used the same checkpoint, threshold, and fusion parameters with no per-scene tuning or pre-mapping. The work was supported by the Home Team Science and Technology Agency (HTX) in Singapore.

Future Directions

  1. Model semantic uncertainty during training. The authors identify the projection of 2D segmentation into a 2.5D elevation map as the main deployment limitation, citing sensitivity to alignment, map drift, and semantic prediction errors. Training against uncertainty rather than treating the cost as ground truth is the stated remedy.
  2. Replace long-horizon map accumulation with egocentric representations. The current pipeline accumulates a global map and crops it, which is where drift enters; an egocentric alternative would sidestep that.
  3. Characterize the softness of the constraint. The paper notes that sufficiently strong velocity commands can still drive the policy through flagged terrain when no permitted path exists. How the controller should trade off command tracking against permission — and how to signal that trade-off to an operator — is unresolved.
  4. Extend to other legged embodiments, including humanoids. The affordance formulation is not quadruped-specific; the authors name humanoids explicitly.

Target Audience

Robotics researchers working on learned locomotion and perceptive control will get the most from this paper, particularly those already familiar with attention-based terrain encoders such as AME and its successors. It is also valuable for practitioners building semantic navigation and traversability stacks who want to understand what changes when permission moves into the controller rather than staying in the planner. Roboticists working on sim-to-real transfer will find the deliberate decorrelation of geometry from permission in the training terrains — and the controlled outdoor ablation with segmentation disabled — instructive as an experimental design pattern. Readers without a reinforcement learning or transformer background will find the method sections dense, though the problem framing and hardware demonstrations are accessible on their own.

Authors’ abstract

Perceptive legged locomotion has advanced rapidly by integrating terrain geometry into learned policies, yet the integration of terrain meaning remains sparse: a pipe, a patch of grass, or a fragile box may be geometrically traversable while being inappropriate for contact. In industrial environments, where legged robots increasingly operate, a single misplaced step can damage fragile equipment, destabilize the robot, or endanger the site. To address this, we introduce…

The full abstract on arXiv
Read the original paper

Related papers