# Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving

자율주행에서 신뢰할 수 있는 오프라인 강화학습을 위한 안전 인지 인과 표현

Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu 외 1명 · arXiv · 2023년 10월 31일

- **연구 문제** 오프라인 데이터로 학습한 자율주행 정책은 교통 밀도나 데이터 분포가 바뀌면 안전과 효율을 함께 유지하기 어렵습니다.
- **연구 방법** FUSION은 인과 앙상블 세계 모델과 안전 인식 bisimulation 정규화를 결합해 상태 표현과 정책을 학습합니다.
- **주요 결과** MetaDrive의 정책 불일치 설정에서 FUSION은 세 지표 모두 비교 기준선보다 좋았고, 동역학 불일치에서는 성공률 0.82로 기준선보다 높았습니다. 다만 일부 기준선은 보상이나 비용의 개별 항목에서 더 높거나 낮은 값을 보였습니다.

## 오프라인 자율주행 RL의 안전 일반화 문제

자율주행의 오프라인 강화학습은 수집된 주행 데이터로 정책을 학습합니다. 그러나 학습 데이터와 배포 환경의 도로 구조나 교통 밀도가 달라지면 안전과 효율을 함께 유지하기 어렵습니다. 이 논문은 이 문제를 문맥에 따라 MDP가 달라지는 Constrained Contextual MDP(C2-MDP)로 정식화합니다.

