관심있는 NLP 논문을 읽어보고 간단히 정리했습니다.
혹시 부족하거나 잘못된 내용이 있다면 댓글 부탁드립니다 🙇♂️
[Google Research, Brain team]
- LLM이 reasoning traces와 task-specific actions를 interleaved manner로 생성하도록 하는 ReAct
- chain-of-thought (CoT) reasoning에서 나타나는 hallucination & error propagation 문제를 극복
- 두 개의 interactive decision making benchmarks (ALFWorld & WebShop)에서 ReAct가 다른 방법들보다 우월

1. Introduction
- 인간 지능의 고유한 특징 중 하나는 verbal reasoning을 task-oriented actions과 결합할 수 있는 능력
- 즉, acting과 reasoning의 synergy를 기대
- 최근 연구 결과들도 autonomous system에서 verbal reasoning과 interactive decision making 결합 가능성을 엿볼 수 있었음
- 그러나 chain-of-thought (CoT)는 static black box이며 hallucination과 error propagation 문제가 존재
- acting의 경우 언어 모델을 high-level goal을 달성하기 위한 reasoning planner로 적절히 사용하지 못한다는 문제
2. Realted Work
- Language model for reasoning
- Chain-of-Thought (CoT), least-to-most prompting, zero-shot-CoT, reasoning with self-consistency
- Selection-Inference, STaR, Faithful reasoning, Scratchpad
- Languae models for decision making
- LLM을 의사 결정을 위한 policy 모델로 활용
- WebGPT, BlenderBot, Sparrow, SimpleTOD
3. Contributions
- 프롬프트 기반으로 reasoning & acting을 통합한 패러다임을 제시하여 LLM이 general task를 잘 풀어낼 수 있도록 하는 ReAct를 도입
- few-shot learning 세팅을 바탕으로 다양한 실험을 수행
- acting in reasoning tasks & reasoning in interactive tasks의 중요성을 이해
- prompting 환경에서 ReAct 방식의 한계를 확인
4. ReACT: Synergizing Reasoning + Acting
- context가 주어졌을 때 기대되는 action이 있고 이것을 설명하는 것이 policy라고 정의
- agent의 action space에 space of language를 더하여 확장
- space of language (L)는 thought 또는 reasoning trace로 볼 수 있음
- frozen LLM, PaLM-540B를 few-shot in-context로 prompt
- ReAct는 몇 가지 고유한 특징을 지님
- A) Intuitive and easy to design: annotator가 단순히 자신의 생각을 언어로 써내려가면 됨
- B) General and flexible: thought space & thought-action 형식은 상당히 자유로워 QA, fact verification 등에 국한되지 않고 적용 가능함
- C) Performant and robust: 새로운 태스크 instance에 대한 강한 일반화 성능
- D) Human aligned and controllable: thought editing을 통해 agent behavior를 control 또는 correct 가능
5. Knowledge-Intensive Reasoning Tasks
5.1. Setup
- Domains
- Hot-PotQA: multi-hop question answering benchmark
- FEVER: fact verification benchmark
- 두 태스크에 대해 question-only setup
- Action Space
- (1) search[entity]: 관련 wiki 페이지가 존재한다면 corresponding entity로부터 첫 5개의 문장을 반환
- (2) lookup[string]: 페이지 내에 'string'을 포함하고 있는 문장의 다음 문장을 반환
- (3) finish[answer]: 현재 태스크를 answer로 마무리
5.2. Methods
- Baselines
- (a) Standard prompting: thoughts, actions, observations 모두 제외
- (b) Chain-of-thought prompting (CoT): action, observations는 제외, reasoning-only + CoT-SC (self-consistency)
- (c) Acting-only prompt (Act): thoughts는 제외, WebGPT와 유사한 작동 방식
- Combining Internal and External Knowledge
- ReAct가 훨씬 factual & grounded. CoT는 hallucination 자주 겪음
- ReACT와 CoT-SC의 통합을 제안: ReAct → CoT-SC / CoT-SC → ReAct
- Finetuning
- 3,000 개의 trajectories를 ReAct에 의해 생성된 정답과 함께 사용하여 smaller language models를 학습
5.3. Results and Observations
- ReAct outperforms Act consistently
- ReAct가 Act에 비해 두 벤치마크에서 우월한 성능을 보임
- fine-tuning 결과 또한 reasoning traces가 informed acting에 도움이 된다는 것을 보여줌

