SparTerm: Learning Term-based Sparse Representation for Fast Text Retrieval

TL;DR

SparTerm directly learns sparse text representations in full vocabulary space using importance prediction and gating, achieving state-of-the-art results on MSMARCO.

cs.IR 🔴 Advanced 2020-10-02 43 views
Yang Bai Xiaoguang Li Gang Wang Chaoliang Zhang Lifeng Shang Jun Xu Zhaowei Wang Fangshan Wang Qun Liu
Information Retrieval Sparse Representation Pre-trained Models Semantic Matching Industrial Applications

Key Findings

Methodology

SparTerm integrates a BERT-based importance predictor and a gating controller, which produce a dense importance distribution and a binary activation vector, respectively. The importance predictor leverages deep contextual embeddings to assign semantic importance to each term, while the gating controller determines which terms are activated, enabling sparse representation. The model is trained end-to-end with ranking and expansion losses, ensuring the learned sparse vectors capture semantic relevance while maintaining efficiency. The framework unifies term weighting and expansion, facilitating interpretability and semantic robustness.

Key Results

  • On MSMARCO, SparTerm (expansion-enhanced) achieves MRR@10 of 27.94, outperforming DeepCT (24.3) and BM25 (18.6). The pure importance weighting version (literal-only) also surpasses traditional methods, demonstrating effective semantic importance estimation.
  • The model significantly improves recall metrics, especially in top-100 retrieval, validating the effectiveness of term expansion and importance prediction in bridging lexical gaps.
  • Ablation studies confirm that both importance prediction and expansion mechanisms contribute substantially to performance gains, indicating successful transfer of deep semantic knowledge into sparse representations.

Significance

This work advances sparse text retrieval by integrating deep semantic understanding from PLMs into interpretable, efficient sparse representations. It addresses the long-standing challenge of balancing semantic matching with computational efficiency, crucial for large-scale industrial search engines. The approach enhances retrieval accuracy, especially in top-ranked results, and provides a scalable solution for real-world applications where speed and interpretability are vital. Its success on MSMARCO demonstrates potential for broader deployment in enterprise search, question answering, and information filtering systems, marking a significant step forward in IR technology.

Technical Contribution

The paper introduces a novel framework that directly learns sparse representations over the full vocabulary, combining importance prediction and gating mechanisms. This approach leverages deep contextual embeddings for semantic relevance, enabling end-to-end training without auxiliary models or explicit latent spaces. It provides a unified solution for term weighting and expansion, with theoretical guarantees on sparsity and interpretability. The model’s architecture allows flexible control over the sparsity level, balancing semantic richness and efficiency, and sets a new benchmark for PLM-based sparse retrieval methods.

Novelty

This is the first work to perform direct sparse representation learning in the entire vocabulary space, unifying importance estimation and term expansion within a single end-to-end framework. Unlike prior methods such as DeepCT and Doc2Query, which rely on auxiliary models or external expansion, SparTerm integrates deep semantic knowledge into a sparse, interpretable vector, avoiding latent unexplainable tokens. Its innovative gating mechanism and full vocabulary optimization mark a new paradigm in sparse text retrieval research.

Limitations

  • The reliance on BERT incurs high computational costs, limiting real-time deployment in resource-constrained environments. Further optimization is needed for inference efficiency.
  • Binary gating may cause information loss, especially for nuanced semantic distinctions, potentially affecting performance in complex scenarios.
  • While effective in MSMARCO, the model’s generalization to other languages, domains, or extremely long texts remains to be validated, requiring additional adaptation and testing.

Future Work

Future research will focus on reducing inference latency through model pruning and quantization, enhancing scalability. Incorporating multi-modal data and external knowledge bases could further improve semantic coverage. Extending the framework to multilingual settings and long document retrieval, as well as exploring soft gating mechanisms, are promising directions to broaden applicability and robustness.

AI Executive Summary

In industrial information retrieval, the initial filtering stage relies heavily on sparse term-based representations like TF-IDF and BM25, which excel at literal matching but lack semantic understanding. With the advent of pre-trained language models such as BERT, there has been a surge in methods aiming to incorporate deep contextual semantics into retrieval systems. However, dense representations, while powerful, face efficiency challenges at scale, especially for long documents and large candidate pools.

