# Learning safety in model-based Reinforcement Learning using MPC and Gaussian Processes

MPC와 가우시안 프로세스를 이용한 모델 기반 강화학습에서의 안전성 학습

Filippo Airaldi, Bart De Schutter, Azita Dabiri · arXiv · 2022년 11월 3일

- **연구 문제** MPC를 함수 근사기로 쓰는 RL은 학습 중 파라미터 갱신이 제약 위반을 일으킬 수 있어, 데이터로부터 안전 집합을 추정하는 방법이 필요합니다.
- **연구 방법** 제약 위반 정도를 GP 회귀로 근사하고, 그 확률적 안전 제약을 MPC 파라미터의 RL 업데이트에 결합합니다.
- **주요 결과** quadrotor 실험에서 안전 변형은 기준 LSTD Q-learning보다 안전하지 않은 에피소드를 57%와 64% 줄였다고 보고되며, 수렴도 더 빨랐습니다.

## MPC 기반 RL의 안전성 문제

MPC를 함수 근사기로 사용하는 RL은 파라미터 θ를 갱신하면서 성능을 높이지만, 갱신 과정에서 MPC 파라미터가 제약을 위반하는 구성으로 이동할 수 있습니다. 기존 MPC 기반 RL은 최적화 문제 구조로 안정성 요구를 어느 정도 반영할 수 있으나, 학습 중 안전성을 보장하는 데에는 여전히 어려움이 남아 있습니다. 이 논문은 안전 집합을 직접 정의하는 대신 θ에 따른 제약 위반 정도를 데이터로 추정하는 문제를 다룹니다.

논문은 MPC 예측 모델을 선형이고 고정된 형태로 제한하지 않고, 확률적 안전 조건을 GP 회귀로 학습하여 RL 업데이트에 제약으로 넣는 방법을 제시합니다. 이 방법은 안전성을 확률 β 수준에서 다루며, 학습 중 안전하지 않은 정책을 줄이는 것을 목표로 합니다.

## GP 기반 안전 제약과 MPC-RL 업데이트

안전 제약 함수 z(θ)는 파라미터 θ에서 시작한 궤적의 최대 제약 위반 정도를 나타내며, 음수이면 안전, 양수이면 위반으로 해석됩니다. 이 함수는 해석적으로 알 수 없으므로 실험에서 얻은 최대 제약 위반 값을 데이터로 모아 GP 회귀기로 근사합니다. 제약 함수마다 독립적인 GP를 두고, 예측 평균과 분산을 이용해 P\[z\_j(θ)≤0 \| D\_n\]≥β 형태의 안전 집합을 근사합니다.

RL 업데이트는 현재 θ에서 θ+로 이동하는 제약 최적화 문제로 구성됩니다. 해당 제약은 GP 예측 평균과 표준편차로 결정론적 형태로 바꿀 수 있으며, 실행 불가능하면 요구 안전 확률 β를 점차 낮추는 역추적을 수행합니다. 이 역추적은 안전성과 실행 가능성 사이의 상충을 만듭니다.

## quadrotor 실험 설정과 비교 조건

검증 과제는 바람 교란이 있는 quadrotor 드론이 목표 위치에 도달하면서 상태와 제어 입력의 박스 제약을 지키는 문제입니다. MPC의 시스템 파라미터는 일부가 잘못 초기화되어 초기 제약 위반이 발생하며, 학습 대상은 중력 상수, 추력 계수, 제약 백오프로 제한됩니다.

비교는 LSTD Q-learning 기준 변형, GP 기반 안전 변형, 사전 지식이 있는 안전 변형 사이에서 수행되었습니다. 각 알고리즘은 100회 시뮬레이션을 평균하고 50 학습 에피소드 동안 실행되었으며, 목표 안전 확률 β는 0.9로 설정되고 실행 불가능 시 역추적이 허용되었습니다.

## 안전 에피소드 감소와 수렴 속도

학습이 끝난 시점에서 안전 변형은 기준 LSTD Q-learning 변형보다 안전하지 않은 에피소드 수를 줄였습니다. 보고된 감소율은 두 안전 변형에서 각각 57%와 64%이며, 이는 이 quadrotor 실험의 설정에서 얻은 결과입니다.

안전 변형은 기준 대비 더 빠르게 수렴했고, 두 알고리즘 모두 기준 성능의 약 20% 이내 수준까지 회복했다고 보고됩니다. 사전 지식이 없는 안전 변형은 초기 학습에서 분산이 더 크게 나타났습니다.

## 역추적과 향후 과제

초기 지식이 없는 경우 β를 상당히 낮춰야 실행 가능한 업데이트를 얻었으며, 사전 지식을 주면 역추적의 필요성이 줄어드는 것으로 보고되었습니다. 이는 안전 확률을 낮추는 대가로 실행 가능성을 얻는 구조이므로 안전성 측면의 한계입니다. 또한 저자들은 학습 알고리즘이 어떤 β에서도 실행 불가능 상태에 머무를 수 있다는 점을 아직 해결되지 않은 질문으로 남깁니다. 제안 방법을 더 복잡한 robust 또는 stochastic MPC로 확장하는 것도 향후 과제로 제시됩니다.

## 논문 정보

