cs.IRDec 18, 2024

CRM: Retrieval Model with Controllable Condition

Authors: Chi Liu, Jiangxia Cao, Rui Huang, Kuo Cai, Weifeng Ding, Qiang Luo, Kun Gai, Guorui Zhou

Organizations: Kuaishou Technology, Beijing, China · Unaffiliated

Abstract

Retrieval models for recommendation need to account for outcomes such as watch time while searching large item corpora efficiently. We present the Controllable Retrieval Model (CRM), an outcome-conditioned retrieval framework that adds watch time as an input to the user tower. During training, CRM learns to predict the next item given its observed watch time; at inference, we supply a desired watch time to steer retrieval without retraining. The item tower is independent of the condition, so item embeddings can still be precomputed and indexed for approximate nearest neighbor (ANN) search. We implement CRM as both a DNN-based two-tower model and a Decision Transformer. The Transformer interleaves item tokens with watch-time-to-go condition tokens, using the target watch time as a numerical prompt for next-item prediction. For each online request, we choose between the average and maximum watch times in the user's recent history as the condition. CRM is deployed in Kuaishou's short-video recommendation system, which serves over 400 million users. Online A/B tests show video watch time improvements of 0.372% in Kuaishou and 0.457% in Kuaishou Lite.

Figures & tables

Explore similar work

Oct 26, 2026

CRIM: Composable and Reusable Item Memory for Efficient Personalized Retrieval

Large language models incur substantial training and inference costs in personalized search and recommendation, as growing interaction histories lengthen request inputs and repeatedly expose the same item text to the model. We propose Composable and Reusable Item Memory (CRIM), a framework that separates item-level semantic encoding from request-level history modeling. A small set of learnable summary tokens compresses each item into compact continuous memories, while segment-level readout tokens (REC tokens) introduce predictive supervision within the interaction history. These memories are independent of users and queries and can therefore be reused across requests. At inference time, CRIM composes cached memories in interaction order and incorporates an optional query to produce a personalized retrieval representation, reducing repeated item-text encoding while retaining request-dependent contextual modeling. We further introduce a joint training mechanism that combines cached memories with sampled live re-encoding. Re-encoding only a few history items per request allows the retrieval objective to jointly optimize the item and request encoders at limited computational cost, while periodic cache refreshes maintain consistency. Extensive evaluation and cost analysis on MovieLens-1M, Qilin, and our new LazSeq dataset show that CRIM achieves state-of-the-art retrieval performance with substantially lower inference costs at the same backbone scale, while limiting item re-encoding during joint training. We will publicly release our code and dataset.
Aug 25, 2026

Keeping the Index Open: The Recommendation-Side Cost of Shared Search and Recommendation

A shared search-and-recommendation index must score new items from features alone because search has no exploration slot. In a public log covering both surfaces over one catalog, 38.6%38.6\% of held-out query-search impressions show an item never previously shown or visited. For user-cold engagements, the feature-based tower serves this demand without measurable loss against 9999 sampled negatives (0.95950.9595 Recall@20 versus 0.95100.9510 warm). A lexical baseline reaches similar parity, while a full-catalog check remains statistically undecided. Dual-encoder retrieval therefore keeps the index open to new items, unlike an ID-softmax recommender that requires retraining. We price this openness on recommendation against six sequential baselines, each retrained and tuned through five rounds on corrected targets. A float32 timestamp bug had reordered leave-one-out targets for 19.7%19.7\% of users. On MovieLens-1M, warm accuracy trails the strongest retrained baseline by 5.2%5.2\% Recall@20 and 11.4%11.4\% NDCG@20. On MIND, the gap narrows to 0.80.8--3.6%3.6\% relative to the five strongest baselines, though the model ranks sixth of seven. Under strict zero-leakage cold-start evaluation, the content tower achieves 0.172±0.0060.172 \pm 0.006 Recall@20, 1.4×1.4\times the strongest retrained dedicated method (0.124±0.0070.124 \pm 0.007) and 3×3\times a training-free floor, without cold-specific training. Exact full-softmax training raises Recall@20 by 54%54\% on MIND-small and 6.9%6.9\% on MovieLens-1M over sampled InfoNCE, but recomputes the full catalog each step and exhausts accelerator memory at 240240K items. Approximate nearest-neighbor search explains none of the remaining gap, serving cost does not regress against ID-softmax retrieval, and a history-window sweep explains half the post-recipe remainder. Exact-quality training at catalog scale remains the open problem.
Jul 27, 2026

Memory Layer: Train the In-Model Cache for Recommendation Models

Early ranking stages in recommendation systems precompute item embeddings and cache them in-model for scoring within strict latency constraints. Because this cache exists only at serving time, outside the training loop, training and serving use different item representations, a structural discrepancy that limits quality and adds operational fragility. We show that co-designing the training and serving paths removes this representation discrepancy at its source. We introduce the memory layer, an in-model key-value embedding cache co-trained with the model: the item tower writes embeddings during training and the model reads them at serving, one source of truth for item representations by construction. Always-on embeddings cover items not yet cached, so every item receives a prediction, and the design consolidates three separate trainer-to-predictor update paths into a single self-contained pipeline. Deployed in production on Instagram Reels, the memory layer raises prediction coverage from 96% to 100%, improves embedding freshness from O(5 min)O(5\text{ min}) to O(20 s)O(20\text{ s}), and narrows the training-serving Normalized Entropy (NE) gap by up to 86%, yielding over 2×2\times recall for the freshest content and a 5-6% cold start engagement lift. Because embeddings are produced during training, the system needs no separate bulk-evaluation or publish-time recomputation, cutting training-and-publish computational cost by 30% at neutral serving computational cost.