When captions are not enough: how we cleaned up the \"gray zone\" in Image Search

Konstantin Nikolaev10 Aug 2026

Problem

Yandex Images scored a document with two separate factors: image to query (i2t) and text attributed to the image to query (t2t). A boosting ensemble then blended them with other signals. When the two disagree, the "gray zone", the ensemble cannot tell which one to trust, and each modality makes its own independent errors. Text is still needed for part numbers, car models and near-identical objects.

Example from the article: for the query "lemur", a real lemur photo with an unrelated caption (high i2t, low t2t) and a lookalike animal whose caption mentions lemurs (medium i2t and t2t) give conflicting signals.

Solution in brief

Train one model that reads the image and the document text together. First build the most accurate version, a VLM, then distill it into light models, one per ranking stage: Embedder, bi-encoder and Light Cross-Encoder. Documents are embedded offline and queries once, so only a small aggregation runs at request time. The new scores enter the existing ensemble as one more factor.

Questions this case answers
  • How to score relevance from two document modalities jointly instead of blending two separate scores in an ensemble, when the separate scores disagree
  • How to serve a heavy joint ranking model under realtime latency by moving document-side computation offline and distilling into stage-specific light models
  • How to combine image relevance and text relevance when the two signals disagree
  • How to put a heavy multimodal ranking model into a realtime search pipeline with tens of thousands of queries per second

Tools and methods

  • Vision-language model (VLM) with LLaVA-style adapter — teacher model that outputs a single relevance score.
  • vBERT — the same model with bidirectional attention and fewer parameters (about 1 billion).
  • Knowledge distillation — moves vBERT quality into stage-specific light models.
  • Embedder, bi-encoder, Light Cross-Encoder (LCE) — production models for candidate generation, draft ranking and reranking.
  • HNSW — ANN index over Embedder vectors.
Continue reading — it's free

Google or a one-time email code. No password.