betaFeedback

WorksComputer Science

Multi-CONDOR: Learning Multistable Motion Primitives from Demonstration

Abstract

Dynamical-system-based motion policies provide a framework for learning reactive robot motions with stability and convergence properties. Many manipulation tasks, however, admit several distinct goals or a continuous set of acceptable outcomes, requiring motion primitives that preserve these alternatives. Accommodating both goal structures within a unified framework with continuous, autonomous dynamics remains an open challenge. We propose a CONDOR-based framework, multi-CONDOR, for learning motion primitives with either multiple discrete attractors or a continuous attracting goal contour. The approach combines imitation learning with losses that encourage agreement between the learned task dynamics and latent reference systems encoding the desired attraction structure. We provide a Lyapunov-based analysis of the convergence properties of the learned motion dynamics. We evaluate the framework on simulated benchmarks with discrete goals, qualitative examples with continuous goal contours, and robotic grasping experiments. In simulation, multi-CONDOR reduces trajectory RMSE by approximately 72% compared with separately learned single-goal motion primitives selected by a state machine. For tasks with two and three goals, respectively, it reduces the fraction of evaluated initial states ending outside the goal tolerance from StableNODE's 0.31% and 7.29% to 0% in both settings. Experiments with a Franka Emika robot arm demonstrate successful grasping of a container by either of its two handles using motions learned from demonstrations. Together, these results show multi-CONDOR combines motion reproduction with the flexibility to converge to alternative valid outcomes.

Introduction

Imitation learning enables robots to acquire motion skills from demonstrations, providing an accessible way to adapt their behavior to new tasks. This capability is increasingly valuable as robots enter environments where tasks vary and frequent manual programming is impractical. General approaches, including generative methods such as diffusion policies [1], can represent complex behaviors, but may require substantial demonstration data [2] and do not inherently provide stability or convergence guarantees.

Dynamical systems provide an established framework for learning motion primitives with stability and convergence properties. Dynamic movement primitives (DMPs) reproduce demonstrated motions using an internal phase variable that governs their progression [3]. If this phase advances while physical interaction slows or blocks the robot [4], the resulting mismatch can induce unnatural catch-up motions [5]. Other approaches learn autonomous vector fields that determine motion directly from the current task state, without an independent time or phase reference [6, 7, 8, 9].

Standard point-to-point motion primitives typically encode convergence to a single prescribed goal [3, 10]. Many manipulation tasks instead admit multimodal goal behavior: a robot may grasp a container at either of two handles. Other tasks admit a continuum of acceptable outcomes, such as grasping at any admissible point along its rim. Selecting one endpoint in advance discards alternatives that may be easier to reach from the current configuration or after a disturbance. A disturbance can then redirect the motion toward another valid goal, allowing the robot to complete the task without returning to the originally selected endpoint. Motion primitives should therefore capture both the demonstrated approach behavior and the freedom to converge to multiple isolated goals or a continuous goal set.

Initial work has addressed the discrete multistable case. Augmented-SVM combines motion dynamics through learned partitions of the state space and modulates their vector fields to preserve the associated attraction regions [11]. StableNODE learns latent dynamics with multiple attractors using a corrective term derived from an energy function [12]. These approaches demonstrate motion generation toward distinct goals, but do not provide a unified framework for learning continuous, autonomous motion dynamics with both multiple discrete attractors and continuous attracting goal sets.

We propose a unified framework for learning motion primitives with continuous, autonomous dynamics and either multiple discrete attractors or a continuous attracting goal contour. Building on CONDOR [8], we learn a task-space vector field together with an encoding into a latent space equipped with reference dynamics representing the desired attraction structure. We introduce two reference systems: a Gaussian potential for multiple isolated goals and a radially attracting circle for a continuous goal contour. We establish sufficient conditions for convergence to our desired set through Lyapunov analysis, and formulate training losses that

This work was supported by the European Union’s Horizon Europe program through the EIC EMERGE project (Grant Agreement No. 101070918).

*These authors contributed equally to this work.

†Corresponding author. encourage these conditions alongside an imitation objective. The resulting framework learns motion toward alternative admissible goals directly from the current state.

We evaluate the framework on two-dimensional demonstration datasets with two and three discrete goals, measuring trajectory reproduction and convergence from initial states distributed throughout the workspace. We further examine continuous goal contours through qualitative examples and demonstrate robotic grasping with multiple admissible grasping locations. Together, these experiments assess the framework’s ability to reproduce demonstrated motions while accommodating discrete and continuous goal sets.

Methodology

Given motion demonstrations in a task domain T⊂RNx\mathcal{T} \subset\mathbb{R}^{N_x} and a set of admissible goals G⊂T\mathcal{G} \subset\mathcal{T}, we aim to learn an autonomous dynamical system

x˙=fθ(x),(1)\dot{x}=f_\theta(x), \tag*{(1)}

that reproduces the demonstrated motion while approaching a goal in G\mathcal{G}. We consider both multiple isolated goals and a continuous attracting goal contour. The velocity depends only on the current state, with no explicit dependence on time or a phase variable, so the eventual goal is determined by the dynamics from the current state.

