RFL: Simplifying Chemical Structure Recognition with Ring-Free Language
Qikai Chang, Mingjun Chen, Changpeng Pi, Pengfei Hu, Zhenrong Zhang, Jiefeng Ma, Jun Du, Baocai Yin, Jinshui Hu
TL;DR
The paper tackles optical chemical structure recognition (OCSR) for two-dimensional molecules with rings and branches by introducing Ring-Free Language (RFL), which decouples a molecule $G$ into a molecular skeleton $\mathcal{S}$, ring structures $\mathcal{R}$, and branch information $\mathcal{F}$, utilizing SuperAtom/SuperBond abstractions. Building on this, the authors propose a universal Molecular Skeleton Decoder (MSD) that hierarchically predicts $\mathcal{S}$ and $\mathcal{R}$ and then restores the full structure using $\mathcal{F}$ via a Skeleton Generation Module and a Branch Classification Module. The approach yields consistent improvements over state-of-the-art baselines on handwritten (EDU-CHEMC) and printed (Mini-CASIA-CSDB) datasets, with good generalization and only modest computational overhead. This ring-aware, divide-and-conquer framework holds promise for broader structured diagram understanding beyond chemistry and provides a pathway for more robust end-to-end OCSR."
Abstract
The primary objective of Optical Chemical Structure Recognition is to identify chemical structure images into corresponding markup sequences. However, the complex two-dimensional structures of molecules, particularly those with rings and multiple branches, present significant challenges for current end-to-end methods to learn one-dimensional markup directly. To overcome this limitation, we propose a novel Ring-Free Language (RFL), which utilizes a divide-and-conquer strategy to describe chemical structures in a hierarchical form. RFL allows complex molecular structures to be decomposed into multiple parts, ensuring both uniqueness and conciseness while enhancing readability. This approach significantly reduces the learning difficulty for recognition models. Leveraging RFL, we propose a universal Molecular Skeleton Decoder (MSD), which comprises a skeleton generation module that progressively predicts the molecular skeleton and individual rings, along with a branch classification module for predicting branch information. Experimental results demonstrate that the proposed RFL and MSD can be applied to various mainstream methods, achieving superior performance compared to state-of-the-art approaches in both printed and handwritten scenarios. The code is available at https://github.com/JingMog/RFL-MSD.
