Multimodal Representation: A Think-Then-Embed Approach for Complex Instructions
This article introduces Think-Then-Embed (TTE), a two-stage paradigm that brings generative reasoning into multimodal representation. It explains why direct embedding fails on queries that require spatial ordering, temporal alignment, or numeric computation, how the Reasoner produces an embedding-oriented reasoning trace and the Embedder performs conditional pooling on it, why a smaller model with reasoning can outperform a larger model without it, and what to consider when deploying the approach in production multimodal retrieval and search systems.
1. Introduction: The Overlooked Generative Reasoning Capability
When engineering teams build cross-modal retrieval, search and recommendation, or multimodal question answering systems, they often run into a structural tradeoff. A mid-sized multimodal model lacks the precision needed for queries that require multi-step reasoning. Switching to a larger model improves accuracy, but inference cost multiplies and the latency and throughput requirements of online serving become hard to meet.
A paradigm called Think-Then-Embed (TTE) offers a different way out. Its core insight is that multimodal large language models (MLLMs) already possess generative reasoning ability, yet mainstream representation approaches use them only as encoders, effectively giving that ability up. This article starts from the root of the problem and breaks down the design logic, engineering value, and implementation details of the paradigm.
2. Root Cause: Pseudo-Matching Under Complex Instructions
A typical universal multimodal representation (UME) model concatenates the image, text, and instruction, feeds them into an MLLM, and takes the hidden state of the last token as the representation vector. This direct-vector approach works well for simple semantic matching, but as soon as an instruction needs to take a turn, it degrades into surface-level matching at the keyword level.
Three typical failure scenarios:
- Visual grounding: For the query “the second closest vehicle to the camera,” the model only captures entity words such as “vehicle” and “camera.” It never ranks candidates by distance before describing their features, so it ends up retrieving the farthest vehicle as well.
- Video temporal: For the query “what architectural style is the building that appears at the 20th second of the drone video,” the model cannot map the time constraint to a specific video segment and instead matches all architectural styles indiscriminately.
- Document charts: For the query “the metric that grew 50% in 2025 compared with 2020,” the model does not compute the growth rate first but scores similarity around the literal words of the years and “growth.”
What these cases share is that the semantics of the query cannot be expressed directly by surface terms. State filtering, temporal alignment, or numeric computation must happen first to produce a matchable target description. A representation produced without a draft is essentially computing similarity over the wrong intermediate object.
3. The Core of the Paradigm: Two-Stage Collaboration Between Reasoner and Embedder
The TTE framework splits the pipeline into two modules with clear responsibilities, similar to research training: first have the model write out a reasoning draft, then derive the answer from the draft together with the original question.
3.1 Reasoner: Generating a Representation-Oriented Reasoning Trace
The Reasoner does not output the final answer directly. It produces an embedding-oriented reasoning trace (ECR). The key difference from an ordinary chain of thought (CoT) is the goal: a standard CoT ends at a conclusion, whereas an ECR ends once the information needed for matching is complete.
An ECR therefore writes out intermediate quantities that are useful for retrieval, such as the relative position ranking of candidate targets, a key-frame description for a specified timestamp, or a growth-rate conclusion derived from chart values. An illustrative output structure:
[ECR]Constraint parsing: 2nd in distance rankingCandidate enumeration: Vehicle A (closest) / Vehicle B (second closest) / Vehicle C (farthest)Target description: Vehicle B, red, three-box sedan, located in the middle of the frame[EMBED_INPUT] original query + ECR
This intermediate representation lets the subsequent similarity computation rest on a parsed intent rather than on the original literal wording.
3.2 Embedder: Conditional Pooling Based on the Draft
The Embedder takes the joint input of the original query and the ECR, then performs vector pooling. Compared with unconditionally taking the last token, conditional pooling focuses the vector on visual evidence relevant to the query constraints and suppresses interference from irrelevant regions. Training typically uses contrastive learning: positives are targets that genuinely satisfy the constraint, while negatives are samples that are only literally similar but violate the constraint (such as the farthest vehicle or buildings at other timestamps), which injects reasoning correctness directly into the vector space.
4. Why a Small Model With Thinking Beats a Large Model Without It
The gains of this paradigm come from three effects stacking together:
- Better allocation of computation: Generative reasoning applies only on the query side and can be precomputed offline and cached, so online serving only needs vector retrieval, avoiding a heavy forward pass for every candidate.
- Hard samples are decomposed explicitly: Multi-step constraints become readable intermediate states, which lowers the semantic burden of a single representation step and lets a mid-sized model reach high precision.
- Training signal is closer to the business: Negatives can be constructed around constraint dimensions, teaching the model to distinguish “looks similar but is not,” which is the main source of errors in complex-instruction scenarios.
So for the same accuracy target, a smaller backbone model can handle online inference, and overall deployment cost drops significantly.
5. Implementation Recommendations
- Cache first: Pre-generate ECRs and vectors for high-frequency queries and write them into the vector retrieval service; update incrementally when the query side changes.
- Tiered routing: Send simple queries through the direct-vector path and trigger the Reasoner only when a complex constraint pattern (temporal, ordering, numeric comparison) is detected, keeping average cost under control.
- Negative sample engineering: Sample negatives in layers by constraint type, and periodically feed online failure cases back into the training set.
- Observability: Set up monitoring and alerts for ECR quality, recall, and average latency separately, with unified log collection, so it is easy to tell whether an error came from reasoning or from representation.
- Elastic resources: Deploy inference and retrieval decoupled on a container platform and scale each with traffic; raw assets can live in object storage, and a message queue can absorb traffic spikes.
6. Conclusion
The essence of failure on complex instructions is not that the model is too small, but that the step of turning intent into a matchable intermediate representation is missing. Think-Then-Embed brings generative reasoning back into the representation pipeline and trades two-stage collaboration for gains in both accuracy and cost, which is directly useful for architecting multimodal retrieval and search systems.