![Figure 1: Diagram depicting offline-to-online generalization via a modular reasoning framework. The agent learns a causal abstraction from offline demonstratio…](https://refivu.com/papers/405e85e8-5f04-4315-a8f3-fb9bf2c907d9/figures/figure-45999b031e5dc0450295e7d97364baae.png?thumb=512)

**Fig. 1** . Diagram depicting offline-to-online generalization via a modular reasoning framework. The agent learns a causal abstraction from offline demonstration trajectories and then applies it to different environmental components during online implementation. The distribution shift between offline datasets and online environment can lead to unsatisfying safety or efficiency in driving performance. This abstracted representation enables learning agile agents for unseen scenarios in a zero-shot manner while enhancing safety and efficiency.

[원문](https://arxiv.org/abs/2311.10747v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu, Ding Zhao · Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

C2-MDP에서 정책 π는 문맥 ω에서 누적 보상 Jr을 최대화하면서 누적 비용 Jc가 임계값 κc를 넘지 않도록 제약을 받습니다. 목적은 \\( \\max\_\\pi J\_r(\\pi,\\omega) \\) 이고 제약은 \\( J\_c(\\pi,\\omega) \\le \\kappa\_c \\) 로 쓰입니다. Jr과 Jc는 각각 궤적에 따른 보상과 비용의 기댓값 합입니다. 학습에 쓰인 문맥 ω\_train과 배포 문맥 ω\_test가 다르면 같은 상태와 행동에서도 전이 동역학 p가 달라지며, 이를 분포 이동으로 다룹니다.

기존 오프라인 RL과 안전 RL 연구는 전문가 시연의 한계를 줄이려 했지만, 온라인 환경이 오프라인 궤적과 같은 동역학을 따른다고 가정하는 경우가 많았습니다. 이 논문은 상태 공간의 구조를 활용하는 표현 학습으로 이 가정의 한계를 다룹니다.

## 인과 앙상블 세계 모델과 안전 인식 트랜스포머

FUSION의 첫 번째 모듈은 Causal Ensemble World Model(CEWM)입니다. CEWM은 상태 공간을 자차 항법 상태, 라이다 관측, BEV 관측처럼 서로 겹치지 않는 부분 공간으로 나누고, 이 부분 상태와 행동, 보상, 비용을 구조적 인과 모델(SCM)의 노드로 둡니다. 각 노드는 DAG에서 부모 노드와 독립 잡음 변수의 함수로 정해지며, 이 함수들은 어텐션 기반의 Safety-aware Causal Transformer로 매개변수화됩니다. 시간 단계 사이의 연결은 어텐션 가중치로 나타납니다.

![Figure 2: Overview of Safety-aware structural Scenario Representation Framework. The diagram on the left shows a safety-aware decision transformer that conduct…](https://refivu.com/papers/405e85e8-5f04-4315-a8f3-fb9bf2c907d9/figures/figure-33d5a3977e8adcba9dafe9514abda680.png?thumb=512)

**Fig. 2** . Overview of Safety-aware structural Scenario Representation Framework. The diagram on the left shows a safety-aware decision transformer that conducts sequential decision-making based on the temporal contexts. The right diagram shows the general form of the graphical model in the CEWM and Policy Learning modules in FUSION, where the connection between different timesteps will be determined by the attention weights in the causal transformer. The nodes in a later timestep depend on their parental nodes in the previous timesteps.

[원문](https://arxiv.org/abs/2311.10747v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu, Ding Zhao · Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving · 원문 그림 인용 · 원본 PDF 3쪽에서 그림 영역을 추출했습니다.

CEWM은 궤적 확률을 보상-이후(reward-to-go) 모델, 비용-이후(cost-to-go) 모델, 정책 최적화 항, 요소별 전이 동역학의 곱으로 분해합니다. 보조 학습 목표 Ltraj는 이 항들의 음의 로그우도 합이며, Lrtg, Lctg, Lact, Ldyn의 합으로 나타납니다. 각 노드가 이전 시간 단계의 부모 노드에만 의존하므로 배포 시에는 자기회귀적으로 행동을 생성합니다.

배포 단계에서는 reward-to-go와 cost-to-go 토큰을 환경 피드백으로 갱신합니다. 보상 토큰은 max{R̂, R\_{t-1} − r\_t}, 비용 토큰은 min{Ĉ, C\_{t-1} − c\_t} 형태로 갱신됩니다. 즉 보상 목표는 예측값과 실제 누적 차이 중 큰 쪽을, 비용 목표는 작은 쪽을 따릅니다.

## 안전 인식 bisimulation 정렬

두 번째 모듈은 safety-aware Causal Bisimulation Learning(CBL)입니다. 혼합 품질 데이터에는 행동과 상태 사이의 spurious correlation이 있어 학습이 잘못된 상관에 끌릴 수 있으므로, CBL은 상태 인코더를 bisimulation 기준으로 정규화합니다. 안전 인식 bisimulation 관계는 두 상태의 보상, 비용, 전이 확률이 같아야 한다고 정의하지만, 실제 데이터에서는 정확히 일치하기 어려워 bisimulation 거리 dπ를 씁니다.

dπ(s1,s2)는 정책이 고른 행동 쌍에 대한 기댓값으로, \|r(s1,a1) − r(s2,a2)\| + λ\|c(s1,a1) − c(s2,a2)\| + γW2(p̂(·\|s1,a1), p̂(·\|s2,a2)) 의 형태입니다. 여기서 λ는 안전 항의 균형을 맞추는 라그랑주 승수이고, W2는 두 전이 분포 사이의 2-Wasserstein 거리입니다.

![Figure 3: Safety-aware bisimulation metrics with the distribution distance in transition dynamics, rewards, and safety cost](https://refivu.com/papers/405e85e8-5f04-4315-a8f3-fb9bf2c907d9/figures/figure-e280c02dcb79283be3795ff6e63f672f.png?thumb=512)

**Fig. 3** . Safety-aware bisimulation metrics with the distribution distance in transition dynamics, rewards, and safety cost.

[원문](https://arxiv.org/abs/2311.10747v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu, Ding Zhao · Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

학습 목표 Lbisim은 잠재 공간에서 ‖ϕ(s1) − ϕsg(s2)‖1과 dπ(s1,s2)의 차이를 제곱해 최소화합니다. 여기서 ϕsg는 stop gradient가 적용된 상태 인코더입니다. 따라서 인코더는 갱신되지만 목표 거리는 보상, 비용, 전이로 정의된 bisimulation 메트릭입니다. 오프라인 학습에서는 CEWM 목표로 Transformer를 갱신하고 Algorithm 1로 인코더를 갱신합니다.

## 평가 환경과 데이터 구성

평가는 MetaDrive 시뮬레이터에서 수행되었습니다. 관측은 자차 항법 상태, 240개 빔의 LiDAR, 84×84×5 BEV 영상으로 구성됩니다. 오프라인 데이터셋은 IDM 정책에 공격성 수준을 다르게 준 주행 궤적 2,000개, 400,000 시간 단계 이상, 6개 도로 구성에서 수집되었습니다.

정책 불일치 설정은 비완벽한 전문가 정책에서 수집된 혼합 품질 데이터로 학습하고 온라인 환경에서 평가합니다. 동역학 불일치 설정은 학습 환경보다 교통 흐름이 1.5배 밀도인 테스트 환경에서 평가합니다.

지표는 Utility Reward, Safety Cost, Success Rate입니다. Utility Reward는 누적 주행 거리, 주행 속도, 경로점 도달을 결합한 효율 지표입니다. Safety Cost는 충돌, 차선 이탈, 과속을 함께 본 안전 지표입니다. 충돌과 차선 이탈은 발생할 때마다 비용 1이고, 과속 비용은 실험 설정에서 max{0, 0.02(v − vlimit)} 로 제시되며 제한속도는 40 kph입니다. 식 (2)는 같은 과속 항을 max(0, v − vlimit) 로 쓰므로, 과속 비용의 스케일은 실험 설정 기준으로 읽어야 합니다. 기준선은 Safe BC, ICIL, BNN, GSA 같은 안전 모방학습과 BEAR-Lag, BCQ-Lag, CPQ 같은 오프라인 안전 RL입니다.

기준선 결과는 5개 랜덤 시드로 측정되었고, 오프라인 안전 RL 기준선의 에피소드 비용 임계값 κc는 1로 설정되었습니다.

## 정책 불일치와 동역학 불일치의 비교 결과

정책 불일치 설정에서 FUSION은 Reward 139.95±4.24, Cost 0.52±0.06, Succ. Rate 0.90±0.03을 기록했습니다. 같은 표의 기준선은 BCQ-Lag가 Reward 111.36±5.26, Cost 0.89±0.08, Succ. Rate 0.79±0.08이고, BEAR-Lag가 Reward 109.62±3.91, Cost 4.46±0.29, Succ. Rate 0.72±0.06입니다. FUSION은 세 지표 모두에서 가장 좋은 값을 보였으며, 비용은 낮을수록 좋으므로 FUSION의 0.52가 가장 낮습니다.

동역학 불일치 설정에서 FUSION은 Reward 117.40±4.30, Cost 0.90±0.14, Succ. Rate 0.82±0.04입니다. 이 설정에서 BCQ-Lag의 Reward 122.72±7.64는 FUSION보다 높습니다. CPQ의 Cost 0.71±0.09는 FUSION의 0.90보다 낮지만, CPQ의 Reward는 7.47이고 Succ. Rate는 0.00이므로 이 비용은 목적지 도달 실패와 함께 읽어야 합니다. 성공률은 BEAR-Lag 0.32±0.05, BCQ-Lag 0.39±0.08보다 FUSION의 0.82가 높습니다.

따라서 이 결과는 MetaDrive의 두 설정에서 FUSION이 안전 비용과 성공률을 함께 개선한 관찰입니다. 모든 설정과 모든 지표에서 우위가 있었다는 뜻은 아닙니다.

## 절제 실험이 보여주는 구성요소의 역할

절제 실험은 FUSION-Short, FUSION w/o CEWM, FUSION w/o CBL 세 변형과 FUSION, Expert Policy를 비교합니다. FUSION-Short는 더 짧은 문맥을 쓰는 변형입니다. FUSION w/o CEWM은 인과 앙상블 세계 모델 학습을 제외하고 행동 복제 항만 감독 신호로 씁니다. FUSION w/o CBL은 안전 인식 bisimulation 학습을 제외합니다.

정책 불일치에서 FUSION의 Reward 139.95, Cost 0.52, Succ. Rate 0.90은 FUSION w/o CBL의 Reward 104.54, Cost 3.46, Succ. Rate 0.58보다 좋습니다. FUSION w/o CEWM은 Cost 0.67로 FUSION의 0.52보다 높고, Reward 94.24와 Succ. Rate 0.41은 FUSION보다 낮습니다. 동역학 불일치에서도 FUSION w/o CBL의 Cost는 5.60이고 FUSION은 0.90입니다. 반면 FUSION w/o CEWM의 Cost 0.60은 FUSION의 0.90보다 낮지만 Reward와 Succ. Rate는 낮습니다.

따라서 CEWM 제거가 항상 비용을 높인다고 볼 수는 없고, 이 결과는 CEWM을 유지했을 때 보상과 성공률이 높았다는 관찰로 읽어야 합니다.

어텐션 시각화에서 저자들은 FUSION의 첫 번째 층이 이전 한 시간 단계의 토큰에 주로 집중하고, 보상-이후와 비용-이후 토큰이 미래 상태와 행동 토큰에 연결되는 계층 구조를 보인다고 해석합니다. 또한 w/o CEWM 모델은 평균 엔트로피가 더 높아 어텐션이 덜 희소합니다. 이 분석은 30개 궤적의 평균 어텐션 행렬에 기반한 시각화이며, 이를 성능 향상의 직접적인 인과 증명으로 보지는 않습니다.

## 시뮬레이터와 CBL 전제의 한계

저자들은 모든 실험이 MetaDrive 시뮬레이터에서 수행되었고 CARLA 같은 고충실도 시뮬레이터에서는 검증되지 않았다고 밝힙니다. 또한 CBL은 전이 동역학의 좋은 추정에 의존하며, 이는 일반적으로 오프라인 샘플의 충분한 커버리지와 다양성을 요구합니다. 저자들은 다른 자율주행 플랫폼과 다중 에이전트 RL 설정으로의 확장을 향후 과제로 제시합니다.

따라서 본 결과는 MetaDrive의 6개 도로 구성, IDM 기반 오프라인 데이터, 그리고 정책 불일치와 1.5배 교통 밀도의 동역학 불일치라는 명시된 설정에서 얻은 것입니다.

## 논문 정보

- **저자**: Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu, Ding Zhao
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 10월 31일
- **등록일**: 2026년 11월 6일
- **수정일**: 2024년 3월 12일
- **버전**: v3
- **arXiv**: 2311.10747
- **DOI**: 10.1109/lra.2024.3379805
- **분류**: cs.RO · cs.AI · cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

In the domain of autonomous driving, the offline Reinforcement Learning~(RL) approaches exhibit notable efficacy in addressing sequential decision-making problems from offline datasets. However, maintaining safety in diverse safety-critical scenarios remains a significant challenge due to long-tailed and unforeseen scenarios absent from offline datasets. In this paper, we introduce the saFety-aware strUctured Scenario representatION (FUSION), a pioneering representation learning method in offline RL to facilitate the learning of a generalizable end-to-end driving policy by leveraging structured scenario information. FUSION capitalizes on the causal relationships between the decomposed reward, cost, state, and action space, constructing a framework for structured sequential reasoning in dynamic traffic environments. We conduct extensive evaluations in two typical real-world settings of the distribution shift in autonomous vehicles, demonstrating the good balance between safety cost and utility reward compared to the current state-of-the-art safe RL and IL baselines. Empirical evidence in various driving scenarios attests that FUSION significantly enhances the safety and generalizability of autonomous driving agents, even in the face of challenging and unseen environments. Furthermore, our ablation studies reveal noticeable improvements in the integration of causal representation into the offline safe RL algorithm. Our code implementation is available at: https://sites.google.com/view/safe-fusion/.

## 원문 인용

Haohong Lin, Wenhao Ding, Zuxin Liu, Yaru Niu, Jiacheng Zhu, Yuming Niu, Ding Zhao (2023). Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving. arXiv:2311.10747v3. https://doi.org/10.1109/lra.2024.3379805

**BibTeX**

```
@article{lin2023safety,
  title = {{Safety-aware Causal Representation for Trustworthy Offline Reinforcement Learning in Autonomous Driving}},
  author = {Haohong Lin and Wenhao Ding and Zuxin Liu and Yaru Niu and Jiacheng Zhu and Yuming Niu and Ding Zhao},
  year = {2023},
  eprint = {2311.10747},
  archivePrefix = {arXiv},
  doi = {10.1109/lra.2024.3379805},
  url = {https://arxiv.org/abs/2311.10747v3}
}
```

## 이 논문의 용어

- [success rate](https://refivu.com/terms/0964df1dc5eb-success-rate)
- [Fusion](https://refivu.com/terms/c86bab8177f5-fusion)
- [IDM](https://refivu.com/terms/8bc660784d57-idm)
- [BNN](https://refivu.com/terms/c6018f6ea868-bnn)
- [Cost-to-go](https://refivu.com/terms/0681c58895ce-cost-to-go)
- [contextual MDP](https://refivu.com/terms/bb1772138cdb-contextual-mdp)
- [GSA](https://refivu.com/terms/5039864a3a74-gsa)

## 다른 논문 해설

- [Subgoal-based Reward Shaping to Improve Efficiency in Reinforcement Learning](https://refivu.com/papers/7cfae1a0-d6ce-434e-9208-ba670a0a87d0-subgoal-based-reward-shaping-to-improve-efficiency-in.md)
- [HumanLight: Incentivizing Ridesharing via Human-centric Deep Reinforcement Learning in Traffic Signal Control](https://refivu.com/papers/e2d488b7-f8ef-4b13-bcd8-ed7fdeab5df5-humanlight-incentivizing-ridesharing-via-human-centric-deep.md)
- [AR3n: A Reinforcement Learning-based Assist-As-Needed Controller for Robotic Rehabilitation](https://refivu.com/papers/9baf7e20-8ddc-405a-84ce-beae1469aefa-ar3n-a-reinforcement-learning-based-assist-as-needed.md)
- [Deep Reinforcement Learning for Interference Management in UAV-based 3D Networks: Potentials and Challenges](https://refivu.com/papers/9ad5af9b-6b5d-4661-ae97-08a5d2b49f8e-deep-reinforcement-learning-for-interference-management-in.md)
- [Optimal Adaptive Prediction Intervals for Electricity Load Forecasting in Distribution Systems via Reinforcement Learning](https://refivu.com/papers/8e3625e0-1c9c-41fa-9dbb-4ae6c7d06664-optimal-adaptive-prediction-intervals-for-electricity-load.md)
- [Deep Reinforcement Learning for Tropical Air Free-Cooled Data Center Control](https://refivu.com/papers/64d8693e-6aeb-460e-a3bc-77e55d9ee2d2-deep-reinforcement-learning-for-tropical-air-free-cooled.md)
- [Short text classification with machine learning in the social sciences: The case of climate change on Twitter](https://refivu.com/papers/1572ef01-e606-4f6e-a992-4b353feb817a-short-text-classification-with-machine-learning-in-the.md)
- [MorphIt: Flexible Spherical Approximation of Robot Morphology for Representation-driven Adaptation](https://refivu.com/papers/9d4f2447-925e-4c29-bb4c-c383d39c28b2-morphit-flexible-spherical-approximation-of-robot-morphology.md)
- [Investigating the fidelity of explainable artificial intelligence methods for applications of convolutional neural networks in geoscience](https://refivu.com/papers/6fc26172-2105-4bd7-b7b3-31bc6947ab05-investigating-the-fidelity-of-explainable-artificial.md)
- [Gait recognition via deep learning of the center-of-pressure trajectory](https://refivu.com/papers/e0d091d4-853d-4a49-b854-575d2b0c2a6f-gait-recognition-via-deep-learning-of-the-center.md)
- [A Survey on Event-based News Narrative Extraction](https://refivu.com/papers/9d96c17c-77ac-4fdd-92e7-dc86acf73b67-a-survey-on-event-based-news-narrative-extraction.md)
- [Scalable Factor Graph-Based Heterogeneous Bayesian DDF for Dynamic Systems](https://refivu.com/papers/7803d9c1-9efe-47e4-b65f-fd1093c59baa-scalable-factor-graph-based-heterogeneous-bayesian-ddf-for.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/405e85e8-5f04-4315-a8f3-fb9bf2c907d9-safety-aware-causal-representation-for-trustworthy-offline)
