Abstract
Content feed, a type of product that recommends a sequence of items for users to browse and engage with, has gained tremendous popularity among social media platforms. In this paper, we propose to study the diversity problem in such a scenario from an item sequence perspective using time series analysis techniques. We derive a method called sliding spectrum decomposition (SSD) that captures users' perception of diversity in browsing a long item sequence. We also share our experiences in designing and implementing a suitable item embedding method for accurate similarity measurement under long tail effect. Combined together, they are now fully implemented and deployed in Xiaohongshu App's production recommender system that serves the main Explore Feed product for tens of millions of users every day. We demonstrate the effectiveness and efficiency of the method through theoretical analysis, offline experiments and online A/B tests.
Introduction
In modern "infinite scroll" content feeds, such as those found on social media platforms like Xiaohongshu, maintaining diversity is critical to user retention. Traditional recommendation systems often struggle with two major issues in these high-volume environments: the Memory Gap and the Long-Tail Gap.
The Memory Gap refers to the fact that users retain a memory of previously viewed items even after they have scrolled past the current window. Standard sliding-window algorithms often ignore these "out-of-window" items, leading to redundancy. The Long-Tail Gap arises because most items have very few interactions, making it difficult for traditional Collaborative Filtering (CF) to measure similarity accurately. As shown in Figure 5, the platform faces both an increasing trend in impression sequence lengths and a stark long-tail distribution of item clicks, necessitating a more robust approach to diversity.
Methodology
Sliding Spectrum Decomposition (SSD)
To address the memory effect, we treat the recommendation feed as a time series and apply Singular Spectrum Analysis (SSA). Instead of set-based diversity, we construct a Trajectory Tensor by stacking multiple sliding windows of item embeddings.
In this framework, diversity is defined geometrically as the "volume" of the hyper-parallelepiped spanned by item embeddings. If items are redundant, they align in the same direction, resulting in a smaller volume. To ensure real-time performance, we utilize a fast greedy algorithm based on the Modified Gram-Schmidt (MGS) process, allowing us to pick the next item by orthogonalizing it against the user's recent history. A "revert" trick using a circular queue ensures that the computational cost remains independent of the window size.
CB2CF Embedding
To bridge the Long-Tail Gap, we developed the CB2CF (Content-to-Collaborative Filtering) embedding method. We use a Siamese Network architecture that takes raw content features—text processed via BERT and images via Inception-V3—and maps them to an embedding space. The model is trained to predict similarity signals derived from ItemCF. This allows the system to generalize user-perceived similarity to new or low-interaction items that lack historical click data.
Experimental Results
Online A/B Testing
We evaluated the SSD variant (an optimized version for ranking stability) in a production environment serving tens of millions of daily users. Compared to the state-of-the-art Determinantal Point Process (DPP), SSD achieved significant gains in user engagement:
- Total Time Spent: +0.42%
- Total Engagements: +0.81%
- Diversity Metrics: Improvements in Intra-List Average Distance (ILAD) and Mean Read Taxonomies (MRT) confirmed a fresher user experience.
System Efficiency
Efficiency is paramount for industrial deployment. SSD reduced P99 latency by 7ms and decreased the memory footprint of the policy module by 27%*. These optimizations allow for high-throughput serving without compromising the quality of recommendations.
Conclusion
Sliding Spectrum Decomposition offers a mathematically grounded and computationally efficient solution for diversity in infinite scroll feeds. By modeling user browsing as a continuous sequence and leveraging content-based embeddings to handle the long tail, we significantly improved both user engagement and system performance at Xiaohongshu. Future work will focus on dynamically adapting the diversity-quality trade-off to individual user preferences and integrating complex business constraints directly into the decomposition process.
Summary updated