Papers
Topics
Authors
Recent
Search
2000 character limit reached

Memento: Personalized RAG-Style Long-Retention Data Scaling for META Ads Recommendation

Published 22 May 2026 in cs.IR | (2605.24051v1)

Abstract: Modeling of long history data suffers from long-context window attention dilution, system efficiency and catastrophic forgetting problems, where naive linear scaling approach like LastN would fail. We introduce Memento, a personalized retrieval-augmented framework that treats historical user engagements as a document corpus and ad requests as queries, retrieving relevant interactions via Maximal Marginal Relevance (MMR) to balance similarity with diversity. We identify two complementary applications: Representation Memento, which retrieves historical embeddings for feature augmentation, and Data Memento, which retrieves past training examples for multipass training. Through infrastructure co-design -- temporal chunking, INT8 quantization, and asynchronous serving -- Memento achieves 5-10$\times$ resource efficiency over linear scaling. Memento processes daily requests with sub-10ms latency, yielding 0.25-0.3% Normalized Entropy gain on both click-through and conversion prediction. In production, Memento delivers a 1% CTR lift on Facebook Feed and Reels and a 1.2% CVR lift, scaling personalization to 365+ days of history.

Summary

  • The paper introduces a retrieval-augmented framework that reformulates lifelong user history scaling as an information retrieval problem to capture long-term behavioral signals.
  • It employs an MMR-based retrieval mechanism with multi-dimensional query generation, chunking, and INT8 quantization to select diverse and relevant history efficiently.
  • Empirical results demonstrate significant performance gains—with up to 1.2% lift in CTR/CVR and sub-10ms latency—validating the scalability of the approach.

Memento: Personalized Retrieval-Augmented Scaling for Long-Retention User History in Ads Recommendation

Motivation and Context

Modeling lifelong user history is central to advanced recommendation systems but is challenged by attention dilution, resource constraints, and catastrophic forgetting inherent in traditional sequence modeling approaches. Standard retention strategies, notably LastN, prioritize recent events and discard valuable historical context, leading to underutilization of long-term behavioral signals (e.g., seasonality, lifecycle transitions). Moreover, attention-based architectures suffer quadratic complexity and inefficiency with large context windows; and continual training on rolling data windows causes catastrophic forgetting, substantially eroding predictive performance for patterns encoded in older history.

Prior work in both RAG-style retrieval for LLMs and lifelong user modeling recognized the value in leveraging external knowledge and extended context, but existing user history summarization solutions (e.g., TWIN, PinnerFormer, DV365) were limited by embedding space constraints, poor adaptability, and persistent forgetting. Memento addresses these limitations by explicitly treating user history as a document corpus, framing the retrieval process as information retrieval, and leveraging Maximal Marginal Relevance (MMR) to optimize the balance between query-relevance and diversity.

Memento Design and Retrieval Infrastructure

Memento adapts the RAG paradigm to industrial recommendation pipelines by constructing a structured retrieval pipeline—ranging from query generation, historical chunking, indexing, retrieval, to downstream context augmentation.

The retrieval flow begins with multi-dimensional query generation from each ad request, encoding features like user interest, ad category, recency, and cohort information. User history is indexed into time- and topic-chunked “documents,” enabling vector search and efficient aggregation. The core retrieval model employs a modified MMR scoring function, optimizing three similarity objectives: user-to-user, user-to-ad, and document-to-document (diversity). MMR maximizes the collective relevance and minimizes redundancy among retrieved history items:

MMR=arg maxDiRS[αSimUU(Di,Q)+βSimUA(Di,Q)(1αβ)maxDjSSimUU(Di,Dj)]\text{MMR} = \argmax_{D_i \in R \setminus S} [ \alpha \cdot \text{Sim}_{UU}(D_i, Q) + \beta \cdot \text{Sim}_{UA}(D_i, Q) - (1 - \alpha - \beta) \cdot \max_{D_j \in S} \text{Sim}_{UU}(D_i, D_j) ]

Memento operates atop a highly-efficient production infrastructure: (1) unified event aggregation for constructing history "mementos," (2) scalable vector indexing with INT8 quantization and hierarchical clustering (gateway/leaf shards), and (3) low-latency serving platform allowing sub-10ms retrieval for ranking models. Figure 1