We build on CONDOR [8], which represents the task dynamics as a neural network fθ=ϕθ∘ψθf_\theta=\phi_\theta\circ\psi_\theta. The encoder ψθ:T→RNy\psi_\theta:\mathcal{T}\to\mathbb{R}^{N_y} maps a task state xx to a latent state y=ψθ(x)y=\psi_\theta(x), and ϕθ:RNy→RNx\phi_\theta:\mathbb{R}^{N_y}\to\mathbb{R}^{N_x} maps this latent state to a task velocity. CONDOR trains the encoded task trajectories to follow prescribed latent reference dynamics y˙=fC(y)\dot{y}=f_\mathcal{C}(y) with a single asymptotically stable equilibrium. We extend this framework by introducing two reference systems that encode either multiple discrete attractors or a continuous attracting contour.

Training combines an imitation objective with a stability loss comprising trajectory matching and separation to discourage collapsed encodings. The task dynamics inherit convergence properties of the reference system under the conditions developed below, and our approach is summarized in Figure 1. We first introduce the stability loss (§ 2-A) and the convergence conditions (§ 2-B), then present the two reference systems and their additional losses (§ 2-C and II-D), and finally give the imitation loss and complete training objectives (§ 2-E).

Overview of multi-CONDOR

Figure 1. Overview of multi-CONDOR: an encoder ψ\psi maps task states x(t)x(t) to latent states y(t)y(t), and a function ϕ\phi maps these to task velocities x˙(t)\dot{x}(t). Both are jointly trained as parts of a single neural network. Training aligns the encoded task dynamics with prescribed latent reference dynamics featuring multiple attractors (shown above “Latent space”), encouraging the learned vector field to inherit their multistability while reproducing the demonstrations D\mathcal{D}.

Stability loss

We sample BsB^{s} initial states x0,bx_{0,b} uniformly from T\mathcal{T} and roll out the task and reference dynamics for HsH^{s} steps with time step Δt\Delta t. Using y0,bC=ψθ(x0,b)y^{\mathcal{C}}_{0,b}=\psi_\theta(x_{0,b}), the rollouts are

xt,b=xt−1,b+Δt fθ(xt−1,b),yt,bC=yt−1,bC+Δt fC(yt−1,bC).(2)x_{t,b}=x_{t-1,b}+\Delta t\,f_\theta(x_{t-1,b}), \\ y^{\mathcal{C}}_{t,b}=y^{\mathcal{C}}_{t-1,b}+\Delta t\,f_\mathcal{C}(y^{\mathcal{C}}_{t-1,b}). \tag*{(2)}

The matching loss encourages the encoded task trajectories yt,bT=ψθ(xt,b)y^{\mathcal{T}}_{t,b}=\psi_\theta(x_{t,b}) to follow the reference dynamics and reproduce their intended attraction behavior by penalizing differences between the two rollouts (Figure 2):

Matching loss for two sampled initial task states

Figure 2. Matching loss for two sampled initial task states x0,bx_{0,b}. Encoded task rollouts yt,bT=ψθ(xt,b)y^T_{t,b} = \psi_\theta(x_{t,b}) are compared with reference rollouts yt,bCy^C_{t,b} initialized at the same latent state ψθ(x0,b)\psi_\theta(x_{0,b}).

ℓmatch=1BsHs∑b=0Bs−1∑t=1Hs∥yt,bC−yt,bT∥2.(3)\ell_{\mathrm{match}}=\frac{1}{B^{s}H^{s}}\sum_{b=0}^{B^{s}-1}\sum_{t=1}^{H^{s}}\left\lVert y^{\mathcal{C}}_{t,b}-y^{\mathcal{T}}_{t,b}\right\rVert^{2}. \tag*{(3)}

The matching loss alone admits collapsed encodings: mapping every task state to the same latent equilibrium makes it zero regardless of the task dynamics. We therefore introduce a separation loss that encourages distinct consecutive task states to remain distinguishable in latent space:

ℓsep=1BsHs∑b=0Bs−1∑t=1Hsmax⁡(0,m−∥yt,bT−yt−1,bT∥)2.(4)\ell_{\mathrm{sep}}=\frac{1}{B^{s}H^{s}}\sum_{b=0}^{B^{s}-1}\sum_{t=1}^{H^{s}}\max\left(0,m-\left\lVert y^{\mathcal{T}}_{t,b}-y^{\mathcal{T}}_{t-1,b}\right\rVert\right)^{2}. \tag*{(4)}

which penalizes consecutive latent states separated by less than a margin mm. The separation penalty remains active near equilibria, including the desired goals; a small margin limits its influence in these regions.

Our stability loss is

ℓstable=ℓmatch+ℓsep.(5)\ell_{\mathrm{stable}}=\ell_{\mathrm{match}}+\ell_{\mathrm{sep}}. \tag*{(5)}

Section II-B states sufficient conditions for convergence and relates them to these losses.

Conditions for multistable dynamics

Let Z={y:fL(y)=0}\mathcal{Z} = \{y : f_L(y) = 0\} denote the latent equilibrium set. The following theorem transfers convergence to the task space through the encoder; both reference systems introduced below admit a function VCV_C satisfying its assumptions.

