# ZipMPC: Compressed Context-Dependent MPC Cost via Imitation Learning

arXiv: https://arxiv.org/abs/2507.13088 · HTML: https://mlsanity.com/paper/2507.13088/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Placed in Imitation and offline RL for driving, one of 13 directions in Offline RL and imitation learning from data.
- Builds on 23 of its 52 references that are in the map.
- First posted on arXiv 17 Jul 2025.

## Placed in

- Offline RL and imitation learning from data / [Imitation and offline RL for driving](https://mlsanity.com/offlinerl/imitation-and-offline-rl-for-driving/)

## Builds on (most cited first, 23 of 23)

- [OptNet: Differentiable Optimization as a Layer in Neural Networks](https://mlsanity.com/paper/1703.00443/) (2017)
- [Differentiable Convex Optimization Layers](https://mlsanity.com/paper/1910.12430/) (2019)
- [Melding the Data-Decisions Pipeline: Decision-Focused Learning for Combinatorial Optimization](https://mlsanity.com/paper/1809.05504/) (2018)
- [Differentiable MPC for End-to-end Planning and Control](https://mlsanity.com/paper/1810.13400/) (2018)
- [End-to-End Constrained Optimization Learning: A Survey](https://mlsanity.com/paper/2103.16378/) (2021)
- [Data-driven Economic NMPC using Reinforcement Learning](https://mlsanity.com/paper/1904.04152/) (2019)
- [Optimization-Based Autonomous Racing of 1:43 Scale RC Cars](https://mlsanity.com/paper/1711.07300/) (2017)
- [A Unified MPC Framework for Whole-Body Dynamic Locomotion and Manipulation](https://mlsanity.com/paper/2103.00946/) (2021)
- [Deep Learning Alternative to Explicit Model Predictive Control for Unknown Nonlinear Systems](https://mlsanity.com/paper/2011.03699/) (2020)
- [Feedback MPC for Torque-Controlled Legged Robots](https://mlsanity.com/paper/1905.06144/) (2019)
- [Practical Reinforcement Learning of Stabilizing Economic MPC](https://mlsanity.com/paper/1904.04614/) (2019)
- [Bayesian Multi-Task Learning MPC for Robotic Mobile Manipulation](https://mlsanity.com/paper/2211.10270/) (2022)
- [MPC-based Controller with Terrain Insight for Dynamic Legged Locomotion](https://mlsanity.com/paper/1909.13842/) (2019)
- [Online Non-linear Centroidal MPC for Humanoid Robot Locomotion with Step Adjustment](https://mlsanity.com/paper/2203.04489/) (2022)
- [Sample-Based Learning Model Predictive Control for Linear Uncertain Systems](https://mlsanity.com/paper/1904.06432/) (2019)
- [Contextual Tuning of Model Predictive Control for Autonomous Racing](https://mlsanity.com/paper/2110.02710/) (2021)
- [Chronos and CRS: Design of a miniature car-like robot and a software framework for single and multi-agent robotics and control](https://mlsanity.com/paper/2209.12048/) (2022)
- [Evaluation of MPC-based Imitation Learning for Human-like Autonomous Driving](https://mlsanity.com/paper/2211.12111/) (2022)
- [Imitation Learning of MPC with Neural Networks: Error Guarantees and Sparsification](https://mlsanity.com/paper/2501.03671/) (2025)
- [Constrained nonlinear output regulation using model predictive control -- extended version](https://mlsanity.com/paper/2005.12413/) (2020)
- [Learning Model Predictive Control for Competitive Autonomous Racing](https://mlsanity.com/paper/2005.00826/) (2020)
- [On Building Myopic MPC Policies using Supervised Learning](https://mlsanity.com/paper/2401.12546/) (2024)
- [Learning Solutions of Stochastic Optimization Problems with Bayesian Neural Networks](https://mlsanity.com/paper/2406.03082/) (2024)

## Built on by (most cited first, 3 of 3)

- [TurboMPC: Fast, Scalable, and Differentiable Model Predictive Control on the GPU](https://mlsanity.com/paper/2606.24039/) (2026)
- [Deep Reinforcement-Learning-Guided Model Predictive Control for Preventing Overtakes in Autonomous Racing](https://mlsanity.com/paper/2607.20973/) (2026)
- [Accelerating Reinforcement Learning via MPC Solver-Gradient Guidance for Weights-varying MPC](https://mlsanity.com/paper/2609.01061/) (2026)

## Abstract (arXiv)

The computational burden of model predictive control (MPC) limits its application on real-time systems, such as robots, and often requires the use of short prediction horizons. This not only affects the control performance, but also increases the difficulty of designing MPC cost functions that reflect the desired long-term objective. This paper proposes ZipMPC, a method that imitates a long-horizon MPC behaviour by learning a compressed and context-dependent cost function for a short-horizon MPC. It improves performance over alternative methods, such as approximate explicit MPC and automatic cost parameter tuning, in particular in terms of i) optimizing the long term objective; ii) maintaining computational costs comparable to a short-horizon MPC; iii) ensuring constraint satisfaction; and iv) generalizing control behaviour to environments not observed during training. For this purpose, ZipMPC leverages the concept of differentiable MPC with neural networks to propagate gradients of the imitation loss through the MPC optimization. We validate our proposed method in simulation and real-world experiments on autonomous racing. ZipMPC consistently completes laps faster than selected baselines, achieving lap times close to the long-horizon MPC baseline. In challenging scenarios where the short-horizon MPC baseline fails to complete a lap, ZipMPC is able to do so. In particular, these performance gains are also observed on tracks unseen during training.
