HMamba: Hyperbolic Mamba for Sequential Recommendation

Qianru Zhang, Honggang Wen, Wei Yuan, Crystal Chen, Menglin Yang, Siu-Ming Yiu, Hongzhi Yin

TL;DR

This paper introduces HMamba, a novel recommendation system that combines the efficiency of Mamba's linear-time sequence modeling with the hierarchical representation power of hyperbolic geometry. HMamba significantly improves recommendation accuracy and efficiency by better capturing the inherent tree-like structures in user preferences and item relationships, outperforming existing methods.

What Problem Does This Paper Address?

Traditional sequential recommendation systems, like those based on RNNs and Transformers, struggle to effectively model the complex, hierarchical nature of user preferences over time. While Transformers are powerful, they suffer from quadratic computational complexity, making them impractical for long sequences. Newer Mamba-based models offer linear-time efficiency but are limited by Euclidean geometry, which fails to capture the inherent hierarchical structures in recommendation data (e.g., user-item hierarchies, genre-artist-song relationships). This geometric mismatch leads to information loss and suboptimal performance, especially for datasets with deep hierarchies. HMamba aims to bridge this gap by unifying efficient sequence modeling with the geometric advantages of hyperbolic space.

Methods

The core innovation of HMamba lies in its integration of hyperbolic geometry with Mamba's selective state-space mechanism. Key components include:

  • Hyperbolic Selective State Space: This module adapts Mamba's state-space model to operate within hyperbolic space, ensuring curvature-aware sequence modeling. This allows the model to naturally represent hierarchical relationships.
  • Stabilized Riemannian Operations: To address the numerical instabilities often encountered when working with hyperbolic geometry, the authors introduce stabilized Riemannian operations. This ensures geometric fidelity and enables scalable training.
  • HMAMBA-FULL and HMAMBA-HALF: Two variants are proposed: HMAMBA-FULL for complete hyperbolic optimization and HMAMBA-HALF, a hybrid approach that leverages hyperbolic processing but outputs in Euclidean space for potentially faster inference.

Datasets

The authors evaluated their proposed HMamba framework on four benchmark datasets:

  • ML-1M: A classic movie recommendation dataset with dense user-item interactions.
  • New York, California, Texas: Three location-based datasets of increasing scale, with Texas being the largest and exhibiting high user engagement.

These datasets were chosen to cover varying interaction sparsity levels, platform types, and scales, allowing for a comprehensive evaluation.

Key Insights and Ideas

  • Hyperbolic Geometry is Crucial for Hierarchies: The paper strongly demonstrates that hyperbolic space is inherently better suited for representing hierarchical data than Euclidean space. Visualizations clearly show how hyperbolic embeddings preserve multi-level relationships (genres, movies, users) while Euclidean space flattens them.
  • Mamba's Efficiency Meets Hyperbolic Power: By combining Mamba's linear-time complexity with hyperbolic geometry, HMamba achieves both high accuracy and computational efficiency, overcoming limitations of both Transformer-based and vanilla Mamba models.
  • Curvature-Awareness Matters: The "curvature-aware discretization" and "hyperbolic projection" are key to maintaining geometric consistency and enabling the model to leverage the unique properties of hyperbolic space for better representation.
  • Partial Hyperbolic Processing is Beneficial: The HMAMBA-HALF variant, which uses hyperbolic processing but outputs in Euclidean space, still shows significant improvements over Euclidean baselines, suggesting that even partial adoption of hyperbolic geometry yields benefits.

Key Results

  • Accuracy Improvements: HMamba consistently outperforms state-of-the-art baselines, including other hyperbolic and Mamba-based methods, achieving 3-11% improvement in key metrics like Hit Ratio (HR@10), NDCG@10, and MRR@10 across four datasets.
  • Efficiency Gains: HMamba demonstrates superior efficiency, converging 3.1x faster than BERT4Rec and 1.8x faster than Mamba4Rec. It also consumes 18-22% less GPU memory than attention-based models.
  • Parameter Efficiency: Hyperbolic embeddings are shown to be more parameter-efficient for hierarchical data, requiring significantly fewer parameters than Euclidean embeddings for comparable reconstruction error.
  • Scalability: The linear-time complexity of Mamba, combined with hyperbolic geometry, makes HMamba scalable to large interaction histories.

Limitations and Future Work

  • Computational Overhead of Full Hyperbolic: While HMamba-FULL offers the best performance, it incurs a logarithmic computational overhead due to hyperbolic operations compared to HMAMBA-HALF.
  • Future Work: The authors suggest exploring applications to other recommendation tasks with inherent hierarchies and extending the framework to dynamic hyperbolic spaces. They also highlight the potential for further optimization of model architecture and hyperparameter tuning for practical deployment.

Summary updated

BibTeX
@article{zhang2026hmamba,
  author = {Qianru Zhang and Honggang Wen and Wei Yuan and Crystal Chen and Menglin Yang and Siu-Ming Yiu and Hongzhi Yin},
  title = {{HMamba: Hyperbolic Mamba for Sequential Recommendation}},
  journal = {ACM Trans. Information Systems},
  year = {2026},
  doi = {10.1145/3811405},
}
Figure