TL;DR
While modern embedding models excel at general text retrieval, searching mathematical knowledge—from formula lookup to formal premise selection—remains a major blind spot. This paper introduces MIRB (Mathematical Information Retrieval Benchmark), a unified evaluation suite spanning 4 tasks and 12 datasets across natural language, forum discussions, and formal proof systems (Lean, Isabelle, HOL Light). Evaluating 13 leading retrieval models reveals that models struggle significantly with reasoning-oriented tasks, and standard off-the-shelf cross-encoder rerankers actually hurt performance rather than help.
What Problem Does This Paper Address?
Mathematical Information Retrieval (MIR) powers essential tools: automated theorem provers searching for premises, mathematicians locating formal lemmas in libraries like Lean’s mathlib, and students finding duplicate problems on math forums.
However, mathematical text is structurally unique:
- Formulas carry identical semantics under variable substitutions ($x+y$ vs. $a+b$), which breaks naive lexical matching.
- Retrieval often requires logical reasoning (e.g., finding a lemma that unblocks a proof step) rather than matching topical similarity.
- Mathematical representations span diverse formats, including $\LaTeX$, natural language proofs, and formal languages like Lean 4, Isabelle, and HOL Light.
Prior benchmarks were either narrow, scattered across one-off competitions (e.g., ARQMath, NTCIR), or focused strictly on conversational and common-sense reasoning (e.g., BRIGHT, RAR-b). A comprehensive, multi-task benchmark dedicated to mathematics has been missing.
Methods
The authors introduce MIRB, establishing standardized data splits, dynamic corpora (to handle false negatives and incomplete annotations), and prompt instructions across four distinct mathematical retrieval tasks:
- Semantic Statement Retrieval: Finding semantically equivalent statements or duplicate forum questions.
- Question-Answer Retrieval: Locating full proofs or solutions for a given theorem or mathematical query.
- Premise Retrieval: Identifying definitions, lemmas, or formal declarations required to advance a proof state or prove a conjecture.
- Formula Retrieval: Finding relevant mathematical formulas given an isolated formula or a formula with surrounding context.
Using MIRB, the authors evaluate:
- 13 retrieval models, including sparse retrieval (BM25), sub-1B dense encoders (such as
gte-large-en-v1.5,bge-large-en-v1.5), 7B decoder-based dense embedders (such asNV-Embed-v2,SFR-Embedding-2_R,GritLM-7B), and proprietary API models (text-embedding-3-large,voyage-3-large). - Cross-encoder rerankers (
bge-reranker-v2-m3andjina-reranker-v2-base-multilingual) applied to the top-5 retrieved lists to see if two-stage retrieval pipelines improve mathematical retrieval accuracy.
Datasets
MIRB unifies 12 datasets (comprising over 2 million total documents) categorized across the four core tasks:
- Semantic Statement Retrieval:
- Informalized Mathlib4 Retrieval (40 queries, 124k docs)
- MSE Duplicate Question Retrieval (25,116 queries, 1.35M docs from Math Stack Exchange; newly curated with transitive duplicate closure and tag filtering)
- MO Duplicate Question Retrieval (225 queries, 108k docs from MathOverflow)
- Question-Answer Retrieval:
- ARQMath-Task-1 (78 queries, 33k docs)
- ProofWiki (1,099 queries, 15.7k proofs)
- Stacks (776 queries, 10.4k algebraic geometry proofs)
- Premise Retrieval:
- NaturalProofs (2,060 natural language queries, 40.8k premise docs)
- LeanDojo (4,109 Lean 4 proof states, 180k declarations)
- MAPL (4,000 Isabelle proof states, 493k declarations)
- HolStep (1,411 HOL Light conjectures, 3.9k declarations)
- Formula Retrieval:
- NTCIR-WFB (39 queries, 1.9k Wikipedia formulas)
- ARQMath-Task-2 (76 queries, 9.9k formulas with MSE context)
Key Insights and Ideas
- Semantic vs. Reasoning Divide: Dense retrievers perform respectably on semantic matching (e.g., nDCG@10 scores of 70–82 on MathOverflow duplicates or formula search), but collapse on reasoning-heavy tasks. Premise selection requires deducing structural dependencies rather than topical relevance, exposing a key weakness in current text embeddings.
- Formal Language Illiteracy: Models show catastrophic performance drops on formal languages (e.g., nDCG@10 on LeanDojo peaks at only ~13.0, and MAPL at ~19.9). General-purpose embedding models lack exposure to the rigid syntax, variable bindings, and logical semantics of interactive theorem provers.
- The "Reranker Curse" in Math: In general text retrieval, applying a cross-encoder reranker to the top candidates almost always boosts nDCG. In MIRB, rerankers consistently degraded performance across nearly all models and tasks (e.g., dropping
voyage-3-large's average nDCG@10 from 54.54 down to 48.36 withbge-rerankerand 50.42 withjina-reranker). Cross-encoders trained on standard natural language pairs appear poorly calibrated for mathematical syntax and formula structure.
Key Results
Evaluated using nDCG@10:
- Overall Standings:
voyage-3-largeachieved the highest overall average score (54.54), leading in 7 of the 12 datasets.- Large open-source embedders performed competitively:
SFR-Embedding-2_Rscored 52.29, andNV-Embed-v2reached 52.00. - BM25 lagged far behind (32.23 average), proving inadequate for mathematical equivalence and LaTeX variations.
- Task Disparity:
- On ProofWiki QA, top models performed strongly (e.g.,
voyage-3-largereached 91.69;SFR-Embedding-2_Rreached 85.07). - In contrast, on LeanDojo Premise Retrieval, the best model (
voyage-3-large) managed only 13.02, with smaller models dropping below 5.0. - Model Scaling: A clear capability jump occurs between sub-1B parameter models (averaging ~38–40 nDCG@10) and ~7B+ parameter models (averaging ~50–54 nDCG@10).
Limitations and Future Work
- Domain Coverage for Rerankers: Current open reranking architectures fail on specialized mathematical structures, underscoring the urgent need for math-aware cross-encoders.
- Formal Language Pretraining: The authors note that closing the gap on premise retrieval will require retrievers to be pre-trained specifically on large corpora of formal languages (Lean, Isabelle, Coq, HOL Light).
- Evaluating Generation/Proving Integration: MIRB isolates retrieval evaluation (nDCG@10); evaluating how these retrieval improvements directly translate to downstream end-to-end automated theorem proving success rates remains an important future step.
Summary updated