Manuscript Offprint
arXiv:2608.23204Guided Riemannian Optimization (GuRO): Bridging Model Predictive Control and Decision Transformers
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Hossein Abdi, Satya Prakash Dash, and Mingfei Sun
Abstract—Decision-making in high-dimensional, nonlinear systems remains a central challenge in robotics. While model-based methods like Model Predictive Control (MPC) offer sample efficiency and interpretability, their performance degrades when the dynamics model is inaccurate or long-horizon predictions are required. Conversely, model-free reinforcement learning (RL) learns policies directly from interaction but suffers from high sample complexity and unstable optimization. Recent advances in sequence modeling have inspired transformer-based decision-making frameworks that can unify MPC and RL, but their training typically faces significant optimization challenges due to highly non-convex loss landscapes. In this work, we propose a novel framework that integrates MPC with RL in a sequence decision-making framework and leverages a curvature-aware optimization to efficiently tackle non-convex loss landscapes. MPC provides predictions of locally optimal trajectories that guide the decision transformer, removing the need for extensive offline pretraining. To address the slow and unstable convergence of traditional optimizers, we train the policy in a Riemannian parameter space using an efficient Riemannian (curvature-aware) method, leading to faster and more robust optimization. We evaluate our framework on high-dimensional quadruped control tasks and demonstrate consistent improvements over strong baselines, including TRPO, SAC, and Online Decision Transformer, achieving higher returns and faster convergence.
I. INTRODUCTION
Robotic decision-making with high-dimensional and nonlinear dynamics—such as quadruped locomotion—remains a fundamental and challenging problem in robotics. While two dominant paradigms, namely model-based control such as Model Predictive Control (MPC) [1] and model-free Reinforcement Learning (RL) [2], have each achieved impressive milestones, both have critical limitations. Model-based MPC is widely adopted for its interpretability and sample efficiency, particularly when an accurate dynamics model is available [3]. However, the performance degrades when the underlying model is inaccurate and only locally reliable. Moreover, MPC often struggles in tasks that require capturing long-horizon prediction, especially when the approximation of the terminal cost is inaccurate—a scenario commonly observed in complex robotic systems [4], [5]. Model-free RL, on the contrary, is inherently model-agnostic and can learn complex, high-dimensional policies directly from data through interaction with the environment. However, these methods typically suffer from high sample complexity and unstable optimization dynamics [2]. These limitations motivate the search for policies that can take advantage of both the strengths of model-based reasoning and model-free learning [6].
In recent years, motivated by the successes of natural language processing and computer vision, sequence modeling [7] has been increasingly integrated into both MPC [8] and RL frameworks [9]. This paradigm offers a modern and unified framework for leveraging the complementary strengths of RL and MPC, particularly in high-dimensional robotic systems performing complex tasks that often involve long-term temporal dependencies—scenarios in which conventional methods often face significant limitations. Sequence decision-making approaches, such as Decision Transformer (DT) [9] or Trajectory Transformer (TT) [10], formulate policy learning as a sequence modeling problem. Although promising, challenges remain as open research areas in transformer-based policy learning.
Sequence decision-making networks are typically trained on offline datasets, as in offline reinforcement learning. Even approaches designed for online adaptation—such as Online Decision Transformer [11]—still rely on extensive pretraining with large offline datasets. This is mainly because purely online training faces non-stationary data distributions, which can destabilize learning and reduce policy performance. Integrating MPC with RL within the sequence modeling framework addresses these challenges by generating locally near-optimal trajectories that guide Decision Transformer learning, thereby mitigating instability from distributional shifts and reducing the need for real-environment interactions, which improves sample efficiency.
Furthermore, training these large transformer-based architectures involves solving a highly non-convex optimization problem, which is often characterized by sharp critical points and complex curvature in the loss manifold. In practice, this problem is typically addressed using standard gradient-based optimization algorithms, such as classical stochastic gradient descent (SGD), Adam [12], and their variants. However, a key limitation of these methods is that they fail to account for the intrinsic geometry of the loss manifold, including its curvature. Consequently, these optimizers frequently exhibit slow convergence, high sensitivity to hyperparameter settings, and can produce suboptimal updates or unstable, oscillatory behavior, particularly when hyperparameters are poorly tuned. Moreover, the slower convergence rate increases the sample complexity, as more interactions with the environment are required to achieve comparable performance.
Curvature-aware optimization algorithms, including both Riemannian methods and Euclidean second-order ap-
All authors are with the Department of Computer Science, The University of Manchester, Manchester, UK.
Correspondence: hossein.abdi@manchester.ac.uk proaches, overcome this limitation by exploiting curvature information to adapt the update direction to the local geometry of the loss landscape. These algorithms are known to mitigate critical slowdowns in optimization [13] and can achieve faster convergence compared to traditional gradient-based methods [14].
To bridge the aforementioned research gaps, we propose a novel approach for policy learning while integrating the model-based MPC with model-free RL. Particularly, our key contributions are as follows:
• Integrating model-based MPC with model-free RL within a sequence decision-making framework. MPC provides real-time, locally optimal, predicted trajectories that enable the training of a decision transformer without requiring offline pretraining.
• Employing a Riemannian optimization approach to capture the intrinsic geometry of the loss manifold, which provides fast and stable training of large transformer-based policies.
• Validating the proposed framework on high-dimensional quadruped robots across complex control tasks, and conducting extensive comparisons against strong baselines, including TRPO, SAC, and Online-DT. Evaluation metrics include mean total reward and convergence speed.
A. Integrating Model Predictive Control with Reinforcement Learning
The integration of model predictive control and reinforcement learning has been extensively studied from multiple perspectives. A major line of research focuses on learning the underlying Markov decision process structure within model-based RL frameworks. In these approaches, MPC typically operates on an approximate model of the real environment, which is learned iteratively to better capture the system's dynamics or reward function [15], [16]. Some works focus on learning value functions or Q-functions via MPC-based planning [17], [18], while others jointly learn both the dynamics and value functions [19].
A second stream of research aims to directly learn policies using MPC. In imitation learning, MPC acts as an expert, and neural networks are trained to replicate its behavior for faster online inference [20], [21]. In actor-critic, MPC serves as the actor, and a learned critic evaluates and refines its policy [22], [23]. Guided policy search methods represent another main research direction, which leverages MPC-based trajectory optimization to iteratively guide policy learning toward improved solutions [24], [25], [26].
Beyond these mainstream approaches, in some works, MPC has been used as a reference generator to provide desired trajectories for RL-based tracking controllers [27], as a safety filter to enforce constraints during exploration [28], or as a policy generator while RL acts as a policy evaluator [29]. In contrast to these existing strategies, our method leverages a model-based MPC to guide a Decision Transformer, which directly optimizes policy-conditioned trajectories.
B. Sequence Modeling for Decision Making
Transformer-based architectures [7] have demonstrated remarkable success across natural language processing and computer vision, and their adoption in reinforcement learning has grown rapidly. Decision Transformer (DT) [9] and Trajectory Transformer (TT) [10] concurrently pioneered reframing policy learning as a sequence modeling problem. They inspired several extensions and variants that address different challenges: Online decision transformer (Online-DT) [11] adapts DT for online learning; Constrained DT (CDT) [30] balances safety and task performance; Behavior Transformer (BeT) [31] learns behaviors from multi-modal data; and Bootstrapped Transformer (BooT) [32] improves sequence model training via generating more trajectories. Similarly, Q-learning DT (QDT) [33] leverages dynamic programming to relabel returns, and Pretrained DT (PDT) [34] introduces Bayesian fine-tuning for online adaptation. Recent works integrate dynamics modeling into DT training, such as [35], while the Environment Transformer [36] facilitates model-based RL by learning environment dynamics jointly with policy representations.
In parallel, transformer-based sequence modeling has also been explored in the context of MPC. Transformers have been used to warm-start optimal control problems [8]; to learn dynamic models for MPC [37]; and, more recently, [38] integrates MPC into a bidirectional trajectory model to improve action selection at test time. Our approach builds on these ideas but differs fundamentally: we employ model-based MPC to guide a Decision Transformer during training policy-conditioned trajectories through a Riemannian optimization framework.
C. Curvature-aware optimization algorithms
Curvature-aware optimization has long been studied for improving convergence in high-dimensional learning problems. From a Euclidean perspective, classical second-order methods such as Newton's method and quasi-Newton schemes (e.g., BFGS) [39] exploit the Hessian matrix to precondition gradients, thus adapting the update step to the local curvature of the loss landscape. From a Riemannian perspective, Natural Gradient Descent (NGD) [13], [40] interprets the parameter space as a Riemannian manifold and leverages the Fisher information matrix as a local Riemannian metric to capture the loss curvature, a method used in the natural policy gradient [41] within the policy optimization.
However, despite their theoretical advantages, the practical deployment of these methods in high-dimensional policy learning is often constrained by their computational and memory costs. To overcome these challenges, a wide range of approximation techniques has been developed. For instance, K-FAC [42] exploits Kronecker-factored approximations of block-diagonal Fisher matrices. Shampoo [43] maintains a set of per-dimension preconditioning matrices that approximate curvature in a scalable manner, while AdaHessian [44] and Sophia [45] adopt a diagonal Hessian approximation to reduce computational overhead. Alternatively, conjugate gradient methods [39] bypass explicit preconditioning by directly solving the approximate natural gradient step in Riemannian space, a strategy notably employed by TRPO [46].
III. PRELIMINARIES AND BACKGROUND
A. Problem Statement
We consider a sequential decision-making problem that is mathematically formulated within the Markov Decision Process (MDP) framework [47]. Formally, an MDP is defined as , where denotes the state space and the action space. The transition dynamics is specified by , where and represent the state and action vectors, respectively. The reward function is defined as , with denoting the instantaneous reward. The distribution specifies the initial state distribution and is the discount factor controlling the trade-off between immediate and future rewards.
An agent starts from an initial state and interacts with the environment by sampling actions from a policy , i.e., . More generally, the policy may also be conditioned on the entire history of observations, . After executing an action , the agent receives a reward and transitions to the next state . The objective is to find the optimal policy from a family of policies parameterized by (denoted ), that maximizes the expected discounted return:
B. Model Predictive Control (MPC)
Consider the following stochastic, nonlinear, discrete-time dynamic model:
where indicates the nominal model, and denotes white noise, assumed to be independently and identically distributed (i.i.d.) Gaussian with zero mean and covariance .
Formally, MPC determines the optimal sequence of control actions by minimizing a cost function over a finite prediction horizon, formulated as the following optimization problem:
where and denote the stage and terminal cost functions, respectively. Here, describes the stochastic dynamic model as defined in (2). Also, and represent the predicted state and control action conditioned on the observed state at time-step . This optimization problem is solved using a standard trajectory optimization algorithm, which produces the optimal sequence of control actions: . For notational simplicity, we omit the superscript when referring to the output of MPC in the remainder of the paper.
C. Riemannian Optimization
Formally, let denote an -dimensional Riemannian manifold that represents the parameter space, where is a smooth differentiable manifold and is a Riemannian metric tensor defined at each point . Given a smooth objective function , the goal of Riemannian optimization is to solve the following problem:
To this end, the Riemannian steepest descent method updates the parameters at the iteration according to:
where denotes the Riemannian gradient of at with respect to the Riemannian metric , is the step-size (or learning rate), and is a retraction mapping that projects a point from the tangent space back onto the manifold . For a rigorous treatment of the underlying mathematical concepts and a comprehensive review of Riemannian optimization techniques, we refer the reader to [48].
IV. METHOD
A. Sequence Modeling Setup
Given an MDP as defined in Section III-A, the agent starts the sequential interaction with the environment from an initial state and produces a sequence of states, actions, and rewards—i.e., a trajectory. Following [9], we replace rewards with the return-to-go, which yields the trajectory representation used for autoregressive training and generation: . Here, return-to-go is defined as , where . The trajectory is then provided as input to the DT, which outputs the policy distribution .
B. Guiding by MPC
Traditional decision transformers trained exclusively on offline datasets often perform sub-optimally due to the inherent non-stationarity of data distributions in complex environments. To address this, we incorporate online trajectory generation using model predictive control. Specifically, at each time step during rollout, we execute a finite-horizon MPC with horizon T, which serves as the behavior policy to predict an optimal sequence of control actions, , along with the corresponding state and stage-cost sequences (where the stage cost is equivalent to the negative reward). Together, these outputs define a locally optimal trajectory, , which is then stored in a replay buffer alongside real rollout trajectories, , and used for subsequent training of the decision transformer .
To estimate the parameters of the stochastic policy via maximum likelihood estimation (MLE), we minimize the negative log-likelihood (NLL) loss over a mini-batch of trajectories sampled from the replay buffer D:
where T denotes the trajectory distribution induced by the replay buffer, and we approximate the expectation by averaging over the mini-batch of sampled trajectories. Optimizing this objective alone often leads to suboptimal, near-deterministic policies and can induce instability due to unbounded updates in the policy parameters. To mitigate these issues, we augment optimization with two complementary constraints: maximum entropy principle and a Kullback–Leibler (KL) divergence trust region constraint. The maximum entropy principle encourages policies to maintain stochasticity, thereby promoting sufficient exploration of the action space and avoiding premature convergence to suboptimal deterministic policies [49]. Simultaneously, the KL-divergence constraint restricts the magnitude of policy updates between successive iterations, which ensures monotonic policy improvement and stabilizes training [46]. Specifically, we optimize:
s.t.
where represents differential entropy of policy conditioned on trajectory . And, indicates the KL divergence of the reference policy distribution from the current policy distribution . Here, denotes the entropy lower bound required to encourage sufficient exploration, and specifies the trust region bound that limits policy deviation from the reference policy (i.e., the policy from the previous iteration).
To solve the constrained optimization problem in (7) in practice, we reformulate it as a primal-dual optimization problem followed by a backtracking line search. Specifically, we incorporate the hard entropy constraint as a regularization term in the objective and enforce the KL divergence constraint using the backtracking line search technique to stay within the trust region. This yields a primal-dual optimization problem with the primal formulation as follows:
(8a)
s.t.
where serves as the dual variable associated with the entropy constraint.
To solve the dual problem, the gradient descent method is used in a log-space ( ) to ensure that the dual variable remains positive:
Here, is the learning rate, and represents the iteration. Moreover, in practice, the expectation is approximated empirically using a mini-batch of sampled trajectories.
C. Efficient Riemannian Optimization
This section details how we leverage an efficient Riemannian optimization algorithm to exploit the underlying curvature of the loss landscape associated with the non-convex primal optimization problem defined in (8). By accounting for the local geometry, the proposed method enables more informed update steps, thereby improving the per-iteration progress toward the optimum. This, in turn, accelerates convergence and reduces the required number of environment interactions, ultimately reducing the overall complexity of the sample.
Formally, we seek an update direction that minimizes the loss function, , while ensuring that the resulting change in the loss, , corresponds to the steepest descent direction in the induced Riemannian geometry. This is achieved by incorporating the local curvature information, as encoded by an appropriate Riemannian metric, into the optimization process [50].
Recall the Riemannian optimization problem defined in (4), which seeks a minimizer on a smooth manifold . In our policy learning setting, the optimization problem in (8a) can be interpreted as a special case of Riemannian formulation, where the Euclidean space with the standard inner product can be naturally regarded as a Riemannian manifold [48].
Building on this reformulation with the natural retraction , the update direction for the policy parameters at iteration corresponds to the steepest descent direction in the Riemannian space. Specifically, the parameter update is given by
Algorithm 1 GuRO: Guided Riemannian Optimization for Decision Transformer learning via MPC.
1: Input: primal step-size ; dual learning rate ; forgetting factor ; batch size ; MPC horizon ; discount factor ; entropy lower bound ; trust region bound ; contraction factor ; epsilon value .
2: Initialize: policy parameters ; dual variable ; Riemannian metric estimate ; replay buffer .
3: Output: optimal policy
4: for do
5: Rollout and Run MPC.
6:
7: Sample batch of trajectories from .
8: and
9: Update Equation (9), where .
10: and
11: Compute gradient estimate: Equation (12)
12: Estimate Equation (13)
13: Update Equation (14)
14: Euclidean gradient: Equation (15)
15: Riemannian gradient:
16: Trust Region Backtracking Line Search:
17: Re-initialize step-size
18: repeat
19: Update along Equation (16)
20: Estimate Equation (17)
21: Shrink step size.
22: until
23: end for
24: return Optimal parameters
where the Riemannian gradient with respect to the Riemannian metric is defined as:
Here, denotes the Moore–Penrose pseudo-inverse of the Riemannian metric tensor . The metric tensor encodes the local geometric structure of the parameter space and, consequently, the curvature of the loss landscape. In this formulation, acts as a preconditioner for the Euclidean gradient to rescale and reorient the update direction toward the steepest descent direction in the induced Riemannian geometry.
A key challenge, however, lies in computing the Riemannian metric . Direct computation of is generally intractable for high-dimensional policies, such as decision transformers, due to the prohibitive computational and memory costs associated with exact Riemannian metric formulations. To overcome this limitation, we propose a scalable, mini-batch-based approximation strategy that leverages empirical expectations, exponential moving averages, and diagonalized tensor representations.
Following [51], we approximate the diagonal Riemannian metric using a Gauss–Newton estimator. Concretely, we sample a mini-batch of size m from the replay buffer D, yielding trajectories . For each trajectory sample and time steps , we draw actions from the current policy distribution: . Using these samples, we compute the mini-batch gradient estimate of the negative log-likelihood:
The corresponding instantaneous diagonal Riemannian metric is then defined as [51]:
where the function extracts the diagonal entries of its matrix argument, and is for stability. Here, denotes the identity matrix matching the parameter dimensionality.
We then maintain an exponential moving average to obtain a stable and low-variance approximation of the metric:
where denotes the smoothed Riemannian metric approximated at iteration , and is the forgetting factor that controls the trade-off between stability and adaptability. Since stores only the diagonal entries of the original matrix, its Moore–Penrose pseudo-inverse is obtained by inverting these entries elementwise.
Next, using the sampled trajectories, we calculate the mini-batch Euclidean gradient of the entropy-regularized loss in (8a) as below:
(15)
Given and , we approximate the Riemannian gradient according to (11). Consequently, the primal optimization problem defined in (8) can be solved iteratively in the Riemannian parameter space based on the approximated diagonal metric. Specifically, at iteration , the policy parameters are updated via:
where denotes the element-wise (Hadamard) product. We then adapt the step-size using a contraction factor by performing a backtracking line search along the direction to ensure monotonic improvement of the objective while satisfying the trust region constraint in (8b). To this aim, the mini-batch estimate of the KL divergence is computed as:
The complete procedure is outlined in Algorithm 1.