- ReAct vs. CoT
- Fever에서는 ReAct가 CoT를 앞섰으나 HotpotQA에서는 약간 뒤처짐
- A) Hallucination is a serious problem for CoT
- B) ReAct의 방식은 groundedness & trustworthiness 성능 향상에는 도움이 되지만, reasoning step을 formulating하는 데의 flexibility는 줄어듦
- C) ReAct의 경우 informative knowledge를 성공적으로 retrieve하는 것이 매우 중요

- ReAct + CoT-SC perform best for prompting LLMs
- 모델의 internal & external 지식을 적절히 혼합하는 것이 reasoning tasks에서 중요
- ReAct performs best for fine-tuning
- PaLM-8/62B 사이즈에서는 prompting ReAct의 성능이 네 방식 중 가장 낮음
- 그러나, 3,000개의 예시로 fine-tuning할 때는 ReAct가 가장 효과적인 방식임이 확인됨
- Standard 또는 CoT는 ReAct와 Act에 비해 fine-tuning 성과가 좋지 않음
- 사람이 작성한 데이터가 많을 수록 fine-tuning하는 것이 ReAct의 잠재력을 최대한으로 끌어내는 방안

6. Decision Making Tasks
- ALFWorld
- agent가 high-level goal을 달성하기 위한 6개 종류의 태스크로 구성
- text actions을 통해 가상의 집을 navigating and interacting
- 각 종류의 태스크에 대해 세 개의 trajectories를 랜덤하게 annotate
- 목표를 decompose → subgoal completion을 track → next subgoal을 결정 → commonsense를 활용한 reasoning
- WebShop
- 1.18M real-world products & 12k human instructions
- high variety of structured and unstructured texts
- 500개의 test instructions에 대한 평균 스코어로 평가
- Results
- ReAct가 Act에 비해 두 데이터셋에서 좋은 성능을 보임
- Act는 주로 goal을 subgoal로 decompose하지 못함
- Inner Monologue 방식 역시 ReAct에 비해 열등함

7. Insights
LLM이 성장하면서 이를 판단 주체로 활용하고자 하는 연구들이 굉장히 많았습니다.
가장 인상 깊었던 것은 Microsoft에서 내놓은 HuggingGPT였는데 깃 repo 이름을 Jarvis로 지은 것이 굉장히 센스있다고 생각을 했죠.
그런데 이러한 시도가 제가 인지한 것보다도 훨씬 일찍 이뤄졌다는 것이 놀랍습니다..
작년 10월에 제출되었다면 그 이전에 연구가 설계되고 실험이 진행되었을텐데..
현재 이뤄지고 있는 연구들은 어떤 형태일지 상상도 잘 안되는 것 같습니다.
요즘은 위 연구에서 사용한 벤치마크가 아니더라도 LM의 다양한 tool 활용 능력을 평가할 수 있는 데이터셋들이 존재하는 것으로 알고 있는데 거기에 대해서도 유의미한 성과가 있을지 궁금하네요.
출처 : https://arxiv.org/abs/2210.03629
ReAct: Synergizing Reasoning and Acting in Language Models
While large language models (LLMs) have demonstrated impressive capabilities across tasks in language understanding and interactive decision making, their abilities for reasoning (e.g. chain-of-thought prompting) and acting (e.g. action plan generation) ha
arxiv.org
'Paper Review' 카테고리의 다른 글
관심있는 NLP 논문을 읽어보고 간단히 정리했습니다.
혹시 부족하거나 잘못된 내용이 있다면 댓글 부탁드립니다 🙇♂️
[Google Research, Brain team]
- LLM이 reasoning traces와 task-specific actions를 interleaved manner로 생성하도록 하는 ReAct
- chain-of-thought (CoT) reasoning에서 나타나는 hallucination & error propagation 문제를 극복
- 두 개의 interactive decision making benchmarks (ALFWorld & WebShop)에서 ReAct가 다른 방법들보다 우월

