TL;DR
Generative recommendation models struggle to scale to lifelong user histories due to quadratic attention costs and behavioral noise. This paper introduces Rec2PM, a framework that compresses massive interaction histories into compact "Preference Memory" tokens using a novel parallel training strategy. Rec2PM slashes inference latency by over 90% and significantly reduces storage costs while actually improving recommendation accuracy by filtering out user interaction noise.
What Problem Does This Paper Address?
Generative Recommendation (GenRec) models use Transformer architectures to predict a user's next interaction by processing their history as a sequence. However, real-world user histories can easily span thousands of interactions over time. This creates two major bottlenecks:
- Computational & Storage Costs: Standard self-attention scales quadratically ($O(L^2)$) with sequence length, making full-history processing prohibitively expensive for real-time industrial serving. Furthermore, storing per-layer Key-Value (KV) caches for billions of users demands massive, unsustainable storage infrastructure.
- Noise Accumulation: User behavior is inherently stochastic and noisy (e.g., accidental clicks or temporary distractions). Directly attending to an entire raw history amplifies this noise, distracting the model from the user's true underlying preferences.
Existing compression methods either suffer from slow, unstable serial training (like Backpropagation Through Time) or rely on heavy, uncompressed KV caches.
Methods
The authors propose Rec2PM (Recommendation with Recurrent Preference Memory), which introduces a Tripartite Memory Mechanism to separate user context by persistence and granularity:
- Working Memory: Captures recent raw interactions to preserve high-fidelity details for short-term intent shifts.
- Preference Memory: Stores compact, persistent token embeddings (instead of massive KV caches) that summarize long-term interests.
- Parametric Memory: Refers to the static model weights shared across all users.
To train this recurrent mechanism without slow, serial unrolling, Rec2PM introduces a novel Self-Referential Teacher-Forcing strategy:
- Stage 1 (Global Reference Generation): The model processes the entire raw history in a single parallel pass to generate low-error "reference memories" ($\mathbf{m}^{(ref)}$).
- Stage 2 (Parallel Prediction & Update): The sequence is split into independent segments. The model learns to incrementally update its memory from one segment to the next, using the reference memories from Stage 1 as targets via a consistency loss ($\mathcal{L}_{con}$).
The framework supports two inference update modes: Overwriting (replacing old memory with new atomic states to maintain a constant size) and Appending (growing the memory state over time).
Datasets
The model was evaluated on two large-scale datasets:
- MerRec: A large-scale, real-world multipurpose benchmark from the Mercari C2C platform. The authors filtered it to include users with at least 1,003 interactions to strictly evaluate long-sequence modeling capabilities.
- Industrial Dataset: A massive proprietary dataset from a major short-video platform containing over 500 billion interactions from approximately 500 million users.
Key Insights and Ideas
- Memory as an Information Bottleneck: Forcing the model to compress thousands of interactions into a limited number of memory slots acts as an effective denoiser. It discards high-entropy noise (like random clicks) and retains only the most predictive preference signals.
- The Failure of Appending: Counter-intuitively, appending new memories over time performs worse than overwriting them. Appending accumulates stale history and weakens the bottleneck effect, whereas overwriting respects the strong recency effects dominant in sequential recommendation.
- Spontaneous Specialization: Visualization of the memory tokens reveals they automatically differentiate into specialized roles without explicit supervision. Some tokens track early history ("User Identity"), some focus on recent context, and others become "domain experts" for specific categories (e.g., "Internet Short Drama" or "Securities").
Key Results
- Accuracy Boost: Rec2PM consistently outperforms full-sequence attention baselines (SASRec and HSTU). For instance, on MerRec with HSTU, Rec2PM-O achieved an H@10 of 44.20 compared to 42.77 for the Full baseline.
- Massive Latency & Storage Reductions: On MerRec, Rec2PM reduced inference latency from 135ms (Full) to just 10ms, matching the speed of a short-context baseline. It required only 1KB of storage per user compared to 32KB for KV-cache-based masking approaches.
- Industrial Scale Success: On the 500-billion-interaction short-video dataset, Rec2PM achieved a 92% latency reduction and a +7% relative accuracy gain over the full-context baseline, dominating the Pareto frontier.
Limitations and Future Work
The authors note that performance degrades slightly if the number of memory slots ($C$) is set too low (insufficient capacity) or too large (weakens the information bottleneck, letting noise slip through). Finding the optimal slot allocation automatically remains an open challenge. Future work could focus on adaptively tuning the number of memory slots per user based on their behavioral complexity.
Summary updated