상상의 공간에서의 대형 언어 모델: 시뮬레이션을 통한 시행착오 학습
LLMs in the Imaginarium: Tool Learning through Simulated Trial and Error
March 7, 2024
저자: Boshi Wang, Hao Fang, Jason Eisner, Benjamin Van Durme, Yu Su
cs.AI
초록
도구는 대규모 언어 모델(LLM)이 최신 정보를 획득하고 외부 환경에서 중요한 조치를 취하기 위해 필수적입니다. 도구를 활용한 LLM에 대한 기존 연구는 주로 도구의 광범위한 커버리지와 새로운 도구를 추가하는 유연성에 초점을 맞추고 있습니다. 그러나 놀랍게도 간과된 중요한 측면은 단순히 LLM이 훈련된 도구를 얼마나 정확하게 사용하는가입니다. 우리는 GPT-4를 포함한 기존 LLM과 도구 사용을 위해 특별히 미세 조정된 오픈소스 LLM이 30%에서 60%에 불과한 정확도에 머물러 있어 실질적으로 신뢰할 수 있는 수준과는 거리가 있음을 발견했습니다. 우리는 생물학적으로 영감을 받은 방법인 시뮬레이션된 시행착오(STE)를 제안합니다. 이 방법은 생물학적 시스템에서 성공적인 도구 사용 행동을 위한 세 가지 핵심 메커니즘인 시행착오, 상상력, 그리고 기억을 조율합니다. 구체적으로, STE는 LLM의 '상상력'을 활용하여 도구 사용에 대한 그럴듯한 시나리오를 시뮬레이션한 후, LLM이 도구와 상호작용하여 실행 피드백으로부터 학습합니다. 단기 및 장기 기억은 각각 탐색의 깊이와 폭을 개선하기 위해 사용됩니다. ToolBench에서의 포괄적인 실험을 통해 STE가 컨텍스트 내 학습과 미세 조정 설정 모두에서 LLM의 도구 학습을 크게 개선하며, Mistral-Instruct-7B에 46.7%의 성능 향상을 가져와 GPT-4를 능가하게 함을 보여줍니다. 또한 간단한 경험 재생 전략을 통해 도구의 효과적인 지속 학습을 보여줍니다.
English
Tools are essential for large language models (LLMs) to acquire up-to-date
information and take consequential actions in external environments. Existing
work on tool-augmented LLMs primarily focuses on the broad coverage of tools
and the flexibility of adding new tools. However, a critical aspect that has
surprisingly been understudied is simply how accurately an LLM uses tools for
which it has been trained. We find that existing LLMs, including GPT-4 and
open-source LLMs specifically fine-tuned for tool use, only reach a correctness
rate in the range of 30% to 60%, far from reliable use in practice. We propose
a biologically inspired method for tool-augmented LLMs, simulated trial and
error (STE), that orchestrates three key mechanisms for successful tool use
behaviors in the biological system: trial and error, imagination, and memory.
Specifically, STE leverages an LLM's 'imagination' to simulate plausible
scenarios for using a tool, after which the LLM interacts with the tool to
learn from its execution feedback. Both short-term and long-term memory are
employed to improve the depth and breadth of the exploration, respectively.
Comprehensive experiments on ToolBench show that STE substantially improves
tool learning for LLMs under both in-context learning and fine-tuning settings,
bringing a boost of 46.7% to Mistral-Instruct-7B and enabling it to outperform
GPT-4. We also show effective continual learning of tools via a simple
experience replay strategy.