Reaction Miner: An Integrated System for Chemical Reaction Extraction from Textual Data

Ming Zhong, Siru Ouyang, Yizhu Jiao, Priyanka Kargupta, Leo Luo, Yanzhen Shen, Bobby Zhou, Xianrui Zhong, Xuan Liu, Hongxiang Li, Jinfeng Xiao, Minhao Jiang, Vivian Hu, Xuan Wang, Heng Ji, Martin D. Burke, Huimin Zhao, Jiawei Han

Abstract

Scientific literature contains vast amounts of chemical knowledge trapped in unstructured PDF formats. REACTION MINER is an end-to-end system designed to automate the extraction of structured reaction data. By integrating specialized PDF-to-text parsing, unsupervised text segmentation (C99), and a fine-tuned LLaMA-7B model, the system captures 19 distinct reaction roles. Our evaluation shows that REACTION MINER significantly outperforms existing state-of-the-art tools and matches the performance of large-scale proprietary models like GPT-4.

Introduction

Extracting reaction conditions—such as temperature, yield, and solvents—is critical for drug discovery and materials science. However, existing Natural Language Processing (NLP) tools face significant hurdles: they often require clean text, lack the context of full paragraphs, focus on too few reaction roles, and produce inconsistent output formats. REACTION MINER addresses these "misalignments" by providing a robust pipeline from raw PDF to structured data.

Methodology

The REACTION MINER system utilizes a four-stage pipeline to bridge the gap between raw literature and structured databases.

The REACTION MINER architecture: a four-step process involving PDF parsing, segmentation, role enrichment, and LLaMA-based extraction.
  1. PDF-to-Text: Uses dynamic similarity calculation and Sentence-BERT embeddings to identify "anchor paragraphs," effectively filtering out headers, footers, and references.
  2. Text Segmentation: Employs C99 topic segmentation to find natural boundaries of reaction descriptions, ensuring the model captures context spread across multiple sentences.
  3. Role Enrichment: Expands the extraction schema from 9 to 19 roles, including speed, inhibitors, and pH, using GPT-4 generated synthetic data for training.
  4. Unified Extraction: A LLaMA-7B model, fine-tuned via Low-Rank Adaptation (LoRA), serves as the core engine for high-precision extraction.

Experimental Setup

The model was trained on a diverse dataset including ~200k instances from the Open Reaction Database (ORD), a manually corrected Reaction Corpus, and 35k synthetic instances for enriched roles. To prevent hallucinations, 25k negative samples (paragraphs without reactions) were included. Evaluation was conducted by chemistry PhD students using a four-tier qualitative scale: Perfect, Minor Issue, Significant Error, and Unacceptable.

Results and Discussion

REACTION MINER demonstrated superior performance across all pipeline stages. In PDF parsing, it achieved an 85.7% "Perfect" rating, far exceeding the 35.7% achieved by the S2ORC baseline. The segmentation module also outperformed GPT-4 and even-split baselines in identifying reaction boundaries.

Comparison of extraction outputs showing Reaction Miner's ability to produce 'Perfect' structured data compared to errors in ReactIE and minor issues in GPT-4.

In head-to-head extraction tests, REACTION MINER provided "Perfect" or "Minor Issue" results in approximately 75% of cases. This performance significantly outpaced the previous state-of-the-art, ReactIE (~40%), and proved more consistent than GPT-4 in handling chemical symbols and units.

Conclusion

REACTION MINER proves that a specialized, relatively small open-source model can rival proprietary giants when supported by intelligent preprocessing and domain-specific fine-tuning. While currently dependent on keyword triggers for segmentation, future iterations aim to handle more complex multi-column layouts and map entire multi-step synthetic pathways.

Summary updated

BibTeX
@inproceedings{zhong2023reaction,
  author = {Ming Zhong and Siru Ouyang and Yizhu Jiao and Priyanka Kargupta and Leo Luo and Yanzhen Shen and Bobby Zhou and Xianrui Zhong and Xuan Liu and Hongxiang Li and Jinfeng Xiao and Minhao Jiang and Vivian Hu and Xuan Wang and Heng Ji and Martin D. Burke and Huimin Zhao and Jiawei Han},
  title = {{Reaction Miner: An Integrated System for Chemical Reaction Extraction from Textual Data}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-demo.36},
}
Figure