对PDF中数学公式提取的文档解析器进行基准测试
Benchmarking Document Parsers on Mathematical Formula Extraction from PDFs
AI总结:
本文提出了一种新的PDF数学公式提取基准测试框架,通过合成数据和LLM评估方法,评估了多种解析器的性能差异,揭示了选择合适解析器的关键因素。
摘要:
正确解析PDF中的数学公式对于训练大型语言模型和从学术文献构建科学知识库至关重要,但现有的基准测试要么完全排除公式,要么缺乏语义感知的评估指标。我们引入了一个新的基准测试框架,该框架基于合成生成的PDFs,具有精确的LaTeX地面真实值,使布局、公式和内容特征能够系统地进行控制。关键的方法学贡献是开创了LLM作为评判者来评估语义公式,结合了一个稳健的两阶段匹配流程,以处理解析器输出的一致性问题。通过在250对公式上的人类验证(来自30名评估者的750次评分),我们证明LLM基于的评估在与人类判断的相关性上(Pearson r=0.78)比CDM(r=0.34)和文本相似性(r~0)要高得多。评估20多种当代PDF解析器(包括专门的OCR模型、视觉-语言模型和基于规则的方法)在100个合成文档中的2000多个公式上,揭示了显著的性能差异。我们的发现为选择解析器用于下游应用的实践者提供了关键见解,并建立了一个稳健、可扩展的方法论,使PDF公式提取质量的可重复评估成为可能。代码和基准数据:https://github.com/phorn1/pdf-parse-bench
英文摘要:
Correctly parsing mathematical formulas from PDFs is critical for training large language models and building scientific knowledge bases from academic literature, yet existing benchmarks either exclude formulas entirely or lack semantically-aware evaluation metrics. We introduce a benchmarking framework centered on synthetically generated PDFs with precise LaTeX ground truth, enabling systematic control over layout, formulas, and content characteristics. For evaluation, we apply LLM-as-a-judge to assess semantic equivalence of parsed formulas, capturing mathematical meaning beyond surface-level notation differences. We validate this approach through a human study (250 formula pairs, 750 ratings from 30 evaluators), showing a Pearson correlation of r=0.78 with human judgment, compared to r=0.34 for character-level matching (CDM) and r~0 for text similarity. Our robust two-stage matching pipeline combining LLM-based extraction with fuzzy validation reliably aligns parsed formulas with ground truth despite format inconsistencies across parsers. Evaluating 20+ contemporary PDF parsers across 100 synthetic documents with 2,000+ formulas reveals significant performance disparities, providing actionable guidance for practitioners selecting parsers for downstream applications. Code and benchmark data: https://github.com/phorn1/pdf-parse-bench and https://github.com/phorn1/formula-metric-study
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。