AI
H2Rec: Balancing Semantic and Hash IDs in Sequential Recommendation Systems
Researchers propose a framework that harmonizes two ID representation approaches to improve recommendation quality for both popular and niche items.
A new framework called H2Rec addresses a fundamental trade-off in sequential recommendation systems: how to effectively serve both head items (popular, frequently consumed) and tail items (rare, niche products).
The Problem#
Conventional sequential recommender systems rely on hash IDs (HID) to create item embeddings, which capture collaborative signals from user-item interactions. However, this approach struggles with long-tail items that receive few interactions. Recent methods have tried adding auxiliary information through Semantic IDs (SID)—which support multi-granular semantic modeling—but encounter a "collaborative overwhelming phenomenon" where quantization compromises the unique identity needed for head items. In essence, existing methods force a choice: optimize for popular items or rare ones, but not both.
The Solution#
Researchers from the arXiv submission propose H2Rec, which stops trying to pick a winner. Instead, the framework uses a dual-branch architecture that simultaneously:
- Captures multi-granular semantics via Semantic IDs
- Preserves collaborative uniqueness via Hash IDs
A dual-level alignment strategy bridges the two representations, enabling knowledge transfer between them and creating more robust preference modeling.
Validation#
The team tested H2Rec on three public benchmarks and ran live experiments on a large-scale commercial platform. Results show the framework achieves better balance between head and tail recommendation quality while outperforming existing baselines.
This work demonstrates that combining complementary approaches—rather than choosing between them—can unlock better performance in recommendation systems.