Theorem 1 (Transfer of convergence). Let T\mathcal{T} be compact and positively invariant under fθf_\theta, and let VCV_C be a C1C^1 function with V˙C(y)=∇VC(y)⊤fC(y)≤0\dot{V}_C(y) = \nabla V_C(y)^\top f_C(y) \le0, where V˙C(y)=0\dot{V}_C(y) = 0 only if fC(y)=0f_C(y) = 0. If the dynamics-matching condition

Jψθ(x)fθ(x)=fC(ψθ(x))for all x∈T,(6)J_{\psi_\theta}(x) f_\theta(x) = f_C(\psi_\theta(x)) \quad\text{for all } x \in\mathcal{T}, \tag*{(6)}

holds, where Jψθ=∂ψθ/∂xJ_{\psi_\theta} = \partial\psi_\theta/\partial x, then every task trajectory converges to the set E={x∈T:ψθ(x)∈Z}\mathcal{E} = \{x \in\mathcal{T} : \psi_\theta(x) \in\mathcal{Z}\}.

Proof. Let VT=VC∘ψθV_T = V_C \circ\psi_\theta. By the chain rule and (6),

V˙T(x)=∇VC(ψθ(x))⊤dψθ(x)dt=∇VC(ψθ(x))⊤∂ψθ(x)∂xx˙=∇VC(ψθ(x))⊤Jψθ(x)fθ(x)=∇VC(ψθ(x))⊤fC(ψθ(x))=V˙C(ψθ(x))≤0.(7)\begin{aligned} \dot{V}_T(x) &= \nabla V_C(\psi_\theta(x))^\top\frac{d\psi_\theta(x)}{dt} \\ &= \nabla V_C(\psi_\theta(x))^\top\frac{\partial\psi_\theta(x)}{\partial x}\dot{x} \\ &= \nabla V_C(\psi_\theta(x))^\top J_{\psi_\theta}(x) f_\theta(x) \\ &= \nabla V_C(\psi_\theta(x))^\top f_C(\psi_\theta(x)) \\ &= \dot{V}_C(\psi_\theta(x)) \le0. \tag*{(7)} \end{aligned}

Since T\mathcal{T} is compact and positively invariant, LaSalle’s invariance principle [13] implies that every task trajectory converges to the largest invariant set in {x:V˙T(x)=0}\{x : \dot{V}_T(x) = 0\}. Since V˙T(x)=V˙C(ψθ(x))=0\dot{V}_T(x) = \dot{V}_C(\psi_\theta(x)) = 0 if and only if ψθ(x)∈Z\psi_\theta(x) \in\mathcal{Z}, this set is contained in E\mathcal{E}.

To connect this convergence result to the desired goals, we seek an encoding that maps the goals onto the reference attractors. The reference dynamics can also contain unstable equilibria, such as the saddle between the two attractors in Figure 3. Task states mapped onto these equilibria also belong to E\mathcal{E}. We therefore seek an encoding for which the convergence set consists of the desired goals G\mathcal{G} and task states whose latent representations coincide with unstable equilibria of the reference dynamics,

Figure 3. Reference dynamics fLf_L in two dimensions: two isolated stable attractors (blue dots, left) and a continuous attracting circle (dashed blue line, right).

U={x∈T∖G:ψθ(x)∈Z∖ψθ(G)}.(8)\mathcal{U} = \{x \in\mathcal{T} \setminus\mathcal{G} : \psi_\theta(x) \in\mathcal{Z} \setminus\psi_\theta(\mathcal{G})\}. \tag*{(8)}

Remark 1 (Practical effect of unstable equilibria). Small perturbations along unstable directions drive trajectories away from an unstable task-space equilibrium. In physical robot systems, measurement noise and actuation or tracking errors typically introduce such perturbations, making persistent trapping at a saddle point unlikely in practice and allowing motion to continue toward a stable goal.

This motivates three requirements on the encoder:

(R1) G⊆E\mathcal{G} \subseteq\mathcal{E}: desired goals map to latent equilibria;

(R2) E⊆G∪U\mathcal{E} \subseteq\mathcal{G} \cup\mathcal{U}: the convergence set contains only the desired goals and task states mapped onto unstable latent equilibria;

(R3) ψθ\psi_\theta is one-to-one on G∪U\mathcal{G} \cup\mathcal{U}: distinct goals and task states mapped onto unstable latent equilibria have distinct latent representations.

Under (R1) and (R2), E=G∪U\mathcal{E} = \mathcal{G} \cup\mathcal{U}, so every task trajectory converges to this set. Requirement (R3) keeps goal encodings distinct and limits U\mathcal{U} to at most one task state per unstable latent equilibrium.

The matching loss (3) encourages the dynamics-matching condition (6), while the separation loss (4) discourages collapsed encodings along trajectories (R2). For discrete goals (Section II-C), the mapping loss (10) separates the Gaussian centers, promoting stable equilibria near the goal encodings (R1) and keeping these encodings distinct (R3). For goal contours (Section II-D), the curve loss (14) encourages goal encodings to lie on the attracting circle (R1) and other states to lie away from it (R2), while the orientation loss (15) keeps contour goal encodings distinct (R3).

Reference dynamics with discrete equilibria

