用双曲几何提升语言模型的层次化理解能力
Hierarchical Mamba Meets Hyperbolic Geometry: A New Paradigm for Structured Language Embeddings
- 将Mamba2与双曲空间结合,学习带层级关系的语言嵌入
- 在四个语料库上优于平面嵌入,双曲版本更擅长捕捉层级距离
- 适合需要深度推理的场景,如医疗分类、多跳问答
选择性状态空间模型在长序列建模中表现优异,但其在复杂层级推理中的语言表征能力仍待探索。当前大模型普遍使用平坦的欧几里得嵌入,难以捕捉潜在层级结构。为此,我们提出层级马尔可夫(HiM),将高效的Mamba2与双曲几何结合,学习具有层次感知能力的语言嵌入,以实现更深层的语言理解。经过Mamba2处理的序列被投影到庞加莱球或洛伦兹流形,并通过可学习曲率优化双曲损失。该模型能有效捕捉不同层级间的相对距离,支持混合跳跃预测和多跳推理等任务。实验表明,两种HiM变体在四个语言及医学数据集上均显著优于欧几里得基线:HiM-Poincaré在高h范数下提供更精细区分,而HiM-Lorentz则生成更稳定、紧凑且保留层级结构的嵌入,更具鲁棒性。源代码已公开于https://github.com/BerryByte/HiM。
原文摘要 · Abstract (English)
Selective state-space models excel at long-sequence modeling, but their capacity for language representation -- in complex hierarchical reasoning -- remains underexplored. Most large language models rely on \textit{flat} Euclidean embeddings, limiting their ability to capture latent hierarchies. To address this, we propose {\it Hierarchical Mamba (HiM)}, integrating efficient Mamba2 with hyperbolic geometry to learn hierarchy-aware language embeddings for deeper linguistic understanding. Mamba2-processed sequences are projected to the Poincaré ball or Lorentzian manifold with ``learnable'' curvature, optimized with a hyperbolic loss. Our HiM model facilitates the capture of relational distances across varying hierarchical levels, enabling effective long-range reasoning for tasks like mixed-hop prediction and multi-hop inference in hierarchical classification. Experimental results show both HiM variants effectively capture hierarchical relationships across four linguistic and medical datasets, surpassing Euclidean baselines, with HiM-Poincaré providing fine-grained distinctions with higher h-norms, while HiM-Lorentz offers more stable, compact, and hierarchy-preserving embeddings-favoring robustness. The source code is publicly available at https://github.com/BerryByte/HiM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。