- The paper introduces Rec2PM, a recurrent preference-memory framework that combines recent interactions with compact learned summaries to support efficient long-sequence generative recommendation.
- The paper uses self-referential teacher forcing and a consistency loss to train recurrent memory updates in parallel, avoiding serial backpropagation and reducing memory drift during inference.
- The paper reports that Rec2PM-O reaches 15.04 H@1 and 28.66 N@10 on MerRec, cuts latency from 135 ms to about 10 ms, and reduces per-user storage to 1 KB—32× less than a KV-cache method.
Motivation and problem setting
Generative recommendation (GenRec) models such as SASRec and HSTU treat user behavior as an autoregressive sequence transduction task, but scaling full self-attention to lifelong histories of thousands of items is impractical in industrial serving. The paper identifies two coupled obstacles: the quadratic cost O(L2) of attention over long sequences, which forces truncation to short recent windows, and the stochastic noise in raw interaction logs (e.g., accidental clicks), which can degrade generalization even when full-context computation is feasible. The authors propose Rec2PM (Recommendation with Recurrent Preference Memory), a framework that decomposes context into a tripartite memory structure: Working Memory (the recent raw segment), Preference Memory (a compact persistent summary of archived history), and Parametric Memory (shared model weights).
The design targets three system requirements for billion-scale deployment: incremental updates as new interactions arrive, storage efficiency for per-user persisted state, and parallelizable training. Existing approaches fail to satisfy all three simultaneously: token-memory methods with recurrent updates (RMT, AutoCompressors) require serially unrolled training with long BPTT chains and error accumulation, while mask-parallel methods (Gist, PersRec, Anchor) achieve parallel training but persist per-layer KV caches whose footprint is prohibitive at scale.
Architecture
Rec2PM compresses history into C token embeddings produced by globally learned Memory Query Vectors Qmem∈RC×d interacting with the input context through the encoder. The sequence is partitioned into segments of length Lseg. At initialization, the first segment is compressed into an atomic memory state; thereafter, when a segment completes, the update input concatenates the previous memory Mk−1 with the new segment Sk, producing mk via either Overwriting (Mk=mk, constant size) or Appending (Mk=[Mk−1;mk], growable). Prediction within the current segment conditions on [Mk−1;Sk] under causal masking. Notably, memory updating and next-item prediction share parameters and are executed in a single forward pass over the joint input C0: item tokens attend causally for prediction while query tokens attend to both memory and segment to emit the updated state.
Self-referential teacher forcing
The central methodological contribution is a two-stage training scheme that reconciles recurrent inference with fully parallel optimization:
- Global reference generation: memory queries are interleaved after each segment in the full raw sequence, with a mask preventing queries from attending to prior queries. Each query output C1 thus compresses the entire raw prefix directly, yielding low-error "teacher" memories.
- Parallel supervised updates: each segment is processed independently with the reference memory C2 prepended, so all segments train concurrently. An MSE consistency loss C3 aligns each one-step updated memory C4 with its reference counterpart, combined with the autoregressive loss C5.
Because Stage 2 conditions on high-quality reference states rather than rolled-out states, this decouples training steps and prevents drift, analogous to teacher forcing in RNNs. The autoregressive loss implicitly supervises compression quality: to predict well from C6, the model must encode predictive information into the reference. The paper deliberately excludes explicit reconstruction losses, arguing from an Information Bottleneck perspective that reconstruction maximizes C7 and forces limited-capacity memory to waste slots on high-entropy noise—a claim validated empirically on the industrial dataset, where adding reconstruction loss degrades HR@1000 by 1.9%.
Experimental results
Experiments use MerRec (Mercari C2C), filtered to users with ≥1003 interactions, evaluated leave-one-out with H@K and N@K averaged over five seeds, on SASRec and HSTU backbones with C8, C9, Qmem∈RC×d0. Key findings:
| Method (HSTU) |
H@1 |
H@10 |
N@10 |
| Short (200) |
13.94 |
41.67 |
26.86 |
| Full (1000) |
14.24 |
42.77 |
27.47 |
| Tok-Serial-O |
14.65 |
43.75 |
28.20 |
| KV-Mask-O |
14.56 |
43.64 |
28.08 |
| Rec2PM-O |
15.04 |
44.20 |
28.66 |
Three observations stand out. First, memory-augmented models match or exceed Full despite a far smaller effective window, supporting the denoising interpretation: compressed memory filters stochastic interactions that distract full-sequence attention. Second, appending consistently underperforms overwriting across all variants, consistent with the bottleneck hypothesis—overwriting enforces capacity pressure that discards irrelevant information, whereas appending accumulates stale, noisy states. Third, Rec2PM outperforms both baseline families: it avoids serial-training error accumulation relative to Tok-Serial, and provides richer information flow than KV-Mask, where cross-segment propagation through masked anchor positions may be incomplete at lower layers.
Efficiency results are strong: on an NVIDIA H20 GPU, Rec2PM-O achieves ~10ms model-internal latency (comparable to Short's 9ms versus Full's 135ms) with a per-user storage footprint of 1KB, versus 32KB for KV-Mask-O—a 32× reduction. Ablations confirm the necessity of Qmem∈RC×d1 (removing it drops H@1 from 15.04 to 14.43), and performance is stable across slot counts Qmem∈RC×d2, degrading only at extremes—consistent with a bottleneck that is either too tight or too loose. Notably, a trained Rec2PM-O model evaluated without fine-tuning under one-time whole-history compression matches iterative inference exactly (identical metrics), validating that the consistency loss aligns incremental updates with global compression.
Industrial validation
On a proprietary short-video dataset (~500M users, >500B interactions, average sequence length 1147), Rec2PM compresses the first 1948 interactions into Qmem∈RC×d3 slots concatenated with the last 100 interactions. It achieves HR@1000 of 33.06 versus 31.81 for HSTU-Full (context 2048), while shorter raw-context variants show diminishing or negative returns beyond length 500. The reported Pareto analysis claims 107% of HSTU-Full's accuracy at roughly 8% of its inference latency. Attention visualizations further suggest the learned slots specialize temporally (recent-intent, early-history "identity," and periodic-habit roles) and semantically (category-specific "domain experts" with sparse, disentangled attention distributions), though these interpretations rest on qualitative inspection of a single user.
Limitations and open questions
Several caveats bear on the results. The main benchmark uses sequences truncated to exactly 1003 items with fixed segment lengths, leaving untested how the framework behaves under highly variable or truly unbounded lifecycles. The industrial evaluation employs only one-time compression rather than streaming iterative updates, so the deployed configuration does not exercise the recurrent mechanism the training scheme was designed for; conversely, the robustness test for temporal overlap between memory and recent context shows only a small drop (-0.7%) but is evaluated once. The Information Bottleneck account is supported by ablations and visualization but not formalized quantitatively (e.g., no measurement of mutual information). Finally, whether the teacher-forcing alignment remains stable over many more update steps than the five segments used here—and whether appending modes can be made competitive with better staleness handling—are questions the paper leaves open.
Conclusion
Rec2PM demonstrates that compact, per-user token-embedding preference memories can be trained in parallel via self-referential teacher forcing while retaining recurrent update capability at inference time. Across academic and industrial-scale data, the approach reduces per-user memory footprint by more than an order of magnitude relative to KV-cache alternatives, cuts latency by roughly 13× relative to full-context modeling, and improves accuracy—evidence that aggressive history compression acts as a beneficial denoising bottleneck rather than merely a lossy approximation in sequential recommendation.