Let yg=ψθ(xg)y_g = \psi_\theta(x_g) be the latent encoding of task goal xg∈Gx_g \in\mathcal{G}, g=1,…,Ngg = 1, \ldots, N_g. We define the reference dynamics as gradient ascent on a Gaussian potential:

P(y)=∑g=1Nge−∥y−ξg∥2,fC(y)=∇P(y).(9)P(y) = \sum_{g=1}^{N_g} e^{-\lVert y-\xi_g\rVert^2}, \qquad f_C(y) = \nabla P(y). \tag*{(9)}

With VC=−PV_C = -P, we obtain V˙C=−∥fC∥2≤0\dot{V}_C = -\lVert f_C\rVert^2 \le0, which vanishes only at latent equilibria, as Theorem 1 requires. Trajectories are bounded because the superlevel sets {y:P(y)≥c}\{y : P(y) \ge c\}, c>0c > 0, are compact and positively invariant.

In theory, closely spaced Gaussian centers can yield a single potential maximum. In practice, we prevent this by choosing fixed reference positions ξg\xi_g with sufficient separation to support distinct attractors and anchoring the goal encodings to these positions through the mapping loss,

ℓmap=1Ng∑g=1Ng∥yg−ξg∥2.(10)\ell_{\mathrm{map}} = \frac{1}{N_g}\sum_{g=1}^{N_g}\lVert y_g-\xi_g\rVert^2. \tag*{(10)}

This separation reduces the interaction between Gaussians and promotes stable equilibria near the goal encodings, supporting (R1), while keeping the goal encodings distinct, as required by (R3).

Reference dynamics with a continuous set of attraction

We represent the closed task-space goal contour G=C⊂T\mathcal{G} = \mathcal{C} \subset\mathcal{T} by an attracting latent circle. Partition the latent state as y=(u,z)y = (u, z), with u∈R2u \in\mathbb{R}^{2} and z∈RNy−2z \in\mathbb{R}^{N_y-2}, and define the Cartesian reference dynamics

u˙=β(1−∥u∥22)u,z˙=−z,(11)\dot{u} = \beta(1 - \lVert u \rVert_2^2)u,\qquad\dot{z} = -z, \tag*{(11)}

where β>0\beta> 0. These dynamics are smooth everywhere, including at u=0u = 0. For r=∥u∥2>0r = \lVert u \rVert_2 > 0, their polar interpretation is r˙=βr(1−r2)\dot{r} = \beta r(1-r^2) and α˙=0\dot{\alpha} = 0, where α\alpha is the latent angle. Thus, for u(0)≠0u(0) \ne0, the radius approaches one, the angle remains constant, and zz decays to zero, yielding convergence to the latent goal set

S={(u,z):∥u∥2=1, z=0}.(12)S = \{(u,z) : \lVert u \rVert_2 = 1,\ z = 0\}. \tag*{(12)}

The function

VC(y)=14(r2−1)2+12∥z∥22,(13)V_{\mathcal{C}}(y) = \frac{1}{4}(r^2 - 1)^2 + \frac{1}{2}\lVert z\rVert_2^2, \tag*{(13)}
V˙C(y)=−βr2(r2−1)2−∥z∥22≤0,\dot{V}_{\mathcal{C}}(y) = -\beta r^2(r^2 - 1)^2 - \lVert z\rVert_2^2 \le0,

satisfies the assumptions of Theorem 1: its derivative vanishes only on the equilibrium set S∪{0}S \cup\{0\}. Its compact, positively invariant sublevel sets ensure bounded trajectories. Initial states with u(0)=0u(0) = 0 converge to the unstable origin, whose task-space preimage forms U\mathcal{U}.

To place contour encodings at unit radius and separate non-goal encodings from the latent goal set SS, we introduce a curve loss. We sample contour points BC⊂C\mathcal{B}_{\mathcal{C}} \subset\mathcal{C} uniformly along the curve and form Bneg\mathcal{B}_{\mathrm{neg}} from non-goal points sampled both near the contour on either side and uniformly throughout the workspace. Write r(x)=∥u(ψθ(x))∥2r(x) = \lVert u(\psi_\theta(x)) \rVert_2 and z(x)=z(ψθ(x))z(x) = z(\psi_\theta(x)). The squared Euclidean distance from ψθ(x)\psi_\theta(x) to SS is dS(x)2=(r(x)−1)2+∥z(x)∥22d_S(x)^2 = (r(x) - 1)^2 + \lVert z(x) \rVert_2^2. We define

ℓcurve=1∣BC∣∑x∈BC(r(x)−1)2+1∣Bneg∣∑x∈Bnegmax⁡(0,ϵc−dS(x)2).(14)\ell_{\mathrm{curve}} = \frac{1}{\lvert\mathcal{B}_{\mathcal{C}}\rvert} \sum_{x \in\mathcal{B}_{\mathcal{C}}}(r(x)-1)^2 + \frac{1}{\lvert\mathcal{B}_{\mathrm{neg}}\rvert} \sum_{x \in\mathcal{B}_{\mathrm{neg}}}\max(0,\epsilon_c-d_S(x)^2). \tag*{(14)}

