Manuscript Offprint
arXiv:2610.24008Weakly Supervised Discovery of Motion Styles for Compositional Robot Control
Heedo Woo Antonio Marino Eduardo Sebastián Amanda Prorok
Abstract—When a robot possesses more degrees of freedom than a task requires, multiple trajectories can achieve the same objective using distinct motion styles. Compositional robot control aims to preserve a selected style while simultaneously executing an independent task command, effectively balancing these potentially competing objectives. In this paper, we present CODES, a framework for compositional robot control that discovers a coherent style repertoire from diverse recordings and composes it with independent commands. First, motion retargeting maps the recordings to motions executable by the target robot; next, weakly supervised consensus encoding and density-based clustering identify styles within and across recordings without a prescribed count; finally, reinforcement learning trains a policy to compose the discovered styles with independent commands. We evaluate CODES on a Unitree Go2 quadruped across two simulators and physical hardware. Compared to baselines, CODES significantly improves kinematic coherence. Furthermore, our controller successfully tracks velocity commands that generalize beyond the support of the recorded data, exhibiting robust and distinguishable style characteristics during both cross-simulator and real-world hardware deployments.
Project website: proroklab.org/compositional-motion-styles
Index Terms—Compositional robot control, motion style discovery, weakly supervised learning, reinforcement learning.
I. INTRODUCTION
Robot motion control is commonly formulated in terms of task objectives, such as target velocities, poses, or trajectories. However, a given objective typically admits many executions that differ in motion characteristics, including posture, contact patterns, and coordination. These characteristics, referred to here as motion styles, influence aspects such as clearance, interaction with the environment, and predictability [1], [2]. This freedom is particularly relevant when a robotic system has more degrees of freedom than those that the task constrains. The task command alone does not select these characteristics. A compositional robot controller therefore accepts a style reference and a task command as independently selectable inputs, so that the requested execution can change without changing the task objective.
To compose motion styles and task commands, some representation of the styles is needed. Motion style characteristics can be specified explicitly through coupled oscillators, such as in AllGaits [2], or parameterized via posture commands, such as in Walk These Ways [1], allowing selection within predefined families of styles. As an alternative to manual parameterizations, motion recordings offer more flexibility for learning motion structure [3], [4], but entangle embodiments, regimes, and constraints. In computational ethology, B-SOiD [5], VAME [6], and Keypoint-MoSeq [7] identify recurring patterns from pose sequences without predefined taxonomies. A single recording may contain several styles, and similar styles may recur across recordings. Segmentation alone does not identify the characteristics that should persist as task commands change.
On the control side, reference-based reinforcement learning uses demonstrations through explicit tracking (DeepMimic [8]) or learned adversarial motion rewards (AMP [9]). Multi-behavior controllers select among motions using separate adversarial motion priors (Multi-AMP [10]), continuous embeddings [11], [12], or discrete codes [13], [14]. Coarse annotations can nevertheless group distinct execution patterns under one label; diverse execution therefore does not ensure a distinguishable, coherent style representation.
Consequently, neither raw recording boundaries nor existing annotations alone define an adequate repertoire. For successful compositional control, styles extracted from data must be coherent and independently selectable from task commands. This separation parallels Walk Like Dogs [15], which pairs locomotion modes independently with steering commands. Kinematic coherence requires windows in the same style group to share motion characteristics (e.g., posture, joint-velocity patterns, and periodicity), with windows from different groups remaining distinguishable. The controller must exhibit both command and style fidelity, following the task command while preserving the selected style's motion characteristics.
These considerations motivate CODES (Composition Of Discovered Expressive Styles), which identifies motion styles from recordings and trains a policy to execute them under independently specified task commands (Sec. II). Recordings are first expressed on the target robot, providing executable motion examples from which candidate styles are identified by a weakly supervised discovery method; these styles are then exposed to the policy as a separate control input (Sec. III). We evaluate the framework in a quadruped case study on the Unitree Go2 (Sec. IV). Ablations and comparisons with alternative decomposition methods show a compact repertoire with higher kinematic coherence than the no-coarse-guidance and VQ-VAE baselines (Sec. V). We further assess the robot motion controller in two simulators and real hardware deployments, showing that the resulting policy achieves command and style fidelity across a broad range of motions.
All authors are with the Department of Computer Science and Technology, University of Cambridge. Email: {hw527, am3507, es2121, asp45}@cam.ac.uk.
This work is supported by a Leverhulme Trust Research Project Grant. We gratefully acknowledge their support.