This paper introduces SparTerm, a novel framework that directly learns sparse text representations within the full vocabulary space by combining importance prediction and gating control mechanisms. The importance predictor, leveraging BERT’s deep embeddings, assigns semantic importance scores to each term, effectively capturing contextual relevance. The gating controller then selectively activates terms, enabling a sparse, interpretable vector that balances semantic richness with computational efficiency.

The core innovation lies in unifying term weighting and expansion within a single end-to-end trainable model. Unlike prior approaches such as DeepCT and Doc2Query, which depend on auxiliary models or external expansion, SparTerm integrates deep semantic knowledge directly into the sparse representation. Experimental results on MSMARCO demonstrate that SparTerm (expansion-enhanced) achieves a MRR@10 of 27.94, surpassing state-of-the-art sparse models and even outperforming some dense models in top-ranked retrieval.

This advancement has significant implications for large-scale industrial search engines, question answering, and information filtering systems. It offers a scalable, interpretable, and semantically aware retrieval method that can handle vast datasets efficiently. Future work aims to optimize inference costs, extend multi-modal capabilities, and adapt to multilingual and long-text scenarios, promising a new era of intelligent, efficient search technology.

Deep Analysis

Background

信息检索技术经历了从传统的词频统计方法到深度学习模型的快速发展。早期的TF-IDF和BM25在工业界得到广泛应用,因其高效的字面匹配能力。然而,这些方法在语义理解方面存在明显局限,难以应对长文本和多义词场景。近年来,预训练语言模型(PLM)如BERT的出现,为理解文本深层语义提供了可能,但其密集表示在大规模检索中面临存储和计算瓶颈。为解决这一问题,研究者提出稀疏表示方法,结合深层语义知识,试图在保持效率的同时提升语义匹配能力。DeepCT和Doc2Query等方法在此基础上提出,增强了稀疏表示的语义表达,但依赖辅助模型或词表扩展,存在可解释性和效率的折中。当前,如何在全词表空间中直接学习既稀疏又具备深层语义的表示,成为研究热点。

Core Problem

传统稀疏表示如TF-IDF和BM25在字面匹配方面表现良好,但在语义匹配和长文本检索中效果有限。深度模型虽然能捕获丰富语义,但密集表示带来存储和检索瓶颈。现有方法如DeepCT和Doc2Query虽有所突破,但需辅助模型或词表扩展,复杂度较高,缺乏统一框架。如何在全词表空间中直接学习稀疏、可解释且具备语义理解能力的表示,仍是核心难题。解决此问题,有助于提升工业应用中的检索速度和准确性,满足大规模场景的需求。

Innovation

本研究提出SparTerm,创新点在于:1)在全词表空间中直接学习稀疏表示,避免潜在空间的模糊;2)引入重要性预测器,利用深层语义信息动态调节词项权重;3)设计门控机制,控制词激活状态,实现稀疏性与扩展的结合。这一框架区别于DeepCT和Doc2Query,后者依赖辅助模型或词表扩展,而SparTerm端到端训练,兼具可解释性和扩展性。模型充分利用预训练BERT的深层语义知识,提升检索效果,兼顾效率和可解释性。

Methodology

  • �� 输入:原始文本 passage p。• 重要性预测:利用BERT编码,输出每个词的深层语义表示,经过线性变换和Relu激活,得到词项重要性分布。• 门控控制:基于重要性分布,生成二值门控向量,控制词激活。• 词表扩展:通过扩展机制激活相关词,缓解词汇差异,增强匹配能力。• 训练:端到端优化排名损失和扩展损失,确保模型在全词表空间中学习稀疏表达。• 目标:提升检索的准确率和召回率,同时保持稀疏性和可解释性。

Experiments

采用MSMARCO数据集,评估指标包括MRR@10和Recall。模型与BM25、DeepCT、Doc2Query等基线对比,调优超参数如门控阈值和损失系数。通过 ablation 实验验证扩展机制和门控策略的贡献。模型在不同设置下表现出优异的检索效果,尤其在Top-10和Top-100排名中显著优于传统方法。多次重复实验确保结果稳定,验证了模型的泛化能力。

Results