1. Introduction
- 인간 지능의 고유한 특징 중 하나는 verbal reasoning을 task-oriented actions과 결합할 수 있는 능력
- 즉, acting과 reasoning의 synergy를 기대
- 최근 연구 결과들도 autonomous system에서 verbal reasoning과 interactive decision making 결합 가능성을 엿볼 수 있었음
- 그러나 chain-of-thought (CoT)는 static black box이며 hallucination과 error propagation 문제가 존재
- acting의 경우 언어 모델을 high-level goal을 달성하기 위한 reasoning planner로 적절히 사용하지 못한다는 문제
2. Realted Work
- Language model for reasoning
- Chain-of-Thought (CoT), least-to-most prompting, zero-shot-CoT, reasoning with self-consistency
- Selection-Inference, STaR, Faithful reasoning, Scratchpad
- Languae models for decision making
- LLM을 의사 결정을 위한 policy 모델로 활용
- WebGPT, BlenderBot, Sparrow, SimpleTOD
3. Contributions
- 프롬프트 기반으로 reasoning & acting을 통합한 패러다임을 제시하여 LLM이 general task를 잘 풀어낼 수 있도록 하는 ReAct를 도입
- few-shot learning 세팅을 바탕으로 다양한 실험을 수행
- acting in reasoning tasks & reasoning in interactive tasks의 중요성을 이해
- prompting 환경에서 ReAct 방식의 한계를 확인
4. ReACT: Synergizing Reasoning + Acting
- context가 주어졌을 때 기대되는 action이 있고 이것을 설명하는 것이 policy라고 정의
- agent의 action space에 space of language를 더하여 확장
- space of language (L)는 thought 또는 reasoning trace로 볼 수 있음
- frozen LLM, PaLM-540B를 few-shot in-context로 prompt
- ReAct는 몇 가지 고유한 특징을 지님
- A) Intuitive and easy to design: annotator가 단순히 자신의 생각을 언어로 써내려가면 됨
- B) General and flexible: thought space & thought-action 형식은 상당히 자유로워 QA, fact verification 등에 국한되지 않고 적용 가능함
- C) Performant and robust: 새로운 태스크 instance에 대한 강한 일반화 성능
- D) Human aligned and controllable: thought editing을 통해 agent behavior를 control 또는 correct 가능
5. Knowledge-Intensive Reasoning Tasks
5.1. Setup
- Domains
- Hot-PotQA: multi-hop question answering benchmark
- FEVER: fact verification benchmark
- 두 태스크에 대해 question-only setup
- Action Space
- (1) search[entity]: 관련 wiki 페이지가 존재한다면 corresponding entity로부터 첫 5개의 문장을 반환
- (2) lookup[string]: 페이지 내에 'string'을 포함하고 있는 문장의 다음 문장을 반환
- (3) finish[answer]: 현재 태스크를 answer로 마무리
5.2. Methods
- Baselines
- (a) Standard prompting: thoughts, actions, observations 모두 제외
- (b) Chain-of-thought prompting (CoT): action, observations는 제외, reasoning-only + CoT-SC (self-consistency)
- (c) Acting-only prompt (Act): thoughts는 제외, WebGPT와 유사한 작동 방식
- Combining Internal and External Knowledge
- ReAct가 훨씬 factual & grounded. CoT는 hallucination 자주 겪음
- ReACT와 CoT-SC의 통합을 제안: ReAct → CoT-SC / CoT-SC → ReAct
- Finetuning
- 3,000 개의 trajectories를 ReAct에 의해 생성된 정답과 함께 사용하여 smaller language models를 학습
5.3. Results and Observations
- ReAct outperforms Act consistently
- ReAct가 Act에 비해 두 벤치마크에서 우월한 성능을 보임
- fine-tuning 결과 또한 reasoning traces가 informed acting에 도움이 된다는 것을 보여줌

