TL;DR
QARM V2 bridges the gap between Large Language Models (LLMs) and industrial recommendation systems (RecSys) by aligning LLM semantic embeddings directly with business objectives. By introducing a reasoning-based item alignment mechanism and a hybrid quantization method (Res-KmeansFSQ), it significantly improves long-term user sequence modeling while eliminating ID code collisions. Deployed at Kuaishou, the framework drives substantial online revenue and engagement gains across short-video, live-streaming, and e-commerce platforms.
What Problem Does This Paper Address?
Modern recommendation systems handle massive user interaction histories—often exceeding 100,000 items per active user. To process this data efficiently under strict latency constraints, industrial systems typically adopt a two-stage paradigm: a General Search Unit (GSU) to quickly filter a user's lifelong history down to a top-K relevant subsequence, and an Exact Search Unit (ESU) to perform fine-grained ranking on those candidates.
Historically, both units have relied heavily on ID-based embeddings. However, ID embeddings suffer from low information density, knowledge isolation (if an item stops being distributed, its learned knowledge is discarded), and poor generalization to new or long-tail items.
While LLMs possess rich world knowledge and dense semantic representations, directly plugging pre-trained LLM embeddings into a RecSys fails due to two major barriers:
- Representation Unmatch: LLM training objectives (like text generation or image captioning) do not align with recommendation goals (predicting user clicks). For instance, an LLM might group toothpaste and ointment together because they both feature tubular packaging, ignoring that they serve completely different consumer needs.
- Representation Unlearning: Freezing LLM embeddings prevents them from adapting dynamically to downstream ranking models via gradient updates, leading to incompatibility in streaming production environments.
Methods
The authors introduce QARM V2, a unified framework designed to align LLM semantic understanding with industrial RecSys requirements across both the GSU and ESU stages.
1. Reasoning Item Alignment (GSU Side)
To fix the representation unmatch problem, QARM V2 uses an LLM-driven data pipeline to filter out noise from collaborative filtering data. Standard item-to-item models often suffer from exposure bias, falsely pairing unrelated but highly popular items (e.g., soy sauce and laundry detergent). QARM V2 deploys a large reasoning model (Qwen) to explicitly judge whether item pairs share underlying real-world logic.
To turn a decoder-only LLM into an efficient embedding generator without breaking its next-token prediction capability, the authors implement a three-segment attention mask trick. The input token sequence is split into an Input Segment (item text/visuals), a Compression Segment (special <EMB> tokens that only attend to the input), and a QA Segment (instruction pairs). This allows the model to optimize for recommendation-aligned contrastive loss and text generation simultaneously.
2. Res-KmeansFSQ Quantization (ESU Side)
To prevent representation unlearning, embeddings must be converted into discrete, learnable tokens called Semantic IDs (SIDs) that the downstream ranking model can optimize end-to-end.
Standard Residual K-means quantization suffers from severe codebook collisions because real-world item distributions are highly long-tailed; K-means centroids naturally cluster in data-dense regions, assigning identical IDs to distinct tail items. QARM V2 introduces a hybrid quantization strategy:
- Residual K-means is retained for the first two layers to capture coarse-grained category and usage patterns.
- Finite Scalar Quantization (FSQ) replaces the final layer. Because FSQ relies on a fixed, uniform, data-independent grid, it ensures deterministic, collision-free code assignments for fine-grained item distinction.
Datasets
The authors evaluated QARM V2 using both public and proprietary datasets:
- Academic Benchmark: The public Amazon Book dataset, preprocessed to include users with interaction sequence lengths of 20 or more.
- Industrial Datasets: Large-scale production datasets from Kuaishou Technology, spanning three major business domains: Advertising, Shopping (E-commerce), and Live-streaming.
Key Insights and Ideas
- LLMs as Noise Filters: Collaborative filtering logs are incredibly noisy due to systemic exposure bias. Using an LLM as a "reasoning filter" to prune out illogical item pairings before embedding generation is far more effective than directly feeding raw interaction data into the embedding model.
- The Power of Hybrid Quantization: Purely data-driven quantization methods fail in long-tailed industrial spaces. Combining the data-adaptive nature of K-means (for high-level hierarchy) with the rigid, uniform structure of FSQ (for low-level uniqueness) provides an elegant solution to the code collision problem.
- Keep the Duplicates: Counterintuitively, the authors found that omitting sequence deduplication yields better offline results. Non-deduplicated sequences preserve critical user behavioral patterns, such as repeated engagement with the same content creator at different times of day or varying viewing durations.
Key Results
Offline Evaluation
- On the Amazon Book dataset, QARM V2 achieved a top-performing AUC of 70.33%, outperforming competitive baselines like DIN (67.69%) and SIM-soft (69.57%).
- On Kuaishou's industrial datasets, it consistently improved vital metrics across the board, including a +1.10% GAUC lift in Advertising and a +0.50% GAUC lift for long-view predictions in Live-streaming.
- Collision Reduction: The hybrid Res-KmeansFSQ method slashed the ID collision rate from 77.92% down to 32.39%, reducing the average number of items sharing a single SID from 129.33 to just 2.5.
Online Production Impact
QARM V2 was deployed in production at Kuaishou, serving over 400 million daily active users. Multi-week online A/B testing revealed massive commercial gains:
- Advertising Scenarios: Revenue increased by +4.873% alongside a +3.942% improvement in cost efficiency.
- E-commerce Scenarios: Shopping metrics saw a substantial boost, peaking at a +5.612% increase in GMV and a +4.834% increase in total orders.
Limitations and Future Work
Although the hybrid Res-KmeansFSQ method dramatically mitigates codebook collisions compared to standard approaches, a 32.39% collision rate means that a portion of fine-grained item uniqueness is still lost during discrete quantization.
To address this, the authors note that future work will focus on exploring finer-grained, longer parallel Vector Quantization (VQ) codes, as well as developing methods to diffuse these discrete semantic codes back into their original visual and textual modalities.
Summary updated