Fig. 1. Experimental evaluation on the Unitree AlienGo quadruped robot, simulated using the MuJoCo XLA (MJX) physics engine within the JAX framework. All experiments leverage a parallelized GPU implementation on an NVIDIA GeForce RTX 4090. The translucent robots illustrate the parallel simulations running simultaneously. The tasks include locomotion on uneven terrains (left), stair climbing (center), and ascending a low-friction inclined surface (right).
V. EXPERIMENTS AND DISCUSSION
We evaluate the effectiveness of the proposed algorithm on a set of high-dimensional, nonlinear robotic control tasks, focusing on quadruped locomotion in challenging environments.
A. Validation Setup
Environments and Tasks. All experiments are conducted using the Unitree AlienGo quadruped robot, evaluated on three distinct challenging locomotion scenarios: (i) locomotion on uneven terrains, (ii) stair climbing, and (iii) ascending a low-friction inclined surface—as illustrated in Figure 1.
Baselines and Metrics. We compare our method against a diverse set of competitive baselines, including state-of-the-art reinforcement learning algorithm: Soft Actor-Critic (SAC) [49]; curvature-aware policy optimization method: Trust Region Policy Optimization (TRPO) [46]; and online variant of the decision transformer: Online-DT [11]. To rigorously assess the contribution of our Riemannian optimization algorithm on MPC-guided DT learning, we additionally evaluate its performance compared with widely used Euclidean optimizers: SGD and Adam. Performance is measured in terms of average total reward, sample efficiency, and convergence rate, which provides a comprehensive assessment of both learning speed and final policy quality.
Implementation Settings. The experiments are performed on the Unitree AlienGo quadruped robot, simulated using the MuJoCo XLA (MJX) physics engine within the JAX framework. All experiments leverage a parallelized GPU implementation on an NVIDIA GeForce RTX 4090, and the average and standard deviation over 5 runs with different initial random seeds are reported. As a Decision Transformer, we employ a GPT-style sequence model implemented as a 3-layer Transformer decoder with 128-dimensional hidden states and 512-dimensional feedforward layers. For the MPC component, we employ the whole-body dynamics model as the nominal dynamics, assuming an uncertainty with a standard deviation of 0.01 in each dimension. The quantities and in the Equations (9), (15), and (17) are computed using the built-in implementations available in PyTorch.