The first term encourages unit radius for contour encodings, while the matching loss (3) encourages their remaining coordinates to follow z˙=−z\dot{z}=-z and vanish as the task motion settles at a goal. Together, these losses encourage goal encodings to lie on SS, supporting (R1). The second term penalizes sampled non-goal encodings within a distance ϵc\sqrt{\epsilon_c} of SS, supporting (R2) alongside the separation loss (4).

Radial placement leaves the angular arrangement of contour encodings unspecified. To distinguish contour points, we order them along the curve and assign each xix_i a target angle α^i∈[−π,π)\hat{\alpha}_i \in[-\pi,\pi) during preprocessing. With target unit vectors u^i=(cos⁡α^i,sin⁡α^i)T\hat{u}_i = (\cos\hat{\alpha}_i,\sin\hat{\alpha}_i)^\mathsf{T}, the orientation loss is

ℓorient=1∣BC∣∑xi∈BC∥u(ψθ(xi))max⁡(r(xi),ϵ)−u^i∥22,(15)\ell_{\mathrm{orient}} = \frac{1}{\lvert\mathcal{B}_{\mathcal{C}}\rvert} \sum_{x_i \in\mathcal{B}_{\mathcal{C}}} \left\lVert \frac{u(\psi_\theta(x_i))}{\max(r(x_i),\epsilon)}-\hat{u}_i \right\rVert_2^2, \tag*{(15)}

where ϵ>0\epsilon> 0 is a small normalization constant that keeps the expression defined at r(xi)=0r(x_i)=0. Comparing unit-vector targets accounts for angle periodicity and encourages distinct contour goal encodings, supporting (R3).

Imitation loss and training objective

Following CONDOR [8], we encourage reproduction of the demonstrations through a multistep imitation loss. We sample BiB^i demonstration segments with states xt,bix^i_{t,b} and roll out the task dynamics for HiH^i steps from x^0,b=x0,bi\hat{x}_{0,b} = x^i_{0,b}:

x^t,b=x^t−1,b+Δt fθ(x^t−1,b).(16)\hat{x}_{t,b} = \hat{x}_{t-1,b} + \Delta t\, f_\theta(\hat{x}_{t-1,b}). \tag*{(16)}

The imitation loss is the mean squared trajectory error:

ℓIL=1BiHi∑b=0Bi−1∑t=1Hi∥xt,bi−x^t,b∥22.(17)\ell_{\mathrm{IL}} = \frac{1}{B^iH^i} \sum_{b=0}^{B^i-1} \sum_{t=1}^{H^i} \lVert x^i_{t,b} - \hat{x}_{t,b}\rVert_2^2. \tag*{(17)}

We combine imitation, stability, and reference-specific losses into the training objectives for discrete goals,

Ld=λILℓIL+λstableℓstable+λmap(k)ℓmap,(18)\mathcal{L}_d = \lambda_{\mathrm{IL}}\ell_{\mathrm{IL}} + \lambda_{\mathrm{stable}}\ell_{\mathrm{stable}} + \lambda_{\mathrm{map}}(k)\ell_{\mathrm{map}}, \tag*{(18)}

and continuous goals,

Lc=λILℓIL+λstableℓstable+λcurveℓcurve+λorientℓorient.(19)\mathcal{L}_c = \lambda_{\mathrm{IL}}\ell_{\mathrm{IL}} + \lambda_{\mathrm{stable}}\ell_{\mathrm{stable}} + \lambda_{\mathrm{curve}}\ell_{\mathrm{curve}} + \lambda_{\mathrm{orient}}\ell_{\mathrm{orient}}. \tag*{(19)}

We observe empirically that goal separation is maintained after the initial training iterations, so we progressively reduce the mapping-loss weight as

λmap(k+1)=γλmap(k),(20)\lambda_{\mathrm{map}}(k+1) = \gamma\lambda_{\mathrm{map}}(k), \tag*{(20)}

where kk indexes training iterations and γ∈(0,1)\gamma\in(0,1). We jointly optimize the network parameters θ\theta, with nonnegative weights balancing the loss terms.

Results

We first benchmark multi-CONDOR on tasks with discrete goals, then demonstrate its application to robotic grasping and illustrate its extension to continuous goal contours.

Discrete multi-attractor benchmarking

Datasets

We evaluate multi-CONDOR on seven 2D motion tasks drawn manually on a digital interface: three with two attractors and four with three attractors. The tasks contain 6–8 and 12–24 demonstrations, respectively, with equal numbers of demonstrations per goal. Goal positions are estimated by clustering demonstration endpoints using kk-means, with kk equal to the number of attractors, and taking each cluster’s mean endpoint. All states are normalized to a workspace defined by the demonstration minima and maxima multiplied by a factor of 1.3 to provide a margin.

Metrics

We evaluate imitation accuracy and empirical stability. For imitation accuracy, we simulate each system from the demonstration initial states and compare the resulting trajectories with the demonstrations using root mean squared error (RMSE), dynamic time warping distance normalized by the number of points (DTWD) [14], and Fréchet distance (FD) [15]. To assess stability, we simulate each system for 5000 steps from a 16×1616 \times16 grid covering the workspace. We report the percentage of initial states whose final state lies more than 5 units (approximately 1% of the workspace width) from every goal as the “spurious attractors” metric. We also report the mean distance from each final state to its nearest goal (distance from goals).

