Say you find a shirt you like on an online store. The design is great as is — you just want to swap the logo on the chest for a different one. Spelling all of that out in words is a chore. So you pull up a photo of the shirt and add, "keep this, just change the logo." Ordinary image search takes that request as a single blob and pulls up "things that look like this shirt." The result: the logo you actually wanted changed gets washed out, and you get back products that are near-clones of the original shirt.
FactEmbed, from researchers at KAIST AI and Google DeepMind, takes aim at exactly this problem in image search. The task of finding a desired result by attaching an edit instruction to a reference image is called Composed Image Retrieval (CIR) — search that specifies a target by combining a reference image with a "condition to change."
CIR is useful precisely when it's hard to describe the result you want in words, but easy to describe it as a "difference" from a reference image. The shirt above is like that. The single phrase "just a different logo" stands in for a long description.
What defines this task is that the query splits into two parts. One is the element to change (the logo on the chest); the other is the element to keep (the shirt itself, its color, the background). A good search would first separate these two, then turn whatever the edited result would look like into something searchable.
The recent trend is to bring models that handle images and text together — multimodal large language models (MLLMs) — to bear on CIR. The most common strategy is to fine-tune such a model with contrastive learning. Contrastive learning trains things that are alike to sit close together and things that differ to sit far apart. The query and the target image each get compressed into a single embedding, and the two embeddings are then pulled toward each other. An embedding is a numeric representation (a vector) that turns an image or text into something comparable, so that the more alike two things are, the closer their numbers.
The trouble is that when you shove the query straight into a single vector, there's no room left to work out "what to change and what to keep" separately. Even if the model has the ability to make that distinction, it just gets smeared together inside the vector, and the axis to change (the logo) gets buried under the rest of the signal.
There have been earlier attempts to sketch out the target in advance. But they usually generated a separate "hypothetical target image" from the query, or bolted on an extra reasoning pass. There are also methods (CCIN, FIRE-CIR) that call an external LLM for every query to break it down attribute by attribute, but the inference cost is high, and some even require verification that scales with the number of candidates. FactEmbed finishes the decomposition during a single pass of a local MLLM, without any of this external machinery. No separate generative model, no additional reasoning pass.
Before getting to the core design, it helps to keep two phases apart so they don't get confused. Training is the process of teaching the model how to "imagine what the edited result would look like," and retrieval is the process of using that trained ability to turn a query into a vector and compare it against candidates. Everything described from here on — the decoder, the rough draft, element-to-element alignment, distillation — operates only during training. What's left at retrieval time is just the embedding those produce.
FactEmbed's design starts from separating, within training, the process of "understanding" the query from the process of "building the vector for search." The model first predicts the result of the requested edit (the authors describe this as "imagining the target"), and then stacks the search embedding on top of that prediction.
The vessel that holds this prediction is the decomposed latents. Decomposed latents are an internal representation trained to hold different features of the image in separate slots. A query that was once tangled into a single vector gets split, element by element, as it passes through this representation. For the shirt, one slot handles the logo, one the background, one the body. Because the element to change (the logo) and the elements to keep (body, background) are placed separately, the search stage can reflect the axis to change without blurring it.
So how do you teach "imagination"? During training, a lightweight decoder is attached partway through the model. A decoder is the part that reconstructs the original features from a compressed representation. This decoder is made to reconstruct the features of the target image, but with an asymmetry built in. The target-side input reconstructs by looking directly at the target image, whereas the query-side input has to infer the features without ever seeing the target. That "inferring without looking" is exactly the imagination. This reconstruction happens only during training; the decoder isn't used at retrieval time.
But if you simply tell it to "reconstruct the whole target," the decomposed latents spend their capacity holding the broad outline (usually the overall layout, which has nothing to do with the part you want to change). So a coarse rough draft is laid down in advance. The rough draft is a numeric vector built during training by roughly aggregating the target image's features, holding only the broad outline (it's not a drawing on paper). Adding this draft in lets the decomposed latents focus only on the fine differences the draft can't capture. Since the big picture is already laid out, a division of labor emerges in which each latent takes on a different detail.
Reconstructing well doesn't guarantee searching well. If the latents are tuned only toward "reconstructing well," there's no guarantee the query and target land in the same comparable coordinate space. So two more mechanisms are added. One is element-to-element alignment learning, which matches each element of the query to its counterpart in the target so they line up. The other is distillation into the deeper layers, which aligns the decomposition structure of the middle layers with the deeper layers so that the per-element decomposition doesn't blur out even in the deep layers near the search output. As a result, the query and target are aligned element by element and can be compared directly at search time.
The heart of this design is that it nails down "what each latent should hold" as a structural task — target reconstruction. That's where it parts ways with earlier multi-vector approaches, which merely tacked on a few training tokens. And it does all this without touching the MLLM's compute flow itself, so speed optimizations like FlashAttention still work as is.
Once training is done, search is simple. Running the query once yields a single global embedding together with several decomposed latents. The candidate images are indexed in advance, and the representation stored per image is just two things: one global vector and one latent-mean vector (the average of the decomposed latents).
Large-scale search splits into two stages. In the first-pass screening, the global vectors of query and candidates are compared to quickly narrow down to the top 100. In the second-pass re-ranking, only that short list is re-ordered, using a score that adds the cosine similarity between global vectors to the cosine similarity between latent-mean vectors. It's a division of labor: the global embedding handles the coarse first-pass screening, and the element-level information gets added on top for a precise second-pass ordering.
The re-ranking cost applies only to the 100 narrowed down in the first pass. Even if the gallery grows to a million images, the re-ranking still only reconsiders 100, so the cost scales only with the number of candidates — independent of the total gallery size.
Performance at getting the first result right (Recall@1) clearly went up. That said, on some evaluations it didn't come out ahead once you widen the view to 50 candidates. That means its strength is concentrated on "nailing first place exactly."
Recall@K is the fraction of queries for which the target lands within the top K. Take just one representative comparison. On Refined-CIRR, which has ambiguous samples filtered out, FactEmbed's Recall@1 is 68.99, ahead of the prior ReCALL (67.41) and CSMCIR (67.16).
| Evaluation (refined) | Metric | FactEmbed | Compared against |
|---|---|---|---|
| Refined-CIRR | Recall@1 | 68.99 | ReCALL 67.41 · CSMCIR 67.16 |
| Refined-FashionIQ | Avg. Recall@10 | 71.13 | standalone (no comparison in table) |
| Refined-FashionIQ | Avg. Recall@50 | 86.41 | standalone (no comparison in table) |
One thing to flag when reading these numbers. The relative improvement the authors cite isn't the gap in scores itself, but a conversion of "by what % it rose over the prior method." On Refined-CIRR Recall@1 that's 2.7% over CSMCIR and 2.3% over ReCALL; on Refined-FashionIQ average Recall@10 it's 2.3% and 2.4% respectively.
Among the comparison methods, CSMCIR is a technique that attaches a synthetic caption to every image in the gallery. FactEmbed surpassed it without any such extra captions.
The advantage isn't consistent across every cell. On the original FashionIQ validation set, CSMCIR's average Recall@50 (77.18) is higher than FactEmbed's (76.87). On the other hand, its Recall@1 on the original CIRR, at 56.60, comes out ahead of prior methods.
The numbers here come from two kinds of conditions. The refined sets (Refined-) are clean conditions with ambiguous queries filtered out; the original sets leave them in. So the refined-set Recall@1 advantage speaks to "the power to nail first place when the query is clear." Whether that same advantage holds in real-world search, where queries are ambiguous or noisy, can't be decided from these results alone.
There's a reason the authors lead with Recall@1. When the top models' Recall@5 all cluster tightly in the low 90s and become indistinguishable, Recall@1 — nailing first place exactly — becomes the more sensitive yardstick. That said, what Recall measures is only "did it put the right one near the top," not how faithfully the search result captured the user's editing intent.
The tension the authors acknowledge outright is the conflict between reconstruction and contrast. Reconstruction wants to split the latents into several non-overlapping elements, while contrast wants to gather a query's latents into one discriminative embedding. The two goals pull the same representation in opposite directions. Splitting training into stages is a choice for managing this tension, not one that eliminates the tension itself.
There are other limitations. The final numbers sit on top of ReCALL-style additional training (a post-training stage that re-trains the model on augmented triplets), so "what % is the pure contribution of the decomposition design alone" is hard to pin down from the numbers as presented. And because it's a design where the decoder, rough draft, element matching, distillation, and staged training all overlap, the results may be sensitive to settings like the number of latents or the resolution of the rough draft.
The two-stage search carries one structural implication worth noting: the first-pass screening and the second-pass re-ranking guard against different kinds of failure. The first-pass screening is responsible for "getting the right candidate into the top 100." If the target drops out here, no amount of refinement in the second-pass re-ranking can bring it back, because re-ranking only fixes the "order" of the 100 that already made it in. In other words, the first pass is the power not to miss, and the second pass is the power to order precisely. If the axis to change gets buried in the global vector during the first pass and the candidate is eliminated, the decomposition design never even gets a chance to be used.
One question remains, too. The method goes to the trouble of training elements apart, yet at re-ranking it averages those latents back into a single vector (added to the global vector) — and it still works. This part is cleanest when split into three.
This question is practical. Depending on the outcome, you'd decide whether to leave the latent term in re-ranking as average pooling, switch it to element matching, or use both.
ONTLE builds AI work agents that handle a company's document repositories. Finding and repurposing past proposals, reports, and slides is one of the core jobs of such an agent. And the search requests that come in from the field take exactly the same shape as the shirt above. An AI PM asks something like: "You know that KT proposal from last time — find me the one that keeps the same structure but with the target industry changed to manufacturing." What to keep (the proposal structure) and what to change (industry: telecom → manufacturing) are mixed into one request — a textbook composed query.
Current search fails here in two ways. One is the failure to catch the axis to change. Lump the request into one vector and you only get back "things that resemble the KT proposal," while the industry you actually asked to change (manufacturing) gets washed out. The other is the failure to catch the axis to keep. Pulled by the industry keyword (manufacturing), manufacturing-industry documents with a completely different structure get mixed in. The problems FactEmbed targets are precisely these two failures.
To apply this to documents, two things have to be settled first.
First, define what "structure" is. Here, structure means the document's table of contents and the order in which the proposal logic unfolds — problem statement → solution → expected impact. Just as we split an image into elements like "logo, body, background," we're saying a document gets split into elements like "table of contents, proposal logic, target industry."
Second, decide what the training signal — the document-side counterpart to an image's "target feature reconstruction" — should be. For images, the reconstruction target was the features of the target image. For documents, what to set as the "target to reconstruct" is the open question. On top of that, you need to collect a few pairs of past deliverables that share the same structure but differ only in industry, as an evaluation document sample.
Once these two are solved, a validation plan falls into place. For the request above, score separately whether (1) the table of contents and proposal logic were preserved (the keep condition), and (2) the target industry actually pivoted from telecom to manufacturing and manufacturing-industry cases were included (the change condition). And it must be compared side by side against existing single-vector search under the same document set, same first-pass candidates, and same post-training conditions. Only by matching conditions can you tell whether a performance difference is thanks to the decomposition design or some other factor. If both conditions are satisfied to a high degree and that gain clearly exceeds existing search, then the usefulness of the decomposition design is confirmed in the document domain too.
Attach the practical checks in this order.
The decoder is attached to the 14th of 28 layers, as an intermediate layer, and consists of one self-attention layer and a 3-layer MLP. It uses the patch features of the target image, extracted from a vision foundation model, as the reconstruction target. An alpha mask normalizes the spatial contributions of the latents to sum to 1 at each location via softmax — the same idea as the competitive normalization in slot attention, which splits a scene into object regions. Distillation matches the latent-patch attention distribution of a deep layer (3rd from the top) via KL divergence, and since the query side is in reference-image coordinates and doesn't share the target's spatial grid, it's applied only to the target-side forward pass. The base model is Qwen2.5-VL-7B-Instruct, the adapter is DoRA, and after a reconstruction-only warm-up stage it trains with the full objective, finishing with a post-training stage that re-trains the model on MLLM-augmented triplets.