- ReAct vs. CoT
- Fever에서는 ReAct가 CoT를 앞섰으나 HotpotQA에서는 약간 뒤처짐
- A) Hallucination is a serious problem for CoT
- B) ReAct의 방식은 groundedness & trustworthiness 성능 향상에는 도움이 되지만, reasoning step을 formulating하는 데의 flexibility는 줄어듦
- C) ReAct의 경우 informative knowledge를 성공적으로 retrieve하는 것이 매우 중요

- ReAct + CoT-SC perform best for prompting LLMs
- 모델의 internal & external 지식을 적절히 혼합하는 것이 reasoning tasks에서 중요
- ReAct performs best for fine-tuning
- PaLM-8/62B 사이즈에서는 prompting ReAct의 성능이 네 방식 중 가장 낮음
- 그러나, 3,000개의 예시로 fine-tuning할 때는 ReAct가 가장 효과적인 방식임이 확인됨
- Standard 또는 CoT는 ReAct와 Act에 비해 fine-tuning 성과가 좋지 않음
- 사람이 작성한 데이터가 많을 수록 fine-tuning하는 것이 ReAct의 잠재력을 최대한으로 끌어내는 방안

6. Decision Making Tasks
- ALFWorld
- agent가 high-level goal을 달성하기 위한 6개 종류의 태스크로 구성
- text actions을 통해 가상의 집을 navigating and interacting
- 각 종류의 태스크에 대해 세 개의 trajectories를 랜덤하게 annotate
- 목표를 decompose → subgoal completion을 track → next subgoal을 결정 → commonsense를 활용한 reasoning
- WebShop
- 1.18M real-world products & 12k human instructions
- high variety of structured and unstructured texts
- 500개의 test instructions에 대한 평균 스코어로 평가
- Results
- ReAct가 Act에 비해 두 데이터셋에서 좋은 성능을 보임
- Act는 주로 goal을 subgoal로 decompose하지 못함
- Inner Monologue 방식 역시 ReAct에 비해 열등함

7. Insights
LLM이 성장하면서 이를 판단 주체로 활용하고자 하는 연구들이 굉장히 많았습니다.
가장 인상 깊었던 것은 Microsoft에서 내놓은 HuggingGPT였는데 깃 repo 이름을 Jarvis로 지은 것이 굉장히 센스있다고 생각을 했죠.
그런데 이러한 시도가 제가 인지한 것보다도 훨씬 일찍 이뤄졌다는 것이 놀랍습니다..
작년 10월에 제출되었다면 그 이전에 연구가 설계되고 실험이 진행되었을텐데..
현재 이뤄지고 있는 연구들은 어떤 형태일지 상상도 잘 안되는 것 같습니다.
요즘은 위 연구에서 사용한 벤치마크가 아니더라도 LM의 다양한 tool 활용 능력을 평가할 수 있는 데이터셋들이 존재하는 것으로 알고 있는데 거기에 대해서도 유의미한 성과가 있을지 궁금하네요.
출처 : https://arxiv.org/abs/2210.03629
ReAct: Synergizing Reasoning and Acting in Language Models
While large language models (LLMs) have demonstrated impressive capabilities across tasks in language understanding and interactive decision making, their abilities for reasoning (e.g. chain-of-thought prompting) and acting (e.g. action plan generation) ha
arxiv.org