Heracles: Bridging Precise Tracking and Generative Synthesis for General Humanoid Control

Zelin Tao, Zeran Su, Peiran Liu, Jingkai Sun, Wenqiang Que, Jiahao Ma, Jialin Yu, Jiahang Cao, Pihai Sun, Hao Liang, Gang Han, Wen Zhao, Zhiyuan Xu, Jian Tang, Qiang Zhang, Yijie GuoarXiv 2026

TL;DR

Heracles introduces a state-conditioned diffusion middleware that seamlessly bridges precise motion tracking and generative synthesis for humanoid robots. By acting as an intermediary layer between high-level commands and low-level physics trackers, it allows humanoids to maintain high-fidelity tracking under normal conditions while automatically synthesizing natural, human-like recovery trajectories to survive severe physical disruptions.

What Problem Does This Paper Address?

For humanoid robots to operate successfully in unstructured real-world environments, they must balance two conflicting capabilities: precisely executing target tasks (like walking or manipulating objects) and flexibly recovering from unexpected forces (like being pushed or tripping).

Current general-purpose controllers rely heavily on reference-driven tracking, often powered by reinforcement learning. While these trackers excel at mimicking motion capture (MoCap) data under ideal conditions, they are notoriously brittle. When a severe disturbance pushes the robot far from its reference path, a pure tracker blindly tries to minimize immediate joint errors. This "myopic" strategy results in rigid, physically impossible joint torques and unnatural, unrecoverable falls. Conversely, purely generative models yield highly compliant, human-like movements but sacrifice the spatial and temporal precision required for strict task execution.

Heracles addresses this gap by introducing a hierarchical architecture that injects generative priors directly into the control loop without disrupting high-frequency execution.

Methods

Heracles splits control into a decoupled, two-layer hierarchy:

  1. State-Conditioned Generative Middleware: Operating at a lower planning frequency (25 Hz), this layer uses a Continuous Conditional Flow Matching model (parameterized by an AdaLN-modulated Transformer). Instead of predicting absolute coordinates, it predicts geometric residual trajectories relative to the current state. When the robot is stable, the residual is near zero, acting as an identity map that passes reference commands straight through. Under severe deviations, it leverages the gap between the actual state and the reference to synthesize entirely new, physically feasible recovery paths.
  2. Directional Warm Start & Inpainting: To ensure real-time viability, the middleware initializes its ODE solver with a directional prior (linear interpolation toward the target) rather than pure Gaussian noise, reducing the required integration steps. It also applies an inpainting constraint to pin the first residual token, ensuring kinematic continuity.
  3. General-Purpose Physics Tracker: Operating at 50 Hz, this low-level policy converts the middleware's trajectories into joint torques via a PD controller. It utilizes an improved Finite Scalar Quantization (iFSQ) encoder-decoder structure to compress high-frequency kinematic signals into discrete semantic tokens.
  4. Kinematics-Aware Loss Weighting: During training, the velocity matching loss is weighted by a pose-dependent Jacobian magnitude. This forces the model to prioritize geometrically sensitive joints (e.g., a shoulder joint in a T-pose) that cause massive Cartesian displacements.
Overview of the Heracles framework showing the training of the motion generator, motion tracker, and the closed-loop inference pipeline.

Datasets

  • Training Corpus: Curated from a diverse mix of public and proprietary datasets, including LAFAN1, 100STYLE, SnapMoGen, and AMASS. The dataset spans locomotion, martial arts, dance, daily activities, jumping, and fall-and-recovery sequences.
  • Evaluation Set: A held-out testing set consisting of 101 unseen motion sequences designed to test tracking fidelity, discontinuous/piecewise-constant commands, and extreme out-of-distribution physical perturbations.

Key Insights and Ideas

  • Implicit Mode-Switching: Instead of relying on rigid, hand-engineered state machines to switch between "tracking mode" and "recovery mode," Heracles achieves this implicitly via residual parameterization. The physical state deviation itself naturally dictates whether the middleware acts as a passive pass-through or an active generative synthesizer.
  • Frequency Separation: The architecture mirrors biological motor control by separating slow, long-horizon trajectory reasoning (25 Hz middleware) from fast, reactive physical execution (50 Hz tracking / 200 Hz torque control).
  • Self-Organizing Skill Taxonomy: Even though the iFSQ quantizer received no explicit category labels during training, a 3D projection of the discrete codebook revealed that it automatically self-organized into semantically coherent clusters of distinct motor skills (e.g., walking and running clustered adjacently, completely separate from crawling or fall recovery).

Key Results

The framework was validated both in simulation (MuJoCo/IsaacLab) and via real-world deployment on a Unitree G1 humanoid robot.

  • Robust Tracking: On the 101-sequence test set, Heracles achieved a 90.6% completion rate, outperforming external baselines like VQ-VAE (86.0%), MLP (84.8%), and SONIC (79.3%).
  • Fall-and-Recovery Dominance: When evaluated on highly challenging lie-to-stand and prone-to-stand sequences, all reactive tracking baselines failed catastrophically, scoring below a 45% completion rate. Heracles achieved a 90.0% completion rate, demonstrating emergent human-like recovery behaviors such as compensatory stepping and coordinated arm counter-motions to redistribute angular momentum.
Figure 1: Heracles synthesizes diverse, anthropomorphic recovery motions via state-conditioned diffusion. In contrast to recovery policies trained with termination tricks that converge to a limited set of stereotypical maneuvers, Heracles leverages its generative middleware to produce a rich repertoire of agile, human-like recovery behaviors, enabling more general and robust responses across a wide range of extreme perturbations.
  • Real-World Generalization: On physical hardware, the robot successfully executed agile skills (like 360° kicks) and demonstrated true omnidirectional recovery from arbitrary fallen configurations (supine, lateral, and prone) without any task-specific engineering.

Limitations and Future Work

The authors highlight a structural trade-off between their model variants:

  • The 38D configuration tracks global root positions, allowing the robot to autonomously correct positional drift relative to a reference path, but it requires an external localization system.
  • The 35D variant omits global root positions, making it entirely deployable using only onboard proprioception and an IMU, but it sacrifices autonomous position correction.

Further limitations regarding terrain complexity or multi-object interactions were not extensively discussed in the paper.

Summary updated

BibTeX
@misc{tao2026heracles,
  author = {Zelin Tao and Zeran Su and Peiran Liu and Jingkai Sun and Wenqiang Que and Jiahao Ma and Jialin Yu and Jiahang Cao and Pihai Sun and Hao Liang and Gang Han and Wen Zhao and Zhiyuan Xu and Jian Tang and Qiang Zhang and Yijie Guo},
  title = {{Heracles: Bridging Precise Tracking and Generative Synthesis for General Humanoid Control}},
  year = {2026},
  eprint = {2603.27756},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.27756},
}
Figure