Skip to content
RobotWorld
Back to Papers

PAPER DEEP DIVE

人形机器人注意力机制地形编码

Global-Local Attention Decomposition for Terrain Encoding in Humanoid Perceptive Locomotion

Although reinforcement learning has significantly advanced humanoid locomotion, perceptive policies still struggle on sparse-foothold terrain and constrained environments. Success in these scenarios requires both broad terrain awareness and precise foothold selection, two perceptual roles that conventional encoders often entangle. To address this challenge, we propose Global-Local Attention Decomposition (GLAD) for terrain encoding in humanoid locomotion. Realized by a coarse-to-fine encoder over a robot-centric elevation map, GLAD explicitly separates these objectives: a global attention branch utilizes attention pooling to summarize the surrounding terrain context, while a state-conditioned local attention branch sparsifies and encodes precise foothold-relevant geometry. This explicit attention decomposition prevents the dilution of fine-grained spatial cues while reducing training overhead. Experiments demonstrate that GLAD enables reliable locomotion over challenging gaps, stepping stones, and stairs. Furthermore, the learned policy exhibits emergent terrain-responsive behaviors, autonomously following narrow paths and avoiding obstacles under simple velocity commands without explicit navigation planners. In real-world deployment on a Unitree G1 humanoid robot using onboard LiDAR, the proposed method achieves robust zero-shot sim-to-real transfer across diverse sparse-foothold and obstacle-rich domains.

Shengcheng Fu, Yang Zhang, Zhanxiang Cao, Liyun Yan, Yizhi Chen, Yunpeng Yin, Yue GaoMay 30, 20268 min read
中文

Global-Local Attention Decomposition for Terrain Encoding in Humanoid Perceptive Locomotion

Authors: Shengcheng Fu, Yang Zhang, Zhanxiang Cao, Liyun Yan, Yizhi Chen, Yunpeng Yin, Yue Gao

Affiliations: Tongji University · Shanghai Innovation Institute · SJTU · Humanoid Robot (Shanghai) Co.

Paper: https://arxiv.org/abs/2606.00637


One-sentence Summary

GLAD uses a coarse-to-fine encoder to explicitly separate global attention (summarizing surrounding terrain context) from local attention (sparsifying and encoding precise foothold geometry) over a robot-centric elevation map, enabling robust locomotion on sparse footholds, gaps, and stairs with zero-shot sim-to-real on Unitree G1.

Background and Motivation

RL has advanced humanoid locomotion, but perceptive policies still struggle on sparse-foothold terrain and constrained environments. Success requires both broad terrain awareness and precise foothold selection — two perceptual roles that conventional encoders entangle. On sparse-foothold terrain, success depends on identifying feasible support regions and placing feet precisely.

Raw exteroceptive observations (elevation maps, depth images) are high-dimensional and noisy, reducing robustness and complicating training. Conventional terrain encoders treat perception as isolated geometric compression, ignoring the robot's immediate kinematic state. This state-unaware encoding dilutes fine-grained geometric cues, weakens the spatial correspondence between features and reachable footholds, and limits foothold precision. Attention mechanisms offer a principled way to fuse proprioception with exteroception, but existing methods (AME, AME-2) entangle multiple perceptual objectives within a single attention mechanism, failing to explicitly separate broad context from precise foothold geometry. GLAD addresses this by explicit decomposition.

Core Contributions

  1. Global attention branch: Attention pooling aggregates all local features into a compact surrounding-terrain context vector $c \in \mathbb{R}^D$.
  2. State-conditioned local attention branch: Fuses the context with a proprioceptive embedding to generate a query, scores and sparsifies local features (top-K), then applies MHA for fine-grained foothold-relevant encoding.
  3. Explicit attention decomposition: Avoids entangling global context and local foothold geometry in a single MHA, preventing dilution of fine-grained cues while reducing training overhead.

Method Details

Problem Formulation

