arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.18276cs.IRcs.CL
收藏

RankMamba:在Transformer时代评估Mamba的文档排序性能

RankMamba: Benchmarking Mamba's Document Ranking Performance in the Era of Transformers

University of Utah(犹他大学)

Zhichao Xu

AI总结:

RankMamba通过文档排序任务评估Mamba模型在信息检索中的性能,发现其在相同训练条件下表现优异,但训练效率低于高效Transformer实现。

摘要:

Transformer结构在多个应用机器学习社区中取得了巨大成功,例如自然语言处理(NLP)、计算机视觉(CV)和信息检索(IR)。Transformer架构的核心机制——注意力需要训练时O(n²)的时间复杂度和推理时O(n)的时间复杂度。许多工作已提出改进注意力机制的可扩展性,例如Flash Attention和多查询注意力。另一条工作线旨在设计新的机制来替代注意力。最近,一种基于状态空间模型的显著模型结构Mamba在多个序列建模任务中实现了与Transformer等效的性能。在本工作中,我们通过经典IR任务——文档排序的视角来考察Mamba的效能。重排模型以查询和文档作为输入,预测一个相关性分数。该任务要求语言模型具备理解长上下文输入和捕捉查询与文档标记之间交互的能力。我们发现(1)Mamba模型在相同训练配方下与基于Transformer的模型具有竞争力的性能;(2)但与高效的Transformer实现如Flash Attention相比,其训练吞吐量较低。我们希望本研究可以作为探索Mamba模型在其他经典IR任务中的起点。我们的代码实现已公开以促进可重复性。参考~\cite{xu-etal-2025-state}以获取更全面的实验和结果,包括段落排序。

英文摘要:

Transformer structure has achieved great success in multiple applied machine learning communities, such as natural language processing (NLP), computer vision (CV) and information retrieval (IR). Transformer architecture's core mechanism\, -- \,attention requires $O(n^2)$ time complexity in training and $O(n)$ time complexity in inference. Many works have been proposed to improve the attention mechanism's scalability, such as Flash Attention and Multi-query Attention. A different line of work aims to design new mechanisms to replace attention. Recently, a notable model structure Mamba, which is based on state space models, has achieved transformer-equivalent performance in multiple sequence modeling tasks. In this work, we examine Mamba's efficacy through the lens of a classical IR task\, -- \,document ranking. A reranker model takes a query and a document as input, and predicts a scalar relevance score. This task demands the language model's ability to comprehend lengthy contextual inputs and to capture the interaction between query and document tokens. We find that \textbf{(1) Mamba models achieve competitive performance compared to transformer-based models with the same training recipe; (2) but also have a lower training throughput in comparison to efficient transformer implementations such as flash attention.} We hope this study can serve as a starting point to explore \mamba models in other classical IR tasks. Our \href{https://github.com/zhichaoxu-shufe/RankMamba}{code implementation} is made public to facilitate reproducibility. Refer to~\cite{xu-etal-2025-state} for more comprehensive experiments and results, including passage ranking.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