用分阶段微调让大模型精准识别化学结构图
Fine-tuning DeepSeek-OCR-2 for Molecular Structure Recognition

- 将分子结构识别转为图像条件的SMILES生成任务
- 两阶段微调策略使准确率接近顶尖图像到序列模型
- 适合需要高精度化学结构解析的研究者
光学化学结构识别(OCSR)对于将印刷文献中的二维分子图转换为机器可读格式至关重要。尽管视觉-语言模型在端到端 OCR 任务中表现出潜力,但其直接应用于 OCSR 仍具挑战性,且全参数监督微调常失败。本文通过将任务定义为图像条件下的 SMILES 生成,对 DeepSeek-OCR-2 进行适配。为克服训练不稳定性,提出两阶段渐进式监督微调策略:先使用参数高效的 LoRA,再过渡到分学习率的选择性全参数微调。模型在结合 PubChem 合成图与 USPTO-MOL 真实专利图像的大规模语料上训练。所提出的 MolSeek-OCR 模型表现良好,精确匹配准确率接近当前最优图像到序列模型,但仍逊于最先进的图像到图模型。此外,探索了强化风格后训练和基于数据清理的优化,发现二者均无法提升严格序列级保真度以实现精确的 SMILES 匹配。
原文摘要 · Abstract (English)
Optical Chemical Structure Recognition (OCSR) is critical for converting 2D molecular diagrams from printed literature into machine-readable formats. While Vision-Language Models have shown promise in end-to-end OCR tasks, their direct application to OCSR remains challenging, and direct full-parameter supervised fine-tuning often fails. In this work, we adapt DeepSeek-OCR-2 for molecular optical recognition by formulating the task as image-conditioned SMILES generation. To overcome training instabilities, we propose a two-stage progressive supervised fine-tuning strategy: starting with parameter-efficient LoRA and transitioning to selective full-parameter fine-tuning with split learning rates. We train our model on a large-scale corpus combining synthetic renderings from PubChem and realistic patent images from USPTO-MOL to improve coverage and robustness. Our fine-tuned model, MolSeek-OCR, demonstrates competitive capabilities, achieving exact matching accuracies comparable to the best-performing image-to-sequence model. However, it remains inferior to state-of-the-art image-to-graph modelS. Furthermore, we explore reinforcement-style post-training and data-curation-based refinement, finding that they fail to improve the strict sequence-level fidelity required for exact SMILES matching.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。