Multimodal Task Vectors Enable Many-Shot Multimodal In-Context Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Huang, Brandon, Mitra, Chancharik, Arbelle, Assaf, Karlinsky, Leonid, Darrell, Trevor, Herzig, Roei
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916534590373888
author Huang, Brandon
Mitra, Chancharik
Arbelle, Assaf
Karlinsky, Leonid
Darrell, Trevor
Herzig, Roei
author_facet Huang, Brandon
Mitra, Chancharik
Arbelle, Assaf
Karlinsky, Leonid
Darrell, Trevor
Herzig, Roei
contents The recent success of interleaved Large Multimodal Models (LMMs) in few-shot learning suggests that in-context learning (ICL) with many examples can be promising for learning new tasks. However, this many-shot multimodal ICL setting has one crucial problem: it is fundamentally limited by the model's context length set at pretraining. The problem is especially prominent in the multimodal domain, which processes both text and images, requiring additional tokens. This motivates the need for a multimodal method to compress many shots into fewer tokens without finetuning. In this work, we enable LMMs to perform multimodal, many-shot in-context learning by leveraging Multimodal Task Vectors (MTV) -- compact implicit representations of in-context examples compressed in the model's attention heads. Specifically, we first demonstrate the existence of such MTV in LMMs and then leverage these extracted MTV to enable many-shot in-context learning for various vision-and-language tasks. Our experiments suggest that MTV can scale in performance with the number of compressed shots and generalize to similar out-of-domain tasks without additional context length for inference. Code: https://github.com/Brandon3964/MultiModal-Task-Vector
format Preprint
id arxiv_https___arxiv_org_abs_2406_15334
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Multimodal Task Vectors Enable Many-Shot Multimodal In-Context Learning
Huang, Brandon
Mitra, Chancharik
Arbelle, Assaf
Karlinsky, Leonid
Darrell, Trevor
Herzig, Roei
Computer Vision and Pattern Recognition
Artificial Intelligence
Computation and Language
Machine Learning
The recent success of interleaved Large Multimodal Models (LMMs) in few-shot learning suggests that in-context learning (ICL) with many examples can be promising for learning new tasks. However, this many-shot multimodal ICL setting has one crucial problem: it is fundamentally limited by the model's context length set at pretraining. The problem is especially prominent in the multimodal domain, which processes both text and images, requiring additional tokens. This motivates the need for a multimodal method to compress many shots into fewer tokens without finetuning. In this work, we enable LMMs to perform multimodal, many-shot in-context learning by leveraging Multimodal Task Vectors (MTV) -- compact implicit representations of in-context examples compressed in the model's attention heads. Specifically, we first demonstrate the existence of such MTV in LMMs and then leverage these extracted MTV to enable many-shot in-context learning for various vision-and-language tasks. Our experiments suggest that MTV can scale in performance with the number of compressed shots and generalize to similar out-of-domain tasks without additional context length for inference. Code: https://github.com/Brandon3964/MultiModal-Task-Vector
title Multimodal Task Vectors Enable Many-Shot Multimodal In-Context Learning
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Computation and Language
Machine Learning
url https://arxiv.org/abs/2406.15334