Figure 1: Memento system architecture, including retrieval pipeline and complementary applications for augmenting CTR/CVR ranking models with relevant historical context.

Application 1: Representation Memento

Representation Memento addresses the challenge of attention dilution and overfitting to recent context by dynamically retrieving history embeddings for inference-time feature augmentation. Embeddings are generated per source and day (dimension: 64–256), chunked into weekly blocks, and indexed in VectorDP. MMR-based retrieval reduces the volume of embeddings processed, preserving informativeness while compressing granularity and minimizing storage (up to 14× reduction).

Critical efficiency gains are realized via chunking and INT8 quantization; with 50% filter rates, embedding selection preserves performance while enabling practical scaling to year-long histories. The Ember architecture further enhances representation, comprising:

  • Affine Modulation: A context-conditioned MLP generates per-feature scale/shift parameters, modulating embeddings to an adaptive linear transformation.
  • Quadratic Interaction: A QNN module computes explicit cross-feature quadratic interactions before compression, ensuring structural signal from raw embeddings is retained post-compression.

Empirical studies demonstrate consistent NE improvements with increased embedding sources, with optimal configurations (affine + quadratic) yielding up to 0.25% CTR NE gain and 0.26% CVR NE gain, without material inference QPS regression.

Application 2: Data Memento

Data Memento confronts catastrophic forgetting in recommendation models by reframing lifelong learning as a targeted data retrieval problem. Instead of uniformly replaying or scaling historical training data, the system retrieves forgotten-but-relevant examples via MMR-driven KNN search and injects them into a second-pass rehearsal during training.

Each training row (user, ad, label) is embedded and chunked by hour, then indexed. Example selection incorporates positive/negative sampling aligned to model loss, ensuring the augmented batch prioritizes forgotten patterns. Second-pass training entails full resetting of network sparse parameters (embedding tables) to mitigate overfitting, followed by retraining on combined recent/history samples. Empirical evaluation indicates that full resets outperform shrinking (by 0.04% NE), and MMR retrieval outperforms random replay (by 0.07% NE), with up to 0.195% NE gain in CVR models and near-doubled gain compared to multipass baselines.

Empirical Results

Memento exhibits robust empirical improvements and high production efficiency:

  • Retention Scaling Performance: RAG-style scaling consistently outperforms LastN, providing 0.25–0.30% NE gain at 365-day retention for both CTR and CVR models (see Fig. 2 and 3).
  • Infrastructure Efficiency: Sharding, chunking, quantization, and MMR enable 5–10× resource efficiency over linear scaling.
  • Production A/B Results: Memento delivers a statistically significant 1% CTR and 1.2% CVR lift on Facebook Feed and Reels, operating with sub-10ms latency and manageable storage/inference QPS budgets.

Practical and Theoretical Implications

Memento's design formalizes history scaling as an information retrieval problem, optimizing retrieval for relevance and diversity. The dual application strategy enables both feature augmentation and data rehearsal, directly mitigating attention dilution and catastrophic forgetting, and unlocking persistent gains from extended user history. The infrastructure demonstrates that personalized retrieval and augmentation at exabyte scale are feasible under tight latency and resource constraints.

Practically, these advances suggest that retrieval-augmented personalization is scalable beyond typical retention limits (30–180 days), making year-long history actionable in real-time recommendation. Theoretically, the work demonstrates that selective retrieval (RAG-style) can continue to extract information from ultra-long user history where uniform scaling fails, providing probabilistic guarantees of improved signal-to-noise in model context windows.

Future Directions

Potential future improvements include transitioning MMR retrieval to fully supervised objectives, integrating additional data modalities (e.g., cross-platform signals), and extending the framework to other recommendation tasks and architectures. Investigating the limits of chunking, quantization, and more sophisticated blending architectures (beyond Ember) is warranted, especially as models and corpus sizes continue to grow.

Conclusion

Memento operationalizes personalized, retrieval-augmented history scaling, achieving superior efficiency and predictive performance in large-scale ads recommendation models. By recasting context window retention as a query-driven information retrieval problem, the framework effectively addresses long-context attention dilution, resource inefficiency, and catastrophic forgetting—delivering measurable gains in CTR and CVR prediction with minimal additional latency. The results validate the viability of RAG-style history augmentation at production scale and imply broad applicability in personalized systems requiring actionable lifelong context retention.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 6 likes about this paper.