Large Multimodal Models (LMMs) like LLaVA have demonstrated impressive visual-linguistic reasoning capabilities. However, their standard architecture processes every image using a fixed, large grid of visual tokens (e.g., 576 tokens). This "one-size-fits-all" approach is highly inefficient. A simple photo of an apple incurs the same computational cost as a dense, complex infographic.
To address this, researchers have introduced Matryoshka Multimodal Models ($M^3$). Inspired by Russian nesting dolls, $M^3$ learns to represent visual content as nested sets of tokens, capturing information across multiple coarse-to-fine granularities within a single set of weights.
How $M^3$ Works
Instead of forcing an image into a single fixed token length, $M^3$ creates a hierarchy of visual granularities.
- Nested Token Sets: The model represents an image as a series of nested sets, typically containing $S \in \{1, 9, 36, 144, 576\}$ tokens. Coarser levels (fewer tokens) are derived directly from the finer levels using spatial average pooling.
- Joint Optimization: During training, the model is optimized to answer questions correctly using any of these scales. The loss function averages the next-token prediction loss across all scales simultaneously.
- No New Parameters: Remarkably, $M^3$ does not add new learnable modules. It simply fine-tunes the existing vision encoder (like CLIP) and the Large Language Model (LLM) to be scale-agnostic.
- Granularity Control: At inference time, a "Granularity Controller" dictates how many tokens to feed the LLM based on the available compute budget or the anticipated complexity of the task.
Key Insights: The "9-Token" Surprise and the Oracle Gap
Extensive evaluation across image, document, and video benchmarks revealed surprising insights about how LMMs process visual information.
The "9-Token" Surprise: For many natural scene benchmarks (such as COCO or MMBench), the model achieves near-peak performance using only 9 tokens. This indicates that current models waste massive amounts of compute processing "easy" images at maximum resolution. Conversely, document-based tasks and OCR require much higher token counts, showing a sharp performance drop as granularity decreases.
The Oracle Gap: The researchers calculated an "Oracle" performance—the theoretical score if the model perfectly chose the optimal scale for every individual image. They discovered a massive 8-10% performance gap between current fixed-scale models and this theoretical upper bound. This suggests that adaptive granularity is a major frontier for improving LMM efficiency and accuracy.
Efficiency and Video Performance
The practical benefits of $M^3$ are substantial:
- Computational Efficiency: Reducing the representation from 576 to 9 tokens cuts the LLM "prefill" time by approximately 70% and drastically reduces memory usage.
- Competitive Baselines: An $M^3$ model based on LLaVA-1.5 using just 9 tokens can outperform specialized models like Qwen-VL-Chat that use 256 tokens.
- "Less is More" in Video: On zero-shot video benchmarks, $M^3$ achieved state-of-the-art results among open-source models. In some cases, using fewer tokens actually improved performance by reducing visual distraction, helping the LLM focus on relevant frames rather than background noise.
Limitations and Future Directions
The primary limitation of the current $M^3$ framework is that it requires the user (or a heuristic) to select the scale at test time. The model lacks a built-in "router" to automatically decide whether an image needs 1 token or 576 tokens.
Future work will likely focus on developing lightweight Scale Predictors—mechanisms that can assess an image's complexity and predict the necessary granularity before the heavy LLM processing begins. Additionally, exploring more sophisticated token aggregation methods beyond simple average pooling could help preserve crucial fine details even at the lowest token counts.
Summary updated