Abstract
Large-scale chemical reaction datasets are crucial for AI research in chemistry. However, existing chemical reaction data often exist as images within papers, making them not machine-readable and unusable for training machine learning models. In response to this challenge, we propose the RxnCaption framework for the task of chemical Reaction Diagram Parsing (RxnDP). Our framework reformulates the traditional coordinate prediction driven parsing process into an image captioning problem, which Large Vision Language Models (LVLMs) handle naturally. We introduce a strategy termed BBox and Index as Visual Prompt (BIVP), which uses our state-of-the-art molecular detector, MolYOLO, to pre-draw molecular bounding boxes and indices directly onto the input image. This turns the downstream parsing into a natural-language description problem. Extensive experiments show that the BIVP strategy significantly improves structural extraction quality while simplifying model design. We further construct the RxnCaption-15k dataset, an order of magnitude larger than prior real-world literature benchmarks, with a balanced test subset across four layout archetypes. Experiments demonstrate that RxnCaption-VL achieves state-of-the-art performance on multiple metrics.
Introduction
A massive amount of chemical knowledge is currently "trapped" in scientific literature as unstructured images. To enable AI-driven drug discovery or retrosynthesis, this data must be converted into machine-readable formats like SMILES strings. Traditionally, Reaction Diagram Parsing (RxnDP) has been treated as a coordinate-prediction problem, requiring models to predict precise pixel coordinates for molecules and text while identifying their roles. However, Large Vision-Language Models (LVLMs), while powerful, often struggle with precise coordinate prediction. Previous "Bbox and Role in One Step" (BROS) frameworks have consequently suffered from poor generalization to complex, real-world layouts.
Methodology: The RxnCaption Framework
The RxnCaption framework shifts the paradigm from coordinate prediction to natural language captioning, leveraging the inherent strengths of LVLMs in reasoning and description.
The framework consists of several key components:
- MolYOLO Detector: A specialized, high-precision molecular detector based on the YOLOv10 architecture, designed to identify all molecular structures within an image.
- BBox and Index as Visual Prompt (BIVP): Instead of requiring the LVLM to locate molecules, the system pre-annotates the image with bounding boxes and numerical indices (e.g., "Mol 1", "Mol 2").
- Visual Prompt Guided Captioning: The annotated image is processed by RxnCaption-VL (based on Qwen2.5-VL-7B). The model is prompted to describe the reactions by referencing these indices, effectively turning a spatial task into a linguistic one.
Datasets and Benchmarking
The researchers introduced two major datasets to support this work:
- MolDet-33k: Contains over 219,000 molecular bounding boxes for training the MolYOLO detector.
- RxnCaption-15k: The largest real-world reaction parsing dataset to date, featuring 15,000 images from organic chemistry literature. It covers four distinct layout archetypes: Single-line, Multi-line, Tree, and Cyclic.
Key Results and Insights
RxnCaption-VL achieves state-of-the-art performance, significantly outperforming existing models. On the RxnCaption-15k test set, it surpassed Gemini-2.5-Pro by 19.4 percentage points in the HybridMatch F1 score.
A critical insight was the "Synthetic Gap"—models trained solely on synthetic data (like RxnIM) fail to generalize to the noisy, diverse layouts of real journals. By providing visual prompts (BIVP), the task aligns better with the model's pre-trained capabilities. Furthermore, the framework is highly efficient; by avoiding long coordinate strings, inference speed improved to 9.65 seconds per image, compared to 16.88 seconds for coordinate-based methods.
Conclusion and Future Work
RxnCaption demonstrates that reformulating RxnDP as a captioning task with visual prompts is a highly effective strategy. While the model excels at linear reactions, challenges remain for "Tree" and "Cyclic" diagrams which require deeper chemical reasoning. Future work will focus on integrating chemical logic—such as atomic composition—to improve classification accuracy in ambiguous layouts.
Summary updated