Baselines

We compare our method with two baselines. Single-attractor CONDORs + state machine trains one CONDOR model [8] per goal and selects the nearest goal’s model at execution time, mirroring the state-space partitioning idea of Augmented-SVM [11]. Each model combines imitation learning with a contrastive stability loss that encourages encoded trajectories to follow reference dynamics with a single stable equilibrium. Each model uses the same architecture and optimizer as multi-CONDOR, specified below.

StableNODE [12], our main baseline for learning a single autonomous dynamical system with multiple goals, uses a neural ODE with a Lyapunov-based correction to its nominal vector field. The correction acts when the nominal dynamics violate a prescribed Lyapunov decrease condition. Its formulation admits nonconvex Lyapunov functions, allowing multiple attractors. We train it using the average Hausdorff distance between generated and demonstrated trajectories, which measures geometric similarity without requiring temporal alignment. The reported results use α=ϵ=10−2\alpha= \epsilon= 10^{-2}, where α\alpha specifies the desired Lyapunov decay rate and ϵ\epsilon regularizes the correction near points where the Lyapunov gradient vanishes.

Ablations

We evaluate two ablations of the discrete-goal objective (18), retaining the multi-CONDOR network architecture. Only imitation removes the stability loss (trajectory matching and separation) and the goal-mapping loss (λstable=λmap=0\lambda_{\mathrm{stable}} = \lambda_{\mathrm{map}} = 0). It tests whether fitting demonstrations alone yields accurate imitation and reliable goal reaching throughout the workspace. No mapping loss removes only the goal-mapping loss (λmap=0\lambda_{\mathrm{map}} = 0), retaining imitation and stability losses. It tests whether anchoring goal encodings to separated reference positions ξg\xi_g improves imitation accuracy and suppresses spurious attractors.

Multi-CONDOR implementation details

As a safeguard, rollout transitions that would leave T\mathcal{T} are projected back onto its boundary. The encoder has four hidden layers and the decoder three, all with 300 units, GELU activations and layer normalization, and the latent space has dimension 300. The reference system is the Gaussian mixture of Section II-C. For two attractors, the reference positions are ξ1=(1,…,1)\xi_1 = (1,\ldots,1) and ξ2=(−1,…,−1)\xi_2 = (-1,\ldots,-1); for three attractors, they are sampled uniformly at random in the latent space. We use horizons Hi=10H^i = 10 and Hs=7H^s = 7, margin m=0.033m = 0.033, weights λIL=1\lambda_{\mathrm{IL}} = 1, λstable=0.4\lambda_{\mathrm{stable}} = 0.4 and λmap=0.05\lambda_{\mathrm{map}} = 0.05 with decay factor γ=0.99\gamma= 0.99, and train for 10,000 iterations with AdamW (learning rate 4.9×10−44.9 \times10^{-4}, weight decay 10−510^{-5}, batch size 250). All results are averaged over five random seeds.

Discussion

Table I summarizes the results. The imitation-only ablation achieves the lowest imitation errors in both settings, but its spurious-attractor rates are approximately 17% and 37% for two and three attractors, respectively. The full method records no spurious attractors under our evaluation criterion, with modestly higher imitation errors. Its mean distance from the goals decreases from 13.33 to 3.10 and from 28.24 to 2.69, respectively. Removing the mapping loss also worsens both stability metrics in both settings and substantially increases imitation errors for two attractors.

Compared with separate single-attractor CONDOR models selected by a state machine, multi-CONDOR achieves substantially lower imitation errors and better stability metrics in both settings. StableNODE achieves comparable imitation accuracy and the smallest mean distance from the goals for two attractors. For three attractors, however, its spurious-attractor rate is 7.29%, and its mean distance from the goals is 17.90, compared with 2.69 for multi-CONDOR.

During StableNODE hyperparameter tuning and longer training runs, we observed a tradeoff between imitation accuracy and stability: improving one often degraded the other. Figure 4 illustrates this qualitatively: StableNODE produces additional spurious attractors (blue) away from the demonstration endpoints, with demonstrations shown in white and generated trajectories in red. Overall, multi-CONDOR combines imitation accuracy close to the imitation-only ablation with reliable goal reaching across the evaluated initial states.

Learned dynamics of multi-CONDOR and StableNODE on two three-attractor benchmark tasks

Figure 4. Learned dynamics of multi-CONDOR (left) and StableNODE [12] (right) on two three-attractor benchmark tasks. Demonstrations are white, generated trajectories red, and attractors blue. StableNODE produces additional spurious attractors away from the intended goals.

A multi-goal robotic grasping task

We evaluate multi-CONDOR on a robotic grasping task in which a Franka FR3 grasps a box from either side. We collect ten kinesthetic demonstrations, five per goal, and learn dynamics for the 3D Cartesian end-effector position (Figure 5).

Kinesthetic demonstrations approaching the two grasping goals

Figure 5. Kinesthetic demonstrations approaching the two grasping goals.

At each control step, the learned dynamics map the current position to a velocity, which is integrated to obtain the target position for an impedance controller. The target orientation is taken from the nearest recorded demonstration point, and a separate state machine closes the gripper when the end effector reaches either goal.