Fig. 1. Learning and composing motion styles for quadruped control. (A) Motions are retargeted to a common representation compatible with the robot's kinodynamics; (B) a weakly-supervised method based on consensus affinity and HDBSCAN identifies a style repertoire; and (C) a policy trained with reinforcement learning composes a style reference from the repertoire and an independent task command for robot control. This makes recorded motion characteristics available under independently selected commands.
where N is the number of windows. The coarse labels only specify priors available from human expertise and provide weak supervision: they identify broad motion categories rather than the fine-grained styles or window assignments to be inferred. Within the recorded trajectory windows, we can identify a set of motion characteristics shared by multiple windows. In this paper, we denote such characteristics as a motion style.
Styles are therefore represented by a partial grouping of the collection, which assigns each window a label , where denotes a window without sufficient support for any style. For each style , we define the group and a nonempty reference pool of observed windows from that group:
Each element is an observed example of style , with a representation of , the union is the reference bank, and the groups form the style repertoire. The repertoire is coherent if windows within a group share motion characteristics, windows from different groups are distinguishable, and consecutive windows of a recording share an assignment while the underlying motion pattern persists. A coherent grouping of need not be unique, and the metrics to measure it are task- and robot-dependent. Neither the styles nor their number is known a priori.
Once a coherent style repertoire is established, it can be used for motion control. At time step , the robot receives an observation and a task command , where is the set of admissible commands. A style is selected by providing a reference , and the style-conditioned policy produces the action
The command specifies what the execution must achieve, and the reference specifies how the motion is performed.
Let denote a window of states executed by the robot for some . The achieved command sequence is , where maps an executed motion window to its sequence of command-relevant quantities. Deviations are measured by a command distance and a style distance , with tolerances and . Ideally, compares the style characteristics and disregards differences attributable to the command.
The policy displays command fidelity for a reference r if it tracks every admissible command,
and style fidelity for a command u if the executed motion preserves every selectable style,
Since the commands under which style k was recorded typically cover only a subset of U, the two properties jointly require generalization beyond the recorded style-command combinations.
Given a motion collection , our goal is to find a coherent style repertoire and a policy that displays command and style fidelity for all and .
III. PROPOSED FRAMEWORK
In this section, we detail CODES, our proposed framework for integrating motion representation, style discovery, and compositional control. As outlined in Figure 1, the pipeline begins by mapping motion recordings onto the target robot. Weakly-supervised encoders are then used to construct a consensus representation, from which the style repertoire and its reference bank are identified via density-based clustering. Finally, a style-conditioned policy combines the selected style with an independently specified task command. We detail each step in the following subsections.
A. Retargeting to the Target Robot
To obtain comparable, executable motion examples, CODES maps each recorded window through a preparation map ,
The preparation map has two requirements: all outputs use common state coordinates, units, and sampling rate, and each output is kinodynamically feasible for the target robot. These requirements make different sources comparable and ground the discovered styles in executable motion, supporting commandability in Eq. (4). Recordings that already satisfy them use the identity map. CODES otherwise does not prescribe how is realized; depending on the source and target embodiments, it may use inverse-kinematic [16] or kino-dynamic [15] mappings, key-body correspondence [17], interaction meshes [18], or physics-based imitation [8], [19].
B. Weakly-Supervised Motion Representation
A style representation should describe motion over time while preserving differences within broad behavior categories. Fixed-duration windows capture local coordination without treating an entire recording as one style. We use a compact one-dimensional temporal convolutional network (TCN) [20] to map each window to a fixed-dimensional code that can be compared for clustering and supplied to control. Supervised contrastive learning can admit solutions in which each class collapses to a single representation [21], discarding information needed for finer distinctions [22]. Reconstruction and instance contrast retain motion detail, while balanced coarse-label guidance organizes the representation without prescribing the final groups. The labels enter the training objective rather than the encoder input.
Specifically, we train an ensemble of M encoders using the same data and objective but different random initializations. Each encoder applies three TCN blocks to the motion window, followed by temporal mean and maximum pooling and an MLP, with parameters . Its d-dimensional output is normalized to the unit sphere
Here, indexes the encoders. During training, each encoder and its decoder use a loss that combines reconstruction and contrastive terms,
with nonnegative weights. Reconstruction preserves the motion within each window; instance contrast encourages robustness to perturbations while distinguishing windows; and coarse-label attraction and separation provide broad behavioral guidance.
The decoder reconstructs the clean, normalized window X from each of its two augmented views, producing . The weighted reconstruction loss is
Here is the mean element-wise smooth- error, denotes the difference between consecutive frames, and brackets average over sampled windows and both augmented views. The terms preserve configurations and frame-to-frame changes, as in motion reconstruction [23] and velocity reconstruction [4].
uses symmetric NT-Xent [24] with temperature-scaled cosine similarity between unit-normalized codes. Two views of each window, independently perturbed by channel gain, channel dropout, and Gaussian noise, form the positive pair; views of other windows are negatives, promoting robustness but potentially separating similar motions.
We address this drawback with the last two loss terms using the labels. Let indices and denote augmented views with inherited coarse labels and annotation confidences . The attraction term uses supervised contrastive learning [25], with views of other windows sharing the same known label as positives. Positive contributions are weighted by to obtain , while all other views in the batch remain in the contrastive denominator. This gives the attraction loss
where the multiplier scales inversely with class support to prevent over-compressing frequent, coarse classes while boosting rare ones.
Conversely, the separation term penalizes different-label pairs only if their cosine similarity exceeds a margin :
where and pair weights depend on class window counts . This margin ignores moderately similar pairs, shaping the representation without overly constraining downstream clustering. Unknown windows contribute to reconstruction and instance contrast, but not to the coarse-label attraction or separation terms.
C. Consensus Geometry and Style Decomposition
Because density clustering is sensitive to local neighborhoods, which vary with random initialization, we aggregate affinities across the encoder ensemble to form a robust geometry [26]. For windows i and j, we concatenate the M encoder outputs into a unit-norm consensus code, ensuring its inner product exactly equals the mean affinity:
(12)
Because neither the number of styles nor the assignment of every window is known in advance, we apply HDBSCAN [27], a hierarchical density-based clustering method, to the consensus geometry. Since consensus codes have unit norm, the Euclidean distance used for density clustering is entirely determined by the mean cosine affinity .
HDBSCAN operates exclusively on these consensus codes without coarse labels, recording identities, or manual merging, allowing the number of styles to emerge naturally from the data. This produces the partial assignment of Section II, where marks windows lacking sufficient density support. Each discovered group defines a reference pool from its consensus codes, collectively establishing the reference bank used for downstream control.
D. Style-Conditioned Composition
CODES conditions the policy in Eq. (3) on a selected consensus code, , and an independent task command . Codes are computed from retargeted windows through Eqs. (7) and (12). The encoders are frozen, and reference codes are stored before policy training.
Consensus similarity compares motion windows; a conditional adversarial motion prior (AMP) [9] supplies a training reward for individual transitions. Its discriminator distinguishes reference from policy transitions, conditioned on the selected code. Reference transitions are sampled independently of the execution phase, so no frame-by-frame alignment or online window encoding is required.
Command tracking and reference compatibility can favor different executions. We train the policy with proximal policy optimization (PPO) using the gated reward
where rewards transitions the discriminator judges consistent with the selected reference data, rewards command tracking, and contains robot-specific regularization. The logistic gate is
with floor , midpoint , and width . Higher AMP rewards smoothly increase the tracking contribution, while the floor retains a tracking incentive at low scores. The additive AMP term rewards reference compatibility independently of tracking accuracy.
During training, references are paired with recording-derived commands and commands sampled independently from U, exposing the policy to combinations absent from the recordings. References and commands remain independently selectable at execution.
IV. CASE STUDY: QUADRUPED MOTION CONTROL
We instantiate and evaluate our framework using a quadrupedal robot as the target platform. Quadrupeds possess a highly redundant and expressive action space, making them an ideal testbed for style discovery and compositional robot control.
The collection combines policy rollouts based on Kine2Go reference motions [28] originating from dogs, horses, and other robot platforms, with motion-capture recordings of a Unitree Go2 teleoperated using its built-in controller. The motion styles are learned over the robot state projected into its local frame with and defined as
Here, is the base height; represents the orientation of the base with yaw removed, to not include global orientation bias; and are base linear and angular velocities; and stacks the four foot positions relative to the base. These orientation, velocity, and foot quantities use yaw-normalized coordinates. The vectors and contain the 12 joint positions and velocities.
Across these sources, the corpus contains 53 trajectories, 40 Kine2Go policy rollouts, and 13 teleoperated recordings, comprising 59,247 frames (16.5 minutes of motion) sampled at 60 Hz, giving and a 2 s context. From these, we extract 10,661 overlapping two-second windows of frames, with successive window starts spaced five frames apart. The coarse annotations are . All recordings participate in representation learning and clustering, with no decomposition train/test split. Weak supervision from five broad behavior categories leads to a learned representation in which density clustering identifies 16 style groups.
Style discovery uses an ensemble of encoders with latent dimension , loss weights , contrastive temperature , and cosine-similarity threshold ; HDBSCAN uses excess-of-mass selection with minimum cluster size 80 and minimum samples 17.
The task command specifies target body-frame planar velocities and yaw rate:
The robot observation is
Here, is base angular velocity, is projected gravity, is the default joint configuration, is joint velocity, and is the previous action. The estimates and give the base height and linear velocity. Superscript denotes body coordinates.
The actor outputs at 50 Hz while training physics runs at 200 Hz; a low-level PD controller tracks with an action scale of 0.15 rad and gains , . Height is measured using a downward-facing time-of-flight (ToF) sensor, while velocity is estimated using a contact-aided invariant extended Kalman filter (InEKF) [29]. During policy training, the InEKF is driven by simulated IMU measurements, joint kinematics, and foot contacts.
The reference pools of Eq. (2) are formed within each cluster-recording pair by ranking windows by cosine similarity to the cluster mean and greedily retaining anchors at least frames apart. This yields 335 non-overlapping references with stored consensus codes. During training, styles are sampled uniformly, their supporting recordings are balanced, and the selected reference is held for or until reset.
The command term of Eq. (13) is instantiated by a velocity-tracking score. We compare the body-frame velocities measured at with the command at time ,
where is the component of on axis , and and are its weight and error scale. We use , m/s, m/s, and rad/s; the gate parameters are , with post-ramp weights and . The auxiliary term combines actuation and contact regularization with a reward matching the selected reference's base-height mean and variation.
V. EXPERIMENTAL EVALUATION
Our evaluation addresses three questions. First, whether weakly supervised consensus discovery yields a compact and kinematically coherent style repertoire, which we assess through ablations of the representation loss and comparisons against label-free and discrete alternatives (Sec. V-A). Second, whether a single style-conditioned policy attains command fidelity across the repertoire (Sec. V-B) while preserving the motion characteristics of the selected reference as the command varies, including beyond the estimated recorded support of that style (Sec. V-C). Third, whether the resulting behavior persists outside the simulator used for training, which we examine through cross-simulator rollouts and onboard deployment (Sec. V-D).
A. Repertoire Coherence
Coherence requires distinguishable motion groups and consistent assignments. All comparisons use the same 53 recordings and 10,661 two-second windows, without a train/test split. We evaluate representation quality through repertoire size, total groups and effective count , where ; discounts sparsely occupied groups. We also consider coverage (fraction of non-rejected windows) and core switches to measure temporal fragmentation. Core switches count changes between successive assigned windows within two seconds, bridging short noise gaps but excluding transitions into or out of noise.
TABLE I DECOMPOSITION ABLATIONS AND BASELINES
| Method | Loc. | Coverage | Core switches | ||
|---|---|---|---|---|---|
| K | K | (%) | (/min) | ||
| CODES (ours) | 16 | 10.19 | 12 | 72.8 | 1.36 |
| Loss ablations | |||||
| No coarse () | 15 | 8.92 | 10 | 90.8 | 0.79 |
| Separation only () | 15 | 7.40 | 9 | 91.3 | 1.01 |
| Uniform attraction () | 7 | 3.42 | 7 | 95.9 | 0.00 |
| No reconstruction () | 3 | 1.20 | 3 | 93.6 | 0.00 |
| Alternative representations | |||||
| Kinematic PCA | 39 | 30.00 | 30 | 84.1 | 3.02 |
| TS2Vec consensus | 41 | 24.39 | 31 | 96.7 | 0.14 |
Balanced guidance prevents collapse. Table I evaluates variations of our representation loss, Eq. (8). Without reconstruction, the repertoire collapses to just 3 groups (), while uniform attraction reduces it to 7.40. Both configurations sacrifice critical behavioral diversity. Conversely, the full CODES objective actively preserves a compact, semantically meaningful repertoire: 12 locomotion-dominant groups alongside distinct idle, jump, sit, and lie behaviors. By balancing attraction using confidence-weighted distributions, CODES avoids mode collapse while maintaining a highly reliable core (coverage of ).
Consensus drives stability. Our multi-encoder ensemble is fundamental to maintaining consistent temporal similarities. A single encoder yields unstable clustering (4.6 groups, 8.7% coverage) and weak pairwise similarity correlation (0.539). Leveraging the full ensemble drives this correlation to 0.985, demonstrating that consensus inherently stabilizes window-to-window similarities and produces robust partition boundaries.
Comparison with alternative representations. We compare against Kinematic PCA, which clusters fixed posture and motion statistics; TS2Vec [30], a label-free temporal representation; and VQ-VAE [14], a discrete codebook alternative. The label-free Kinematic PCA and TS2Vec [30] baselines produce substantially larger repertoires, with 39–41 groups compared with 16 for CODES (Table I). Kinematic assignments also switch more frequently (3.02 versus 1.36 switches per minute). In contrast, the discrete VQ-VAE baseline [14] exhibits pronounced codebook underutilisation: only 17 of 256 codes are active, with 51.5% of all windows assigned to a single code ( ).
Superior kinematic coherence. Table II evaluates assignment coherence in a label-independent, 32-dimensional kinematic PCA space. Silhouette [31] measures within-group cohesion and between-group separation, while cross-recording
TABLE II COHERENCE IN A COMMON KINEMATIC SPACE
| Method | Coverage (%) | Silhouette | Cross-recording AUC |
|---|---|---|---|
| CODES (ours) | 72.8 | 0.329 | 0.832 |
| No coarse terms | 90.8 | 0.264 | 0.826 |
| VQ-VAE | 100.0 | -0.043 | 0.562 |
| Coverage and balance controls | |||
| CODES, full coverage | 100.0 | 0.246 | 0.790 |
| VQ-VAE, balanced | 100.0 | 0.022 | 0.680 |
AUC [32] tests whether same-group motion characteristics recur across different recordings.
CODES achieves higher kinematic coherence than VQ-VAE, with a silhouette score of 0.329 and a cross-recording AUC of 0.832, compared with -0.043 and 0.562, respectively.
To separate the effect of sample rejection from representation quality, we additionally assign every non-core window to its nearest CODES prototype, giving 100% coverage. Under this forced assignment, CODES retains a silhouette score of 0.246 and an AUC of 0.790, indicating that the improvement is not solely attributable to HDBSCAN rejection.
Ultimately, CODES provides a compact, kinematically differentiated repertoire. By combining coarse guidance with multi-encoder consensus, it yields robust representations that strictly outperform standard label-free and discrete alternatives, paving the way for reliable downstream control. Visualizations of CODES and baseline styles are on the project website.
B. Command Fidelity
Controller comparisons test coarse guidance through the no-coarse-terms ablation and discrete conditioning through VQ-VAE. All policies use the same training protocol: 20,000 iterations from scratch with 4,096 environments and the PPO, reward, observation, and reference-sampling setup of Section IV. Hidden layers are unchanged; input widths accommodate 160-dimensional consensus or 32-dimensional quantized codes. Each policy uses its own decomposition's reference bank. Baseline comparisons are conducted only in Isaac Sim; cross-simulator and hardware evaluation is limited to CODES.
Tracking measure and trials. Command fidelity is measured by planar and yaw-rate RMSE over trial 's scored interval :
where , , and are measured minus commanded body-frame velocities, as in Eq. (18). The command distance in Eq. (4) is
TABLE III COMMAND FIDELITY IN SIMULATION AGAINST BASELINES
| Dictionary | K | Median (m/s) ↓ | Complete (%) ↑ | Success (%) ↑ |
|---|---|---|---|---|
| CODES (ours) | 16 | 0.114 | 98.1 | 74.2 |
| No coarse terms | 15 | 0.106 | 99.3 | 89.8 |
| VQ-VAE | 17 | 0.142 | 99.2 | 66.8 |
With , a successful trial completes its full duration with planar RMSE at most and yaw-rate RMSE at most . Continuous RMSE and completion are also reported separately.
Each dictionary entry is tested through one reference at 135 command pairs: forward velocity from to in steps, lateral velocity from to in steps, and zero yaw rate. Each pair uses three reset seeds and trials; excludes the first for settling.
Figure 2 shows two axis-aligned slices of the full command grid. The forward sweep varies with , whereas the lateral sweep varies with . Each cell gives the success fraction over three trials; crosses mark early termination. Orange outlines enclose of the smoothed recorded-velocity probability, weighting recordings equally. They indicate typical recorded commands, not success thresholds or policy-training boundaries.
CODES attains median planar RMSE 0.114 m/s and 74.2% success across 6,480 trials, versus 89.8% success without coarse terms and 66.8% for VQ-VAE (Table III). In the forward sweep, tracking is strongest at low and moderate speeds, degrading for several references above approximately 2.25 m/s. The no-coarse ablation therefore has stronger aggregate command metrics, including median planar RMSE of 0.106 m/s. Each policy uses its own reference bank, so these results do not isolate a command-tracking tradeoff for identical requested motions.
C. Style Fidelity Under Command Changes
Reference consensus cosine assesses style fidelity using the frozen encoders and the consensus similarity of Eq. (12):
Here is the two-second rollout window ending at , normalized as in discovery, and is the target-robot window of reference . Higher cosine indicates closer resemblance; is a reference-distance proxy for Eq. (5). Scores are averaged over , excluding windows spanning a reference switch. Figure 2(b) averages the three trial scores per cell, reporting similarity continuously rather than thresholding style success.
Within and beyond the estimated recorded support, respectively, mean cosine is 0.271 and 0.156 for the forward sweep, and 0.351 and 0.219 for the lateral sweep. The corresponding command-success rates are and forward, and and lateral. Thus, command tracking extends beyond recorded support in both directions, although reference resemblance decreases on average.
(a) Command fidelity
(b) Style fidelity

