Artificial Intelligence 13 min read

Understanding Xiaohongshu’s Content Recommendation Mechanisms: NoteLLM and SSD

This article analyzes Xiaohongshu’s content recommendation system by reviewing two official papers, detailing the NoteLLM framework for interest discovery and the Sliding Spectrum Decomposition (SSD) method for diversified recommendations, and explaining their underlying models, loss functions, and experimental results.

DataFunTalk
DataFunTalk
DataFunTalk
Understanding Xiaohongshu’s Content Recommendation Mechanisms: NoteLLM and SSD

Introduction: Xiaohongshu (Little Red Book) has attracted a surge of international users, and its content recommendation algorithm is a core reason for handling this massive traffic. This article reviews two official papers released by the Xiaohongshu team to reveal the platform’s recommendation mechanisms.

1. How Xiaohongshu "投你所好" (personalized recommendation): The classic recommendation pipeline consists of (1) retrieving candidate items from a content database, (2) ranking them by predicting the utility for the user, and (3) passing high‑quality items to a strategy module for further filtering and final ordering. An illustration of this typical architecture is shown below.

2. Discovering user interests – NoteLLM: NoteLLM is an innovative unified framework for the content‑to‑content (I2I) note recommendation task. In a week‑long online experiment, NoteLLM improved click‑through rate by 16.20% over a SentenceBERT baseline, increased comment count by 1.10%, and raised the weekly active publisher count by 0.41%.

The framework compresses each note into a special single token using a prompt template, then applies generative contrastive learning (GCL) and collaborative supervision fine‑tuning (CSFT) to learn embeddings and generate tags or categories.

The prompt template uses special tokens [BOS], [EMB], and [EOS] together with placeholders , , , and . Separate templates are defined for category generation and tag generation, as illustrated below.

Generative Contrastive Learning (GCL) enhances the LLM’s ability to capture collaborative signals by constructing note pairs that co‑occur in user sessions and training the model to distinguish related from unrelated pairs. The GCL loss is defined as:

Collaborative Supervision Fine‑Tuning (CSFT) treats tag/category generation similarly to embedding generation, using both semantic content and collaborative signals from the compressed token. Its loss is:

The total loss combines GCL and CSFT:

3. Achieving diversified recommendation – SSD: The Sliding Spectrum Decomposition (SSD) method addresses the “diversified feed” problem in Xiaohongshu. It treats the entire content sequence as a time series, slides a fixed‑size window ω, stacks windows into a content matrix, and maps each item to a d‑dimensional embedding, forming a trajectory tensor 𝒳.

SSD applies singular value decomposition (SVD) to the trajectory tensor (or its three‑order extension) using singular spectrum analysis, interpreting singular vectors as orthogonal recommendation directions and singular values as their weights in user perception of diversity.

The objective balances quality and diversity via a volume‑based metric γ, solved with a greedy algorithm. Experiments show SSD outperforms DPP on residence time, interaction count, ILAD, and MRT by modest margins.

4. Embedding computation – CB2CF: Building on collaborative filtering, the authors propose a twin‑network CB2CF to compute content embeddings. Text features are extracted with a pre‑trained BERT model, image features with Inception‑V3, concatenated, and projected to a final embedding vector.

For long‑tail notes with few interactions, CB2CF retrieves positive pairs via ItemCF exposure and negative pairs via random sampling, using cosine similarity (normalized and augmented with an extra dimension) as the distance metric. A binary cross‑entropy loss trains the model.

Qualitative examples demonstrate that CB2CF retrieves semantically closer notes for low‑engagement content (e.g., Chinese calligraphy) compared to traditional ItemCF, which often returns unrelated entertainment items.

Overall, the combination of NoteLLM (with GCL and CSFT) and SSD (with CB2CF embeddings) provides a powerful solution for personalized, diverse, and collaborative recommendation on Xiaohongshu, improving both relevance and user experience.

machine learningLLMcollaborative filteringRecommendation systemsdiversity
DataFunTalk
Written by

DataFunTalk

Dedicated to sharing and discussing big data and AI technology applications, aiming to empower a million data scientists. Regularly hosts live tech talks and curates articles on big data, recommendation/search algorithms, advertising algorithms, NLP, intelligent risk control, autonomous driving, and machine learning/deep learning.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.