MethodRMSEDTWDFDSpurious attractors (%)Distance from goals
2 attractors
StableNODE (α=ϵ=10−2\alpha=\epsilon=10^{-2})17.65±0.6417.65\pm0.648.37±1.358.37\pm1.3532.91±4.1032.91\pm4.100.31±0.630.31\pm0.630.38±0.210.38\pm0.21
Single-attractor CONDORs + state machine77.85±3.9477.85\pm3.9481.32±2.9681.32\pm2.96106.28±9.11106.28\pm9.119.22±9.239.22\pm9.233.71±0.703.71\pm0.70
Multi-CONDOR (only imitation, λstable=λmap=0\lambda_{\mathrm{stable}}=\lambda_{\mathrm{map}}=0)15.25±6.5315.25\pm6.535.69±1.485.69\pm1.4820.68±8.0320.68\pm8.0316.98±20.8916.98\pm20.8913.33±16.3813.33\pm16.38
Multi-CONDOR (no mapping loss, λmap=0\lambda_{\mathrm{map}}=0)32.00±32.8932.00\pm32.8923.62±42.2423.62\pm42.2448.20±69.9948.20\pm69.9913.33±35.1913.33\pm35.1921.25±48.0921.25\pm48.09
Multi-CONDOR (Ours)21.58±11.3021.58\pm11.308.82±6.978.82\pm6.9724.26±16.1524.26\pm16.150.00±0.000.00\pm0.003.10±0.973.10\pm0.97
3 attractors
StableNODE (α=ϵ=10−2\alpha=\epsilon=10^{-2})13.46±0.5113.46\pm0.518.33±1.048.33\pm1.0424.50±1.4824.50\pm1.487.29±6.097.29\pm6.0917.90±10.6817.90\pm10.68
Single-attractor CONDORs + state machine49.70±1.8649.70\pm1.8660.03±1.9660.03\pm1.9688.22±3.4788.22\pm3.4713.75±6.6313.75\pm6.633.76±0.723.76\pm0.72
Multi-CONDOR (only imitation, λstable=λmap=0\lambda_{\mathrm{stable}}=\lambda_{\mathrm{map}}=0)11.26±7.0911.26\pm7.096.58±4.876.58\pm4.8718.49±14.5718.49\pm14.5737.13±21.2037.13\pm21.2028.24±30.3728.24\pm30.37
Multi-CONDOR (no mapping loss, λmap=0\lambda_{\mathrm{map}}=0)13.23±10.2713.23\pm10.278.85±8.858.85\pm8.8520.15±18.5820.15\pm18.587.38±13.567.38\pm13.563.77±3.143.77\pm3.14
Multi-CONDOR (Ours)14.08±10.5414.08\pm10.549.24±8.019.24\pm8.0121.18±17.1021.18\pm17.100.00±0.000.00\pm0.002.69±0.792.69\pm0.79

Table 1. Performance metrics for the 2-attractor and 3-attractor datasets. We report the mean and standard deviation over the total number of tasks (3 for 2-attractor and 4 for 3-attractor) and over 5 random seeds. The best results are shown in bold.

Figure 6 shows the robot reaching either goal depending on its initial position. Figure 7 shows the 5 provided demonstrations for each side in green, and 4 examples of successful trajectories in red. Note how the trajectories converge towards the desired goal despite the fact that they do not start at the same initial conditions as the provided demonstrations. Moreover, to be successful, these trajectories had to follow the demonstrations in approaching from the side, rather than from the top, to be able to insert one of the fingers in the handle. This task thus highlights how the system can converge towards the goal when starting from varying initial conditions, while still imitating the demonstrated behaviour when necessary.

Robot executions reaching either grasping goal using a single vector field learned with multi-CONDOR

Figure 6. Robot executions reaching either grasping goal using a single vector field learned with multi-CONDOR.

Figure 7. Visualization of provided demonstrations (in green) for the multi-goal grasping task and four multi-CONDOR trajectories (in red) which successfully grasped the box by the handles. Note how the trajectories converge to the desired goals despite starting from initial conditions which are not the same as the provided demonstrations.

Convergence to closed curves

We also provide qualitative results which use the reference dynamics with a continuous curve of attraction. In this case, rather than task dynamics which reach multiple discrete goals, we can learn dynamics which converge to a continuous, closed shape. As Figure 8 shows, for example, we can learn to converge to a star-shaped contour: the red attractors shown on the image on the left all lie on the star-shaped goal contour. Moreover, we can still combine imitation with this approach, as the plot on the right shows with the demonstrations in white, trajectories in red, and the attractors lying on the target circle in blue. Similarly to the previous grasping task, such dynamics could thus be useful when an object can be grasped along an entire continuous set of points, rather than specific, distinct ones.

Figure 8. Example of learned dynamics using multi-CONDOR for a continuous, closed star shape (left) without any imitation, and an example of a case with a circular shape as a continuous goal with two subgroups of demonstrations to imitate (right).

Conclusion, limitations, and future work

Grasping a container by either handle or at admissible points along its rim exemplifies manipulation tasks with multiple valid endpoints. We presented a CONDOR-based framework for learning such motions toward discrete goals or continuous attracting goal contours. Our method reduces mean trajectory RMSE by approximately 72% relative to single-attractor CONDORs with a state machine. The observed rate of spurious attractors falls from StableNODE’s 0.31% and 7.29% to 0% for two and three goals, respectively. A robotic grasping demonstration further illustrates reaching alternative goals within a single autonomous vector field.

