의학교육에서 reflection(성찰)이 중요한 개념이고 전문가 영역에서 자기개발을 위해 중요한 능력으로 보고 있다. 성찰일지를 써서 훈련을 시키는 식으로 하고 있음. LLM도 성찰을 통해 성능이 올라갈 수 있다는 재미있는 논문을 발견해서 읽어봄 (3/20)
원문: https://arxiv.org/abs/2303.11366

기존(이라고 해봤자 최근 몇 달)에 나온 ReAct, DEPS, Inner monlogue 등에 대해 소개하고 한계점 지적: long trajectory에 걸쳐 발생한 문제를 잘 인지하지 못함.
Human-in-the-loop으로 reasoning 과정의 문제를 찾아 교정해주는 식으로 해결 가능하다고 나왔는데, 이 과정 자체를 LLM에게 시켜보자는 것이 논문의 아이디어
Task를 주면 initial query를 만들고
– action a_0를 수행하고
– heuristic을 계산해서 reflection이 필요한지 판별
— 필요 없으면 observation o_0을 만들고 다음 action을 LLM이 생성함
— 필요하면 reflection을 수행해서 Working memory mem에 저장하고 처음부터 리셋

heuristic 계산은 어떻게 하냐
– 지금 state s_t, 마지막 action a_t, 지금까지 순차적으로 해온 action과 observation의 목록을 보고
– repeat가 Omega보다 많거나 total action이 epsilon보다 많은 것을 보고 판별
hallucination이 의미 없는 반복을 하거나 쓸데없는 action이 많아지는 거니까

Reflexion은 LLM에게 current state, last reward, 지금까지 action, observation 목록, working memory mem 값을 줘서 수행. Working memory size는 3으로 설정 (이것도 hyperparameter래)
결과는 mem에 저장하고 environment를 리셋하고 다음 trial 실행

이걸로 벤치마크 2개를 돌림. 보면 성능 향상이 inefficient planning보다 hallucination이 감소해서 주로 일어남.
Success without reflection은 이전 trial의 내용을 reflection 없이 base ReAct를 이용한 것.

AlfWorld는 이런 문제들이라고


다음 벤치마크는 HotPotQA. 여기도 성공률이 증가

HotPotQA 벤치마크 예시. 써칭 방향을 수정함

추가로 수행한 WebShop에서는 차이가 없음. 이 벤치마크는 plan and execute 능력이 별로 영향을 안 미치는 방식이라서 그렇다고

어떻게 작용했는가?
“Reflexion served as a redirection mechanism in some cases and as a summarization
tool in others”
효과는?
“Reflexion is a highly applicable method to improve performance between trials on decision-making and knowledge-intensive tasks due to its sole dependence on a binary reward model.”
활용은?
“We encourage others to apply Reflexion to more complex tasks in which the agent must learn to develop new ideas, explore larger unseen state spaces, and form more accurate plans of action through its experiences in past environments.”
인간이 성찰하는 것과 유사해서 정말 재미있게 읽었다.
– 헉 망했다 ← h() = 1
– 지금 내가 어떤 꼴이 된거지? ← s_t
– 내가 무슨 짓들을 했고, 그 때마다 어떤 상태로 변화해왔지? ← [a_0, o_0, … , a_t, o_t]
– 다음에 비슷한 상황에서는 어떻게 해야하지? ← LLM()
– 기억해두자 ← mem
Originally tweeted by 말러팔산 (@mahler83) on 2023-03-23.
More from my site
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Leave a Comment