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% 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 99 sampled negatives (0.9595 Recall@20 versus 0.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% of users. On MovieLens-1M, warm accuracy trails the strongest retrained baseline by 5.2% Recall@20 and 11.4% NDCG@20. On MIND, the gap narrows to 0.8--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.006 Recall@20, 1.4× the strongest retrained dedicated method (0.124±0.007) and 3× a training-free floor, without cold-specific training. Exact full-softmax training raises Recall@20 by 54% on MIND-small and 6.9% on MovieLens-1M over sampled InfoNCE, but recomputes the full catalog each step and exhausts accelerator memory at 240K 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.
Figures & tables
Figure 1. RetrievalFormer data flow. Shared embedding tables (red) embed each categorical value identically wherever it appears: in item metadata, inside a history event, or as a user attribute. Item side: AttentionFusion pools the item’s embedded features and the item MLP produces a pre-computable, indexable item embedding ( fi ). User side: each interaction is fused into one enriched token ; the sequence [history, [SEP], profile token] feeds the user-tower transformer (prefix-LM: bidirectional within the appended special-token block, causal over history), read out at a final readout token (not drawn) into fu . Relevance is the dot product. The item-ID input pathway with its tied output head (§ 4.1 ) is not drawn. Block diagram. Item metadata features are embedded through tables shared with the user side, pooled by a fusion module, and passed through an item-tower network into an item embedding. Each user history event's features are fused into one token; the token sequence, followed by a separator and a fused profile token, feeds a user-tower transformer that produces a user embedding. The two embeddings meet in a dot product.
Model
Recall@20
NDCG@20
Echo@20
GRU4Rec
0.3687 ± 0.0039
0.1799
3.11
SASRec
0.3893 ± 0.0024
0.1876
3.87
BERT4Rec
0.3453 ± 0.0024
0.1542
4.22
SASRecF (genres)
0.3851 ± 0.0015
0.1911
3.33
FDSA (genres) †
0.3767
0.1742
4.12
DIF-SR (genres)
0.3944 ± 0.0019
0.1883
3.99
Table 1. MovieLens-1M, full-catalog unmasked ranking, own runs only, all rows sharing one target definition on the corrected chronological-last benchmark (§ 4.1 ). Echo@20 = average count of already-seen items in the top 20, a protocol diagnostic (§ 4.2 ); RetrievalFormer’s is scored at seen-window parity against the user’s 50 most recent training items, the window the baselines consume. Mean ± std over 3 seeds, each baseline at its best of a published-config retrain plus five validation-selected tuning rounds; † FDSA is a single run (its 3-seed set exists only for the genre+title variant, 0.3838±0.0043 , which the no-title input-parity rule excludes). RetrievalFormer’s seeds are truly-unmasked exact-convention GPU rescores of its shipped checkpoints (per-seed Recall@20 0.3748 / 0.3745 / 0.3724 ). DIF-SR prints its published-learning-rate configuration, which maximizes test Recall@20; its validation-selected round trades Recall for NDCG ( 0.3881±0.0024 / 0.1910±0.0014 ), and ratio statements in the text use the conservative 0.3944 (against the validation-selected round the warm cost would be 3.7% , not 5.2% ). Best per column bold , runner-up underlined .
Model
Recall@20
Seeds
DIF-SR
0.3494 ± 0.0011
3
FDSA
0.3446
1
SASRec
0.3433 ± 0.0008
3
SASRecF
0.3430 ± 0.0003
3
GRU4Rec
0.3396 ± 0.0016
3
BERT4Rec
0.3275 ± 0.0055
3
Table 2. MIND-large 5-core next-item benchmark ( 267,545 users; 9,353 items): full-catalog unmasked Recall@20, own runs under the same retrain-and-tune protocol as Table 1 , with the same genre-consuming inputs. Mean ± std over 3 seeds; FDSA is a single run. Short histories (mean ∼11 events, median 8 ) remove the history-context axis of § 4.3 (b), and every model ranks with an exact full-catalog softmax rather than a sampled one. Best per column bold , runner-up underlined .
Model
Cold R@20
Warm R@20
Overall
Floors
Last-item text cosine (no training)
0.058
0.018
—
MF (ID-based CF, tuned)
0.031 ± 0.004
0.276 ± 0.001
0.125
Dedicated cold-start baselines (tuned)
DropoutNet (meta)
0.094 ± 0.013
0.241 ± 0.001
0.109
Heater (meta)
0.106 ± 0.005
0.256 ± 0.002
0.116
Table 3. Strict item cold-start on MovieLens-1M (global random 20% item holdout; cold/warm slices rank their candidate partitions, overall ranks the full catalog). Mean ± std over 3 seeds where shown; row definitions and protocol in § 4.4 and Appendix A . MF and the dedicated baselines are tuned through five documented one-lever rounds with 3-seed champion confirms. Item content is frozen sentence embeddings (“text”) or genre+year (“meta”); text variants remain at reference configurations. Best per column by point estimate bold , runner-up underlined ; “—” = not computed. The three bolded warm cells are the same tuned-MF ceiling, which the fused rows inherit by construction.
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) to O(20 s), and narrows the training-serving Normalized Entropy (NE) gap by up to 86%, yielding over 2× 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.
In modern recommendation systems, retrieval serves as a primary stage responsible for filtering billions of candidate items down to thousands prior to refined ranking. To make this massive search effective and efficient, the system relies on ranking accuracy and indexing efficiency. However, these two objectives are traditionally misaligned: while the former optimizes for the alignment between ranking predictions and user behavior, the latter optimizes for a structural grouping of item representations which enables fast search among billions of candidates. Thus, despite extensive efforts to scale up interaction modeling for retrieval, they remain fundamentally limited by the structural misalignment between the ranking objectives and the proximity-learned index. In this work, we address this long-standing dichotomy by proposing a new holistic retrieval framework, OneShot. It is an end-to-end, in-model index learning framework that natively aligns index learning with ranking objectives. Using this joint learning as a structural foundation, OneShot pushes the boundaries of retrieval expressiveness by scaling interaction modeling with neural scoring beyond the persistent dot-product bottleneck. OneShot is fully deployed in Instagram's industrial short-video recommendation system, driving significant wins in user daily sessions, engagement, and time-spent. Additionally, OneShot achieves a 20% recall gain at the operational ranking volume and a 10x efficiency improvement at an equivalent recall level.
Approximate nearest neighbor (ANN) search is widely used in the retrieval stage of large-scale recommendation systems. In this stage, candidate items are indexed using their learned embedding vectors, and ANN search is executed for each user (or item) query to retrieve a set of relevant items. However, ANN-based retrieval has two key limitations. First, item embeddings and their indices are typically learned in separate stages: indexing is often performed offline after embeddings are trained, which can yield suboptimal retrieval quality-especially for newly created items. Second, although ANN offers sublinear query time, it must still be run for every request, incurring substantial computation cost at industry scale. In this paper, we propose MultiFaceted Learnable Index (MFLI), a scalable, real-time retrieval paradigm that learns multifaceted item embeddings and indices within a unified framework and eliminates ANN search at serving time. Specifically, we construct a multifaceted hierarchical codebook via residual quantization of item embeddings and co-train the codebook with the embeddings. We further introduce an efficient multifaceted indexing structure and mechanisms that support real-time updates. At serving time, the learned hierarchical indices are used directly to identify relevant items, avoiding ANN search altogether. Extensive experiments on real-world data with billions of users show that MFLI improves recall on engagement tasks by up to 11.8%, cold-content delivery by up to 57.29%, and semantic relevance by 13.5% compared with prior state-of-the-art methods. We also deploy MFLI in the system and report online experimental results demonstrating improved engagement, less popularity bias, and higher serving efficiency.