Most molecular diagram parsers recover chemical structure from raster images (e.g., PNGs). However, many PDFs include commands giving explicit locations and shapes for characters, lines, and polygons. We present a new parser that uses these born-digital PDF primitives as input. The parsing model is fast and accurate, and does not require GPUs, Optical Character Recognition (OCR), or vectorization. We use the parser to annotate raster images and then train a new multi-task neural network for recognizing molecules in raster images. We evaluate our parsers using SMILES and standard benchmarks, along with a novel evaluation protocol comparing molecular graphs directly that supports automatic error compilation and reveals errors missed by SMILES-based evaluation. On the synthetic USPTO benchmark, our born-digital parser obtains a recognition rate of 98.4% (1% higher than previous models) and our relatively simple neural parser for raster images obtains a rate of 85% using less training data than existing neural approaches (thousands vs. millions of molecules).
翻译:大多数分子结构图解析器从光栅图像(如PNG格式)中恢复化学结构。然而,许多PDF文档包含明确指定字符、线条和多边形位置与形状的绘制指令。本文提出一种新型解析器,直接以这些原生数字PDF图元作为输入。该解析模型兼具快速性与准确性,且无需依赖GPU、光学字符识别(OCR)或矢量化处理流程。我们利用该解析器对光栅图像进行标注,进而训练出新型多任务神经网络,专门用于识别光栅图像中的分子结构。我们通过SMILES表示法与标准基准测试对解析器进行评估,同时引入创新的分子图直接比对评估方案——该方案支持自动错误归集,并能发现基于SMILES的评估所遗漏的错误。在合成USPTO基准测试中,我们的原生数字解析器获得98.4%的识别率(较先前模型提升1%),而针对光栅图像的相对简洁的神经解析器仅使用数千个分子训练数据(现有神经方法需数百万数据量)即达到85%的识别率。