Page 233 - Read Online
P. 233
Yuan et al. J. Mater. Inf. 2026, 6, 17 Page 11 of 13
single set of model parameters, achieving a “train-once, adapt-to-many” capability. The replay mechanism
also reinforces the retention of key features learned in earlier stages, ensuring that the model does not forget
previously learned datasets while adapting to new conditions. This approach not only reduces computational
overhead but also streamlines the entire training pipeline. These results emphasize the transferability of the
learned representations and confirm that the model can accurately detect and classify molecules across
heterogeneous environments without significant performance loss.
CONCLUSIONS
In this study, we developed a comprehensive YOLOv9-based program for object detection and instance
segmentation of molecular STM images, specifically addressing the challenges associated with manual
molecular image analysis in surface nanostructures. The program integrates several advanced features,
including data labeling, dataset creation, model training, detection, and analysis, with a strong focus on
supporting incremental learning. The inclusion of a replay mechanism for incremental learning has proven
highly effective in mitigating catastrophic forgetting, allowing the model to retain previously learned
information while adapting to new data. By replaying a small portion of the old dataset, the system reduces
the rate of forgetting while maintaining efficiency. Additionally, Bayesian optimization was employed to
fine-tune hyperparameters, further enhancing model performance. The results demonstrate that our
approach provides a scalable, efficient, and robust solution for the analysis of high-resolution molecular STM
images, enabling researchers to accurately interpret complex surface reactions beyond the limitations of
manual analysis. To support the practical implementation of this workflow, a software framework was
developed, as described in Supplementary Section 5. Overall, the integration of machine learning techniques,
including incremental learning and hyperparameter optimization, offers promising improvements in the
accuracy, consistency, and scalability of molecular image analysis, paving the way for further innovations in
the field of surface chemistry.
DECLARATIONS
Acknowledgments
The authors would like to thank the developers of Bgolearn (https://doi.org/10.48550/arXiv.2601.06820) for
providing the Bayesian global optimization framework used to optimize the hyperparameters during the
SciBERT model training process.
Authors’ contributions
Research conception and study design, data analysis and interpretation, and software framework
development and machine learning model implementation: Yuan, S.; Zhu, Z.
Data acquisition, annotation pipeline development, and result visualization: Lu, J.
Manuscript drafting, critical revision, and review of important intellectual content: Yuan, S.; Cai, L.
Administrative, technical, and material support, project supervision, and funding acquisition: Sun, Q.
Availability of data and materials
The code and trained models supporting the findings of this study are publicly available in a GitHub
repository: https://github.com/yuanke75/yolo_program_for_spm. All datasets generated and analyzed
during this study are included in the repository as processed files and annotation scripts.
AI and AI-assisted tools statement
During the preparation of this manuscript, the AI tool ChatGPT (GPT-4o, released 2024-05-13) was used
solely for language editing. The tool did not influence the study design, data collection, analysis,
interpretation, or the scientific content of the work. All authors take full responsibility for the accuracy,
integrity, and final content of the manuscript.
Financial support and sponsorship
This work was supported by the National Natural Science Foundation of China (No. 22302120).