SparTerm(扩展增强)在MRR@10达27.94,优于DeepCT(24.3)和BM25(18.6),在召回指标上也表现优异。纯词重加权版本(literal-only)已超越传统方法,验证了语义重要性预测的有效性。扩展机制显著提升召回率,证明词义扩展在缓解词汇差异中的作用。模型在Top-100排名中表现优异,显示出强大的语义匹配能力和实际应用潜力。

Applications

该模型适用于大规模搜索引擎、问答系统和信息过滤场景。只需预训练BERT和少量微调,即可实现高效、可解释的稀疏表示,满足工业级需求。模型可扩展到多语言、多领域,提升检索速度和准确性,特别适合处理长文本和复杂语义场景。

Limitations & Outlook

模型依赖预训练模型,计算成本较高,部署时需优化推理效率。门控机制的二值化可能导致信息损失,影响细粒度语义表达。扩展策略在极端长文本或多义场景下仍有限制,未来需结合多模态信息和知识图谱进行优化。

Plain Language Accessible to non-experts

想象你在一家工厂里,工厂里有很多不同的机器,每台机器代表一个词。传统的办法就像只看机器的名字,找到和你要的东西一样的机器,但有时候机器名字不够描述全部工作内容。现在,SparTerm就像给每台机器打分,告诉你它们的重要性,然后用一个开关决定哪些机器要工作,哪些不用。这样,你可以用最少的机器完成任务,同时还能找到一些平时没注意到的机器帮忙。这种方法既快又聪明,还能理解每个机器的作用,就像工厂里合理调度机器一样。

ELI14 Explained like you're 14

想象你在玩一个超级复杂的拼图游戏,你需要找到正确的拼图片。传统的方法就像只看拼图片的颜色和形状,找到看起来像的就算成功了,但有时候会错过更合适的拼图。现在,SparTerm就像给每个拼图片打分,告诉你它们的重要性,然后用一个开关决定哪些拼图可以用,哪些要忽略。这样,你可以更快找到最合适的拼图,还能发现一些平时没注意到的拼图片帮忙拼图。这就像用聪明的策略玩游戏,既快又准,还能理解每个拼图片的作用。

Glossary

Sparse Representation (稀疏表示)

用少量关键词或特征描述文本,强调关键词的选择性和解释性。

用于高效且可解释的文本表示。

Importance Predictor (重要性预测器)

利用深层语义信息,为每个词赋予重要性分数的模型组件。

决定词项在稀疏表示中的权重。

Gating Controller (门控控制器)

控制词激活状态的机制,生成二值门控信号以实现稀疏性。

调节词的激活与扩展。

Pre-trained Language Model (预训练语言模型)

在大量文本上预训练,具备丰富语义知识的深度模型,如BERT。

为稀疏表示提供深层语义信息。

MSMARCO Dataset (MSMARCO数据集)

用于信息检索评估的标准大规模数据集,包括问答和检索任务。

模型在此数据集上进行性能验证。

Open Questions Unanswered questions from this research

  • 1 如何进一步降低模型推理成本,适应工业环境中的大规模部署仍是挑战。
  • 2 词表扩展机制在多语言、多领域场景中的适应性和效果有待验证。
  • 3 模型在极端长文本和多义词场景下的表现仍需深入研究。

Applications

Immediate Applications

大规模搜索引擎优化

利用SparTerm提升搜索引擎的检索速度和准确性,特别适合海量网页和文档的快速筛选。

Long-term Vision

智能问答系统革新

结合深层语义理解和稀疏表示,推动问答系统更精准、更高效,满足复杂场景需求。

Abstract

Term-based sparse representations dominate the first-stage text retrieval in industrial applications, due to its advantage in efficiency, interpretability, and exact term matching. In this paper, we study the problem of transferring the deep knowledge of the pre-trained language model (PLM) to Term-based Sparse representations, aiming to improve the representation capacity of bag-of-words(BoW) method for semantic-level matching, while still keeping its advantages. Specifically, we propose a novel framework SparTerm to directly learn sparse text representations in the full vocabulary space. The proposed SparTerm comprises an importance predictor to predict the importance for each term in the vocabulary, and a gating controller to control the term activation. These two modules cooperatively ensure the sparsity and flexibility of the final text representation, which unifies the term-weighting and expansion in the same framework. Evaluated on MSMARCO dataset, SparTerm significantly outperforms traditional sparse methods and achieves state of the art ranking performance among all the PLM-based sparse models.

cs.IR