Automated InChI Sequence Generation from Chemical Images with Configurable Encoder-Decoder Architecture
DOI:
https://doi.org/10.62051/ijcsit.v7n3.05Keywords:
Optical Chemical Structure Recognition, InChI, Image Captioning, Attention Mechanism, Encoder-Decoder Ar- chitecture, Deep LearningAbstract
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.
Downloads
References
[1] S. Wahler, T. M. Klap tke, and W. G. Proud, “Testing open-source tools for optical chemical structure recognition on novel nitrogen-rich energetic materials,” Journal of Energetic Materials, 2023. [Online]. Available: https://doi.org/10.1080/07370652.2023.2215797
[2] N. M. O’Boyle, “Towards a universal smiles representation - a standard method to generate canonical smiles based on the inchi,” Journal of Cheminformatics, vol. 4, no. 1, p. 22, Sep. 2012. [Online]. Available: https://doi.org/10.1186/1758-2946-4-22
[3] S. Heller, A. McNaught, S. Stein, D. Tchekhovskoi, and I. Pletnev, “Inchi-the worldwide chemical structure identifier standard,” Journal of Cheminformatics, vol. 5, Jan. 2013. [Online]. Available: https://doi.org/10.1186/1758-2946-5-7
[4] A. P. Bento et al., “An open source chemical structure curation pipeline using rdkit,” Journal of Cheminformatics, vol. 12, no. 1, sep. 2020. [Online]. Available: https://doi.org/10.1186/s13321-020-00456-1
[5] D. Jin et al., “Application of transformers to chemical synthesis,” Molecules, vol. 30, no. 3, pp. 493–493, Jan. 2025. [Online]. Available: https://doi.org/10.3390/molecules30030493
[6] I. V. Filippov and M. C. Nicklaus, “Optical structure recognition software to recover chemical information: Osra, an open source solution,” Journal of Chemical Information and Modeling, vol. 49, pp. 740–743, Feb. 2009. [Online]. Available: https://doi.org/10.1021/ ci800067r
[7] J. R. McDaniel and J. R. Balmuth, “Kekule: Ocr-optical chemical (structure) recognition,” Journal of Chemical Information and Computer Sciences, vol. 32, pp. 373–378, Jul. 1992. [Online]. Available: https://doi.org/10.1021/ci00008a018
[8] A. T. Valko and A. P. Johnson, “Clide pro: The latest generation of clide, a tool for optical chemical structure recognition,” Journal of Chemical Information and Modeling, vol. 49, pp. 780–787, Mar. 2009. [Online]. Available: https://doi.org/10.1021/ci800449t
[9] J. Staker, K. Marshall, R. Abel, and C. M. McQuaw, “Molecular structure extraction from documents using deep learning,” Journal of Chemical Information and Modeling, vol. 59, pp. 1017–1029, Feb. 2019. [Online]. Available: https://doi.org/10.1021/acs.jcim.8b00669
[10] K. Rajan, A. Zielesny, and C. Steinbeck, “Decimer 1.0: deep learning for chemical image recognition using transformers,” Journal of Cheminformatics, vol. 13, Aug. 2021. [Online]. Available: https://doi.org/10.1186/s13321-021-00538-8
Downloads
Published
Issue
Section
License
Copyright (c) 2025 International Journal of Computer Science and Information Technology

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.