Humanoid perceptive locomotion is a POMDP $\mathcal{M}=(\mathcal{S}, \mathcal{A}, \mathcal{O}, p, r, \gamma)$, partially observable due to limited sensor FoV and noise. The policy $\pi_\theta$ receives proprioception and exteroceptive terrain perception (elevation map), outputs actions. Objective: $J(\pi_\theta) = \mathbb{E}_{\pi_\theta}[\sum_{t=0}^{\infty} \gamma^t r(s_t, a_t)]$. $$ J(\pi_\theta)=\mathbb{E}_{\pi_\theta}\left[\sum_{t=0}^{\infty}\gamma^{t}\,r(s_t,a_t)\right] $$

The policy is parameterized as $a_t \sim \pi_\theta(\cdot \mid o_t)$, with system dynamics $p(s_{t+1} \mid s_t, a_t)$ and discount factor $\gamma \in (0,1)$.

Observation and Action Space

Actor observes base angular velocity $\omega_t^b$, gravity $g_t^b$, joint positions $q_t$, velocities $\dot{q}_t$, previous action $a_{t-1}$, and elevation map $m_t \in \mathbb{R}^{L \times W \times 3}$ (3D coordinates per cell in base frame). Critic additionally receives noise-free base linear velocity $v_t^b$. Action is 29-dim (29 actuated joints), interpreted as offset from nominal standing: $\theta_{\text{target}} = \theta_{\text{stand}} + a_t$. $$ \theta_{\mathrm{target}}=\theta_{\mathrm{stand}}+a_t $$

The elevation map is defined as $m_t \in \mathbb{R}^{L \times W \times 3}$, where $L$ and $W$ are the map length and width, and each grid cell stores 3D coordinates in the robot base frame.

Spatially Aligned Local Feature Extraction

The elevation map is processed by a two-layer CNN with zero padding throughout. Unlike AME (convolving only height then concatenating 3D coordinates), GLAD directly convolves 3D coordinates so positional cues are embedded from the start. The first layer performs strided downsampling (stride $s=2$), decoupling sensing resolution from encoded feature resolution; the second projects to embedding dimension $D=64$. With $L=33$, $W=21$, $s=2$: output $17 \times 11 = 187$ local features. Zero padding preserves spatial alignment with the terrain map, critical for grounding attention to physical locations.

Global-Local Attention Decomposition

Three steps. First, global attention pooling: logits and weights: $$ u_i = v^\top k_i + b_u, \qquad \alpha_i = \frac{\exp(u_i)}{\sum_{j=1}^{N}\exp(u_j)} $$ Context vector:

$$c = \sum_{i=1}^N \alpha_i k_i$$

Second, state-conditioned sparsification: concatenate $c$ with proprioceptive embedding, project to query $q \in \mathbb{R}^D$; score each feature: $$ s_i = w^\top [q; k_i] + b_s, \quad i=1,\ldots,N $$ Retain top-$K$ ($K=32$).

Third, MHA (16 heads) over retained sparse features with query $q$ produces foothold-relevant feature $f \in \mathbb{R}^D$. The final terrain encoding concatenates $c$ and $f$ with proprioception for the policy.

Two-Stage Training

Stage 1: basic terrains (stairs, random grid, rough, slopes, stepping-stone-everywhere, gaps) with perfect perception, initializing the terrain module and fundamental skills. Stage 2: retains stairs and gaps, replaces easy stepping stones with sparse-foothold courses (parallel-row, single-row, alternating stepping stones, rails, random cylindrical obstacles). Ten-level progressive curriculum within each stage; 4096 robots parallel; 10000 iterations per stage. Only standard locomotion rewards — no handcrafted foothold rewards or terrain-specific shaping — to isolate the contribution of terrain representation quality.

Method Overview

