Learning Riemannian Stable Dynamical Systems via Diffeomorphisms
Abstract: Dexterous and autonomous robots should be capable of executing elaborated dynamical motions skillfully.
Learning techniques may be leveraged to build models of such dynamic skills.
To accomplish this, the learning model needs to encode a stable vector ﬁeld that resembles the desired motion dynamics.
This is challenging as the robot state does not evolve on a Euclidean space, and therefore the stability guarantees and vector ﬁeld encoding need to account for the geometry arising from, for example, the orientation representation.
To tackle this problem, we propose learning Riemannian stable dynamical systems (RSDS) from demonstrations, allowing us to account for different geometric constraints resulting from the dynamical system state representation.
Our approach provides
Lyapunov-stability guarantees on Riemannian manifolds that are enforced on the desired motion dynamics via diffeomorphisms built on neural manifold ODEs.
We show that our Riemannian approach makes it possible to learn stable dynamical systems displaying complicated vector ﬁelds on both illustrative examples and real-world manipulation tasks, where Euclidean approximations fail.
Introduction
The promise of having fully-autonomous robots performing a large variety of tasks implies that robots should be able to execute highly-dynamic motions.
The inherent complexity of these movements makes hand coding an infeasible approach. Therefore learning techniques arise as a potential solution.
In particular, learning dynamic robot motions from human demonstrations is a promising approach to build models of dynamic skills in an intuitive, sample-efﬁcient and quick manner.
However, learning dynamical motions is not trivial as the learning model requires to provide stability guarantees, which is also an intrinsic property in human motion generation [1].
In this context, most research works have focused on learning time-invariant stable dynamical systems for goal-driven motions (a.k.a point-to-point movements) with Lyapunov-stability guarantees [2, 3, 4, 5, 6].
Khansari-Zadeh and Billard [2] proposed one of the ﬁrst approaches to learn stable dynamical systems from human demonstrations by imposing quadratic Lyapunov non-linear constraints on the model parameters’ optimization, which limited the range of possible learnable motions.
As the class of stable dynamical systems constrained by a predeﬁned Lyapunov function is a subset of all possible stable dynamical systems, this limits the learned model accuracy [4].
To improve accuracy, a more general parametric control Lyapunov function [7] can be learned from demonstrations [3, 8, 9].
The trade-off between stability and accuracy motivated the use of diffeomorphisms [4, 5, 6, 10, 11, 12], which leveraged a more general class of stable dynamical systems.
Their main idea is to design or learn a canonical Lyapunov-stable dynamical system on a latent space and use a diffeomorphic mapping to transform the demonstrations to the latent space so that they are consistent with the desired Lyapunov-stable behavior.
Thus, the modeling accuracy depends on the expressiveness of the diffeormorphic function, often modeled by a neural network [5, 6, 10, 11].
Most of aforementioned works assume that the training data lie in the Euclidean space [4, 5, 6, 10, 12], with the exception of Urain et al.
[11], which severely limits their use in real applications.
For instance, there are various types of representation for the robot end-effector’s orientation, namely unit quaternions in the 3 -Sphere manifold [13], and rotation matrices in the special orthogonal group ( SO(3) ) manifold [14], which do not lie in the Euclidean space.
Accounting for the data geometry has proven critical when learning and optimizing movement primitives on quaternion space [15, 16, 17, 18, 19], as relying on Euclidean approximations leads to modeling distortions and compromises extrapolation.
The importance of geometry-aware methods when learning dynamical systems was recently addressed in [11], where a stable dynamical system was learned via diffeomorphisms over
Lie groups.
Although Lie theory has been exploited to operate with data of speciﬁc geometries [20], a potential limitation is that not all types of manifolds arising in robotics can be easily endowed with a Lie group structure (e.g., the space of symmetric positive-deﬁnite matrices (SPD)).
A more general solution based on Riemannian geometry [21] is proposed in this paper.
We consider dynamical systems evolving on a Riemannian manifold.
This arises two main challenges: (1) designing a canonical Lyapunov-stable dynamical system on Riemannian manifolds, and (2) learning a diffeomorphism that accounts for the Riemannian geometry.
To address these challenges, we leverage the Lyapunov stability analysis on Riemannian manifolds [22, 23].
Moreover, we exploit neural ordinary differential equations (ODEs) on Riemannian manifolds [24, 25] for constructing the diffeomorphism to learn a Riemannnian stable dynamical system (RSDS).
Unlike previous works using diffeomorphisms [4, 5, 6], our approach extends this concept to systems evolving on Riemannian manifolds.
In contrast to works assuming Riemannian manifolds that are diffeomorphic to the Euclidean space [26], or manifold-speciﬁc diffeomorphisms built on specialized neural networks [27], our approach leverages a general formulation to construct diffeomorphisms based on solutions of ODEs evolving on arbitrary Riemannian manifolds [24].
Our approach is conceptually similar to the Lie-group method introduced in [11], as both explicitly consider the data geometry to design technically-sound learning models via diffeomorphisms.
However, our Riemannian formulation substantially differs from [11] in its technical development, and provides a more general approach that may be exploited for a variety of Riemannian manifolds.
In summary, we propose a method to learn Riemannian stable dynamical systems from demonstrations.
Our approach provides Lyapunov-stability guarantees on Riemannian manifolds (see § 3.1) that are enforced on the desired motion dynamics via diffeomorphisms built on neural manifold
ODEs (see § 3.2 and 3.3).
Through a set of evaluations on the 2 -sphere manifold S 2 , presented in § 4, we show that our Riemannian approach is able to learn complicated dynamical systems, in contrast to Euclidean approximations which fail to encode stable vector ﬁelds.
Also, we learn realistic motion skills on a 7 -DoF robotic manipulator featuring complex full-pose trajectories on R 3 × S 3 .
Background 2.1 Dynamical Systems and Lyapunov Stability
We here give a short review of Lyapunov stability in the Euclidean setting.
Let us assume an autonomous dynamical system ˙ x = f ( x ) , with a single equilibrium point x ∗ , where x ∈ R n is the state variable.
Consider a potential function V ( x ( t )) describing the energy of such a system.
If this system loses energy over time and the energy is never restored, the system must eventually reach some ﬁnal resting state.
This idea is formally described as (see [28] for details):
Theorem 1 (Lyapunov Stability) .
A dynamical system ˙ x = f ( x ) is globally asymptotically stable at x ∗ if there exists a continuously differentiable Lyapunov function V ( x ) : R n → R such that
[Equation]
From Theorem 1 we know that we can always ﬁnd a Lyapunov function that fulﬁlls these four conditions in Eq.
1 for a globally asymptotically stable dynamical system.
2.2 Riemannian Manifolds
A smooth manifold M can be seen as a set of points that locally, but not globally, resemble the Euclidean space R d [21, 29].
An abstract deﬁnition of a manifold speciﬁes the topological, differential and geometric structure by using charts , which are maps between parts of M to R d .
The collection of these charts (a.k.a.
local parameterizations) is called atlas .
More formally, a chart on a smooth manifold M is a diffeomorphic mapping (i.e. a bijective and differentiable function) ϕ : U → ˜ U from an open set U ⊂ M to an open set ˜ U ⊆
R d (see Fig.
6 in App. A.1).
Moreover, the transition map between two intersecting sets U 1 and U 2 , given by ϕ 1 ◦ ϕ − 1 2 or ϕ 2 ◦ ϕ − 1: R d → R d is also a diffeomorphism.
The smooth structure of M makes it possible to take derivatives of curves on the manifold, leading to tangent vectors in R d .
The set of tangent vectors of all curves at x ∈ M spans a d -dimensional afﬁne subspace of R d , which is known as the tangent space T x M of M at x .
The collection of all tangent spaces of M is the tangent bundle TM =
(cid:70) x ∈M T x M .
Therefore, a velocity vector ˙ x at x ∈ M lies on T x M , and consequently a vector ﬁeld on M lies on TM .
The above deﬁnitions do not provide the mechanisms to measure how curved M is, or to compute distances on M .
To do so, we can endow M with a Riemannian metric , which is a family of inner products g x : T x M × T x M → R associated to each point x ∈ M .
As a result, a Riemannian manifold ( M , g ) is a smooth manifold endowed with a Riemannian metric [29].
To operate with
Riemannian manifolds, it is common practice to exploit the Euclidean tangent spaces.
To do so, we resort to mappings back and forth between T x M and M using the exponential and logarithmic maps.
The exponential map Exp x ( u ) : T x M → M maps a point u in the tangent space of x to a point y on the manifold, so that it lies on the geodesic starting at x in the direction u , and such that the geodesic distance d M ( x , y ) =
d R ( x , u ) .
The inverse operation is the logarithmic map
Log x ( y ) :
M → T x M .
We provide all the necessary operations in App. A.1.
2.3 Diffeomorphism
A diffeomorphism ψ : M → N is a smooth bijective mapping between two smooth manifolds which preserves the topological properties of M , and whose inverse ψ − 1 is also smooth.
When learning stable dynamical systems, diffeomorphisms can be exploited to impose Lyapunov stability guarantees by transferring a manually-designed stable dynamical system on N to the desired manifold M .
We focus on constructing learnable diffeomorphisms that resemble continuous normalizing ﬂows (CNFs) [30, 31, 32], which are bijective and bidirectionally differentiable mappings, and have been recently exploited on density estimation problems [33, 34, 35].
We here exploit them to learn diffeomorphic mappings between Riemannian manifolds.
Most CNFs are constructed from neural ordinary differential equation (Neural ODEs) in Euclidean space [30, 31, 32], with the exception of neural manifold ordinary differential equations (Neural
MODEs) on Riemannian manifolds [24, 25].
Generally, Neural ODEs parametrize the dynamics of a hidden variable using a continuous-time ODE represented by a neural network, as follows,
[Equation]
where z ∈ R d is the state variable and f θ : R d × R → R d is a neural network.
According to Mathieu and Nickel [25] (see Theorem 2 in App.
A.2), we can extend CNFs to the Riemannian setting, where the state variable z ∈ M and the vector ﬁeld f θ : M× R → TM .
As a result, we can use (2) as a manifold ODE, whose initial value problem (IVP) solution results in a diffeormorphic mapping ψ θ : M → N , x
= z ( t s ) ∈ M and y
=
z ( t e ) ∈ N .
i.e. y =
ψ θ ( x ) = x + (cid:82) t e τ = t s f θ ( z ( τ ) , τ ) dτ .
To solve the IVP on M , we leverage integrators on Riemannian manifolds based on the local representation via coordinate charts [36].
This method uses a local representation of M deﬁned by a coordinate map ϕ : M ⊇ U → ˜ U ⊆ R d with coordinates w ( t )
=
ϕ ( z ( t )) .
Computing integrators on M can be approximated by solving an equivalent ODE in R d
[Equation]
where D ϕ − 1 ( w ( t ))
ϕ represents the differential of ϕ at ϕ − 1 ( w ( t ))
(see App.
A.2 and A.3 for details).
Additionally, we use the adjoint method [30] on Riemannian manifolds [24] to compute gradients, which can also be used for calculating differentials.
Consider a loss function L : M → R , in order to compute the derivative of L with respect to an intermediate variable z ( t ) of the manifold ODE, we can solve ˙ a ( t ) T = − a ( t ) T D z ( t ) f
θ ( z ( t ) , t ) , where a ( t ) T :
= D z ( t ) L (as detailed in App.
A.4).
Learning Riemannian Stable Dynamical Systems
We here introduce our approach for learning stable dynamical systems on Riemannian manifolds from demonstrated point-to-point motions.
First, let us consider that the recorded demonstrations follow a dynamical system ˙ x = f ( x ) , where the state x evolves on a Riemannian manifold M with velocity ˙ x ∈ T x M .
This dynamical system is equivalent, under a change of coordinates, to another system deﬁned on a latent Riemannian manifold N .
Under the diffeomorphism ψ θ : x (cid:55)→ y ∈ N , parameter- ized by θ , we map the observed states x onto N .
Then, we evaluate the canonical stable vector ﬁeld g γ ( y ) to obtain the velocity ˙ y ∈ T y N .
Finally, we leverage the pullback operator D y ψ (cid:63) θ to project ˙
y back to the tangent space T x M .
The whole procedure can be expressed as follows,
[Equation]
(4) which is illustrated in Fig.
1 (a proof is given in App. B).
In the sequel, we describe how we design a
Lyapunov-stable vector ﬁeld g γ on N to provide stability guarantees on the learned dynamical system.
Later, we explain how to compute the diffeomorphism between the target and latent manifolds.
Finally, we introduce two different methods to compute the pullback operator D y ψ (cid:63) θ .
3.1 Lyapunov-stable Geodesic Vector Fields
To design a stable vector ﬁeld on the Riemannian manifold N , we enforce the canonical dynamical system to follow geodesic curves that converge to a single equilibrium.
Such a vector ﬁeld can be designed via the logarithmic map.
Speciﬁcally, given an equilibrium point y ∗ ∈ N , the corresponding velocity vector ˙ y ∈ T y N can be computed as ˙ y =
g γ ( y ) =
k γ ( y ) g n ( y ) with the normalized geodesics vector ﬁeld g n ( y ) :
= Log y ( y ∗ ) (cid:107) Log y
( y ∗ ) (cid:107) 2 .
This implies that the direction of tangent vectors is fully speciﬁed by Log y
( y ∗ ) , while their magnitude depends on the scaling factor k γ : R n ⊃ N → R ≥ 0 .
We can prove the stability of this geodesic vector ﬁeld by choosing the
Lyapunov function V ( y ) :
= (cid:104) F, F (cid:105) y ∗ with F = Log y ∗ ( y ) , and applying Theorem 3 for Lyapunov stability on Riemannian manifolds, as detailed in App.
B. Given that our geodesic vector ﬁeld is Lyapunov stable, we can easily prove that the desired dynamical system is also globally asymptotically stable by deﬁning a new valid Lyapunov function ˜ V ( x ) :
= V ( ψ θ ( x )) via the diffeomorphism ψ θ , with a single equilibrium point x ∗ = ψ − 1 θ ( y ∗ ) ∈ M .
As ψ θ preserves the topological properties of
N , the equilibrium point x ∗ is also globally asymptotically stable on M (see App.
B for the proof).
Note that for certain Riemannian manifolds, it is only possible to guarantee quasi-global stability guarantees due to the Poincar´e-Hopf theorem (see App.
B for details).
Note that we separate the parameterization for the magnitude and direction of vector ﬁelds to improve the expressiveness of our framework.
By relocating the scaling factor k γ and normalizing the vector ﬁelds governed by (4), we can obtain our ﬁnal RSDS learning framework
[Equation]
where ˆ k γ ( x ) is the new positive scaling factor that fully determines the magnitude of the learned vector ﬁelds.
In App.
C, we prove that the models (4) and (5) are equivalent.
3.2 Diffeomorphisms on Riemannian Manifolds
Given the ﬁnal RSDS in (5) and M demonstrations, the goal of learning stable dynamics on a Riemannian manifold reduces to learning ψ θ , computing its pullback operator D y ψ (cid:63) θ , and subsequently estimating ˆ k γ ( x ) . However, due to the geometric constraints arising from M , learning a diffeomorphism and calculating the corresponding pullback operator are non-trivial problems.
To address them, we leverage Neural MODEs [24] to build the diffeomorphism ψ θ .
Unlike [24], we propose a novel approach to compute the pullback operator by reversing the time interval of the ODE integration (see § 3.3), avoiding to explicitly compute the corresponding inverse.
We also propose a method to design Lyapunov-stable geodesic vector ﬁelds on a Riemannian manifold, which are leveraged to provide stability guarantees on the learned dynamical system, as explained in § 3.1.
According to Theorem 2 in App.
A.2, the dynamics f θ of Neural MODEs only has to be a Cfunction.
To compute the diffeomorphism with a parametric Neural MODE, we solve an integration problem based on the local parameterization w ( t ) =
ϕ ( z ( t ))
(described in App. A.3).
Using this method requires the selection of coordinate charts, which can be created via the exponential map ϕ − 1 i =
Exp z i and logarithmic map ϕ i =
Log z
i , similarly to [24].
Under this choice of coordinate mapping and given a ﬁxed number of charts k , the diffeomorphism ψ θ : x = z
(cid:55)→ z k = y , obtained via integration on the manifold can be then viewed as the composition of blocks of solving Neural ODEs and chart transitions deﬁned as,
[Equation]
with
[Equation]
(6) where i is the chart index, t i,s and t i,
e are the starting and end time for i th chart.
ˆ ψ θ ,i deﬁnes a diffeomorphism computed by the classical ODE solver on the tangent space (i.e. Euclidean space) and provides the solution of the IVP of the equivalent ODE (3).
3.3 Differential of the Inverse Diffeomorphism
We are now left with the problem of computing the pullback operator D y ψ (cid:63) θ in (4), which maps the latent velocity ˙ y back to the original tangent space T x M .
This operator can be considered as the inverse mapping of the differential D x ψ θ : T x M → T ψ θ ( x ) N .
As we already have the diffeo- morphism ψ θ , the straightforward solution is to compute its derivatives and then obtain the required inverse.
Nevertheless, under the Riemannian setting, particularly for d -dimensional submanifolds
M d embedded in R n , computing the inverse directly becomes problematic due to the geometric constraints arising from M .
Next, we provide two methods to deal with this problem.
Pullback operator via constrained optimization: Instead of naively differentiating through the
ODE solver of ψ θ , we can use the adjoint method to calculate the differential of a diffeomorphism constructed by a Neural MODE.
Assuming that we have the differential D x ψ θ (as computed in
Algorithm 1 in App.
A.4), the connection between tangent vectors ˙ x and ˙ y can be written as
D x ψ θ ( x ) ˙ x = ˙
y .
In the Euclidean case, we can directly compute ˙ x
= ( D x ψ θ ( x )) − 1 ˙ y .
However, under the Riemannian setting, computing the inverse ( D x ψ θ ( x )) − 1 often leads to a loss of rank in the matrix representation of D x ψ θ ( x ) for an embedded submanifold M d due to the intrinsic geometric constraints of x .
We address this problem by introducing geometric constraints that allow us to compute ˙ x on T x M .
For example, for manifold S d , the tangent vector ˙ x is orthogonal to x , that is x T ˙ x = 0 .
Hence, we can ﬁnd a solution by solving a constrained optimization problem, from which the pullback operator D y ψ [Equation] θ is obtained as,
[Equation]
The full derivation and discussions can be found in App.
D.1.
Note that D y ψ (cid:63) θ in (7) is speciﬁc to hypersphere manifolds due to the choice of constraints.
Thus, this constrained optimization approach does not easily scale to compute the pullback operator for arbitrary Riemannian manifolds.
Pullback operator via the adjoint method: To generalize the computation of the pullback operator for arbitrary Riemannian manifolds, we introduce a new approach based on a modiﬁed version of the adjoint method.
By reversing the integration time interval (i.e. from [ t s , t e ] to [ t e , t s ]), we can determine the inverse diffeomorphism ψ − 1 θ , which is a distinct beneﬁt of Neural MODEs.
Thus, the pullback operator D y ψ (cid:63) θ can be viewed as the differential of the inverse diffeomorphism D y ( ψ − 1 θ ) .
Furthermore, we leverage the adjoint method to compute the differential of ψ − 1 θ using the adjoint
ODE ˙
A ∗ ( t ) = − A ∗ ( t )
D z ( t ) f
θ ( z ( t ) , t ) , with A ∗ ( t ) :
= D z ( t ) ( ψ − 1 θ ) .
Due to the availability of starting states z ( t s ) = x and A ∗ ( t s ) =
I n , we can integrate both the Neural MODE (2) and adjoint
ODE to get the D y ( ψ − 1 θ ) .
For clariﬁcation, we provide Algorithm 2 in App. D.2 for computing
D y ( ψ − 1 θ ) .
Although, we can use dynamic charts method to solve the Neural MODE, dealing with the adjoint ODE dynamics is still not straightforward.
The main challenge is to compute the differential of the vector ﬁelds on the Riemannian manifold D z ( t )
f θ ( z ( t ) , t ) , despite it is nothing but partial derivatives in the Euclidean case.
To avoid directly computing the differential of vector ﬁelds on M , we adopt an approach similar to (6), such that a component z
i
[Equation]
for computing the inverse diffeomorphism has its differential as,
[Equation]
where D w i ( t i,e ) ˆ ψ − 1 θ ,i boils down to partial derivatives (the proof of (8) is provided in App. D.2).
Experiments
We evaluate our method in two settings: reproducing trajectories based on the LASA dataset [29] projected on S 2 ; and reproducing real dynamic motions learned from demonstrations.
To show the importance of incorporating geometry, we compare against a baseline method similar to Euclideanizing ﬂows [5], that is implemented using CNFs with Neural ODEs in R n for illustrative experiments on a modiﬁed LASA dataset.
We refer to this baseline as EuclideanFlow and our model as RSDS .
4.1 LASA dataset on S
Architectures: For EuclideanFlow , we use a fully-connected neural network with an input vector on R 4 (i.e., the 3 -dimensional state x and time), and 3 hidden layers each, with 32 hidden units for
S 2 .
We use tanh as activation function to guarantee a C 1 -bounded mapping for modeling the Neural
ODE.
The RSDS architecture has an additional projection operator proju on the head of the network to impose the output on the tangent space of manifolds.
The scaling factor ˆ k γ is generated using a network composed of an RBF layer and a linear layer without bias.
The network architectures are depicted in App.
E (Fig.
For all the experiments, we use an Euler ODE solver with step size of 1 / 32 , and 4 coordinate charts for the integration.
For each dataset, one trajectory is used for testing and the remaining ones as training set.
All models are trained using the ADAM optimizer [37] with learning rate of 10 − 3 (decaying by factor 0 .
1 after 1000 epochs) over 2000 epochs.
To illustratively show how RSDS and EuclideanFlow perform, we use a modiﬁed version of the
LASA dataset of hand-written letters [38], whose trajectories are projected on S 2 .
The corresponding vector ﬁeld can be easily computed from the projected trajectories by using the logarithmic map.
As a result, we have a new dataset {{ x m,t , ˙ x m,t } T m t =1 } Mm =1 of M demonstrations for each letter, with positions x ∈ S 2 and velocities ˙ x ∈ T x S 2 , from which we learn stable dynamical systems.
Fig- ure 2 shows the resulting demonstrations as white curves for datasets P and W , the corresponding learned vector ﬁelds and the reproduced trajectories.
Note that we provide more results in App.
F and comparisons to an alternative method to EuclideanFlow , which projects trajectories onto the manifold after computing the integration in Euclidean space.
Concerning the reproductions, the blue and black trajectories are rollouts starting from the same initial position as the demonstrations and from randomly-sampled points around them, respectively.
Regarding our RSDS approach (ﬁrst two plots in Fig. 2), it is evident that all blue and black rollouts closely match the demonstrations
[Figure]
and converge to the equilibrium. In contrast, the EuclideanFlow reproductions constantly leave the manifold since there are no mechanisms accounting for the inherent geometric constraints of the data (see last two plots in Fig. 2).
The bald regions on the manifold where the velocity vectors point inwards towards the sphere’s center are also evidence of this phenomenon.
We also provide quantitative metrics for accuracy comparisons.
Figure
4- right , and - middle show the dynamic time warping distance (DTWD) as a measure of reproduced position trajectory accuracy, and the mean squared error (MSE) of the velocities reproduction.
These metrics show that RSDS outperforms EuclideanFlow for the most complex trajectories, e.g. the W dataset.
Although Fig.
4 shows that both models seem to perform well on the P , G , and MultiModels datasets, as pointed out before, Fig.
2 displays that the EuclideanFlow trajectories do not obey the data geometry.
Secondly, we evaluate the stability of both approaches.
For a fair comparison, we ﬁrst project the vector ﬁelds onto S 2 and compute the integration trajectories for EuclideanFlow .
To quantitatively assess this, we measure the stability of the learned vector ﬁelds (i.e. convergence to the equilibrium), by uniformly sampling 1000 initial points on S 2 and counting the number of trajectories that successfully converge.
This procedure is repeated for 7 different trained models, with the average success rate computed over the initial points.
Using one of the trained models, Fig.
3 shows green and red curves representing successful and failed trajectories, respectively.
It is evident that a large number of the EuclideanFlows trajectories failed to converge despite the projection, however all the
RSDS trajectories succeeded.
This result is supported by the success rate metric displayed in Fig.
4– left .
These results show that accounting for the data geometry, as in our RSDS approach, is crucial to provide stability guarantees of the learned dynamical system.
Additionally, we also compare the learning efﬁciency between the two methods, where RSDS generally requires fewer training epochs than EuclideanFlow .
Nevertheless, each training epoch of RSDS is more computationally expensive due to manifold operations.
The details of these results are provided in App.
F (Fig. 10).
4.2 Real robot experiments on R 3 × S
We evaluated two different manipulation tasks using the 7 -DOF Franka-Emika Panda robot: (1) a GraspingTask with 90 degrees rotation, and (2) a V -shape DrawingTask .
For both experiments, we collected 10 kinesthetic demonstrations of the robot end-effector motion as position-velocity trajectories at a frequency of 10 Hz .
Here, we show that RSDS can indeed be used in real-world applications.
We train our model on the R 3 × S 3 manifold accounting for position and orientation of robot end-effector with the same network architecture as our illustrative experiments, except that we use 16 hidden units for faster computations.
As shown in Fig.
5, while following the Vshape curve in the DrawingTask , the end-effector always faces the moving direction; similarly, when approaching the object in the GraspingTask , the gripper rotates 90 degrees.
These motion patterns require synchronized position and orientation trajectories, which is only attainable by training a model with a state variable on a product manifold, i.e., x ∈ R 3 × S 3 .
To deploy the reproduced motion on the robot, we numerically integrated the desired velocity vector ˆ x ∈ T ˙ x M online, and used it as reference for a Cartesian impedance controller.
As observed in Fig.
5, the reproductions governed by the vector ﬁelds learned with our RSDS model accurately imitate the demonstrated motion patterns and converge to the goal position.
Furthermore, these experiments incorporated some target shifts to test if our model could cope with them without retraining.
We further evaluated the stability of the learned vector ﬁelds by perturbing the robot during the task reproduction.
As Fig.
5 shows, after perturbing the robot, the end-effector still follows an alternative trajectory computed from the learned vector ﬁeld (see black and orange trajectories for DrawingTask and GraspingTask , respectively).
Discussion
We introduced a new approach RSDS to accurately learn vector ﬁelds on Riemannian manifolds while ensuring global asymptotic stability, which can not be achieved without taking into account the underlying geometry structure of the data.
Our model inherits all the advantages of stable dynamical systems, such as high robustness against environmental perturbations.
To our knowledge,
RSDS is the ﬁrst to leverage neural ODEs on Riemannian manifolds to learn Lyapunov-stable Riemannian dynamical systems.
Moreover, RSDS builds on a new methodology to compute the pullback operator leveraging the characteristics of neural MODEs.
Our framework is generic and can theoretically be used to learn vector ﬁelds on any Riemannian manifolds with deﬁned exponential and logarithmic maps.
As future work, we will leverage RSDS to learn vector ﬁelds on other Riemannian manifolds such as the manifold of symmetric-positive-deﬁnite (SPD) matrices S d ++ , which is relevant in manipulability learning [23] and video tracking [39].
Limitations:
Due to the complexity of the Riemannian operators and the Neural MODE solvers, our framework runs relatively slowly, making it unsuitable for hard real-time applications.
This problem can be alleviated by switching to faster ODE solvers after training, which allows us to accelerate the query time at the expense of precision.
To improve the accuracy and stability of solving Neural MODEs, we can take advantage of techniques such as regularization [32] and recording checkpoint for the forward mode [40].
In addition, since we leverage the Lyapunov stability to a single ﬁxed point, the model may still reproduce some trajectories that are inconsistent with the trend of demonstration data due to lack of information for points far from demonstrations.
It may be worthwhile exploring other stability criteria, such as contraction analysis [41], to ensure the incremental exponential stability of trajectories with respect to each other on the manifold. Acknowledgments
J. Zhang was supported by the Bosch Center for Artiﬁcial Intelligence (BCAI) as a master thesis student.