Search and recommendation systems often need to return a varied set of items for a broad query, not just the single best match. A query like “camping gear” should give a tent, a sleeping bag, a stove and a headlamp, not ten almost identical tents. Current approaches that split the query into sub‑queries at inference time suffer from two problems. First, they produce paraphrastic collapse: the language model writes near‑synonyms such as “bohemian festival fashion” and “festival bohemian clothes,” which retrieve overlapping, homogeneous results. Second, the autoregressive generation plus repeated retrieval calls is slow; best‑of‑N sampling improves quality but multiplies latency.
Google Research’s Retrieve‑for‑Train (R4T) solves this by moving the heavy lifting to training time. In step one a fan‑out language model is trained with reinforcement learning, using a frozen dense retriever to execute the generated sub‑queries and a set‑level reward that scores the whole retrieved list. The reward combines groundedness (how close each sub‑query is to real catalog items), diversity (Vendi Score over the retrieved representatives) and alignment (cosine similarity to the original query). This three‑term reward stops the model from cheating on any single metric and prevents paraphrastic collapse.
In step two the trained fan‑out model samples many fan‑outs per query to create synthetic (query, target set) pairs without any human labels. Step three distills this behavior into a small diffusion transformer (about 53.9 M parameters) that, given a query embedding, produces all target embeddings in a single non‑autoregressive pass. Nearest‑neighbor lookup then maps each embedding to database items.
Experiments on fashion and music datasets show that R4T‑based fan‑out lifts quality scores from the high thirties to the high forties while cutting latency from seconds to a few hundred milliseconds—a 12× to 20× speedup over autoregressive fan‑out. The approach delivers diverse, grounded results without the inference‑time bottleneck.
#AI #Product #MachineLearning #Search #Recommendation #Diffusion