flowchart TD
    A[Elevation map m_t 33x21x3] --> B[Two-layer CNN zero-pad stride s=2]
    B --> C[Local features 17x11x64 = 187]
    C --> D[Global attention pooling]
    D --> E[Context vector c 64-dim]
    E --> F[Concat proprioceptive embedding]
    F --> G[State-conditioned query q 64-dim]
    C --> H[Relevance scoring top-K=32 sparsify]
    G --> H
    H --> I[MHA 16 heads]
    G --> I
    I --> J[Foothold feature f 64-dim]
    E --> K[Concat c + f]
    J --> K
    K --> L[Policy network MLP]
    M[Proprioception] --> L
    L --> N[29-dim joint actions]

Experimental Results

Training Efficiency

GLAD completes two-stage training in 1.00 days on a single H200, vs 1.36 for AME and 1.50 for AME w/ global context. The coarse-to-fine design avoids applying MHA to the full feature set.

Figure 1: Unitree G1 real-world locomotion — sparse stepping stones, stair-gap composite, 70 cm gaps, dense obstacles.

Unseen Terrain Performance

Method(a) Composite(b) Single-row(c) Pentagonal(d) Sinusoidal
AME94.9293.7583.5925.00
AME w/ global96.6891.9974.6142.58
GLAD w/o global80.0885.9486.9123.98
GLAD w/o local92.9793.5573.4418.95
GLAD95.5196.8891.2195.90

On stepping stones all methods do reasonably well, but GLAD w/o global falls below 90%, confirming broad context is needed. On terrain (c) (dense but ambiguous supports), full GLAD combines foothold precision with context for >90%, while AME w/ global drops to 74.61% due to entangled attention dilution. On terrain (d) (sinusoidal narrow path, requiring anticipatory direction adjustment), GLAD achieves 95.90% vs at most 42.58% for baselines — the global branch sees the path ahead while the local branch locks each foothold.

Figure 6: Global and local attention weight visualization — yellow (global) and red (local) markers.

Attention-Foothold Alignment

MethodTerrain$D_{\text{attn}}$ ↓$D_{\text{peak}}$ ↓$A_{\text{peak}}$ ↑
GLADContinuous0.137±0.0060.103±0.0060.257±0.029
GLADDiscrete0.133±0.0060.113±0.0060.447±0.035
AMEContinuous0.400±0.0000.107±0.0120.073±0.006
AME-GCContinuous0.530±0.0100.140±0.0300.023±0.006

GLAD's attention-weighted distance to the foothold is only 0.137 m (AME 0.400, AME-GC 0.530), and attention concentration $A_{\text{peak}}$ reaches 0.447 on discrete terrain (AME only 0.077). State-conditioned sparsification concentrates ~45% of attention on the single most relevant feature, vs 7.7% for AME — directly explaining GLAD's superior foothold precision.

Figure 3: Stage-2 training terrains at highest curriculum difficulty — sparse stepping stones, rails, gaps, random cylindrical obstacles.

Real-World Deployment

GLAD achieves zero-shot sim-to-real on Unitree G1 with onboard LiDAR across diverse sparse-foothold and obstacle-rich domains. The policy exhibits emergent terrain-responsive behavior — autonomously following narrow paths and avoiding obstacles under simple velocity commands without explicit navigation planners.

Limitations

  1. Limited perception range: The elevation map covers only 1.6 m × 1.0 m; long-range path planning may be insufficient. The sinusoidal path's anticipatory adjustment is bounded by the sensing window.
  2. Fixed top-K threshold: K=32 is fixed; for varying terrain complexity an adaptive K or score-based threshold could improve performance.
  3. Elevation-map quality dependency: Assumes reliable elevation maps; real LiDAR noise, occlusion, and drift may affect encoding. Domain randomization mitigates but extreme perception failures are not fully validated.

Conclusion and Outlook

GLAD proposes global-local attention decomposition for terrain encoding in humanoid perceptive locomotion. By explicitly separating global attention (surrounding context) from local attention (precise foothold geometry) via a coarse-to-fine encoder, GLAD avoids perceptual-objective entanglement in a single attention mechanism. Experiments demonstrate robust locomotion on gaps, stepping stones, and stairs, significantly outperforming AME and AME-2 on unseen terrains, with emergent terrain-responsive behavior and zero-shot sim-to-real on Unitree G1.

