Navigating the "Tree" of User Interests in Hyperbolic Space
Session-based recommendation (SBR) aims to predict a user's next interaction based on a short sequence of anonymous actions, such as clicks within a single shopping session. While modern SBR models often employ Graph Neural Networks (GNNs) to capture these patterns, they typically operate within Euclidean space.
The Problem: Euclidean Distortion
User behavior data is rarely "flat." Instead, it often follows a power-law distribution and possesses an inherent hierarchical, tree-like structure. For instance, a user might browse broad categories before narrowing down to specific items.
Euclidean space struggles to represent such hierarchical data without significant distortion. In a standard Euclidean grid, the space available grows only polynomially with the radius. Consequently, it lacks the "room" at the edges to accommodate the exponential growth of a tree structure, leading to sub-optimal embeddings.
The Solution: HCGR
The authors introduce HCGR (Hyperbolic Contrastive Graph Recommender), a framework that leverages Lorentz hyperbolic space to better fit hierarchical data. Unlike Euclidean space, the volume of hyperbolic space grows exponentially with its radius, perfectly matching the branching nature of user interest trees.
Key Technical Components
- Lorentz Hyperboloid Model: The authors favor the Lorentz model over the Poincaré disk for its superior numerical stability and simpler distance calculations during optimization.
- Hyperbolic Graph Attention Network: This specialized mechanism uses exponential and logarithmic maps to move between the hyperbolic manifold and Euclidean tangent spaces, allowing for effective neighbor aggregation without losing hierarchical properties.
- Hyperbolic Self-Attention: To capture long-term dependencies across an entire session, the model extends standard self-attention into hyperbolic space.
- Hyperbolic Contrastive Learning: A contrastive ranking loss using geodesic distance (the shortest path on a curved surface) ensures that positive samples are closer to user preferences than negative ones, helping the model distinguish subtle differences between items.
Key Insights
- Hierarchy as Popularity: Visualization reveals that HCGR naturally places popular items near the center of the hyperbolic space and niche items toward the edges, effectively mapping item "popularity" to its position in the hierarchy.
- Contrastive Boost: Hyperbolic contrastive learning specifically improves ranking metrics like MRR by forcing the model to perceive distinctions that Euclidean models might conflate.
- Lorentz Stability: The Lorentz model's mathematical properties make it particularly well-suited for stable gradient-based optimization in deep learning.
Results and Performance
HCGR consistently outperformed state-of-the-art baselines (including SR-GNN, GC-SAN, and LESSR) across four diverse real-world datasets: Yoochoose, Last.FM, Ta-Feng, and MYbank.
- Significant Gains: Improvements ranged from 0.43% to 28.84% across metrics like HitRate@K and NDCG@K.
- Ranking Excellence: The most dramatic improvements were seen in MRR (Mean Reciprocal Rank), particularly on the Ta-Feng dataset (a 28.84% increase), indicating superior accuracy in top-tier item placement.
- Ablation Success: Integrating Lorentz components into existing Euclidean models (like FPMC or GRU4Rec) consistently boosted their performance, confirming that the geometric space itself is a critical factor.
Future Directions
While HCGR demonstrates the power of hyperbolic geometry, the authors identify several areas for growth:
- Feature Integration: Future versions could incorporate richer user profiles and diverse item features beyond simple sequences.
- Geometric Diversity: Some data might be better suited for spherical or product spaces (combinations of different geometries).
- Computational Optimization: Operations in non-Euclidean geometry are more complex than standard matrix multiplication; optimizing these for large-scale production remains a priority.
Summary updated