Fig. 2. Command and style fidelity across forward and lateral velocity sweeps, with the other commanded components set to zero. (a) Fraction of three trials satisfying the completion and tracking criteria. (b) Mean reference consensus cosine, shown on an asinh scale clipped below -0.1. In reviewed rollouts, values near 0.5 usually retain recognizable reference posture and limb coordination, whereas values near 0 show weaker resemblance; this learned score is not a calibrated perceptual distance. Orange outlines show estimated recorded support; crosses mark early termination. Tracking extends beyond support, but reference resemblance decreases.

Fig. 3. Style switching on hardware under a fixed task command. Deployment of the CODES policy on the Unitree Go2 at a constant 0.5 m/s forward command with zero lateral and yaw-rate components, while the selected reference switches among C04, C00, C14, and C11. The colored band indicates the active style, and dashed lines the switch instants. The policy, reference bank, and state estimation run onboard, without external motion capture or offboard inference. The top row shows a time-lapse composite of the traversal, with numbered markers at successive instants of the run. The panels below report, from top to bottom, the estimated and commanded forward velocity ; the reference consensus cosine of Eq. (21) with respect to the active reference; the base-relative height of the four feet (FL, FR, RL, RR); and the kinematically inferred contact states. The command is identical across all four segments, while foot-swing amplitude, contact timing, and base posture differ, indicating that the reference changes how the command is executed rather than which command is tracked. Videos of the hardware execution are provided on the project website.
Consensus cosine reflects velocity as well as posture and coordination, so it is not command-independent. The physical traces in Figure 3 complement this measure by showing distinct postures and foot motions at a fixed forward command: the reference changes how the command is executed.
D. Cross-Simulator and Hardware Execution
The policy, reference bank, and state estimation run onboard the robot’s Jetson, without external motion capture or offboard inference. The policy is further fine-tuned for 2,000 iterations with joint targets clipped to 0.025 rad within the physical limits, matching the safeguard used during deployment.
Figure 3 shows a completed Go2 mission at a fixed forward command of 0.5 m/s. Switching through C04, C00, C14, and C11 changes posture and foot-motion amplitude and timing; C04 remains lower than C00 and C14. Onboard velocity estimation and kinematic contact inference are described in Section IV. A MuJoCo rollout with the same checkpoint and reference sequence exhibits corresponding motion changes, supporting cross-simulator transfer for these references.
VI. Conclusion
We presented CODES, a framework that discovers motion styles from heterogeneous recordings and conditions a robot controller on a selected style and an independently specified feasible command. Retargeting grounds discovery in executable motion, while consensus encoding and density clustering produce a repertoire without prescribing its size. On the Go2, CODES achieved higher common-space kinematic coherence than its no-coarse ablation and the VQ-VAE baseline. The controller tracked velocity commands beyond the styles' estimated recorded support and produced reference-dependent motion changes in simulation and hardware.
The evaluation also exposes limitations: the no-coarse controller achieved higher command success on its own reference bank, and reference consensus cosine declined outside recorded support. These findings motivate command-independent measures of style fidelity and automatic reference selection [33], [14]. Future work should also examine transfer across robots and multi-robot coordination, where multiple group motion patterns may accomplish the same task but be difficult to specify analytically.
REFERENCES
[1] G. B. Margolis and P. Agrawal, “Walk these ways: Tuning robot control for generalization with multiplicity of behavior,” in Proceedings of the 6th Conference on Robot Learning, ser. Proceedings of Machine Learning Research, vol. 205. PMLR, 2023, pp. 22–31.
[2] G. Bellegarda, M. Shafiee, and A. Ijspeert, “AllGaits: Learning all quadruped gaits and transitions,” in 2025 IEEE International Conference on Robotics and Automation (ICRA), 2025, pp. 15929–15935.
[3] H. Zhang, S. Starke, T. Komura, and J. Saito, “Mode-adaptive neural networks for quadruped motion control,” ACM Transactions on Graphics, vol. 37, no. 4, pp. 145:1–145:11, 2018.
[4] F. Zargarbashi, D. Agrawal, J. Buhmann, M. Guay, S. Coros, and R. W. Sumner, “VQ-Style: Disentangling style and content in motion with residual quantized representations,” Computer Graphics Forum, p. e70377, 2026.
[5] A. I. Hsu and E. A. Yttri, “B-SOiD, an open-source unsupervised algorithm for identification and fast prediction of behaviors,” Nature Communications, vol. 12, p. 5188, 2021.
[6] K. Luxem, P. Mocellin, F. Fuhrmann, J. Kürsch, S. R. Miller, J. J. Palop, S. Remy, and P. Bauer, “Identifying behavioral structure from deep variational embeddings of animal motion,” Communications Biology, vol. 5, p. 1267, 2022.
[7] C. Weinreb, J. E. Pearl, S. Lin, et al., “Keypoint-MoSeq: Parsing behavior by linking point tracking to pose dynamics,” Nature Methods, vol. 21, no. 7, pp. 1329–1339, 2024.
[8] X. B. Peng, P. Abbeel, S. Levine, and M. van de Panne, “DeepMimic: Example-guided deep reinforcement learning of physics-based character skills,” ACM Transactions on Graphics, vol. 37, no. 4, pp. 143:1–143:14, 2018.
[9] X. B. Peng, Z. Ma, P. Abbeel, S. Levine, and A. Kanazawa, “AMP: Adversarial motion priors for stylized physics-based character control,” ACM Transactions on Graphics, vol. 40, no. 4, 2021.
[10] E. Vollenweider, M. Bjelonic, V. Klemm, N. Rudin, J. Lee, and M. Hutter, “Advanced skills through multiple adversarial motion priors in reinforcement learning,” in 2023 IEEE International Conference on Robotics and Automation (ICRA), 2023, pp. 5120–5126.
[11] X. B. Peng, Y. Guo, L. Halper, S. Levine, and S. Fidler, “ASE: Large-scale reusable adversarial skill embeddings for physically simulated characters,” ACM Transactions on Graphics, vol. 41, no. 4, 2022.
[12] C. Tessler, Y. Kasten, Y. Guo, S. Mannor, G. Chechik, and X. B. Peng, "CALM: Conditional adversarial latent models for directable virtual characters," in ACM SIGGRAPH 2023 Conference Proceedings, 2023.
[13] Q. Zhu, H. Zhang, M. Lan, and L. Han, “Neural categorical priors for physics-based character control,” ACM Transactions on Graphics, vol. 42, no. 6, pp. 178:1–178:16, 2023.
[14] L. Han, Q. Zhu, J. Sheng, et al., “Lifelike agility and play in quadrupedal robots using reinforcement learning and generative pre-trained models,” Nature Machine Intelligence, vol. 6, no. 7, pp. 787–798, 2024.
[15] D. Kang, J. Cheng, F. Zargarbashi, T. Yoon, S. Choi, and S. Coros, "Walk like dogs: Learning steerable imitation controllers for legged robots from unlabeled motion data," 2025, arXiv:2507.00677 [cs.RO]. [Online]. Available: https://arxiv.org/abs/2507.00677
[16] X. B. Peng, E. Coumans, T. Zhang, T.-W. E. Lee, J. Tan, and S. Levine, "Learning agile robotic locomotion skills by imitating animals," in Robotics: Science and Systems, 2020.
[17] J. P. Araújo, Y. Ze, P. Xu, J. Wu, and C. K. Liu, “Retargeting matters: General motion retargeting for humanoid motion tracking,” 2025. [Online]. Available: https://arxiv.org/abs/2510.02252
[18] L. Yang, X. Huang, Z. Wu, A. Kanazawa, P. Abbeel, C. Sferrazza, C. K. Liu, R. Duan, and G. Shi, “OmniRetarget: Interaction-preserving data generation for humanoid whole-body loco-manipulation and scene interaction,” 2025. [Online]. Available: https://arxiv.org/abs/2509.26633
[19] X. B. Peng, “MimicKit: A reinforcement learning framework for motion imitation and control,” 2025. [Online]. Available: https://arxiv.org/abs/2510.13794
[20] S. Bai, J. Z. Kolter, and V. Koltun, “An empirical evaluation of generic convolutional and recurrent networks for sequence modeling,” arXiv preprint arXiv:1803.01271, 2018. [Online]. Available: https://arxiv.org/abs/1803.01271
[21] F. Graf, C. Hofer, M. Niethammer, and R. Kwitt, “Dissecting supervised contrastive learning,” in Proceedings of the 38th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 139. PMLR, 2021, pp. 3821–3830.
[22] D. Y. Fu, M. F. Chen, M. Zhang, K. Fatahalian, and C. Ré, “The details matter: Preventing class collapse in supervised contrastive learning,” Computer Sciences & Mathematics Forum, vol. 3, no. 1, p. 4, 2022.
[23] J. Zhang, Y. Zhang, X. Cun, Y. Zhang, H. Zhao, H. Lu, X. Shen, and Y. Shan, “Generating human motion from textual descriptions with discrete representations,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023, pp. 14730–14740.
[24] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations,” in Proceedings of the 37th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 119. PMLR, 2020, pp. 1597–1607.
[25] P. Khosla, P. Teterwak, C. Wang, A. Sarna, Y. Tian, P. Isola, A. Maschinot, C. Liu, and D. Krishnan, “Supervised contrastive learning,” in Advances in Neural Information Processing Systems, vol. 33, 2020, pp. 18661–18673.
[26] A. Strehl and J. Ghosh, “Cluster ensembles—a knowledge reuse framework for combining multiple partitions,” Journal of Machine Learning Research, vol. 3, pp. 583–617, 2002.
[27] L. McInnes, J. Healy, and S. Astels, “hdbscan: Hierarchical density based clustering,” Journal of Open Source Software, vol. 2, no. 11, p. 205, 2017.
[28] W. Palucki, P. Siwak, K. Ciebiera, and M. Cygan, “Kine2Go: Kinematic dataset for the Unitree Go2 robot with diverse gaits and motions,” 2026, arXiv:2606.14433 [cs.RO]. [Online]. Available: https://arxiv.org/abs/2606.14433
[29] R. Hartley, M. Ghaffari, R. M. Eustice, and J. W. Grizzle, “Contact-aided invariant extended Kalman filtering for robot state estimation,” The International Journal of Robotics Research, vol. 39, no. 4, pp. 402–430, 2020.
[30] Z. Yue, Y. Wang, J. Duan, T. Yang, C. Huang, Y. Tong, and B. Xu, “TS2Vec: Towards universal representation of time series,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 36, 2022, pp. 8980–8987.
[31] P. J. Rousseeuw, “Silhouettes: A graphical aid to the interpretation and validation of cluster analysis,” Journal of Computational and Applied Mathematics, vol. 20, pp. 53–65, 1987.
[32] T. Fawcett, “An introduction to ROC analysis,” Pattern Recognition Letters, vol. 27, no. 8, pp. 861–874, 2006.
[33] H. Fu, H. Dong, W. Xu, Z. Zhou, G. Deng, K. Tang, D. Dong, and C. Chen, “Learning diverse natural behaviors for enhancing the agility of quadrupedal robots,” Nature Communications, vol. 17, no. 1, p. 5857, 2026.