The core insight is that broad terrain awareness and precise foothold selection are fundamentally different perceptual roles; entangling them in a single attention mechanism causes mutual dilution. Global attention pools to capture "what's around"; local attention sparsifies to focus "where to step." State-conditioned sparsification is the key innovation: the current motion state guides the query vector, automatically focusing attention on reachable and geometrically suitable foothold candidates. The interpretable attention alignment — local attention highly concentrated on actual footholds — is both a performance driver and a debugging asset.

Golden Quote

When "seeing the surroundings" and "seeing exactly where to step" are no longer handled by the same pair of eyes but delegated to two kinds of attention, the robot finally neither loses its way nor misses a foothold on sparse terrain.

Related Papers

Humanoid Seated Locomotion on Passive Mobile Chair

Humanoid Seated Locomotion on Passive Mobile Chair

Research on omnidirectional seated locomotion for humanoids on passive chairs. Policies use proprioception only, outperforming standing in tracking. Analyzes regularization effects on convergence.

人形机器人Humanoid坐姿移动Aug 28, 2026
LAC: Linear and Angular Compliance for Humanoid Whole-body Control

LAC: Linear and Angular Compliance for Humanoid Whole-body Control

LAC is a general humanoid whole-body controller that simultaneously realizes commanded linear and angular compliance for wrenches applied to the upper body. Sampled force and couple events imposed on contact frames from human interaction data synthesize a large-scale compliant-response dataset; teacher-student RL then trains a single policy to track compliant motions under external wrenches, with sim and real experiments showing monotonic stiffness modulation and teleoperated loco-manipulation.

人形机器人全身控制柔顺控制Aug 26, 2026
GigaBrain-WBC-0.5: A Behavior World Model for Robust Whole-Body Control with Environment Interaction

GigaBrain-WBC-0.5: A Behavior World Model for Robust Whole-Body Control with Environment Interaction

The first Behavior World Model (BWM) for humanoid whole-body control. A causal Transformer jointly predicts next action, state, and latent behavior command distribution, enabling the policy network to model how the environment shapes actions. Automatic terrain-annotation pipeline recovers 3D contact geometry from retargeted motion. At deployment, implausible commands are detected and retracted onto learned behaviors. Achieves highest success rate across all four regimes: 81.3% terrain interaction, 83.1% under implausible commands, 99.3% fall recovery. Unitree G1 checkpoint transfers to Maker L01 robot.

人形机器人Humanoid世界模型Aug 18, 2026
Learning Athletic Humanoid Tennis Skills from Imperfect Human Motion Data

Learning Athletic Humanoid Tennis Skills from Imperfect Human Motion Data

Human athletes demonstrate versatile and highly-dynamic tennis skills to successfully conduct competitive rallies with a high-speed tennis ball. However, reproducing such behaviors on humanoid robots is difficult, partially due to the lack of perfect humanoid action data or human kinematic motion data in tennis scenarios as reference. In this work, we propose LATENT, a system that Learns Athletic humanoid TEnnis skills from imperfect human motioN daTa. The imperfect human motion data consist only of motion fragments that capture the primitive skills used when playing tennis rather than precise and complete human-tennis motion sequences from real-world tennis matches, thereby significantly reducing the difficulty of data collection. Our key insight is that, despite being imperfect, such quasi-realistic data still provide priors about human primitive skills in tennis scenarios. With further correction and composition, we learn a humanoid policy that can consistently strike incoming balls under a wide range of conditions and return them to target locations, while preserving natural motion styles. We also propose a series of designs for robust sim-to-real transfer and deploy our policy on the Unitree G1 humanoid robot. Our method achieves surprising results in the real world and can stably sustain multi-shot rallies with human players. Project page: https://zzk273.github.io/LATENT/

LATENT人形机器人网球Mar 13, 2026