Scientific literature relies heavily on mathematical formulas to represent complex relationships concisely. However, for machines to truly "understand" these papers—enabling tasks like mathematical information retrieval or automated keyphrase extraction—they must be able to resolve what specific variables represent. This paper introduces MathAlign, an end-to-end pipeline designed to extract mathematical identifiers from PDFs and link them to their natural language descriptions in the surrounding text.
The MathAlign Pipeline
The authors propose a three-stage, domain-agnostic pipeline to process raw PDFs and establish these critical links:
- Formula Extraction (Image-to-LaTeX): The system identifies formula locations, crops the images, and uses a sequence-to-sequence neural network (based on
im2markup) to convert them into machine-readable LaTeX. This model was retrained on 1.7 million augmented images from arXiv to ensure robustness across diverse formatting styles. - Description Extraction: Utilizing the Odin framework, the system employs a rule-based Information Extraction (IE) approach. It scans the surrounding three paragraphs for syntactic patterns and trigger words to identify potential variable definitions.
- Alignment: The generated LaTeX is segmented into individual identifiers (e.g., $x_i$, $\theta$) and aligned with the extracted text descriptions.
Data and Annotation Tools
To facilitate this research, the authors developed MathAlign-Eval, a novel evaluation dataset containing 145 formulas from 116 arXiv papers across 13 scientific domains. The dataset includes 757 manually annotated identifiers, 584 of which are linked to specific natural language descriptions.
Creation of this dataset was made possible by PDFAlign, an open-source annotation tool. PDFAlign allows researchers to highlight bounding boxes directly on a PDF, which the tool then automatically links to the underlying LaTeX source code, streamlining the ground-truth annotation process.
Key Insights and Results
A central finding of the study is that context is paramount. Because the usage of identifiers varies significantly between sub-disciplines, relying on external math ontologies is often insufficient. Instead, the system must extract definitions directly from the paper's text. Furthermore, the authors found that descriptions often extend beyond simple noun phrases; capturing the full meaning frequently requires expanding descriptions along syntactic dependencies to include attached clauses or prepositional phrases.
The system was evaluated across three levels of strictness:
- Segmentation: The system achieved an F1 score of 0.62 (Strict) and 0.66 (Lenient) when breaking formulas into identifiers.
- End-to-End Linking: The full task proved challenging, with F1 scores of 0.19 (Strict) and 0.27 (Soft). The performance gap between Strict and Soft metrics suggests that while the system identifies the correct general phrasing, it often struggles to capture the exact character-level span defined by human experts.
Limitations and Future Directions
The current rule-based approach faces difficulties with coordinate constructions (where multiple variables are defined in a single list) and subscript mismatches (where an author might use $x_i$ in a formula but refer only to $x$ in the text).
Future work will focus on using the PDFAlign tool to crowdsource a larger dataset, enabling a transition from rule-based extraction to supervised machine learning models. This shift is expected to improve the system's ability to handle the linguistic nuances and varied conventions of scientific writing.
Summary updated