Abstract
While Large Language Models (LLMs) have demonstrated proficiency in solving word problems and generating LaTeX equations, their ability to semantically parse mathematical symbols remains under-explored. This paper introduces STEM-PoM, a novel benchmark designed to evaluate "Part-of-Math" (PoM) tagging—the mathematical equivalent of part-of-speech tagging. By classifying symbols into hierarchical categories such as variables, constants, and operators, the study reveals that even state-of-the-art models struggle with contextual polymorphism. However, enhancing a model's "symbol literacy" through fine-tuning significantly improves its performance on downstream mathematical reasoning tasks.
Introduction: The Challenge of Contextual Polymorphism
A significant hurdle in scientific document parsing is contextual polymorphism: the phenomenon where a single mathematical symbol changes its semantic role based on context. For instance, the symbol $y$ might represent a dependent variable in a linear equation ($y = mx + b$) but serve as a fixed target label (a constant) in a machine learning loss function. Existing NLP techniques often treat these symbols as static entities, leading to reasoning errors. To address this, the authors propose PoM tagging, requiring models to distinguish if a symbol is a scalar, a vector, or a discipline-specific constant (e.g., Planck’s constant).
Methodology and Taxonomy
The researchers developed a hierarchical classification system to categorize mathematical symbols within their original document contexts. This taxonomy consists of two levels:
- First-level attributes: Variable, Constant, Operator, and Unit Descriptor.
- Second-level attributes: Nuanced sub-categories such as Scalar/Vector/Matrix for variables, and Local/Global/Discipline-specific for constants and operators.
To evaluate model performance, the study utilized two approaches: In-Context Learning (ICL) with varying context windows (one sentence, ten sentences, or the full manuscript) and fine-tuning using Low-Rank Adaptation (LoRA).
The STEM-PoM Dataset
The primary contribution is the STEM-PoM dataset, which contains 2,109 meticulously annotated symbol instances extracted from 453 math-rich ArXiv papers. The dataset spans diverse scientific fields, including Physics, Chemistry, Economics, and Computer Science. To facilitate the creation of this dataset, the authors released the STEM-PoM Labeler, a toolkit designed for expert annotation of symbols in situ.
Results and Discussion
The evaluation of models ranging from LSTMs to GPT-4o revealed several key insights regarding the current state of mathematical symbol reasoning.
The Context Gap
Performance across all models improved significantly as the context length increased. Smaller models, such as Llama2-13B, showed a particularly high reliance on extended context to compensate for limited pre-trained domain knowledge.
Model Performance and Failure Modes
GPT-4o emerged as the top performer, achieving an overall accuracy of 68.5% when provided with the full manuscript context. However, even the most advanced models struggled with nuanced second-level attributes like "Matrix" or "Discipline-Specific" operators.
Common failure modes included ambiguity in context (where symbols like $\alpha$ or $\beta$ change meaning within a single paper) and domain-specific knowledge gaps. The study also noted that "Constants" are generally easier for models to identify than "Variables" or "Operators."
Symbol Literacy and Reasoning
A critical finding of the study is that "symbol literacy"—the ability to correctly identify a symbol's role—is a prerequisite for mathematical reasoning. Fine-tuning models on the STEM-PoM task directly translated to improved scores on general math benchmarks like GSM8K and MATH. For example, Llama2-13B saw a 2.1% average boost across all math tasks after specialized training.
Conclusion
The STEM-PoM benchmark highlights a significant gap between current LLM capabilities and human-level understanding of mathematical notation. While long-context windows and fine-tuning offer paths toward improvement, handling complex attributes and domain-specific nuances remains a challenge. Future research will focus on developing more sophisticated encoding methods and expanding the dataset to cover more niche scientific disciplines.
Summary updated