Table of Contents
Fetching ...

AdaParse: An Adaptive Parallel PDF Parsing and Resource Scaling Engine

Carlo Siebenschuh, Kyle Hippe, Ozan Gokdemir, Alexander Brace, Arham Khan, Khalid Hossain, Yadu Babuji, Nicholas Chia, Venkatram Vishwanath, Rick Stevens, Arvind Ramanathan, Ian Foster, Robert Underwood

TL;DR

AdaParse tackles the bottleneck of parsing scientific PDFs by adaptively assigning the most suitable parser to each document, balancing accuracy and compute cost. It combines fast text extraction, a hierarchical prediction pipeline, and direct preference optimization (DPO) to align parser choices with human judgments, all orchestrated on leadership-class HPC systems. The approach achieves up to 17x throughput improvements with comparable or slightly higher accuracy and demonstrates robust performance under various data degradations and OCR conditions. This work enables scalable, high-quality PDF parsing necessary for building large-scale, science-focused text corpora for advanced AI systems.

Abstract

Language models for scientific tasks are trained on text from scientific publications, most distributed as PDFs that require parsing. PDF parsing approaches range from inexpensive heuristics (for simple documents) to computationally intensive ML-driven systems (for complex or degraded ones). The choice of the "best" parser for a particular document depends on its computational cost and the accuracy of its output. To address these issues, we introduce an Adaptive Parallel PDF Parsing and Resource Scaling Engine (AdaParse), a data-driven strategy for assigning an appropriate parser to each document. We enlist scientists to select preferred parser outputs and incorporate this information through direct preference optimization (DPO) into AdaParse, thereby aligning its selection process with human judgment. AdaParse then incorporates hardware requirements and predicted accuracy of each parser to orchestrate computational resources efficiently for large-scale parsing campaigns. We demonstrate that AdaParse, when compared to state-of-the-art parsers, improves throughput by $17\times$ while still achieving comparable accuracy (0.2 percent better) on a benchmark set of 1000 scientific documents. AdaParse's combination of high accuracy and parallel scalability makes it feasible to parse large-scale scientific document corpora to support the development of high-quality, trillion-token-scale text datasets. The implementation is available at https://github.com/7shoe/AdaParse/

AdaParse: An Adaptive Parallel PDF Parsing and Resource Scaling Engine

TL;DR

AdaParse tackles the bottleneck of parsing scientific PDFs by adaptively assigning the most suitable parser to each document, balancing accuracy and compute cost. It combines fast text extraction, a hierarchical prediction pipeline, and direct preference optimization (DPO) to align parser choices with human judgments, all orchestrated on leadership-class HPC systems. The approach achieves up to 17x throughput improvements with comparable or slightly higher accuracy and demonstrates robust performance under various data degradations and OCR conditions. This work enables scalable, high-quality PDF parsing necessary for building large-scale, science-focused text corpora for advanced AI systems.

Abstract

Language models for scientific tasks are trained on text from scientific publications, most distributed as PDFs that require parsing. PDF parsing approaches range from inexpensive heuristics (for simple documents) to computationally intensive ML-driven systems (for complex or degraded ones). The choice of the "best" parser for a particular document depends on its computational cost and the accuracy of its output. To address these issues, we introduce an Adaptive Parallel PDF Parsing and Resource Scaling Engine (AdaParse), a data-driven strategy for assigning an appropriate parser to each document. We enlist scientists to select preferred parser outputs and incorporate this information through direct preference optimization (DPO) into AdaParse, thereby aligning its selection process with human judgment. AdaParse then incorporates hardware requirements and predicted accuracy of each parser to orchestrate computational resources efficiently for large-scale parsing campaigns. We demonstrate that AdaParse, when compared to state-of-the-art parsers, improves throughput by while still achieving comparable accuracy (0.2 percent better) on a benchmark set of 1000 scientific documents. AdaParse's combination of high accuracy and parallel scalability makes it feasible to parse large-scale scientific document corpora to support the development of high-quality, trillion-token-scale text datasets. The implementation is available at https://github.com/7shoe/AdaParse/
Paper Structure (31 sections, 8 equations, 5 figures, 4 tables)

This paper contains 31 sections, 8 equations, 5 figures, 4 tables.

Figures (5)

  • Figure 1: Failure modes of PDF parsers, (a) whitespace injection, (b) word substitution, (c) character scrambling, (d) character substitution, (e) corrupted SMILES, (f) LaTeX to plaintext conversion, (g) document page dropped.
  • Figure 2: System architecture diagram for a range of predictive models: After an initial text extraction step (PyMuPDF), PDFs are routed through a hierarchical classification pipeline. CLS I predicts the binary quality attribute of the extracted text through coarse but fast-to-compute features (e.g., text length). For valid texts, CLS II assesses if an improvement is likely for any other parser. If affirmative, CLS III selects the parser most likely to improve output text quality.
  • Figure 3: Parser performance (BLEU) for $n$ = 23,398 PDFs. They are sorted by parsing difficulty which is estimated for each document by the average BLEU score across parsers. The higher the rank, the greater the estimated parsing difficulty. Throughputs for a single node using each parser are presented in the legend.
  • Figure 4: Utilization of the workload per GPU, as measured with the NVIDIA Nsight Systems profiler (Nsys).
  • Figure 5: Scalability of the seven parsers.