- **저자**: Filippo Airaldi, Bart De Schutter, Azita Dabiri
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2022년 11월 3일
- **등록일**: 2026년 11월 6일
- **수정일**: 2023년 3월 17일
- **버전**: v2
- **arXiv**: 2211.01860
- **DOI**: 10.1016/j.ifacol.2023.10.563
- **분류**: eess.SY
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2211.01860v2) · [원문 PDF ↗](https://arxiv.org/pdf/2211.01860v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

We propose a method to encourage safety in Model Predictive Control (MPC)-based Reinforcement Learning (RL) via Gaussian Process (GP) regression. This framework consists of 1) a parametric MPC scheme that is employed as model-based controller with approximate knowledge on the real system's dynamics, 2) an episodic RL algorithm tasked with adjusting the MPC parametrization in order to increase its performance, and lastly, 3) GP regressors used to estimate, directly from data, constraints on the MPC parameters capable of predicting, up to some probability, whether the parametrization is likely to yield a safe or unsafe policy. These constraints are then enforced onto the RL updates in an effort to enhance the learning method with a probabilistic safety mechanism. Compared to other recent publications combining safe RL with MPC, our method does not require further assumptions on, e.g., the prediction model in order to retain computational tractability. We illustrate the results of our method in a numerical example on the control of a quadrotor drone in a safety-critical environment.

## 원문 인용

Filippo Airaldi, Bart De Schutter, Azita Dabiri (2022). Learning safety in model-based Reinforcement Learning using MPC and Gaussian Processes. arXiv:2211.01860v2. https://doi.org/10.1016/j.ifacol.2023.10.563

**BibTeX**

```
@article{airaldi2022learning,
  title = {{Learning safety in model-based Reinforcement Learning using MPC and Gaussian Processes}},
  author = {Filippo Airaldi and Bart De Schutter and Azita Dabiri},
  year = {2022},
  eprint = {2211.01860},
  archivePrefix = {arXiv},
  doi = {10.1016/j.ifacol.2023.10.563},
  url = {https://arxiv.org/abs/2211.01860v2}
}
```

## 이 논문의 용어

- [강화학습](https://refivu.com/terms/9d55ef3a06b9-reinforcement-learning)
- [Q-learning](https://refivu.com/terms/e20b416cb2f7-q-learning)
- [Markov Decision Process](https://refivu.com/terms/5d622f56f22a-markov-decision-process)
- [Reinforcement learning (RL)](https://refivu.com/terms/70a01d49619c-reinforcement-learning-rl)
- [Model Predictive Control (MPC)](https://refivu.com/terms/cf53fcdb63b9-model-predictive-control-mpc)
- [sensitivity analysis](https://refivu.com/terms/f97589901505-sensitivity-analysis)
- [squared exponential kernel](https://refivu.com/terms/481c277501ee-squared-exponential-kernel)
- [stage cost](https://refivu.com/terms/5874754bc5b2-stage-cost)
- [Constrained Bayesian Optimization](https://refivu.com/terms/6749bc0ca719-constrained-bayesian-optimization)

## 다른 논문 해설

- [Adaptive Partial Scanning Transmission Electron Microscopy with Reinforcement Learning](https://refivu.com/papers/1712224e-8bb4-4264-82df-2d4c4c85bf05-adaptive-partial-scanning-transmission-electron-microscopy.md)
- [Optimal Actor-Critic Policy with Optimized Training Datasets](https://refivu.com/papers/cfa37ea3-1a47-46dd-a1df-78878523c82d-optimal-actor-critic-policy-with-optimized-training-datasets.md)
- [Decoding trust: A reinforcement learning perspective](https://refivu.com/papers/e0b0203e-eca5-4119-be13-d3d5a97ca414-decoding-trust-a-reinforcement-learning-perspective.md)
- [Randomized Optimal Stopping Problem in Continuous time and Reinforcement Learning Algorithm](https://refivu.com/papers/7adcaae8-ea78-467a-bac8-2728c2e89995-randomized-optimal-stopping-problem-in-continuous-time-and.md)
- [Joint Relay Selection and Beam Management Based on Deep Reinforcement Learning for Millimeter Wave Vehicular Communication](https://refivu.com/papers/acc42d2b-52dd-4692-b65f-7b79c8d003e5-joint-relay-selection-and-beam-management-based-on.md)
- [Deep Reinforcement Learning for Multi-user Massive MIMO with Channel Aging](https://refivu.com/papers/0672d54e-f6e6-4a69-a81d-3132209b46d1-deep-reinforcement-learning-for-multi-user-massive-mimo.md)
- [Quantum Multi-Agent Reinforcement Learning for Cooperative Mobile Access in Space-Air-Ground Integrated Networks](https://refivu.com/papers/a89749b9-6d0b-4b12-b5fd-7cb93bababff-quantum-multi-agent-reinforcement-learning-for-cooperative.md)
- [Learning in Cooperative Multiagent Systems Using Cognitive and Machine Models](https://refivu.com/papers/2dbf53d7-def0-4ab9-874e-db9d7bd1d06e-learning-in-cooperative-multiagent-systems-using-cognitive.md)
- [Closing the Planning-Learning Loop with Application to Autonomous Driving](https://refivu.com/papers/b60eb55f-af73-4b0a-9ec8-bedef187e98d-closing-the-planning-learning-loop-with-application-to.md)
- [Multi-agent reinforcement learning for the control of three-dimensional Rayleigh-Bénard convection](https://refivu.com/papers/33f67ff3-ad21-4e79-9ce4-d2be7a795434-multi-agent-reinforcement-learning-for-the-control-of.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/e6603786-8155-43d7-b14b-6be6dced48bc-learning-safety-in-model-based-reinforcement-learning-using)
