NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Closed-loop Model Selection for Kernel-based Models using Bayesian Optimization

Thomas Beckers, Somil Bansal, Claire J. Tomlin, Sandra Hirche

TL;DR

This paper introduces a framework that optimizes kernel-based machine learning models directly for their performance inside a control loop, rather than just minimizing their prediction error. By using Bayesian Optimization to iteratively tune kernels and hyperparameters based on real-world closed-loop performance, the method significantly improves tracking accuracy in both simulations and physical robotic experiments.

What Problem Does This Paper Address?

When designing model-based controllers (like model predictive control or feedback linearization) for complex, nonlinear systems, engineers frequently turn to kernel-based machine learning methods like Gaussian Processes (GPs) or Support Vector Machines (SVMs). Traditionally, these models are trained in an "open-loop" fashion: you collect data, fit the model, and minimize the state prediction error.

However, a model that is excellent at predicting the next state in isolation isn't necessarily the best model for controlling the system. Open-loop training completely ignores how the model interacts with the controller and the actual system dynamics. This disconnect often leads to sub-optimal closed-loop performance, such as poor trajectory tracking or high control effort. The authors address this gap by directly optimizing the model's structure and parameters to minimize the actual control cost.

Methods

The authors propose a Closed-loop Model Selection framework powered by Bayesian Optimization (BO). Instead of treating model selection as a pure data-fitting problem, they treat it as an active learning problem executed directly on the physical system or a high-fidelity simulator.

Fig. 1. Closed-loop model selection for kernel-based models. BO is used to optimize the kernel and its hyperparameters directly based on the evaluation of a cost function.

The workflow operates in an iterative loop:

  1. Initialization: A set of candidate kernels (e.g., linear, polynomial, Gaussian) and their hyperparameter spaces are defined.
  2. Task Evaluation: The controller utilizes the current kernel-based model to execute a control task on the actual system. The system's trajectory is recorded, and a performance cost function (such as tracking error) is evaluated.
  3. Model Optimization: BO takes the evaluated cost and updates a probabilistic surrogate model of the cost function. It then uses an acquisition function ("expected-improvement-plus") to propose the next best kernel and hyperparameter combination to try.

Crucially, the paper provides a theoretical analysis proving that under certain assumptions (such as using stationary kernels), this iterative evaluation process preserves the stability of the closed-loop system and guarantees convergence to the global minimum of the control cost function.

Datasets

The framework was evaluated using two main setups:

  • Numerical Simulation: A synthetic, highly nonlinear one-dimensional system controlled via feedback linearization using an SVM prediction model. The training dataset consisted of a sparse set of 11 homogeneously distributed data pairs.
  • Physical Robotic Experiment: A 3-Degree-of-Freedom (DoF) SCARA robot named CARBO executing a fluid-stirring task. The dynamics model utilized a Gaussian Process trained on 223 data points collected along a desired trajectory using a high-gain controller.
Stirring with the 3-dof SCARA robot CARBO

Key Insights and Ideas

  • The Accuracy Paradox: A lower prediction error does not guarantee better control. In fact, the optimal closed-loop model might exhibit a higher open-loop prediction error but capture the specific system sensitivities that matter most to the controller.
  • Data Efficiency over Data Volume: Instead of collecting massive amounts of new training data to fix a poorly performing controller—which drastically increases the real-time computational burden of GP and SVM models—this method optimizes the interpretation of existing data by tuning the kernel space.
  • Bypassing Explicit Dynamics: The framework optimizes the control objective without needing to explicitly identify the exact underlying physical parameters of complex environments (like fluid dynamics during stirring).

Key Results

Simulation

The classical data-based optimization (minimizing cross-validation loss) selected a linear kernel, resulting in a prediction loss of 0.913 but a massive closed-loop control cost of 204.477. Conversely, the proposed closed-loop optimization selected a Gaussian kernel, which had a worse prediction loss (2.491) but slashed the actual control cost down to 16.410.

Robotic Experiment

When tested on the physical SCARA robot performing the stirring task, the closed-loop optimization adjusted the GP hyperparameters over 100 trials.

Minimum cost vs task evaluations for the robot experiment

Compared to standard maximum-likelihood estimation (data-based optimization), the BO-driven closed-loop framework reduced the tracking error cost by 30% (dropping the cost from 1.49 to 1.05), despite the resulting hyperparameters being sub-optimal with respect to the pure likelihood function.

Limitations and Future Work

  • Hardware Wear and Tear: The framework requires running multiple iterative trials on the actual physical system. For systems where repetitive rollouts are expensive, time-consuming, or physically damaging, this could be a bottleneck.
  • Optimization Scalability: In the physical experiment, the authors had to fix the kernel type beforehand to reduce the optimization space. Simultaneously optimizing both discrete kernel choices and a large number of continuous hyperparameters on physical hardware remains a scaling challenge.

Summary updated

BibTeX
@inproceedings{beckers2019closed,
  author = {Thomas Beckers and Somil Bansal and Claire J. Tomlin and Sandra Hirche},
  title = {{Closed-loop Model Selection for Kernel-based Models using Bayesian Optimization}},
  booktitle = {CDC},
  year = {2019},
  doi = {10.1109/cdc40024.2019.9029690},
}
Figure