Introduction
Large Multimodal Models (LMMs) have made significant strides in single-image visual question-answering. However, their performance often plummets when tasked with finding a specific "needle" in a massive "haystack" of images. This paper introduces Visual Haystacks (VHs), a new vision-centric benchmark designed to challenge LMMs to retrieve and reason about specific objects across thousands of images. To address the shortcomings of current models on this benchmark, the authors also present MIRAGE (Multi-Image Retrieval Augmented Generation), a highly efficient visual-RAG framework capable of processing up to 10,000 images on a single GPU.
The Problem with Current Benchmarks
Existing "Needle-In-A-Haystack" (NIAH) benchmarks for vision are often inadvertently easy to bypass. They typically overlay text (e.g., "The secret word is...") directly onto an image. Because modern LMMs possess powerful Optical Character Recognition (OCR) capabilities, they can effectively "hack" these benchmarks by scanning for text rather than genuinely understanding the visual content.
Real-world tasks—such as a researcher analyzing satellite imagery or a user searching for a specific pet in a massive photo album—require true vision-centric retrieval and reasoning. Current models struggle with this. They are easily distracted by irrelevant images and exhibit a severe "lost-in-the-middle" bias, frequently failing to retrieve information placed in the center of their context window.
Methods: A Rigorous Benchmark and a Novel Architecture
To push the field forward, the authors propose a two-part solution:
1. Visual Haystacks (VHs) Benchmark
Unlike OCR-reliant tests, VHs uses natural images from the COCO dataset. A model is presented with a query such as, "For the image with a truck, is there a dog?" To answer correctly, the model must first retrieve the correct anchor image (the one with the truck) from the haystack and then reason about its specific visual content (is there a dog?).
2. MIRAGE Framework
MIRAGE is an open-source, lightweight "Visual-RAG" architecture designed for extreme efficiency:
- Token Compression: Standard LMMs use hundreds of tokens per image (e.g., ~576). MIRAGE utilizes a Q-Former to compress this representation to just 32 tokens, achieving an 18x reduction in token intensity.
- Query-Aware Retriever: Instead of feeding every image in the haystack directly into an expensive LLM, MIRAGE employs a lightweight retriever module to filter for the most relevant images first.
- Instruction Tuning: The model is trained on a massive 1.2M-image dataset specifically curated for multi-image tasks, combining existing sets (RetVQA, SlideVQA, WebQA) with synthetic data derived from LLaVA.
Key Insights
- The "Lost-in-the-Middle" Vision Bias: Similar to text-only LLMs, LMMs struggle when the target image is located in the middle of a long sequence. As shown in the performance heatmaps, even proprietary models like GPT-4o show a clear accuracy dip in the center, while open-source models often heavily favor images placed at the very end of the context.
- Retrieval is the True Bottleneck: The primary reason LMMs fail at large-scale visual tasks is an inability to filter out visual distractors, rather than a lack of reasoning power. As the haystack grows, performance drops sharply across the board.
- OCR is a Crutch: Models that achieve near-perfect scores on OCR-based NIAH tests fail dramatically on VHs, underscoring the necessity for genuinely vision-centric evaluation metrics.
Key Results
- Unprecedented Scalability: MIRAGE is the first open-source framework capable of processing 10,000 images on a single 40GB A100 GPU, far surpassing the 1,000-image limit of most contemporary models.
- Performance Boost: MIRAGE achieves up to a 13% performance improvement over existing open-source LMMs on the VHs benchmark.
- State-of-the-Art Multi-Image QA: It sets a new SOTA on the RetVQA multi-image benchmark (67.6% compared to GPT-4o's 34.6%).
- Maintained Robustness: Despite using 18x fewer tokens per image, MIRAGE remains highly competitive on standard single-image QA tasks (like VQAv2 and GQA), proving that massive token counts are not strictly necessary for high-quality reasoning.
Limitations and Future Work
Because VHs is built upon the MS-COCO dataset, it inherently carries over existing biases regarding gender, race, and geographic location, and is limited to COCO's 80 object categories. Furthermore, the benchmark relies on template-based questions, which may not capture the full nuance of natural language. Future work will focus on expanding to more complex, multi-hop reasoning across diverse, open-domain image sets.
Summary updated