offline RL | TD3+BC:在最大化 Q advantage 時新增 BC loss 的極簡演算法

MoonOut發表於2023-11-19



0 abstract

Offline reinforcement learning (RL) defines the task of learning from a fixed batch of data. Due to errors in value estimation from out-of-distribution actions, most offline RL algorithms take the approach of constraining or regularizing the policy with the actions contained in the dataset. Built on pre-existing RL algorithms, modifications to make an RL algorithm work offline comes at the cost of additional complexity. Offline RL algorithms introduce new hyperparameters and often leverage secondary components such as generative models, while adjusting the underlying RL algorithm. In this paper we aim to make a deep RL algorithm work while making minimal changes. We find that we can match the performance of state-of-the-art offline RL algorithms by simply adding a behavior cloning term to the policy update of an online RL algorithm and normalizing the data. The resulting algorithm is a simple to implement and tune baseline, while more than halving the overall run time by removing the additional computational overheads of previous methods.

  • 背景:
    • Offline RL 定義了從 a fixed batch of data 中學習的任務。
    • 由於 OOD action 的 value estimation error,大多數 offline RL 演演算法使用 ID action 去約束或正則化策略。
    • 因此,可以說建立在原來的 online RL 演演算法之上,讓它變成 offline RL,是以增加複雜性為代價的: offline RL 演演算法引入了新的超引數,並且通常利用生成模型(generative models)等輔助元件,同時還會調整底層的 RL 演演算法。
  • method & result:
    • 本文的目標是,讓 DRL 演演算法在最小更改下 work。
    • 我們發現,只需在 online RL 演演算法的策略更新中,新增行為克隆項(behavior cloning term)並 normalize 資料,就可匹配 sota offline RL 演演算法的效能。
    • 我們的演演算法是易於實現和 tune 的 baseline,同時,透過消除先前 offline 方法的額外計算開銷,將總體執行時間縮短了一半以上。

4 Challenges in Offline RL - offline RL 中的挑戰

  • Implementation and Tuning Complexities - 演演算法實現與微調的複雜度。
  • Extra Computation Requirement - 額外的計算需求。
    • CQL 好像會有 log sum exp 的操作,計算量大。
  • Instability of Trained Policies - 訓出來的策略的不穩定性。
    • 在 online RL 中,如果當前策略不盡如人意,我們可以使用策略先前迭代的 checkpoint,或者乾脆繼續訓練。
    • 但是,在 offline RL 中,根據定義,評估應該只發生一次,這大大增加了評估時單個策略的重要性。
    • 我們重點介紹了 offline RL 中的兩種不穩定性。
    • 圖 2 顯示,offline trained policy 在單次評估期間表現出巨大的 performance 差異。因此,即使平均表現合理,agent 在某些 episode 上仍可能表現不佳。
    • 圖 3 表示了一組評估(應該是同一 episode 內)的不穩定性,這意味著 agent 的 performance 可能取決於,為 evaluation 選擇的特定停止點。(可能是獵豹跑著跑著就栽了嘛?)

5 A Minimalist Offline RL Algorithm - 極簡 Offline RL 演演算法

  • 主要的 method 就是公式 3 4 5,其中:
    • 公式 3 納入了一個 behavior cloning 的 loss;
    • 公式 4 是 observation 歸一化;
    • 公式 5 讓 Q advantage 跟 behavior cloning 的 loss 可比。

6 Experiments

  • settings:
    • 主要使用兩個 baselines: CQL、Fisher-BRC。
    • 其他 baselines: BRAC 和 AWAC(據作者說演演算法簡單)、Behavior Cloning。
    • benchmark: D4RL benchmark of OpenAI gym MuJoCo tasks。
  • results:
    • 看圖就好了。
    • 比較了演演算法們的訓練時間,TD3 + BC 訓練時間最短。
    • 圖 2 3 顯示的穩定性問題。(見上面 section 4 的筆記)
  • ablation:
    • 師兄提到的一點:可以預見的是,刪除 state normalization 的影響是最小的,但它仍然有好處,並且只是一個微小的調整。對應 Figure 5 最後一張圖。


相關文章