Abstract
Mathematical Information Retrieval (MIR) presents unique challenges due to the structural complexity of formulas and the semantic overlap between different notations. This paper investigates the efficacy of dense retrieval models—specifically Dense Passage Retrieval (DPR) and ColBERT—in the mathematical domain. By implementing domain-specific pre-training on a large-scale math corpus and integrating neural scores with symbolic structure search, we demonstrate significant improvements in retrieval performance. Our hybrid approach achieves a new state-of-the-art on the ARQMath-2 benchmark, highlighting the complementary nature of "fuzzy" semantic matching and "rigid" structural precision.
Introduction
Searching for mathematical content is inherently more complex than standard text retrieval. Traditional keyword-based systems (e.g., BM25) fail to account for the structural nuances of mathematical expressions. Specifically, MIR must address three primary hurdles:
- Structural Complexity: Conceptually identical expressions can be represented through various syntactic structures (e.g., $1 + \frac{1}{x}$ vs. $\frac{1+x}{x}$).
- Symbol Interchangeability: Variables often act as placeholders; $x+y$ and $a+b$ are semantically equivalent in many contexts, yet keyword search treats them as distinct.
- The Modality Gap: Math documents interleave natural language with LaTeX or MathML. Systems that treat these modalities in isolation fail to capture the contextual relationship between a formula and its surrounding descriptive text.
While symbolic "structure search" methods offer high precision by matching formula tree patterns, they often suffer from low recall. This study explores whether dense retrieval—mapping queries and documents into a shared vector space—can mitigate these limitations.
Methodology
The research evaluates two distinct bi-encoder architectures for dense retrieval:
- Dense Passage Retriever (DPR): A passage-level model that encodes an entire document or formula into a single dense vector. Similarity is determined via a simple dot product.
- ColBERT: A token-level model that maintains embeddings for every token. It utilizes a "late interaction" mechanism (MaxSim) to calculate similarity, allowing for more granular matching between query and document components.
Domain-Specific Enhancements
To adapt these models for mathematics, the authors implemented several key innovations:
- Further Pre-training: A BERT-base model was further pre-trained on a massive corpus of 1.69 million math-heavy documents sourced from Math StackExchange and Art of Problem Solving.
- Vocabulary Expansion: The model's vocabulary was expanded with 539 specialized LaTeX tokens (e.g.,
\frac,\sqrt,\int). This prevents the tokenizer from fragmenting mathematical symbols into semantically empty sub-words. - Hybrid Fusion: Recognizing that neural models and symbolic engines have different strengths, the authors fused the scores of the dense retrievers with Approach0 (a state-of-the-art structure search system) using a weighted linear combination.
Experimental Setup and Datasets
The models were benchmarked on two primary MIR tasks:
- NTCIR-12 Wiki-Formula: A task focused on retrieving isolated formulas from a collection of approximately 591,000 Wikipedia-sourced expressions.
- ARQMath-2: A complex task involving answer retrieval for mathematical questions from Math StackExchange, encompassing 1 million questions and 28 million formulas.
Key Insights
Token-Level vs. Passage-Level Retrieval
The results indicate that ColBERT (token-level) consistently outperforms DPR (passage-level) in mathematical contexts. This suggests that the specific arrangement and identity of symbols within a formula are too intricate to be effectively compressed into a single "passage" vector. The late interaction mechanism in ColBERT preserves the necessary detail for distinguishing between similar but mathematically distinct expressions.
The Synergy of Hybrid Models
A significant finding is the complementary nature of dense retrieval and structure search. Structure search excels at "Calculation" queries where exact notation is paramount. Conversely, dense retrieval thrives in "Concept" or "Proof" queries, where the surrounding natural language provides critical semantic context.
Pre-training Efficacy
Domain-specific pre-training proved more effective than using general scientific models like SciBERT. While SciBERT is trained on scientific literature, its focus is largely biomedical, whereas the authors' specialized pre-training captures the specific formalisms of mathematical notation.
Results
The hybrid approach yielded substantial performance gains:
- ARQMath-2: The fusion of ColBERT and Approach0 achieved an NDCG' of 0.447, setting a new state-of-the-art and surpassing the previous leader, MathDowsers (0.434).
- NTCIR-12: The hybrid model reached a BPref of 0.70, a significant improvement over the 0.63 achieved by structure search alone. This confirms that neural models successfully retrieve relevant formulas that rigid symbolic matches overlook.
- Efficiency: The bi-encoder models demonstrated the ability to outperform computationally expensive cross-encoders while remaining fast enough for large-scale production environments.
Discussion and Limitations
Despite the performance gains, several challenges remain:
- Resource Intensity: ColBERT requires significant storage; the authors noted a 77GB index for ColBERT compared to 5.3GB for DPR on the same dataset.
- System Complexity: Maintaining a hybrid pipeline (neural + symbolic) increases engineering overhead and resource requirements for indexing and serving.
- Interpretability: Unlike symbolic systems that provide clear matching sub-trees, neural rankings remain difficult to interpret, complicating the debugging of edge cases.
Conclusion
This research demonstrates that combining the semantic depth of token-level dense retrieval with the precision of structural search significantly advances the state of Math Information Retrieval. Future work will focus on teaching models to recognize mathematical identities (e.g., $(a+b)^2 = a^2+2ab+b^2$) natively, reducing the reliance on explicit symbolic rules.
Summary updated