Automated InChI Sequence Generation from Chemical Images with Configurable Encoder-Decoder Architecture - Liu, Suxuan (International Journal of Computer Science and Information Technology, 2025)
In the chemical and pharmaceutical domains, researchers frequently rely on structural diagrams found in patents, scientific literature, and archival documents. Converting these diagrams into standardized text representations, such as the International Chemical Identifier (InChI), is traditionally a labor-intensive manual process. To address this challenge, we introduce an optical chemical structure recognition (OCSR) system based on an encoder–decoder framework that translates molecular images into InChI strings efficiently and accurately. The workflow begins with image preprocessing, where each structural diagram is resized and transformed into normalized tensors. The encoder then extracts salient visual features through backbone networks, including ResNet, EfficientNet, and Vision Transformers, generating high-dimensional feature maps that capture both spatial and semantic information. These are passed to the decoder, implemented with GRU, LSTM, or Transformer architectures, which sequentially outputs InChI tokens. To enhance performance, the framework integrates a soft attention mechanism that directs focus toward relevant image regions during decoding, and employs a gradually reduced teacher forcing strategy to improve robustness during training. We evaluate multiple architectural pairings on a large-scale dataset, benchmarking model outputs against ground-truth InChI strings using exact match accuracy, Levenshtein distance, BLEU, and METEOR metrics. Results reveal clear performance variations across encoder–decoder configurations, with EfficientNet-B0 combined with an LSTM decoder achieving accuracy up to 84.0% on a 20K dataset, striking an effective balance between computational efficiency and predictive precision. These findings provide critical insights into designing OCSR systems tailored for varying levels of chemical complexity and resource availability, thereby advancing automated molecular translation for diverse applications in research and industry.