Our Lyapunov analysis establishes sufficient conditions for transferring convergence from the reference dynamics to the learned task dynamics. These guarantees require exact dynamics matching, which training only encourages. A diffeomorphic encoder, following Euclideanizing Flows [7], with task velocities derived through its inverse Jacobian could enforce this condition by construction. The analysis also requires the intended correspondence between goals and latent attractors, including a distinct stable equilibrium for each discrete goal. Since Gaussian interactions can shift or merge equilibria, this extension should incorporate latent dynamics with distinct stable equilibria fixed at the encoded discrete goals.

The current formulation treats discrete attractors and continuous attracting contours separately. Future work could unify these with single point attractors and limit cycles, with convergence guarantees appropriate to each attractor type.

Acknowledgements

The illustrations of the human demonstrator in Figure 1 were generated using OpenAI’s ChatGPT image generation. Claude Opus 5.5 (Anthropic) assisted in writing code for plots and TikZ drawings, Claude Opus 5.5 and GPT-6 Astra were also used to edit and revise the manuscript. The authors reviewed and edited all AI-assisted content and take full responsibility for the content of this paper.

References

  1. [1]C. Chi, S. Feng, Y. Du, Z. Xu, E. Cousineau, B. C. M. Burchfiel, and S. Song, “Diffusion policy: Visuomotor policy learning via action diffusion,” in Proceedings of Robotics: Science and Systems, 2023.
  2. [2]D. Wang, S. Hart, D. Surovik, T. Kelestemur, H. Huang, H. Zhao, M. Yeatman, J. Wang, R. Walters, and R. Platt, “Equivariant diffusion policy,” in Proceedings of the 8th Conference on Robot Learning, ser. Proceedings of Machine Learning Research, vol. 270. PMLR, 2025, pp. 48–69.arxiv.org/abs/2407.01812
  3. [3]A. J. Jispert, J. Nakanishi, H. Hoffmann, P. Pastor, and S. Schaal, “Dynamical movement primitives: Learning attractor models for motor behaviors,” Neural Computation, vol. 25, no. 2, pp. 328–373, 2013.
  4. [4]M. Karlsson, A. Robertsson, and R. Johansson, “Convergence of dynamical movement primitives with temporal coupling,” in Proceedings of the European Control Conference (ECC), 2018, pp. 32–39.
  5. [5]S. Schaal, A. Ijspeert, and A. Billard, “Computational approaches to motor learning by imitation,” Philosophical Transactions of the Royal Society of London. Series B: Biological Sciences, vol. 358, no. 1431, pp. 537–547, 2003.pubmed.ncbi.nlm.nih.gov/12689379
  6. [6]S. M. Khansari-Zadeh and A. Billard, “Learning stable nonlinear dynamical systems with Gaussian mixture models,” IEEE Transactions on Robotics, vol. 27, no. 5, pp. 943–957, 2011.
  7. [7]M. A. Rana, A. Li, D. Fox, B. Boots, F. Ramos, and N. Ratliff, “Euclideanizing flows: Diffeomorphic reduction for learning stable dynamical systems,” in Proceedings of the 2nd Conference on Learning for Dynamics and Control, ser. Proceedings of Machine Learning Research, vol. 120. PMLR, 2020, pp. 630–639.arxiv.org/abs/2005.13143
  8. [8]R. Pérez-Dattari and J. Kober, “Stable motion primitives via imitation and contrastive learning,” IEEE Transactions on Robotics, vol. 39, no. 5, pp. 3909–3928, 2023.
  9. [9]R. Pérez-Dattari, C. Della Santina, and J. Kober, “PUMA: Deep metric imitation learning for stable motion primitives,” Advanced Intelligent Systems, vol. 6, no. 11, p. 2400144, 2024.
  10. [10]M. Saveriano, F. J. Abu-Dakka, A. Kramberger, and L. Peternel, “Dynamic movement primitives in robotics: A tutorial survey,” The International Journal of Robotics Research, vol. 42, no. 13, pp. 1133–1184, 2023.DOI
  11. [11]A. Shukla and A. Billard, “Augmented-SVM: Automatic space partitioning for combining multiple non-linear dynamics,” in Advances in Neural Information Processing Systems, vol. 25, 2012.
  12. [12]A. Sochopoulos, M. Gienger, and S. Vijayakumar, “Learning deep dynamical systems using stable neural ODEs,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2024, pp. 11 163–11 170.
  13. [13]H. K. Khalil, Nonlinear Systems, 3rd ed. Prentice Hall, 2002.
  14. [14]H. Sakoe and S. Chiba, “Dynamic programming algorithm optimization for spoken word recognition,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 26, no. 1, pp. 43–49, 1978.
  15. [15]T. Eiter and H. Mannila, “Computing discrete fréchet distance,” 1994.

Paper details

vlnc:W_yqus6fgu
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

ChatGPT image generation, Claude Opus 5.5, GPT-6 Astra

View statement
Looking for related papers…
Contents