다중모달 기반 모델에서의 다수 샷 인컨텍스트 학습
Many-Shot In-Context Learning in Multimodal Foundation Models
May 16, 2024
저자: Yixing Jiang, Jeremy Irvin, Ji Hun Wang, Muhammad Ahmed Chaudhry, Jonathan H. Chen, Andrew Y. Ng
cs.AI
초록
대규모 언어 모델(Large Language Models)은 소수 샷(few-shot) 인컨텍스트 학습(ICL)에서 효과적인 것으로 잘 알려져 있습니다. 최근 멀티모달 기반 모델(Multimodal Foundation Models)의 발전으로 전례 없이 긴 컨텍스트 윈도우가 가능해졌으며, 이는 더 많은 데모 예제를 활용한 ICL 능력을 탐구할 수 있는 기회를 제공합니다. 본 연구에서는 멀티모달 기반 모델의 성능을 소수 샷에서 다수 샷(many-shot) ICL로 확장하여 평가합니다. 우리는 GPT-4o와 Gemini 1.5 Pro를 10개의 데이터셋(자연 이미지, 의료 이미지, 원격 감지, 분자 이미지 등 다양한 도메인)과 작업(다중 클래스, 다중 레이블, 세분화된 분류)에 걸쳐 벤치마킹했습니다. 실험 결과, 거의 2,000개의 멀티모달 데모 예제를 포함한 다수 샷 ICL은 소수 샷(<100 예제) ICL에 비해 모든 데이터셋에서 상당한 성능 향상을 보였습니다. 또한, Gemini 1.5 Pro는 많은 데이터셋에서 테스트한 최대 예제 수까지 로그 선형적으로 성능이 계속 향상되었습니다. 다수 샷 ICL에 필요한 긴 프롬프트와 관련된 높은 추론 비용을 고려하여, 우리는 단일 API 호출에서 여러 쿼리를 배치 처리하는 영향도 탐구했습니다. 최대 50개의 쿼리를 배치 처리하면 제로 샷(zero-shot) 및 다수 샷 ICL에서 성능 향상을 이끌 수 있으며, 특히 제로 샷 설정에서는 여러 데이터셋에서 상당한 이점을 보이면서도 쿼리당 비용과 지연 시간을 크게 줄일 수 있음을 확인했습니다. 마지막으로, 모델의 ICL 데이터 효율성, 즉 더 많은 데모 예제로부터 학습하는 속도를 측정했습니다. GPT-4o와 Gemini 1.5 Pro는 데이터셋 전반에서 유사한 제로 샷 성능을 보였지만, Gemini 1.5 Pro는 대부분의 데이터셋에서 GPT-4o보다 높은 ICL 데이터 효율성을 나타냈습니다. 우리의 결과는 다수 샷 ICL이 멀티모달 기반 모델을 새로운 애플리케이션과 도메인에 효율적으로 적응시키는 데 유용할 수 있음을 시사합니다. 본 연구의 코드베이스는 https://github.com/stanfordmlgroup/ManyICL에서 공개되어 있습니다.
English
Large language models are well-known to be effective at few-shot in-context
learning (ICL). Recent advancements in multimodal foundation models have
enabled unprecedentedly long context windows, presenting an opportunity to
explore their capability to perform ICL with many more demonstrating examples.
In this work, we evaluate the performance of multimodal foundation models
scaling from few-shot to many-shot ICL. We benchmark GPT-4o and Gemini 1.5 Pro
across 10 datasets spanning multiple domains (natural imagery, medical imagery,
remote sensing, and molecular imagery) and tasks (multi-class, multi-label, and
fine-grained classification). We observe that many-shot ICL, including up to
almost 2,000 multimodal demonstrating examples, leads to substantial
improvements compared to few-shot (<100 examples) ICL across all of the
datasets. Further, Gemini 1.5 Pro performance continues to improve log-linearly
up to the maximum number of tested examples on many datasets. Given the high
inference costs associated with the long prompts required for many-shot ICL, we
also explore the impact of batching multiple queries in a single API call. We
show that batching up to 50 queries can lead to performance improvements under
zero-shot and many-shot ICL, with substantial gains in the zero-shot setting on
multiple datasets, while drastically reducing per-query cost and latency.
Finally, we measure ICL data efficiency of the models, or the rate at which the
models learn from more demonstrating examples. We find that while GPT-4o and
Gemini 1.5 Pro achieve similar zero-shot performance across the datasets,
Gemini 1.5 Pro exhibits higher ICL data efficiency than GPT-4o on most
datasets. Our results suggest that many-shot ICL could enable users to
efficiently adapt multimodal foundation models to new applications and domains.
Our codebase is publicly available at
https://github.com/stanfordmlgroup/ManyICL .Summary
AI-Generated Summary