TL;DR
The paper introduces VISTA (VIrtual Sequential Target Attention), a two-stage attention framework designed to scale recommendation systems to lifelong user interaction histories of up to one million items. By compressing ultra-long histories into a few hundred cached summary embeddings, VISTA decouples heavy sequence modeling from downstream inference, achieving a massive 94% reduction in GPU resource usage while significantly boosting recommendation accuracy on a platform serving billions of users.
What Problem Does This Paper Address?
Modern recommendation systems rely heavily on a user's historical interactions to predict future preferences. While scaling to longer histories (10k to 100k+ items) consistently improves model accuracy, it introduces severe computational bottlenecks. Standard attention mechanisms scale quadratically or linearly with sequence length, making real-time inference incredibly expensive in terms of latency, GPU cost, and queries per second (QPS) when serving billions of users.
Existing methods either truncate histories or use target-specific sequence sampling that scales poorly with the number of candidate items evaluated at inference time. The challenge lies in capturing lifelong user behaviors without causing inference clusters to buckle under the computational weight.
Methods
The authors propose VISTA, a framework that splits the traditional target attention mechanism into two distinct stages:
- User History Summarization: An ultra-long user interaction history (UIH) is compressed into a compact set of a few hundred "virtual seed" embeddings. To handle the prohibitive $O(N^2)$ complexity of standard softmax attention on long sequences, VISTA introduces Quasi-Linear Attention (QLA). QLA utilizes a Quasi Linear Unit (QLU) to inject non-linear expressive power (via SiLU activations) while maintaining $O(N)$ time complexity. Crucially, QLA is tailored for recommendations: it prevents candidate items from attending to each other to avoid label leakage.
- Target-Aware Attention: Downstream models perform standard attention between the candidate item and the compact summary tokens generated in the first stage.
To ensure the summary embeddings retain maximum information from the original history, VISTA incorporates a Generative Sequence Reconstruction Loss. This forces the model to autoregressively reconstruct the original history sequence, acting as an information bottleneck.
During production, the expensive first stage runs only during foundational model training or via offline/asynchronous pipelines. The resulting summarization embeddings are quantized and cached in a massive key-value storage system. For real-time inference, the downstream model simply fetches these pre-computed user summaries, bypassing the ultra-long history processing entirely.

Datasets
VISTA was evaluated on both public benchmarks and massive proprietary production datasets:
- Amazon-Electronics: A standard public dataset containing user reviews and metadata with a short mean sequence length of 8.93.
- KuaiRand-1K: A public sequential recommendation dataset from Kuaishou with a mean sequence length of 225.20.
- Simplified Prod: A scaled-down version of Meta's production data designed for fast experimentation, featuring sequence lengths up to 2,000.
- Industrial-Scale Data: Meta's real-world production dataset containing billions of examples per day, with average and maximum UIH sequence lengths of 7,000 and 16,000 items respectively (scaled up to 12,000 in online deployment).
Key Insights and Ideas
- Trading Storage for Compute: Instead of re-computing full history attention at inference time, VISTA shifts the burden to storage. Caching user summaries fixes downstream inference costs regardless of how long the user's history grows. In industry, the cost of GPU computation remains multiple orders of magnitude higher than the cost of storage, making this a highly favorable trade-off.
- Recommendation-Safe Linear Attention: In text-based LLMs, tokens freely attend to preceding tokens. In recommendation systems, candidate items evaluated at inference time cannot attend to each other because they represent a artificial, logged subset of choices; allowing them to interact introduces severe label leakage. QLA explicitly handles this constraint.
- Generative Self-Supervision as a Compressor: The generative reconstruction loss forces the personalized seed embeddings to maximize the information retained from the user history sequence, ensuring that compressing 100k items into 100 tokens doesn't wash away nuanced, long-term preferences.
Key Results
- Massive Efficiency Gains: In online A/B tests, VISTA demonstrated a 94% reduction in inference GPU resource usage (measured by QPS) by caching and serving embeddings rather than re-computing them for every user request.
- Improved Accuracy: VISTA outperformed strong baselines like HSTU, SASRec, and DIN across public and production datasets. On the industrial-scale dataset, it achieved significant offline Normalized Entropy (NE) reductions across multiple engagement tasks (e.g., -0.47% for the primary consumption task).
- Successful Production Deployment: Deployed on a live video recommendation platform serving billions of users, VISTA delivered statistically significant gains in core online engagement metrics (0.5% for the main consumption task).
Limitations and Future Work
- Storage Overhead: The primary trade-off of VISTA is infrastructure cost related to storage capacity. Storing quantized embeddings for billions of users requires an immense key-value cache on the scale of hundreds of terabytes to petabytes.
- Future Directions: The authors note that future work will focus on further optimizing the embedding compression techniques to minimize the storage footprint and exploring VISTA's generalizability across other recommendation domains.
Summary updated