Introduction
Modern robotics and autonomous systems face a persistent challenge in reinforcement learning (RL): the trade-off between the flexibility of model-free methods and the efficiency of model-based approaches. While model-based systems often utilize Linear Quadratic Regulators (LQR) for planning, standard LQR assumes a perfect model of the environment. In practice, models are frequently inaccurate due to inherent uncertainty (e.g., unmodeled friction) and stochasticity (e.g., sensor noise).
This paper introduces a Differentiable Robust LQR Layer, a plug-and-play neural network module designed to learn control policies that are explicitly resilient to such errors. By formulating robust optimal control as a differentiable semi-definite program (SDP), the proposed layer enables end-to-end training where a system learns to account for its own model uncertainty.
Methodology
The core of the proposed method is a neural network layer based on Robust Linear-Quadratic-Gaussian (LQG) control. The approach consists of four key components:
- Robust Formulation: Rather than optimizing for a single nominal model, the layer optimizes for the worst-case scenario within a predefined "uncertainty set"—typically an ellipsoid of possible dynamics models.
- LMI and SDP Integration: The complex constraints of robust control are translated into Linear Matrix Inequalities (LMIs). This allows the problem to be framed as a Semi-Definite Program (SDP), a type of convex optimization that is mathematically well-behaved and guarantees global optimality.
- Differentiable Optimization: Utilizing the
cvxpylayerslibrary, the entire optimization process is made differentiable. This allows gradients to backpropagate through the robust solver, enabling the neural network to update its internal representation of dynamics ($A, B$), costs ($Q, R$), and the uncertainty set ($D, \sigma$). - Infinite Horizon Efficiency: By focusing on the infinite-horizon version of the control problem, the method avoids the computational burden of "unrolling" simulations over many time steps. This makes the layer significantly faster and more stable than previous finite-horizon differentiable MPC approaches.
Experimental Evaluation
The method was evaluated across several simulated control environments designed to test robustness:
- Robust Imitation Learning: A learner mimics an expert's behavior in an environment characterized by high model uncertainty.
- Uncertain Stochastic Optimal Control (SOC): A benchmark requiring the system to minimize costs while navigating both random noise and a range of possible dynamics models.
The proposed LMI-Robust-LQR was compared against standard differentiable LQR (mpc.pytorch), as well as general-purpose architectures like Multi-Layer Perceptrons (MLPs) and LSTMs.
Key Results and Insights
The integration of robust control laws directly into the neural network architecture provides a powerful inductive bias for safety. The network is effectively "forced" to learn stable policies, preventing it from taking risky shortcuts during the training phase.
As shown in Figure 3, the imitation loss converges rapidly, demonstrating the layer's ability to learn effective control policies even as the internal model loss fluctuates. A significant finding is that the network can learn the shape of its own uncertainty set ($D$), essentially learning how much to trust its physics model.
In scenarios with high model uncertainty, the LMI-Robust-LQR significantly outperformed baselines. For instance, it achieved a validation cost of 10.9, compared to 44.1 for the standard mpc.pytorch layer, which struggled with the gap between the learned model and the true environment (see Figure 5). Furthermore, the LMI-based layers demonstrated exceptional computational efficiency, maintaining a constant solving time of approximately 1 second per batch regardless of the time horizon. In contrast, standard differentiable MPC solvers scaled linearly, taking up to 140 seconds for a horizon of 100—a 140x speedup.
Conclusion and Future Work
The Differentiable Robust LQR Layer offers a robust and efficient solution for learning control policies under uncertainty. While currently limited to linear control laws ($u = Kx$), which may struggle with highly non-linear systems, the layer can serve as a local controller within larger non-linear frameworks. Future research will explore extending this approach to time-dependent and finite-horizon robust settings to accommodate more complex, time-varying maneuvers while maintaining safety guarantees.
Summary updated