Searching for mathematical content presents unique challenges that traditional text-based retrieval systems, such as BM25, struggle to overcome. In math information retrieval (MIR), symbol frequency is often a deceptive indicator of importance, and minor structural variations—like the placement of an exponent—can fundamentally alter a formula's meaning. Furthermore, mathematical concepts often exhibit high notation variance, and there is a significant "modality gap" between symbolic formulas and the natural language text that describes them.
While dense retrieval models using neural networks have transformed general search, their efficacy in the structured domain of mathematics has remained largely unproven. This research investigates the potential of passage-level (DPR) and token-level (ColBERT) dense retrieval models, enhanced by domain-specific pre-training and hybrid fusion techniques.
Methods
The authors employed a multi-stage approach to adapt dense retrieval for MIR:
- Domain-Specific Pre-training: A standard BERT model was further pre-trained on a corpus of 1.69 million math-related documents from sources like Math StackExchange. To better represent mathematical syntax, 539 math-specific tokens were added to the vocabulary, enabling the model to process LaTeX more effectively.
- Architectural Comparison: Two primary architectures were evaluated:
- Dense Passage Retriever (DPR): A bi-encoder model that represents entire text/math passages as single vectors. While computationally efficient, it risks losing fine-grained structural nuances.
- ColBERT: A token-level late interaction model that maintains individual vectors for every token. It utilizes a "MaxSim" operator to align query and document tokens, offering higher precision for symbolic matching.
- Hybrid Fusion: Recognizing the strengths of traditional methods, the neural models were combined with Approach0, a system specialized in matching the tree structure of mathematical formulas. Scores were integrated using linear fusion rather than simple reranking.
Evaluation and Results
The models were tested on the NTCIR-12 Wiki-Formula and ARQMath-2 benchmarks. The latter is particularly challenging as it involves finding relevant answers to complex mathematical questions on StackExchange.
The results demonstrate that the combination of ColBERT and Approach0 achieved a new state-of-the-art (SOTA) on ARQMath-2, with an NDCG' of 0.447 and a MAP' of 0.215. Math-specific pre-training proved essential, significantly outperforming vanilla BERT and SciBERT. While ColBERT provided the best accuracy, it required a substantial 77GB index, whereas the DPR model offered a more resource-efficient alternative with a 5.3GB index.
Analysis of Model Strengths
A key finding of the study is the "division of labor" between structural and semantic search. Traditional structure-search systems remain superior for "Calculation" queries where the formula's exact shape is paramount. In contrast, dense models—particularly DPR—excel at "Concept" or "Proof" queries where the surrounding linguistic context provides critical relevance clues.
The fine-grained matching of ColBERT consistently outperformed the passage-level compression of DPR. In the mathematical domain, where every symbol is significant, the ability to perform token-level interaction prevents vital details from being lost in a single embedding. Interestingly, the researchers found that using dense models for reranking actually harmed performance due to "false positives"—formulas that appear mathematically similar but are contextually irrelevant. Linear fusion of scores proved to be a much more robust integration strategy.
Conclusion
This work establishes that dense retrieval models are powerful tools for MIR when properly adapted. By bridging the gap between semantic context and structural precision, these models set new performance benchmarks. However, challenges remain regarding the engineering complexity of hybrid systems and the high computational cost of token-level matching. Future research may focus on incorporating structural awareness directly into neural architectures to reduce the reliance on external structure-search engines.
Summary updated