Grounding Large Language Models in Interactive Environments with Online Reinforcement Learning
์ ์: Thomas Carta, Clรฉment Romac, Thomas Wolf, Sylvain Lamprier, Olivier Sigaud, Pierre-Yves Oudeyer | ๋ ์ง: 2023-02-06 | URL: https://arxiv.org/abs/2302.02662 📄 PDF
Essence
Figure 1: The GLAM method: we use an LLM as agent policy in an interactive textual RL
๋ณธ ๋
ผ๋ฌธ์ Large Language Model(LLM)์ ๋ํํ ํ๊ฒฝ์์ agent policy๋ก ์ฌ์ฉํ๋ฉฐ online Reinforcement Learning์ผ๋ก ์ ์ง์ ์ผ๋ก ์
๋ฐ์ดํธํ์ฌ functional grounding์ ๋ฌ์ฑํ๋ GLAM ๋ฐฉ๋ฒ์ ์ ์ํ๋ค. ํ
์คํธ ๊ธฐ๋ฐ BabyAI ํ๊ฒฝ์์ LLM์ ํ๋ณธ ํจ์จ์ฑ, ์ผ๋ฐํ ๋ฅ๋ ฅ, online learning์ ์ํฅ์ ์ค์ฆ์ ์ผ๋ก ๊ฒ์ฆํ๋ค.
Motivation
- Known: ์ต๊ทผ LLM์ ์ธ๊ณ์ ๋ฌผ๋ฆฌ์ ๊ท์น์ ๋ํ ์ถ์์ ์ง์์ ํ๋ํ์ฌ ์์ฌ๊ฒฐ์ ๋ฌธ์ ํด๊ฒฐ์ ํ์ฉ๋๊ณ ์๋ค. ๊ทธ๋ฌ๋ LLM์ ๋ด๋ถ ์ง์๊ณผ ์ค์ ํ๊ฒฝ ๊ฐ์ ์ ๋ ฌ ๋ถ์กฑ์ผ๋ก ์ธํด functional competence๊ฐ ์ ํ๋๋ค.
- Gap: LLM์ด ๋ํํ ํ๊ฒฝ๊ณผ ์ํธ์์ฉํ๋ฉด์ ์ ์ง์ ์ผ๋ก ์ง์์ groundingํ๊ณ ์
๋ฐ์ดํธํ ์ ์๋์ง, ๊ทธ๋ฆฌ๊ณ online RL์ ํตํ functional grounding์ ์ค์ฆ์ ํจ๊ณผ๊ฐ ๊ท๋ช
๋์ง ์์๋ค.
- Why: LLM์ ์ฌ์ ํ์ต๋ ์ง์์ ํ์ฉํ์ฌ sample efficientํ RL learning์ ๊ตฌํํ๊ณ ๋์์ ํ๊ฒฝ๊ณผ์ ์ํธ์์ฉ์ ํตํด ์ค์ ์๋ ๋ฅ๋ ฅ(functional competence)์ ํ๋ณดํ ์ ์๋ค๋ฉด embodied AI์ ๋ก๋ด์ ์ด ๋ฑ ์ค์ ์์ฉ์์ ๋งค์ฐ ์ค์ํ๋ค.
- Approach: LLM์ agent policy๋ก ์ฌ์ฉํ์ฌ ๊ฐ action์ ์กฐ๊ฑด๋ถ ํ๋ฅ ์ ๊ณ์ฐํ๊ณ PPO(Proximal Policy Optimization)๋ฅผ ํตํด ํ๊ฒฝ์ reward signal๋ก LLM์ fine-tuningํ๋ค. ์ด๋ฅผ ์ํด BabyAI๋ฅผ ํ
์คํธ ๊ธฐ๋ฐ ํ๊ฒฝ์ผ๋ก ๋ณํํ BabyAI-Text๋ฅผ ์ค๊ณํ์ฌ ์คํํ๋ค.
Achievement
- ํ๋ณธ ํจ์จ์ฑ ํฅ์: LLM ๊ธฐ๋ฐ policy๊ฐ ์์ ๋ชจ๋ธ์ด๋ scratch์์ ํ์ตํ๋ baseline์ ๋นํด spatial/navigation ๊ณผ์ ์์ ์๋ฑํ ๋น ๋ฅธ ํ์ต ์๋๋ฅผ ๋ณด์
- ๊ฐ์ฒด ๋ณํ์ ๋ํ ์ผ๋ฐํ: ํ์ต๋ LLM agent๊ฐ ํ๋ จ ๊ณผ์ ์์ ๋ณด์ง ๋ชปํ ์๋ก์ด ๊ฐ์ฒด์ ๋ํด ๊ฐํ ์ผ๋ฐํ ์ฑ๋ฅ์ ๋ฌ์ฑ
- ์๋ก์ด ๊ณผ์ ๋ก์ ์ ๋ก์ท ์ผ๋ฐํ: ํน์ ์กฐ๊ฑด์์ ํ๋ จ๋์ง ์์ ์๋ก์ด spatial/navigation ๊ณผ์ ๋ก์ ์ผ๋ฐํ ๊ฐ๋ฅ์ฑ์ ์ค์ฆ
- Online learning์ ํจ๊ณผ ์
์ฆ: ์คํ๋ผ์ธ Behavioral Cloning๋ณด๋ค online PPO ํ์ต์ด ๋ ๋์ functional grounding์ ๋ฌ์ฑํจ์ ํ์ธ
- ๋๊ตฌ ๊ณต๊ฐ: RL ์ฐ๊ตฌ์๋ค์ด LLM์ ๋๊ท๋ชจ๋ก ํ์ฉํ๋๋ก ์ง์ํ๋ Lamorel ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ฐ๋ฐ ๋ฐ ๊ณต๊ฐ
How
Figure 1: The GLAM method: we use an LLM as agent policy in an interactive textual RL
- BabyAI ํ๋ซํผ์ ํ
์คํธ ๊ธฐ๋ฐ ํ๊ฒฝ(BabyAI-Text)์ผ๋ก ๋ณํํ์ฌ ์๊ฐ ์ธ์์ ๋ณต์ก์ฑ์ ๋ฐฐ์ ํ๊ณ ์์ ํ
์คํธ ๊ด์ฐฐ/ํ๋๋ง์ผ๋ก spatial reasoning ๋ฅ๋ ฅ์ ํ๊ฐ
- FLAN-T5์ encoder๋ฅผ ์ด์ฉํ์ฌ goal description๊ณผ observation์ ํฌํจํ prompt์์ ๊ฐ ๊ฐ๋ฅํ action ํ ํฐ์ ์กฐ๊ฑด๋ถ ํ๋ฅ ์ ๊ณ์ฐ
- ๊ณ์ฐ๋ action ํ๋ฅ ์ softmax๋ฅผ ์ ์ฉํ์ฌ policy distribution์ ์์ฑํ๊ณ ์ด๋ก๋ถํฐ action์ ์ํ๋ง
- ํ๊ฒฝ์ผ๋ก๋ถํฐ ๋ฐ์ reward signal์ ์ด์ฉํ์ฌ PPO ์๊ณ ๋ฆฌ์ฆ์ผ๋ก LLM๊ณผ value head๋ฅผ ๋์์ fine-tuning
- ๋ค์ํ LLM ํฌ๊ธฐ์ ์ํคํ
์ฒ(FLAN-T5 variants) ๋ณํ์ ๋ํ ablation study๋ฅผ ์ํํ์ฌ ์ค๊ณ ์ ํ ๊ฒ์ฆ
Originality
- LLM์ ๋จ์ planner๊ฐ ์๋ ์ง์ ์ ์ธ agent policy๋ก ์ฌ์ฉํ๋ฉด์ online RL๋ก functional groundingํ๋ ์ฒซ ๋ฒ์งธ ์ฒด๊ณ์ ์ฐ๊ตฌ
- ํ
์คํธ ๊ธฐ๋ฐ ๋ํํ ํ๊ฒฝ์์ LLM์ sample efficiency, ์ผ๋ฐํ, online learning ํจ๊ณผ๋ฅผ ๋์์ ๊ฒ์ฆํ๋ ํฌ๊ด์ ์คํ ์ค๊ณ
- ๊ธฐ์กด BabyAI๋ฅผ ํ
์คํธ ๊ธฐ๋ฐ์ผ๋ก ๋ณํํ์ฌ spatial reasoning์ ๋ค์ํ ์ธก๋ฉด์ ๋
๋ฆฝ์ ์ผ๋ก ๋ถ์ ๊ฐ๋ฅํ๋๋ก ํ ํ๊ฒฝ ์ค๊ณ
- RL ์ปค๋ฎค๋ํฐ๋ฅผ ์ํด LLM ์ถ๋ก ์ต์ ํ์ ๋๊ท๋ชจ ๋ฐฐ์น ์ฒ๋ฆฌ๋ฅผ ์ง์ํ๋ Lamorel ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๊ฐ๋ฐ
Limitation & Further Study
- ํ
์คํธ ๊ธฐ๋ฐ ํ๊ฒฝ์ผ๋ก ์ ํ๋์ด ์์ผ๋ฉฐ, ๋ก๋ด์ ์ด๋ ์๊ฐ ๊ธฐ๋ฐ ๊ณผ์ ๋ก์ ํ์ฅ ๊ฐ๋ฅ์ฑ์ด ๋ช
ํํ์ง ์์
- ์ ํ๋ action space(๊ธฐ๋ณธ navigation ๋ช
๋ น)๋ฅผ ์ฌ์ฉํ์ฌ ๋ ๋ณต์กํ ๋ฌธ์ ์์ญ์ผ๋ก์ ํ์ฅ์ฑ ๊ฒ์ฆ ํ์
- Online RL ํ์ต ์ค LLM ์ ์ฒด parameter๋ฅผ ์
๋ฐ์ดํธํ๋ ๊ณ์ฐ ๋น์ฉ์ด ๋์ผ๋ฉฐ, parameter-efficient fine-tuning(LoRA ๋ฑ)๊ณผ์ ๋น๊ต ๋ถ์ฌ
- ์๋ก์ด ๊ณผ์ ๋ก์ ์ผ๋ฐํ๋ task ์ ์ฌ๋๊ฐ ๋์ ๊ฒฝ์ฐ๋ก ์ ํ๋์ด ์์ผ๋ฉฐ, ๊ตฌ์กฐ์ ์ผ๋ก ์ ํ ๋ค๋ฅธ ๊ณผ์ ๋ก์ ์ ์ด ๋ฅ๋ ฅ ๊ฒ์ฆ ํ์
- ๋จ์ผ LLM ๊ณ์ด(FLAN-T5)์ ๋ํด์๋ง ์คํํ์์ผ๋ฏ๋ก ๋ค๋ฅธ LLM ์ํคํ
์ฒ(GPT-style ๋ฑ)์ ํจ๊ณผ ๋น๊ต ๋ถ์ฌ
- ํ์ ์ฐ๊ตฌ ๋ฐฉํฅ: (1) ์๊ฐ ๋ชจ๋ฌ๋ฆฌํฐ๋ฅผ ํฌํจํ multimodal LLM์ functional grounding, (2) ๋ ๋ณต์กํ๊ณ ๋๊ท๋ชจ action space ํ๊ฒฝ์์์ scalability ๊ฒ์ฆ, (3) parameter-efficient adaptation ๊ธฐ๋ฒ ์ ์ฉ, (4) ๋ถํฌ์ธ(out-of-distribution) task์์์ ์ผ๋ฐํ ๋ฅ๋ ฅ ๊ฐํ
Evaluation
Novelty: 4/5 Technical Soundness: 3/5 Significance: 4/5 Clarity: 4/5 Overall: 4/5
์ดํ: ๋ณธ ๋
ผ๋ฌธ์ LLM์ interactive environment์์ online RL๋ก groundingํ๋ ์ค์ํ ์ฒซ ์๋๋ก์, ์ฒด๊ณ์ ์ธ ์คํ๊ณผ ๋ช
ํํ ๋ถ์์ ํตํด LLM ๊ธฐ๋ฐ policy์ sample efficiency ๋ฐ ์ผ๋ฐํ ๋ฅ๋ ฅ์ ์
์ฆํ๋ค. ๋ค๋ง ํ
์คํธ ๊ธฐ๋ฐ ์ ํ ํ๊ฒฝ๊ณผ ๋จ์ผ ๋ชจ๋ธ ๊ณ์ด ํ๊ฐ๋ผ๋ ์ ์ฝ์ด ์์ผ๋, ๊ณต๊ฐ ๋๊ตฌ(Lamorel)์ ํจ๊ป RL ์ปค๋ฎค๋ํฐ์ ๊ธฐ์ฌํ ๊ฐ์น ์๋ ์ฐ๊ตฌ์ด๋ค.
๐ง Audio Overview
์ด ๋
ผ๋ฌธ ๋ฆฌ๋ทฐ๋ฅผ ํ์บ์คํธํ ์ค๋์ค๋ก ์์ฑํฉ๋๋ค. (Gemini ยท ํค๋ ๋ธ๋ผ์ฐ์ ์๋ง ์ ์ฅ ยท ์์ฑ๋ณธ์ ์ด๋ฉ์ผ๋ก๋ ์ ์ก)
โธ ๊ณ ๊ธ: ๊ตฌ์ฑ ๋ฐฉํฅ(๋๋ณธ ์์ฑ ์ง์นจ) ์ง์ ์์