Fig. 2. Locomotion on uneven terrains. Left: mean total reward versus timesteps, highlighting improved sample efficiency and final performance. Right: training loss across iterations, illustrating faster convergence with the proposed Riemannian optimization method.

Fig. 3. Stair climbing performance. Left: mean total reward over timesteps, showing enhanced sample efficiency and final reward with our approach. Right: corresponding training loss, demonstrating accelerated convergence relative to SGD and Adam.

Fig. 4. Ascending low-friction incline. Left: mean total reward, emphasizing the performance improvement and sample efficiency of our method. Right: training loss across iterations, highlighting the faster convergence of the proposed Riemannian optimizer compared to conventional methods.
Furthermore, hyperparameter selection is performed via systematic grid search over predefined ranges, and the configuration that yields the highest performance on validation rollouts is used for all reported results. Specifically, we perform a hyperparameter sweep over the learning rates in the range and the forgetting factor in the range . Furthermore, we set the batch size to 64, the MPC horizon to 25, and the discount factor to 0.99. In addition, we use an entropy lower bound of 0.2, a trust region bound of 0.01, a contraction factor of 0.8, and . Additionally, all baseline algorithms are tuned via a limited grid search around the default settings provided in their original implementations to ensure fair comparisons. Specifically, for SAC, we use the Adam optimizer with a learning rate of , discount factor , replay buffer size , batch size 256, soft update coefficient , and a neural network comprising two hidden layers of 256 units each. TRPO is configured with a maximum KL divergence , discount factor , 10 conjugate gradient
TABLE I
AVERAGE TOTAL REWARD (MEAN ± STANDARD DEVIATION) FOR QUADRUPED ROBOT ACROSS CHALLENGING SCENARIOS. TASKS INCLUDE UNEVEN TERRAIN LOCOMOTION, STAIR CLIMBING, AND LOW-FRICTION SLOPE ASCENT. HIGHER VALUES CORRESPOND TO BETTER PERFORMANCE.
| Task Scenario | TRPO | SAC | Online-DT | Ours-SGD | Ours-Adam | Ours-Riemannian |
|---|---|---|---|---|---|---|
| Locomotion on uneven terrains | ||||||
| Stair climbing performance | ||||||
| Ascending low-friction inclines |
steps, and a line search contraction factor of 0.8. Finally, for Online-DT, we adopt the same model architecture as our method, with context length , learning rate , weight decay 0.001, discount factor , and batch size 256.
B. Main Results and Discussions
Table I, and Figures 2–4 summarize our experimental results on the Unitree AlienGo quadruped across three challenging locomotion tasks. Overall, the MPC-guided DT trained with the proposed Riemannian (curvature-aware) optimizer significantly outperforms classical RL baselines (TRPO, SAC), Online-DT, and our own ablated variants using Euclidean optimizers (Ours-SGD, Ours-Adam). Higher average total reward, better sample efficiency, and faster convergence rates evidence this superior performance.
As illustrated in the left plots of Figure 2 (Locomotion on uneven terrains), Figure 3 (Stair climbing), and Figure 4 (Ascending low-friction incline), our method achieves higher average total reward with fewer environment steps compared to TRPO, SAC, and Online-DT. MPC in our framework provides real-time, locally optimal predicted trajectories that guide the decision transformer learning and effectively minimize the need for environment interaction, and reduce the sample complexity. Another key factor contributing to these improvements is the efficient Riemannian optimization strategy. The right plots in Figures 2, 3, and 4, depicting the training loss across iterations, clearly demonstrate the faster convergence of our Riemannian approach compared to traditional Euclidean optimizers like SGD and Adam. This faster convergence is attributed to the Riemannian method's ability to capture the intrinsic geometry of the loss manifold and perform curvature-aware updates, which traditional gradient-based methods often fail to account for.
To complement the summary statistics in Table I, we performed Welch's t-test and Cohen's effect size (d) analysis to assess the significance of performance differences. In the uneven terrain task, our algorithm consistently outperforms TRPO, SAC, and Online-DT, yielding very large t-statistics and extremely small p-values, indicative of highly significant differences. Specifically, compared to TRPO, our method achieves ( ) with a Cohen's d of 12.85. Against SAC, the results are ( , d = 4.50), while against Online-DT they are ( , d = 2.75).
In the stair climbing scenario, the statistical analysis indicates a significant difference only in comparison to Online- DT, with . However, across all pairwise comparisons with TRPO, SAC, and Online-DT, the effect sizes are consistently large (d > 0.8), suggesting substantial performance gains of our method, even in cases where the p-values do not reach conventional thresholds of statistical significance. In the low-friction incline scenario, none of the pairwise comparisons reach conventional levels of statistical significance (p < 0.05). Nevertheless, the corresponding Cohen's d values are all large. Our analysis further shows that the MPC-guided algorithm with Riemannian learning consistently attains large effect sizes relative to the same algorithm trained with SGD or Adam, most notably in the uneven terrain locomotion. Although these improvements are not always statistically significant due to comparatively high p-values, they nonetheless highlight the substantial advantage of the Riemannian approach over its Euclidean counterparts.
VI. CONCLUSIONS
In this work, we proposed a hybrid framework that seamlessly integrates model-based MPC with model-free RL within a sequence modeling paradigm, using the Decision Transformer. To address the challenges arising from the highly non-convex optimization landscape of transformer-based policies, we employed an efficient Riemannian optimization strategy, which enables curvature-aware updates that improve numerical optimization stability and convergence rate. We evaluated the proposed approach on the Unitree AlienGo quadruped robot across three challenging locomotion scenarios: traversing uneven terrains, climbing stairs, and ascending low-friction inclined surfaces. The results demonstrate that our method consistently outperforms state-of-the-art baselines, achieving higher mean total reward, superior sample efficiency, and faster convergence.
ACKNOWLEDGMENT
This work was supported in part by the Engineering and Physical Sciences Research Council (EPSRC) through the AI Hub in Generative Models [grant number EP/Y028805/1].
REFERENCES
[1] J. B. Rawlings, D. Q. Mayne, M. Diehl et al., Model predictive control: theory, computation, and design. Nob Hill Publishing Madison, WI, 2020, vol. 2.
[2] R. S. Sutton, A. G. Barto et al., Reinforcement learning: An introduction. MIT press Cambridge, 1998, vol. 1, no. 1.
[3] D. Q. Mayne, J. B. Rawlings, C. V. Rao, and P. O. Scokaert, "Constrained model predictive control: Stability and optimality," Automatica, vol. 36, no. 6, pp. 789–814, 2000.
[4] M. Schwenzer, M. Ay, T. Bergs, and D. Abel, “Review on model predictive control: An engineering perspective,” The International Journal of Advanced Manufacturing Technology, vol. 117, no. 5, pp. 1327–1349, 2021.
[5] H. Abdi, P. Zhao, N. Hovakimyan, and R. Ghabcheloo, “Model predictive control barrier functions: Guaranteed safety with reduced conservatism and shortened horizon,” in 2024 American Control Conference (ACC). IEEE, 2024, pp. 1652–1657.
[6] R. Reiter, J. Hoffmann, D. Reinhardt, F. Messerer, K. BaumgÄltner, S. Sawant, J. Boedecker, M. Diehl, and S. Gros, “Synthesis of model predictive control and reinforcement learning: Survey and classification,” arXiv preprint arXiv:2502.02133, 2025.
[7] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017.
[8] D. Celestini, D. Gammelli, T. Guffanti, S. D'Amico, E. Capello, and M. Pavone, "Transformer-based model predictive control: Trajectory optimization via sequence modeling," IEEE Robotics and Automation Letters, 2024.
[9] L. Chen, K. Lu, A. Rajeswaran, K. Lee, A. Grover, M. Laskin, P. Abbeel, A. Srinivas, and I. Mordatch, “Decision transformer: Reinforcement learning via sequence modeling,” Advances in neural information processing systems, vol. 34, pp. 15084–15097, 2021.
[10] M. Janner, Q. Li, and S. Levine, “Offline reinforcement learning as one big sequence modeling problem,” Advances in neural information processing systems, vol. 34, pp. 1273–1286, 2021.
[11] Q. Zheng, A. Zhang, and A. Grover, “Online decision transformer,” in international conference on machine learning. PMLR, 2022, pp. 27042–27059.
[12] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014.
[13] S.-I. Amari, “Natural gradient works efficiently in learning,” Neural computation, vol. 10, no. 2, pp. 251–276, 1998.
[14] R. Anil, V. Gupta, T. Koren, K. Regan, and Y. Singer, “Scalable second order optimization for deep learning,” arXiv preprint arXiv:2002.09018, 2020.
[15] Z. Wu, C. Yu, C. Chen, J. Hao, and H. H. Zhuo, “Plan to predict: Learning an uncertainty-foreseeing model for model-based reinforcement learning,” Advances in Neural Information Processing Systems, vol. 35, pp. 15849–15861, 2022.
[16] K. Chua, R. Calandra, R. McAllister, and S. Levine, “Deep reinforcement learning in a handful of trials using probabilistic dynamics models,” Advances in neural information processing systems, vol. 31, 2018.
[17] K. Lowrey, A. Rajeswaran, S. Kakade, E. Todorov, and I. Mordatch, "Plan online, learn offline: Efficient learning and exploration via model-based control," arXiv preprint arXiv:1811.01848, 2018.
[18] N. Hatch and B. Boots, “The value of planning for infinite-horizon model predictive control,” in 2021 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2021, pp. 7372–7378.
[19] N. Hansen, X. Wang, and H. Su, “Temporal difference learning for model predictive control,” arXiv preprint arXiv:2203.04955, 2022.
[20] D. Kang, J. Cheng, M. Zamora, F. Zargarbashi, and S. Coros, “Rl+ model-based control: Using on-demand optimal control to learn versatile legged locomotion,” IEEE Robotics and Automation Letters, vol. 8, no. 10, pp. 6619–6626, 2023.
[21] S. Mamedov, R. Reiter, S. M. B. Azad, R. Viljoen, J. Boedecker, M. Diehl, and J. Swevers, “Safe imitation learning of nonlinear model predictive control for flexible robots,” in 2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2024, pp. 3613–3619.
[22] A. Romero, Y. Song, and D. Scaramuzza, “Actor-critic model predictive control,” in 2024 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2024, pp. 14777–14784.
[23] S. Gros and M. Zanon, “Data-driven economic nmpc using reinforcement learning,” IEEE Transactions on Automatic Control, vol. 65, no. 2, pp. 636–648, 2019.
[24] S. Levine and V. Koltun, “Guided policy search,” in International conference on machine learning. PMLR, 2013, pp. 1–9.
[25] —, “Learning complex neural network policies with trajectory optimization,” in International Conference on Machine Learning. PMLR, 2014, pp. 829–837.
[26] J. Carius, F. Farshidian, and M. Hutter, “Mpc-net: A first principles guided policy search,” IEEE Robotics and Automation Letters, vol. 5, no. 2, pp. 2897–2904, 2020.
[27] F. Jenelten, J. He, F. Farshidian, and M. Hutter, “Dtc: Deep tracking control,” Science Robotics, vol. 9, no. 86, p. eadh5401, 2024.
[28] L. Brunke, M. Greeff, A. W. Hall, Z. Yuan, S. Zhou, J. Panerati, and A. P. Schoellig, “Safe learning in robotics: From learning-based control to safe reinforcement learning,” Annual Review of Control, Robotics, and Autonomous Systems, vol. 5, no. 1, pp. 411–444, 2022.
[29] M. Lin, Z. Sun, Y. Xia, and J. Zhang, “Reinforcement learning-based model predictive control for discrete-time systems,” IEEE Transactions on Neural Networks and Learning Systems, vol. 35, no. 3, pp. 3312–3324, 2023.
[30] Z. Liu, Z. Guo, Y. Yao, Z. Cen, W. Yu, T. Zhang, and D. Zhao, “Constrained decision transformer for offline safe reinforcement learning,” in International conference on machine learning. PMLR, 2023, pp. 21611–21630.
[31] N. M. Shafiullah, Z. Cui, A. A. Altanzaya, and L. Pinto, “Behavior transformers: Cloning k modes with one stone,” Advances in neural information processing systems, vol. 35, pp. 22955–22968, 2022.
[32] K. Wang, H. Zhao, X. Luo, K. Ren, W. Zhang, and D. Li, “Bootstrapped transformer for offline reinforcement learning,” Advances in Neural Information Processing Systems, vol. 35, pp. 34748–34761, 2022.
[33] T. Yamagata, A. Khalil, and R. Santos-Rodriguez, “Q-learning decision transformer: Leveraging dynamic programming for conditional sequence modelling in offline rl,” in International Conference on Machine Learning. PMLR, 2023, pp. 38989–39007.
[34] Z. Xie, Z. Lin, D. Ye, Q. Fu, Y. Wei, and S. Li, “Future-conditioned unsupervised pretraining for decision transformer,” in International Conference on Machine Learning. PMLR, 2023, pp. 38187–38203.
[35] C. Kim, J. Kim, Y. Seo, K. Lee, H. Lee, and J. Shin, “Dynamics-augmented decision transformer for offline dynamics generalization,” in 3rd Offline RL Workshop: Offline RL as a “Launchpad”, 2022.
[36] P. Wang, M. Zhu, and S. Shen, “Environment transformer and policy optimization for model-based offline reinforcement learning,” in 2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2024, pp. 12625–12631.
[37] M. Kotb, C. Weber, M. B. Hafez, and S. Wermter, “Qt-tdm: Planning with transformer dynamics model and autoregressive q-learning,” IEEE Robotics and Automation Letters, 2024.
[38] K. Wen, Y. Hu, Y. Mu, and L. Ke, “M 3pc: Test-time model predictive control using pretrained masked trajectory model,” in The Thirteenth International Conference on Learning Representations.
[39] J. Nocedal and S. J. Wright, Numerical optimization. Springer, 2006.
[40] S. P. Dash, H. Abdi, W. Pan, S. Kaski, and M. Sun, “Gradient regularized natural gradients,” arXiv preprint arXiv:2601.18420, 2026.
[41] S. M. Kakade, “A natural policy gradient,” Advances in neural information processing systems, vol. 14, 2001.
[42] J. Martens and R. Grosse, “Optimizing neural networks with kronecker-factored approximate curvature,” in International conference on machine learning. PMLR, 2015, pp. 2408–2417.
[43] V. Gupta, T. Koren, and Y. Singer, “Shampoo: Preconditioned stochastic tensor optimization,” in International Conference on Machine Learning. PMLR, 2018, pp. 1842–1850.
[44] Z. Yao, A. Gholami, S. Shen, M. Mustafa, K. Keutzer, and M. Mahoney, “Adahessian: An adaptive second order optimizer for machine learning,” in proceedings of the AAAI conference on artificial intelligence, vol. 35, no. 12, 2021, pp. 10665–10673.
[45] H. Liu, Z. Li, D. Hall, P. Liang, and T. Ma, “Sophia: A scalable stochastic second-order optimizer for language model pre-training,” arXiv preprint arXiv:2305.14342, 2023.
[46] J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz, “Trust region policy optimization,” in International conference on machine learning. PMLR, 2015, pp. 1889–1897.
[47] R. Bellman, “A markovian decision process,” Journal of mathematics and mechanics, pp. 679–684, 1957.
[48] H. Sato, Riemannian optimization and its applications. Springer, 2021, vol. 670.
[49] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine, “Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor,” in International conference on machine learning. Pmlr, 2018, pp. 1861–1870.
[50] S.-i. Amari and H. Nagaoka, Methods of information geometry. American Mathematical Soc., 2000, vol. 191.
[51] R. Pascanu and Y. Bengio, “Revisiting natural gradient for deep networks,” arXiv preprint arXiv:1301.3584, 2013.