Abstract: Current multimodal information retrieval studies mainly focus on single-image inputs, which limits real-world applications involving multiple images and text-image interleaved content. In this work, we introduce the text-image interleaved retrieval (TIIR) task, where the query and document are interleaved text-image sequences, and the model is required to understand the semantics from the interleaved context for effective retrieval. We construct a TIIR benchmark based on naturally interleaved wikiHow tutorials, where a specific pipeline is designed to generate interleaved queries. To explore the task, we adapt several off-the-shelf retrievers and build a dense baseline by interleaved multimodal large language model (MLLM). We then propose a novel Matryoshka Multimodal Embedder (MME), which compresses the number of visual tokens at different granularity, to address the challenge of excessive visual tokens in MLLM-based TIIR models. Experiments demonstrate that simple adaption of existing models does not consistently yield effective results. Our MME achieves significant improvements over the baseline by substantially fewer visual tokens.
What Problem Does This Paper Address?
Traditional Multimodal Information Retrieval (MIR) usually operates on a "one image, one text" basis—think of searching for a product using a single photo and a short description. However, real-world information is rarely that simple. Tutorials, recipes, and complex troubleshooting queries often involve a sequence of steps where the specific order of text and multiple images matters.
Existing Multimodal Large Language Models (MLLMs) can process these sequences, but they face a "visual dominance" problem: each image typically generates hundreds of tokens (e.g., 576 for DeepSeek-VL). In a document with ten images, the visual data can overwhelm the text in the embedding space and quickly hit context length limits, leading to poor retrieval performance and high computational costs.
Methods: The Matryoshka Multimodal Embedder (MME)
The authors propose a dense retrieval framework using an MLLM backbone (specifically DeepSeek-VL-1.3B), where the final [EOS] token serves as the sequence embedding. To solve the token explosion problem, they introduce the Matryoshka Multimodal Embedder (MME).
Key Innovations: * Matryoshka-style Compression: Instead of using a fixed, large number of visual tokens, MME applies average pooling to the vision encoder's output. This allows the model to represent an image using a variable $N \times N$ grid of tokens (where $N$ can range from 1 to 24). * Flexible Granularity: Much like Matryoshka (nesting) dolls, the model is trained to be effective across multiple granularities. At inference time, users can choose a smaller $N$ (like $N=3$, resulting in just 9 tokens per image) to balance speed and accuracy. * Training Strategies: They explored three ways to train these nested embeddings: random sampling of grid sizes, "Matryoshka learning" (optimizing multiple grid sizes simultaneously), and "Mean learning" (averaging losses across sizes).
Datasets: wikiHow-TIIR
The authors created wikiHow-TIIR, the first dedicated benchmark for this task, utilizing approximately 150,000 instructional articles from wikiHow.
Since real interleaved queries are hard to find, they built a sophisticated pipeline (Step a-d above). They used an MLLM to caption document images, an LLM to write a "problem-solving" query based on those captions, and finally, an image generator (FLUX.1) to create new images that represent the user's situation. The final dataset includes 73,084 training pairs and a high-quality, human-annotated test set of 7,654 pairs.
Key Insights and Results
- Context is King: Shuffling the order or positions of images in a sequence led to a significant drop in retrieval accuracy. This proves that TIIR isn't just about "bag-of-visuals" search; the model must understand the interleaved narrative.
- The "U-Shaped" Token Curve: Performance follows an inverted U-shape; too few tokens fail to capture detail, but too many tokens cause "semantic bias," where the images drown out the text. A $3 \times 3$ grid (only 9 tokens per image) often outperformed the full 576-token baseline.
- Superior Performance: The MME model (at $N=3$) achieved a Recall@5 of 77.40 and an MRR@10 of 63.40, significantly outperforming standard MLLM baselines and "adapted" models.
- Efficiency Gains: By compressing tokens, MME reduced encoding time by over 60% (from 187ms to 70ms per query/doc pair) and allowed for much larger batch sizes during inference.
Conclusion
This work establishes TIIR as a new frontier in multimodal search. By introducing the wikiHow-TIIR benchmark and the MME framework, the authors provide both the data and the architectural strategy needed to handle complex, interleaved content efficiently. Future work will look toward expanding this to other domains like news and scientific literature.
Summary updated