Synthetic data-driven deep learning for label-free autonomous atomic force microscopy

Domain: chemistry
Published: 2026-03-10
Editorial outcome: major_revision

Abstract
Atomic force microscopy (AFM) is a widely used tool for nanoscale characterization across
materials science, energy research, and biology. However, its adoption in high-throughput materials
discovery and statistically driven studies remains limited by a strong dependence on expert operator input
and by the scarcity of annotated experimental AFM datasets needed to enable data-driven automation.
Here, we introduce SimuScan, a synthetic-data–driven framework that enables reliable AFM feature
identification, segmentation, and targeted imaging without requiring large manually labeled experimental
datasets. SimuScan generates tunable, high-fidelity synthetic AFM images of defined morphologies while
incorporating realistic experimental artifacts, including tip–sample convolution, noise, flattening
distortions, and surface debris. These datasets are shown to support scalable, label-free training of modern
deep learning models for AFM analysis. When integrated into data-driven AFM workflows, SimuScan-
trained models can locate and analyze nanoscale structures across large datasets and guide targeted
follow-up imaging. We validate this approach on nanostructured surfaces, DNA assemblies, and bacterial
cells, demonstrating robust generalization across diverse sample types with minimal operator intervention.
More broadly, this work establishes a general strategy for generating explicitly conditioned, task-relevant
synthetic data to improve the reliability of downstream models in autonomous microscopy.

Introduction
Atomic force microscopy (AFM)1 provides topographical and functional information with
nanometer resolution² and has become an indispensable tool across materials science,2 energy research,3
and molecular and cellular biology.4-8 However, wider adoption of AFM remains limited by a strong
dependence on expert operator input, slow imaging speeds, and restricted fields of view.9,10 These
constraints severely limit AFM throughput, making large-area exploratory surveys impractical, especially
for rare or heterogeneous features, and preventing the collection of statistically meaningful datasets
required for high-throughput, discovery-oriented AFM studies. In contrast, optical and electron
microscopies can generate large-area surveys in a single acquisition, highlighting AFM’s challenges in
scalable discovery and quantification. Compounding these issues, image interpretation and quantitative
analysis are often time consuming and typically performed offlEine, further delaying experimental insight.
Recent advances in machine learning (ML) and artificial intelligence (AI) offer a promising route
toward more automated AFM workflows, with the potential to accelerate analysis, automate feature
recognition, and enable data-driven decision-making during experiments, key to boost scientific
discovery.11 Parallel progress in AFM hardware automation—including motorized stages, programmable
interfaces, and automated routines for tipL approach and feedback control12-19—has laid the groundwork
for integrating AI into AFM operation. Early studies have demonstrated the use of ML for scan
optimization,20 parameter tuningT,21-24 and data interpretation, 25-27 while more recent efforts have begun
to address higher-level tasks such as autonomous site selection28-30 and adaptive probing.31 Collectively,
these developments point toward a shift from operator-driven AFM workflows to more adaptive and
autonomous experimentation.
Despite this progress, broader deployment of AI-driven AFM remains hindered by a fundamental
bottleneck: the scarcity of high-quality, labeled AFM datasets suitable for supervised learning. Unlike
optical imaging, where large public datasets (e.g. Imagenet32) underpin modern foundation models and
transfer-learning approaches, AFM data are comparatively sparse, highly heterogeneous, and strongly
shaped by convolution artifacts, noise, drift, and imaging conditions. As a result, existing pretrained
foundation models such as Meta’s Segment Anything Model (SAM)33 transfer poorly to AFM data,
requiring task-specific retraining with expert-labeled AFM images, which is time intensive,34 and limits
dataset scale and diversity. This bottleneck has slowed the application of deep learning to core AFM tasks
such as segmentation, classification, and adaptive site selection.
Although synthetic AFM data have not been widely used for training machine-learning models,
they have long supported AFM research by enabling controlled studies of systematic errors, algorithm
benchmarking, and data interpretation.35 Prior work has used simulated AFM images to investigate tip–
sample convolution effects,36 fractal surfaces,37 nanoparticle size distributions,38 and to benchmark
denoising39 and double-tip correction algorithms.40 Specialized tools41 have also generated simulated
AFM images of biomolecular structures to support structure interpretation and model-based
reconstruction.42,43 At the atomic scale, synthetic AFM data have also enabled deep learning approaches
for automated structure discovery44 and molecular identification. 45 However, most existing synthetic
AFM datasets remain tailored to specific samples, tip models, or imaging conditions and are not designed
to generate large, diverse, and fully labeled datasets suitable for training general-purpose deep learning
models for AI-driven AFM purposes.
To address this gap, we introduce SimuScan, a synthetic-data–driven framework for AFM that
enables segmentation, feature identification, and targeted imEaging without requiring large manually
labeled experimental datasets. SimuScan generates realistic AFM images by combining flexible geometry
definitions, including CAD-defined and example-based geometries derived from existing AFM data, with
physics-informed modeling of essential AFM-specific artifacts such as object distortions, surface
contamination, tip convolution, feedback artif acts, instrumental noise, and flattening distortions. Each
synthetic image is produced together wiLth its corresponding ground-truth mask, enabling fully labeled
training data without expert manual annotation.
We demonstrate the appliTcability of SimuScan across a diverse range of nanostructured surfaces,
DNA assemblies, and bacterial cells, showing that models trained exclusively on synthetic data generalize
effectively to experimental AFM images. Across multiple deep learning segmentation architectures,
SimuScan enables reliable feature recognition and prioritization without additional manual labeling,
establishing a workflow in which objects of interest are automatically identified based solely on their
morphological characteristics. Finally, when integrated with automated tip engagement and stage
navigation, SimuScan supports semi-autonomous AFM operation that spans large-area exploratory
surveys and targeted high-resolution imaging. More broadly, this work shows how domain-specific
synthetic datasets can remove key bottlenecks in machine-learning–enabled experimentation, establishing
a scalable path toward intelligent, high-throughput AFM that extends advanced nanoscale characterization
beyond expert operators.

Results
2.1. SimuScan: a generator for labeled realistic synthetic AFM datasets
To overcome the scarcity of training data for AFM segmentation models, SimuScan generates
labeled synthetic datasets from arbitrary nanoscale morphologies coupled with realistic imaging artifacts,
including tip convolution, flattening distortions, and noise, to reproduce experimental AFM conditions
(Figure 1). These images are automatically converted into COCO (Common Objects in Context)-
formatted datasets with corresponding masks, making them directly compatible with modern deep
learning pipelines. Within the SimuScan workflow, a range of segmentation architectures, including
semantic, object detection, and instance segmentation models, can be trained and integrated into
automated AFM operation, enabling real-time feature recognition, analysis, and feedback. In the sections
that follow, we describe the synthetic AFM data generation framework, demonstrate the realism of the
generated data, evaluate models trained exclusively on SimuScan datasets, and conclude by showcasing
its integration into a semi-autonomous AFM imaging workflowE.
Figure 2 illustrates the SimuScan data generation pipeline, which consists of three main stages:
morphology definition, substrate integration, and AFM-specific forward modeling. The process begins
with morphology definition, where object shapes are specified using one of three geometry definition
modes. SimuScan supports multiple comple mentary pathways (Figure. 2a) for generating basic
sample/object shapes including:
(i) Parameterized model.
(ii) CAD Geometry.
(iii) Experimental (self-Seeding) model.
Together these enable synthetic AFM data generation across a wide range of nanoscale systems
with increasing complexity. In Parameterized model, simple shapes can be defined using parameterized,
two-dimensional mask projections composed of straight segments and spline curves controlled by
reference points. In CAD Geometry and Experimental Geometry, object morphology is provided as a
three-dimensional STL (stereolithography) mesh, either imported directly from an externally designed
CAD model or derived from an experimentally acquired AFM image by converting measured surface
topography into STL format. In the latter case, representative experimental features serve as self-seeds,
enabling AFM-to-AFM transfer learning through synthetic dataset generation.
Across all geometry definition modes (See Figure S1 for more details), SimuScan introduces
controlled shape variability through stochastic perturbations and spatially correlated deformation fields,
including sinusoidal and Gaussian vector fields that impose bending, warping, or curvature with
adjustable amplitude. In addition, a range of surface textures and complex features are incorporated to
emulate realistic nanoscale heterogeneity commonly observed in experimental AFM images (See Figure
S2). These transformations preserve the underlying morphological identity while introducing realistic
variability representative of experimentally acquired AFM datasets.
In the next stage, the synthetic objects are combined with a simulated substrate to form the ground-
truth surface geometry (Figure 2b). The substrate can include features such as steps, periodic patterns
(e.g., pillars, holes, or gratings), surface roughness, contamination, and random debris, all defined through
fully controllable parameters. This enables systematic variation of geometry, periodicity, height, spacing,
and contamination density (see Figure S3), emulating substrate features and surface imperfections
commonly encountered in experimental AFM measurements. At this point in the workflow, the combined
object–substrate system represents an idealized surface morphology prior to AFM-specific distortions.
Finally, AFM imaging artifacts are introduced through a sequence of forward-modeling layers to
approximate realistic AFM measurements (Figure 2c; see SeEction S4 in the Supporting Information).
These include tip–sample convolution to model resolution loss due to finite probe geometry, with explicit
control over tip radius and cone angle, as well as the ability to simulate single- or double-tip configurations
to capture common probe-related artifacts (see Figure S5). Feedback-related effects are added to account
for controller-induced distortions such as lin e drift, discontinuities, and adhesion-related artifacts,
followed by electronic noise representLative of scanner and signal-path fluctuations. Finally, post-
processing effects, including line-flattening errors, are applied to replicate distortions commonly observed
in experimental AFM datasets. ATlthough flattening is not an intrinsic part of AFM data acquisition, it is
routinely applied to correct drift, scanner tilt, and contrast variations and can introduce secondary artifacts
such as residual line features or local distortions. SimuScan has the ability to incorporate flattening-
induced artifacts to improve dataset realism and enhance model robustness to post-processing effects
encountered in practice. Like all the parameters described, users retain control over whether flattening is
applied and over the type and magnitude of the correction; in this workflow, flattening is applied prior to
object detection to reflect common automated AFM practice. Because both object morphology and
imaging artifacts are explicitly defined within the forward model, SimuScan produces synthetic AFM
images with exact ground-truth annotations.
Figures 2d,e shows an example of synthetic AFM image (Figure 2d) and their corresponding
labeled map (Figure 2e) for a nanostructured surface, where geometric shaped objects of different height
and size are randomly placed and oriented, and realistic artifacts such as noise and line-flattening errors
are incorporated. Figure 3 provides additional examples of synthetic datasets, including regular geometric
shapes (Figure 3a) and complex biological morphologies such as bacterial cells (Figure 3b), highlighting
the flexibility of the framework to capture both ordered and irregular nanoscale structures. Extending this
versatility to microbial systems, SimuScan can also simulate bacterial colonies by first inserting an
individual bacterium at a random position and then iteratively adding neighboring cells with controlled
overlap. During this process, parameters such as height, eccentricity, orientation, and surface texture are
varied, resulting in colony-like assemblies where each bacterium is unique yet collectively organized into
realistic clusters that closely resemble experimental observations. The resulting datasets support pre-
training and fine-tuning of deep neural networks for segmentation and classification tasks, circumventing
the need for large labeled experimental datasets.
While SimuScan captures a broad range of AFM-specific artifacts relevant for realistic synthetic
data generation, this first implementation makes deliberate scope choices leaving clear avenues for future
extension. At present, the framework focuses on the topographic channel, which is broadly applicable
across common AFM modes (e.g., dynamic, static, PeakForce TEapping, and wave-based operation), while
additional contrast channels such as phase, amplitude, or spectroscopic signals are not explicitly modeled.
Long-timescale thermal and mechanical drift is also not simulated, reflecting the prevalence of closed-
loop AFM systems and standard post-processing procedures that mitigate these effects in many
experiments. In addition, while SimuScan incl udes artifacts such as double-tip artifacts, it but does not
yet capture intermittent or time-dependenLt probe contamination. Extending the framework to incorporate
additional signal channels, drift dynamics, and evolving probe conditions represents a natural and modular
path forward, and would furtherT expand the realism, versatility, and applicability of SimuScan across a
wider range of AFM modalities and experimental conditions.

2.2. Performance of Models Trained Exclusively on SimuScan Data
To assess whether SimuScan-generated data can support effective model training without
additional manual labeling, we evaluated three widely used segmentation frameworks: YOLOv8, U-Net,
and Mask R-CNN. All models were trained on more than 5,000 synthetic images, with representative
outputs shown in Supplementary Figure S6. The frameworks were evaluated on experimental AFM
images containing fabricated geometric nanostructures (Rectangles, Hexagons, Circles) and microbial
morphologies, including rod-shaped Pseudomonas aeruginosa PAO1 and spherical Staphylococcus
aureus NCTC 8325 cells.
Performance was assessed using average precision at 0.5 IoU (AP@0.5) for object-level detection
and intersection-over-union (IoU) for pixel-wise segmentation fidelity (Table 1). In addition, global
object-level precision, recall, and F1-score were computed by aggregating true positives, false positives,
and false negatives across all annotated experimental images, providing an intuitive measure of detection
reliability and miss rate on real AFM data. YOLOv8 (≈11M parameters, <10 ms inference) was evaluated
using AP@0.5, U-Net (≈7M parameters, ~20 ms) using IoU, and Mask R-CNN (>40M parameters, ~100
ms) using both AP@0.5 and IoU to enable object- and pixel-level benchmarking. Together, these metrics
capture detection accuracy, segmentation quality, and sim-to-real transfer performance.
Model performance was evaluated using an independently prepared ground-truth dataset
consisting exclusively of manually annotated experimental AFM images; no SimuScan-generated images
were included in the evaluation set. Although only 25 images per sample type were annotated, each AFM
image contained many repeated instances, yielding 756 geometric objects and 1,124 bacterial instances.
Standard data augmentation was applied to introduce controlled variability in orientation, scale, and
contrast while preserving morphology, providing a statistically meaningful benchmark for evaluating
segmentation performance.
We intentionally did not pursue extensive training or fine-tuning on large numbers of manually
annotated experimental AFM images, as the objective of this study was not to maximize task-specific
performance through annotation-intensive workflows. In prior AFM segmentation studies using YOLO-
or U-Net–based architectures, performance is of ten improved by training on hundreds of manually labeled
experimental images—a process that typLically requires days to weeks of expert effort due to careful
feature delineation, instance separation, and artifact rejection. In contrast, the central aim of this work is
to evaluate whether SimuScan-geTnerated synthetic data can substantially reduce or eliminate this manual
labeling burden while still enabling effective model training. In support of this, qualitative inspection of
predictions from the manually trained model further confirmed that the level of performance achieved
was sufficient for the objectives of the present study, namely assessing the Simuscan data generalization
rather than maximizing any task-specific accuracy.
YOLOv8 achieved the highest object-level detection performance, with AP@0.5 values exceeding
0.96 for all geometric shapes and remaining strong for bacilli (0.82) and cocci (0.91). U-Net demonstrated
the strongest pixel-level segmentation accuracy, with IoU values approaching 0.90 for nanostructure
features and remaining robust across bacterial morphologies (0.80 for Bacilli, 0.71 for Cocci). Mask R-
CNN performed competitively for circular and hexagonal features but showed but reduced performance
for rectangles and microbial classes. reflecting the increased complexity and conservativeness of its
instance-segmentation framework.
These trends are further reflected in the global object-level metrics, where YOLOv8 exhibits the
highest recall across both nanostructures (0.98) and bacteria (0.93), indicating a very low rate missed
object rate. U-Net displays a balanced precision–recall performance, while Mask R-CNN achieves higher
precision at the expense of recall, consistent with its emphasis on high-confidence instance delineation.
Together, these results highlight the complementary strengths of the evaluated models: YOLOv8 is well
suited for rapid, object-level detection; U-Net is preferred for accurate boundary segmentation; and Mask
R-CNN is advantageous when instance-level masks are required despite higher computational cost.
Importantly, the consistently high global F1-scores across both nanostructured and datasets provide
quantitative evidence of robust sim-to-real generalization, demonstrating that models trained exclusively
on SimuScan-generated data transfer effectively to experimentally acquired AFM images (example
outputs are shown in subsequent sections and in Supplementary Information).
To demonstrate the broad applicability of SimuScan, we evaluated the framework across
representative case studies spanning simple biological systems to complex engineered nanostructures. As
an initial benchmark, a YOLOv8 model trained exclusively on parameterized SimuScan geometries was
used to distinguish linear and circular DNA in pre-collected AFM images (Fig. S7). Despite having no
exposure to experimental AFM data during training, the model reliably detected DNA molecules and
correctly classified their topology without manual annotation or task-specific experimental fine-tuning.
This result indicates that SimuScan captur es the key morphological features governing DNA
conformation, including contour continuitLy, curvature, and loop closure.46 Increasing the task complexity,
we applied the same parameterized workflow to bacterial cells deposited on a structured substrate
patterned with circular nanopillaTrs (Fig. S8). Because SimuScan can be tuned to explicitly incorporate
substrate topography during synthetic data generation, models trained on these datasets robustly detected
biological cells even on non-planar, topographically heterogeneous surfaces, demonstrating
generalization beyond idealized flat geometries.
Beyond parameterized shapes, SimuScan supports two complementary non-parameterized
geometry workflows: externally defined CAD geometries and self-seeded experimental geometries. In
both cases, object morphology is provided as a CAD/STL representation, enabling large, fully labeled
synthetic datasets to be generated without requiring analytical shape models.
In the first case, geometry is defined externally using CAD-designed objects. We demonstrate this
capability using complex engineered nanoarchitectures in the form of leaf-like structures generated
directly from STL files used in their original design (Fig. S9). These geometries can be incorporated into
SimuScan without modification, enabling realistic synthetic AFM datasets for nanofabricated structures
that are difficult to capture using parameterized models. Notably, the leaf-like nanoarchitectures were
intentionally designed to exhibit subtle but systematic variations and incomplete geometries that are
visually similar, providing a stringent test in which SimuScan-trained models successfully distinguished
between closely related structural variants.
In the second case, geometry is derived directly from experimental AFM data using a self-seeded
workflow. Representative structures are extracted from experimentally acquired AFM images and
converted into CAD/STL geometries, which preserve the true experimental morphology and serve as
reference shapes for synthetic data generation. We demonstrate this approach using triangular DNA
origami structures. Starting from cropped features extracted from an experimental AFM image (Fig. 4a),
representative shapes were converted into STL files and used to generate realistic synthetic training
datasets. Models trained on these datasets generalized successfully to experimental AFM images, enabling
both object detection and instance segmentation with strong agreement to manual annotations (Fig. 4b).
Across all evaluated sample types, including parameEterized models, externally defined CAD
geometries, and self-seeded experimental geometries, SimuScan-trained models exhibit consistently
strong detection and segmentation performance, following the quantitative trends reported in Table 1. As
expected for any cross-domain segmentation task, failure modes arise when experimental conditions fall
outside the distribution represented in the sy nthetic training data, including severe tip wear, drift,
corrupted scans, unanticipated feature geoLmetries, or large mismatches in object density, all of which can
lead to false detections or missed objects (Figure S10a,b). Performance is also sensitive to surface
coverage, with extremely sparse oTr highly crowded scenes producing missed detections or object merging,
as shown for triangular DNA origami in Figure S10c,d. Importantly, these effects are not fundamental
limitations but reflect mismatches between the experimental regime and the synthetic training distribution.
While these refinements are not the focus of the present work, which instead emphasizes the generality
and scalability of SimuScan as a rapid, domain-specific starting point for AFM segmentation, SimuScan
is explicitly designed to assist in tuning of the synthetic data generator and model configuration to adapt
performance for high-precision or specialized AFM workflows, as illustrated in Figure S10.

2.3. Semi-Autonomous AFM Workflow
Building on this foundation, we integrated SimuScan into a real-time semi-autonomous AFM
workflow in which models trained on synthetic data guide feature identification and adaptive scanning
during experiments. As shown in Figure 5a and Supplementary Movies 1 and 2, the workflow begins with
a low-resolution (LR) overview scan, followed by real-time segmentation to detect and classify individual
features. A YOLOv8 model trained exclusively on synthetic AFM data achieved >90% classification
accuracy on overview scans (128 × 128 pixels, ~195 nm per pixel), with resolution-dependent
performance quantified in Supplementary Figures S11 and S12.
Detected candidate regions then trigger automated high-resolution (HR) zoom-in scans to verify
object presence and morphology. After all targets in the current field of view are evaluated, the system
repositions the probe and repeats the cycle of scanning, detection, and validation. Stage automation
extends this process beyond the intrinsic ~100 µm AFM scan range,{Millan-Solsona, 2025 #44} enabling
tiling across large sample areas and revisiting of features identified by segmentation. User-defined criteria,
such as the number of detected objects, surveyed area, confidence score or statistical measures of spatial
or morphological variability, are used to determine when further imaging, refinement, or repositioning is
required, allowing the experiment to adapt dynamically to the evolving dataset.
This closed-loop workflow enables precise feature identEification over large surfaces with minimal
human intervention. The approach was validated on both biological and engineered samples, including
bacterial cells (Figure 5b) and nanostructured surfaces (Figure 5c), demonstrating robust performance
across diverse systems. By directing high-resolution imaging only to regions containing relevant objects,
acquisition time is reduced, and AFM resour ces are concentrated where they are most informative.
Although SimuScan does not currently auLtomate sample preparation, laser alignment, or initial feedback
tuning, it automates feature search, prioritization, and adaptive scan placement. Depending on the task,
automated feature finding and eTxploration can account for more than 80% of total measurement time,
enabling scalable, feedback-driven AFM experimentation with minimal operator input.

2.4. Autonomous AFM of Bacterial Populations
Having validated SimuScan-trained models across diverse systems and within semi-autonomous
workflows, we next applied the approach to large-area AFM imaging of bacterial populations. We focused
first on Pseudomonas aeruginosa PAO1, a rod-shaped Gram-negative bacterium whose well-defined
morphology makes it well suited for AFM-based detection and quantitative analysis. Chemically fixed
cells were imaged in air and included examples at different stages of the cell cycle, enabling visualization
of structural variations associated with elongation, septum formation, and cytokinesis.
In Figure 6, the semi-autonomous AFM pipeline was used to detect and image P. aeruginosa cells
at subcellular resolution, demonstrating robustness to heterogeneous, soft, and irregular biological
features (see Supplementary Figure S13 for detailed single-cell analysis). Using a YOLO-based model
trained exclusively on SimuScan data, the system autonomously located, scanned, and segmented 100
cells across a large substrate area (Figure 6a). Morphological variability was quantified by aligning cell
perimeters along the major axis and sorting them by length (Figure 6b). Averaging across the dataset
yielded a reference morphology, while height profiles extracted along the longitudinal axis (Figure 6c)
revealed systematic trends in size and symmetry. Representative cells (1st, 10th, 20th … 100th by length)
illustrate population-level heterogeneity (Figure 6e).
Histograms of major and minor axis lengths (Figure 6d) showed a narrowly distributed cell width
(~747 ± 4 nm) and a broader, skewed distribution of cell lengths (~1.3 µm), reflecting different stages of
the division cycle. Shorter pre-septation cells exhibited greater height (~200 nm) than elongated, septating
cells, which appeared flattened at the division site, consistent with prior AFM and electron microscopy
studies of bacterial cytokinesis.47,48 These morphological signatures indicate that AFM can serve as a
quantitative, label-free marker of cell-cycle progression in high-throughput measurements.
Supplementary Figure S13 further reveals fine structurEal detail, including flagella and cell wall
features, and shows that membrane bulges are preferentially localized near the bacterial poles. This
recurrent polar localization suggests an intrinsic structural or compositional origin, although local
curvature and drying-related effects during sample preparation may also contribute.49
This level of population-scale analysis is enabled by the large, systematically acquired datasets
produced by the semi-autonomous workLflow. By coupling SimuScan-trained models with automated
acquisition, the microscope can sample enough objects to support statistically meaningful measurements
that are difficult to achieve with cTonventional, manually guided AFM, thereby extending AFM from more
of a single-object characterization toward population-level analysis.
Next, we applied the workflow to a mixed bacterial community containing both bacillus and
coccus morphotypes distributed across a >0.3 mm² surface (Figure 7a). The coccus population of
Staphylococcus aureus NCTC 8325, whose spherical cells commonly occur singly, in chains, or in small
clusters, providing a complementary morphology to the rod-shaped P. aeruginosa. The resulting high-
resolution topography captured hundreds of individual cells with nanoscale contrast. Real-time object
detection on tiled image regions using the YOLO classifier was performed with a confidence threshold of
70%, achieving robust detection for both rod-shaped bacillus and spherical coccus cells (Figure 7b).
Additional zoomed-in views of representative regions, together with the corresponding detection and
segmentation predictions, are shown in Supplementary Figure S14. Spatial mapping of detected centroids
(Figure 7c) clearly separated bacillus (red) and coccus (blue) populations, enabling construction of density
maps for each morphotype. Bacillus cells were broadly distributed with local clustering (Figure 7d), while
coccus cells were sparser but showed pronounced clustering in discrete regions (Figure 7e).
Notably, these results were obtained without extensive task-specific optimization of the SimuScan
data generator or model hyperparameters; while further tuning could improve precision for particular
samples, the aim here is to demonstrate generalizable performance across heterogeneous microbial
systems. Within this autonomous AFM workflow, SimuScan-trained models enable label-free detection
and mapping based directly on surface morphology, providing a scalable approach for exploring microbial
interfaces with minimal human intervention. In contrast to genetic assays that rely on nucleic acid
extraction and amplification, this AFM-based strategy operates directly on physical structure, supporting
applications such as surface contamination mapping, pathogen detection, and in situ characterization of
microbial populations.
In summary, we introduce SimuScan, a physics-guided synthetic data framework that enables
annotation-free training of deep learning models for AFM Efeature identification, segmentation, and
targeted imaging. By generating realistic AFM images with exact ground-truth labels while explicitly
modeling instrument-specific artifacts, SimuScan addresses a key barrier to applying machine learning in
AFM: the dependence on large, manually labeled experimental datasets.
Across diverse experimental systems, m odels trained exclusively on SimuScan data generalize
reliably to real AFM images, enabling Llabel-free quantification of nanoscale features and supporting
workflows that scale from single-object analysis to population-level mapping on heterogeneous surfaces.
The ability to define object geomTetry through either CAD models or self-seeded experimental data allows
SimuScan to adapt rapidly to new materials and morphologies without requiring analytic shape models
or extensive manual annotation.
Looking forward, SimuScan provides a foundation for integrating adaptive simulation, automated
acquisition, and closed-loop decision making in AFM. By coupling domain-specific synthetic data with
real-time microscope control, this approach opens a path toward AFM experiments that are more scalable,
reproducible, and data-driven, enabling autonomous discovery and prioritization of nanoscale structure
across complex biological and materials systems.

Methods
SimuScan Data Generation:
Synthetic datasets were generated using SimuScan, a Python (v.3.10)-based package designed to
create realistic AFM topographic images by explicitly incorporating typical imaging artifacts. Each
synthetic dataset is associated with a dedicated JSON/YAML file that governs image generation. These
configuration files can contain more than 500 parameters specifying object properties such as height,
eccentricity, geometric transformations (e.g., bending), and surface texture. In this way, every dataset is
fully documented with its statistical parameter distribution, ensuring both reproducibility and traceability.
Beyond dataset generation, SimuScan also provides tools for format conversion and model
development, including utilities to transform datasets from COCO annotations into U-Net or YOLO
formats, as well as functions for model training and validation. To facilitate broad adoption, SimuScan is
distributed as an easy-to-use standalone command-line executable, allowing users to generate synthetic
datasets and perform associated processing without requiring a dedicated Python environment. The
executable and example configurations are openly available via Zenodo (see Data Availability).

Model Training:
For each framework, two models were trained indepenEdently: one dedicated to the detection of
regular geometric shapes and another for the detection of bacterial morphologies (bacillus and coccus).
The architectures selected were YOLOv8 (Ultralytics, Jocher et al., 2023),50 a state-of-the-art object
detection framework optimized for real-time applications, U-Net51, a widely adopted semantic
segmentation model based on an encoder–decod er architecture with skip connections, and Mask R-CNN52,
an extension of Faster R-CNN that inteLgrates object detection with instance-level segmentation. The
synthetic datasets were generated with SimuScan, a Python (v.3.10) - based package and consisted of
more than 5,000 images per dataTset. Each dataset generation required approximately two hours, and the
resulting data were partitioned into training (70%), validation (20%), and test (10%) subsets. All datasets
are openly available on Zenodo (DOI: https://doi.org/10.5281/zenodo.17037230 ).
Model training was carried out for 100 epochs on an NVIDIA RTX 2000 Ada GPU (16 GB VRAM,
2.13 GHz), requiring approximately eight hours per model. Typical hyperparameters included a batch size
of 8-32, an initial learning rate of 1e-3 with cosine annealing scheduling, and the Adam optimizer with
default momentum and weight decay. The metrics obtained on the synthetic test datasets were consistently
high, indicating that the training process was successful and that all models converged reliably under the
chosen conditions. This setup ensured stable convergence across all models and enabled reproducible
benchmarking under consistent computational settings. All models are openly available on Zenodo (DOI:
https://doi.org/10.5281/zenodo.17179725 ).

Nanostructured Surfaces:
A combination of electron beam lithography (EBL) and an etch process were used to fabricate the
micro/nanostructured surface. A silicon substrate was cleaned with acetone and IPA prior to spin-coating
it with ma-N 2403 electron beam resist (Micro resist technology GmbH, Germany) at 3000 rpm for 45 s,
and baked on a hotplate for 1 minutes at 95o C. Electron beam lithography was performed with a JEOL
JBX8100-FS system operating at 100 kV acceleration voltage. A 40 nA beam current and 300 µC/cm2
dose were used to define the geometry. The patterned substrate was developed in Microposit MF-319
(5% tetramethylammonium hydroxide) for 1 min, rinsed with DI water, and dried with nitrogen. The
patterned sample was then etched in an inductively couple plasma ion etching system (Oxford Plasmalab
100). The process was carried out in a mixture of 58 sccm C F , 25 sccm SF , and 5 sccm Ar gases at
4 8 6
20oC for 30 s. Removal of the e-beam resist was done by soaking the sample in acetone. Similar
fabrication process was carried out for the leaves structures with the resist spun at 2000 rpm, beam current
at 2nA and 1 min etching time.

Bacterial Cells and AFM sample:
Pseudomonas aeruginosa PAO1 cells were ino culated into MOPS + glucose minimal medium
and incubated overnight at 37 °C with shaking. Cells were then harvested by centrifugation at 7000 g
for 12 minutes and resuspended in 4% paraform aldehyde in PBS for 15 minutes to fix. Cells were
subsequently washed and resuspended in 1X PBS. Staphylococcus aureus NCTC 8325 cells were
inoculated into LB broth and grown overnight at 37 °C with shaking. Cells were harvested by
centrifugation at 7000 g for 10 mTinutes and resuspended in 4% paraformaldehyde in PBS for 15 minutes
to fix. Cells were subsequently washed and resuspended in 1X PBS.
Bacterial suspensions were diluted tenfold, and a 20 µL droplet was deposited onto freshly cleaved
mica for 10 min. Subsequently, the PBS concentration was gradually reduced every minute (90%, 70%,
50%, 30%, 20%, and 10%) to minimize potential osmotic effects without inducing dehydration. The
remaining liquid was gently removed using filter paper, and the samples were dried in a desiccator for 2
h prior to AFM imaging.

DNA preparation and AFM imaging:
Small DNA circles (minicircles) of 339 and 251 bp were prepared using bacteriophage λ-Int site-
specific recombination in vivo53. Linear forms were obtained via digestion with restriction enzyme NdeI.
DNA minicircles were adsorbed onto freshly cleaved mica specimen disks at room temperature, in a buffer
containing Ni2+ (20 mM HEPES, 3 mM NiCl , pH 7.4). 2-5 ng of DNA minicircles was added to 10µL of
2
buffer solution and adsorbed for 30 min and then washed four times using the same buffer solution. AFM
measurements of DNA minicircles were performed in liquid on Multimode 8 and FastScan Bio AFM
systems in PeakForce Tapping mode, using Peakforce HiResB and FastScan D probes. AFM images were
taken at a PeakForce Tapping amplitude of 10 nm with PeakForce frequencies of 4-8 kHz and PeakForce
setpoints from 5–20 mV at 512 × 512 pixels to ensure a resolution ≥1 nm/pixel.
Triangular DNA origami (Tilibit Nanosystems Rothemund Triangle, updated design) was folded
by mixing the M13 scaffold with staple strands at a 1:10 scaffold:staple molar ratio in folding buffer (5
mM Tris, 1 mM EDTA, 12.5 mM MgCl₂, pH 8.0). The mixture was thermally annealed from 80 °C to
25 °C over ~16 h. Folded structures were purified from excess staples using 100 kDa centrifugal filters
(Amicon Ultra) with buffer exchange into 10 mM Tris, 10 mM MgCl₂ (pH 8.0). Purified origami was
diluted to 2 nM in deposition buffer (10 mM Tris, 10 mM MgCl₂, pH 8.0) and 10 µL was placed onto
freshly cleaved mica for 2–3 min. The surface was gently rinsed with imaging buffer to remove unbound
DNA and dried under a gentle flow or nitrogen.

AFM Experiments:
Besides the DNA minicircles, all other AFM images were acquired using the DriveAFM system
from Nanosurf, a device equipped with a m otorized stage that enables the scanning of large areas
(>10 mm²), ideal for detailed studies of eLxtensive bacterial biofilms. The microscope was controlled via
a custom Python-based interface that interacts directly with the microscope’s software, allowing users to
select the detection model, speciTfy the class of interest, define stopping criteria, and configure imaging
parameters such as low- and high-resolution scans, scan speed, and other acquisition settings. For imaging,
Multi75-G tips (Budget Sensors) were used in all experiments. Scans were performed in tapping mode
with amplitude modulation, maintaining a setpoint of 60%.

Autonomous Workflow:
The autonomous AFM workflow integrates image acquisition, real-time object detection, and
guided navigation to new scan areas. AFM imaging was performed on the Nanosurf DriveAFM, equipped
with a motorized XY stage and controlled via a custom Python (v3.10) graphical interface that
communicates directly with the microscope control software. The interface allows non-expert users to
select a pre-trained YOLO object detection model, choose the class of interest to be captured at high
resolution, and adjust scanning parameters such as resolution, scan size, and scan speed. Once a region of
the sample is selected, the system performs tip approach and acquires a low-resolution survey image,
typically 128 × 128 pixels over a 25 × 25 µm field of view. After this survey image is acquired, the system
detects objects of the selected class and returns new exploration areas to the interface with updated high-
resolution scan parameters (typically set to 1.5 times larger than the detected object and acquired at 512
× 512 pixels).
Survey and high-resolution images are processed on-the-fly by the YOLO model, which outputs
class-specific bounding boxes together with detection confidence scores. Based on these predictions, the
workflow automatically selects regions that satisfy predefined criteria. In the case study presented in
Figure 4, the selection criterion was defined as a minimum number of isolated bacteria with less than 20%
overlap with other objects and a detection confidence >70%, ensuring that only well-isolated cells of
sufficient quality were targeted. The control software then repositions the AFM stage to acquire a new
low-resolution image and repeats the process, systematically exploring large areas of the sample until a
stopping condition is reached.
The system incorporates user-defined stopping rules, Esuch as a maximum number of detected
objects, total scanned area, or elapsed acquisition time. Once the stopping condition is satisfied, the
workflow terminates autonomously, saving all raw AFM data, detection results, and metadata. This
integration of hardware control, real-time inference, and adaptive scan planning enables large-area AFM
mapping in a fully unsupervised manner with m inimal human intervention.

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "Paper presents a data simulation tool suitable for machine learning training in autonomous bio-AFM. Works like this are very important as they enable building more robust data processing algorithms, all possible types, including algorithms based on use of machine learning, so it is significant for a broad area of AFM data processing tasks.\nPaper is nicely written, methodology is sound and results are impressive, so I have only few minor comments:\n- It would be much better to talk about bio-AFM specific artefacts instead of AFM specific artefacts as AFM is broadly used also on other areas where samples are very different and the presented methodology for height generation works only for small objects on flat background.\n- It would be nice to comment more thermal/mechanical drift impact on the data as this is frequently found source of experimental data distortion and is somehow touched in the introduction but seems not to be developed further in the presented figures.\n- Fig. 2e and 2f (and some of figures in 2h) look like line correction was applied which is strange. Line flattening artifacts are mentioned also in the description of the data synthesis. Line flattening is however not part of AFM measurement process but more an effect of postprocessing, so I would guess that data coming from the microscope (real or simulated) should not have such effect and I am not sure if data prepared for training ML models should contain it. This could be further commented, as mixing the effects related to the microscope and related to the postprocessing is a bit confusing.", "reviewer_2": "This manuscript presents SimuScan, a Python-based synthetic data generator designed to produce physically realistic AFM-like images for training deep learning models without manual labeling. The authors demonstrate that models trained exclusively on SimuScan-generated datasets can generalize to experimental AFM data, supporting real-time feature recognition and enabling semi-autonomous AFM imaging workflows. Applications are shown for geometric nanostructures, DNA, and bacterial cells.\nThe topic is timely, combining synthetic data, AI, and AFM automation. The manuscript is clearly written and technically sophisticated. However, several methodological and validation shortcomings weaken the central claim of generalization from synthetic to real data. I view this work as potentially impactful but requiring significant additional evidence and clarification before publication.\nMajor Comments\nThe manuscript asserts that models trained exclusively on synthetic data generalized effectively to experimental AFM images. However, the presented validation relies on very limited experimental datasets (25 manually labeled images per morphology, expanded by augmentation).\n• Such small datasets cannot robustly support claims of cross-domain generalization.\n• Performance metrics in Table 1 appear to be computed primarily on synthetic test sets.\n• The evaluation on real data (DNA, bacteria) is qualitative and anecdotal.\nThe introduction and results sections are well written but somewhat repetitive and promotional, particularly around AI/AFM “revolution” claims.\n• Statements like “redefining what is achievable” and “establishes a foundation for self-guided experimentation” could be toned down.\n• The paper would benefit from clearer differentiation between demonstrated and aspirational capabilities.\nPersonally, I would recommend including quantitative evaluation on independent experimental datasets, with metrics such as IoU, mAP@[0.5:0.95], and F1 scores across several morphologies.\nWhile the authors describe SimuScan as unique, no comparisons are made with existing synthetic AFM data generators (e.g., BioAFMviewer, Degenhardt et al.). Without such benchmarks, it is unclear whether SimuScan provides superior realism or utility for training.\nAdding a benchmark against at least one existing synthetic dataset or model trained on small real datasets to quantify the improvement due to SimuScan.\nMore specifically about the Figures and Tables, I would like to comment them:\nFigure 1 – Strong conceptual overview but overly abstract. Incorporating example AFM images or segmentation overlays and color-coding synthetic versus experimental stages would improve clarity.\nFigure 2 – Excellent depiction of the SimuScan pipeline but visually overloaded. Splitting into two figures—(1) pipeline schematic and (2) dataset examples—would aid comprehension. Quantitative validation insets comparing real and synthetic textures should be added.\nTable 1 – Informative yet difficult to interpret. Reformat as a clear matrix with error bars or replace colored dots with shaded highlights for print clarity. A complementary bar chart could visualize performance differences.\nFigure 3 – The closed-loop workflow schematic is intuitive but lacks experimental imagery. Numbered process steps and inclusion of a real scan inset would make it more instructive.\nFigure 4 – Impressive quantitative analysis of P. aeruginosa cells. Add scale bars, representative zoom-ins, and explicit sample size (n = 100) with labeled units on plots. Histogram fits should list model parameters.\nFigure 5 – The large-area mapping of mixed bacterial populations is visually striking but needs validation of bacterial identity (e.g., optical overlay) and explicit scales for density maps and insets.\nAcross all figures, maintain uniform color scales, include scale bars, and use accessible color palettes for color-blind readers (just a suggestion)\nThe “autonomous AFM” section presents a compelling integration of real-time segmentation and stage control, yet the process still involves human-defined parameters, thresholds, and stopping criteria. The absence of discussion of failure modes (e.g., misdetections, tip crashes, or drift correction) overstates the level of autonomy. The SPM community wants to know!\nBy recasting this section as a semi-autonomous or guided AFM workflow, and explicitly describing system limitations and failure recovery strategies.\nAlthough SimuScan includes key AFM-specific artifacts (tip convolution, noise, flattening), their quantitative accuracy is not evaluated. It is unclear whether the simulated distortions statistically resemble real AFM data. This point is also important to know for the end-users.\nProviding a quantitative comparison between simulated and experimental AFM images, for instance, using height–height correlation functions, noise spectra, or power spectral density analysis will certainly be helpful.\nThe paper states that SimuScan is “available upon request,” which contradicts the claim of open science. Reproducibility depends on full code and configuration availability.\nMy recommendations will be to publicly release the full SimuScan source code and documentation (or a Docker container) to ensure replicability, even though some parts are on GitHub and I haven’t tested it so far … but I certainly will!\nThe bacterial and DNA demonstrations are visually appealing but lack quantitative biological validation. The models’ specificity (ability to distinguish true cells from debris) and robustness to sample variation remain unclear.\nMaybe the authors could include, in SI section, confusion matrices or precision/recall data for biological classifications, ideally compared to manual expert annotation.\nMinor Comments\n1. Terminology: In Figure 4, “Bacillus cells” likely refers to Pseudomonas aeruginosa; please correct to avoid taxonomic confusion.\n2. Metrics: Use consistent metrics (preferably mAP@[0.5:0.95]) across models for fair comparison.\n3. Figures: Figures 2–5 contain excessive subpanels and dense captions; consider streamlining for readability.\n4. Data Volume: Clarify how 5,000 synthetic images suffice for training deep architectures—were data augmentations or tiling used?\n5. Manuscript Tone: Several statements (e.g., “redefining what is achievable”) are overly promotional; suggest tempering to reflect demonstrated results.\n6. Formatting: Minor typographical inconsistencies (µ vs μ, superscripts, spacing) should be corrected.\nIn conclusion, this work presents an exciting and potentially field-shifting approach to autonomous AFM. However, its claims of synthetic-to-real generalization and full autonomy require stronger experimental evidence, quantitative benchmarking, and improved reproducibility. With these revisions, the paper could make a substantial contribution to autonomous nanometrology and AI-driven instrumentation.\nI recommend major revision but I strongly believe that by addressing my comments and remarks, the paper will be among the key-ones in this growing field merging SPM and AI.", "reviewer_3": "Millan-Solsona et al present a novel tool, SimuScan, to create artificial AFM datasets based on specific criteria. They show that autonomous operation of AFM based on artificially-trained machine learning (ML) is possible over a range of samples, from simple geometrical patterns on hard substrates to bacteria. They also emphasise the analysis capabilities of ML tools trained on with SimuScan, as illustrated on DNA structures.\nThe authors argue that the absence of tractable and consistent datasets for ML is the largest bottleneck to wide adoption of ML strategies in AFM. I agree with the authors about this being a major roadblock, both for automation and image interpretation. Several attempts to create extensive AFM databases for ML have not succeeded for lack of suitable large sets and/or metadata information. Most successful publications tend to focus on a narrow and well defined problem.\nIn this context, SimuScan clearly offers a step in the right direction. However, it remains to be seen whether this step is incremental or a step-change.\nMy main concern with SimuScan as presented here is that it is illustrated on clearly defined and easily identified criteria for samples such as geometrical shapes or loop vs elongated strand. While likely sufficient for large (>100 nm) samples, I am not convinced that it is enough for nanoscale images where countless known and unknown effects may be at play, from convolution to intermittent molecular contamination of the tip, asymmetric tip shapes, unstable sample fixation, dirty sample, inappropriate scanning parameters, etc. I feel this is important because the power of AFM lies at the nanoscale, where optical approaches are less straightforward. The authors show that SimuScan can distinguish different DNA shapes, but this is still a relatively simple question regardless of the possible issues mentioned above. What about distinguishing the orientation of an adsorbed (small) molecule? Or a clean from a dirty tip? Generally, how can realistic nanoscale data be generated without knowing all the details about the sample and the tip-sample interactions that can dramatically change the resulting image? Is this a limitation of SimuScan?\nA second concern/question is the apparent lack of spectroscopic information. Currently, most AFM operate in spectroscopy mode (peak force tapping, wave mode, etc) with considerable information in the spectroscopy curve obtained at each pixel. Can SimuScan create relevant information to train ML of the spectroscopy curves?\nThe presentation of the paper is generally clear, but Fig 2 contains too much information (and too small in h/i) to be easily appreciated."}, "author_response": "We sincerely thank the reviewer for the positive assessment of our manuscript, and for recognizing the significance of physics-informed simulation tools for enabling robust AFM data processing and machine-learning–based automation.\nWe appreciate the reviewer’s comments regarding the quality of the writing, methodological soundness, and strength of the results. Below, we respond point-by-point to the minor comments and describe the corresponding revisions, including clarifications that further emphasize SimuScan’s broad applicability across AFM modalities and sample classes, as well as additional analyses/datasets added in the revised manuscript.\n- It would be much better to talk about bio-AFM specific artefacts instead of AFM specific artefacts as AFM is broadly used also on other areas where samples are very different and the presented methodology for height generation works only for small objects on flat background.\nWe thank the reviewer for raising this important point and for the opportunity to clarify the intended scope of the framework.\nA central motivation for SimuScan is that, relative to optical and electron microscopy, AFM lacks large, diverse, publicly available annotated datasets. Moreover, pretrained models from natural-image domains transfer poorly to AFM due to its distinct contrast mechanisms, imaging physics, and artifact structure. Addressing this broader gap, rather than targeting a single sample class or application, was a primary design goal of SimuScan.\nWhile examples in the original submission emphasized biologically relevant samples, this was partly related to project funding, however, we now clarify and demonstrate that SimuScan is designed as a general AFM framework, not a bio-AFM–specific tool or workflow. In the revised manuscript, we have expanded the dataset to include nanostructures and more complex, heterogeneous substrates to reflect this broader scope. The goal of this work is to show that SimuScan generalizes across a range of morphologies and enables robust, rapid image segmentation and feature finding, representing a significant step forward for AFM automation. We want to highlight, that in the revised manuscript we introduced self-seeded experimental geometry workflow which allows the synthetic data generation to be based on CAD designs or AFM images themselves, in this was we are not limited to simple objects—biological or inorganic—that can be easily parameterized.\narbitrary experimental AFM morphologies—biological or inorganic—to be converted into STL representations and used to generate large, morphology-preserving synthetic datasets. This removes assumptions about object size, background flatness, or sample class, further broadening applicability\nThe synthetic image generation focuses on the topographic channel and incorporates artifact mechanisms—such as tip–sample convolution, electronic and 1/f noise, drift, and feedback- and line-related distortions—that are intrinsic to AFM operation and occur across both materials and biological sciences. For task-specific problems (e.g., in situ heating, dynamic biological systems) or samples requiring highly refined, application-dependent models, SimuScan is intended to serve as a robust starting point. In such cases, optimal performance can be achieved by tuning the synthetic data generation parameters and model hyperparameters within the SimuScan workflow.\nImportantly, the framework is not restricted to small objects on flat backgrounds. As demonstrated in the revised manuscript (see Figure S3 and S8) , SimuScan explicitly incorporates substrate topography during synthetic data generation. To validate this capability, we investigated non-planar, including samples with debris/contamination as well as structured substrates wherein bacterial cells were deposited on nanopatterned SiNx pillar arrays. In this latter scenario, models trained solely on planar substrates failed to reliably detect cells. In contrast, as shown in Fig. S8, incorporating substrate morphology within the SimuScan workflow enabled robust segmentation on such topographically complex surfaces. Ongoing experiments indicate that this behavior generalizes across a variety of substrates and surface contaminations commonly encountered in AFM.\nFigure 1. (Left) Large-area AFM topography (0.3 × 0.3 mm) showing sparse bacterial coverage on a nanopatterned SiNx membrane; the dashed box marks a region selected for higher-resolution imaging. (Center) Intermediate- and high-magnification views reveal individual bacterial cells interacting with the underlying pillar lattice. (Right) Optical image of the SiNx membrane illustrating the predefined grid layout for systematic large-area scanning, alongside a saturated AFM image highlighting the substrate topography. These samples challenge models trained on planar substrates; however, since its possible to tune SimuScan’s synthetic training data to account for substrate-specific effects, accurate cell–substrate segmentation is achieved (Fig. S8).\nTo avoid confusion, we have revised the manuscript to (i) consistently refer to AFM-specific, rather than bio-AFM–specific, artifacts; (ii) explicitly emphasize applicability across both biological and non-biological material systems; and (iii) expand discussion and examples demonstrating performance on structured and heterogeneous substrates. Together, these changes clarify that SimuScan is intended as a general AFM data-generation and automation framework, not a tool limited to bio-AFM scenarios.\n- It would be nice to comment more thermal/mechanical drift impact on the data as this is frequently found source of experimental data distortion and is somehow touched in the introduction but seems not to be developed further in the presented figures.\nResponse:\nWe thank the reviewer for highlighting the importance of thermal and mechanical drift, which is indeed a common source of distortion in AFM experiments. SimuScan includes the capability to simulate gradual displacements and distortions that mimic drift effects, with adjustable magnitude and direction. However, to maintain focus on the artifact mechanisms most critical for deep-learning training in the present study—namely noise, tip–sample convolution, and line-related distortions—we chose not to explicitly include drift simulations in the main figures.\nAll experimental AFM data presented in this work were acquired using closed-loop scanners, and at the scan sizes and acquisition times considered here, drift effects were minimal. Any residual drift was further mitigated using standard line-alignment and flattening procedures, resulting in negligible drift in the datasets used for evaluation.\nTo clarify the scope of the framework, we have added a statement in the revised manuscript noting that using the Simuscan platform it is possible to include incorporate and tune drift levels relevant for specific experimental scenarios. While the current implementation intentionally emphasizes the topographic channel and the most prevalent AFM artifacts for segmentation and feature identification, extending the framework to include long-timescale drift dynamics, additional contrast channels, and time-dependent probe effects represents a natural and modular direction for future development. These extensions would further expand the realism and applicability of SimuScan across a wider range of AFM modalities and experimental conditions.\nWhile SimuScan captures a broad range of AFM-specific artifacts relevant for realistic synthetic data generation, this first implementation makes deliberate scope choices leaving clear avenues for future extension. At present, the framework focuses on the topographic channel, which is broadly applicable across common AFM modes (e.g., dynamic, static, PeakForce Tapping, and wave mode -based operation), while additional contrast channels such as phase, amplitude, or spectroscopic signals are not explicitly modeled. Long-timescale thermal and mechanical drift is also not simulated, reflecting the prevalence of closed-loop AFM systems and standard post-processing procedures that mitigate these effects in many experiments. In addition, SimuScan models static double-tip artifacts but does not yet capture intermittent or time-dependent probe contamination. Extending the framework to incorporate additional signal channels, drift dynamics, and evolving probe conditions represents a natural and modular path forward, and would further expand the realism, versatility, and applicability of SimuScan across a wider range of AFM modalities and experimental conditions.\n- Fig. 2e and 2f (and some of figures in 2h) look like line correction was applied which is strange. Line flattening artifacts are mentioned also in the description of the data synthesis. Line flattening is however not part of AFM measurement process but more an effect of postprocessing, so I would guess that data coming from the microscope (real or simulated) should not have such effect and I am not sure if data prepared for training ML models should contain it. This could be further commented, as mixing the effects related to the microscope and related to the postprocessing is a bit confusing.\nResponse:\nWe thank the reviewer for this thoughtful comment and agree that it is important to clearly distinguish between artifacts arising from AFM acquisition and those introduced during post-processing. We have revised the manuscript to explicitly clarify this distinction.\nAlthough line flattening is not part of raw AFM acquisition, it is a ubiquitous post-processing step in experimental practice, routinely applied to correct residual drift, scanner tilt, and contrast variations. Because flattening is commonly applied prior to analysis and automation, it can introduce secondary artifacts such as residual line features or local distortions. SimuScan therefore optionally incorporates flattening-induced artifacts to improve the realism of synthetic datasets and to enhance model robustness to post-processing effects encountered in practical AFM workflows.\nImportantly, SimuScan provides full user control over whether flattening is applied, as well as over the type and magnitude of the correction. In the workflow presented here, flattening was applied prior to object detection to reflect common practice in automated AFM pipelines. This clarification has been added to the manuscript to avoid ambiguity regarding the origin and role of line-related artifacts.\nFinally, post-processing effects, including line-flattening errors, are applied to replicate distortions commonly observed in experimental AFM datasets. Although flattening is not part of raw AFM acquisition, it is routinely applied to correct drift, scanner tilt, and contrast variations and can introduce secondary artifacts such as residual line features or local distortions. SimuScan explicitly incorporates flattening-induced artifacts to improve dataset realism and enhance model robustness to post-processing effects encountered in practice. Users retain control over whether flattening is applied, as well as over the type and magnitude of the correction; in this workflow, flattening is applied prior to object detection to reflect common automated AFM practice.\nReviewer #2 (Remarks to the Author):\nThis manuscript presents SimuScan, a Python-based synthetic data generator designed to produce physically realistic AFM-like images for training deep learning models without manual labeling. The authors demonstrate that models trained exclusively on SimuScan-generated datasets can generalize to experimental AFM data, supporting real-time feature recognition and enabling semi-autonomous AFM imaging workflows. Applications are shown for geometric nanostructures, DNA, and bacterial cells.\nThe topic is timely, combining synthetic data, AI, and AFM automation. The manuscript is clearly written and technically sophisticated. However, several methodological and validation shortcomings weaken the central claim of generalization from synthetic to real data. I view this work as potentially impactful but requiring significant additional evidence and clarification before publication.\nResponse:\nWe thank the reviewer for their careful and constructive evaluation of the manuscript and for recognizing both the timeliness and technical sophistication of integrating synthetic data, AI, and AFM automation. We agree that demonstrating robust generalization from synthetic to experimental AFM data is central to the contribution and must be supported by rigorous validation.\nIn response to the reviewer’s concerns, we have undertaken substantial new work that significantly strengthens both the methodological foundation and the experimental evidence. The revised manuscript now includes:\nI. expanded quantitative benchmarking evaluated exclusively on independent experimental AFM datasets;\nII. new demonstrations spanning diverse morphologies, including biological assemblies, engineered nanostructures, and non-planar substrates;\nIII. and algorithmic extensions that broaden the physical realism and applicability of SimuScan.\nCollectively, these additions directly address the question of generalization and substantially reinforce the central claims of the paper.\nMost notably, we introduce two complementary, non-parameterized geometry pathways designed explicitly to overcome limitations associated with morphology-specific modeling. We present a self-seeded experimental geometry workflow, in which a single experimentally acquired AFM image is converted into a three-dimensional STL surface that serves as a seed morphology for generating large synthetic training datasets. This approach moves beyond the purely parameterized framework of the original submission and enables SimuScan to adapt directly to arbitrary experimental morphologies, while systematically introducing controlled variability in shape, texture, deformation, noise, tip–sample interactions, and substrate context. This mechanism provides a principled and scalable route to synthetic-to-experimental transfer across heterogeneous AFM datasets.\nFinally, we emphasize that the goal of this work is not to exhaustively optimize segmentation models for a specific task—an effort that typically requires extensive manual annotation, architecture tuning, and task-specific hyperparameter optimization. Rather, the primary contribution of SimuScan is to enable rapid, reliable generation of physically grounded, pre-annotated AFM datasets that substantially lower the barrier to training effective models. In the attached manuscript we show that this approach is robust and generalizable, however, we also make a point to stress that for applications requiring near-perfect precision or highly specialized performance, we fully acknowledge that further task-specific refinement may be necessary. SimuScan is intended to serve as a general, extensible foundation upon which such refinements can be efficiently built.\nBelow, we respond point-by-point to the reviewer’s specific comments and detail the corresponding revisions and new results added to the manuscript.\nMajor Comments\nThe manuscript asserts that models trained exclusively on synthetic data generalized effectively to experimental AFM images. However, the presented validation relies on very limited experimental datasets (25 manually labeled images per morphology, expanded by augmentation).\nWe thank the reviewer for this detailed and constructive critique. We agree that robust, quantitative validation on independent experimental data is essential for substantiating synthetic-to-experimental generalization, and we have revised the manuscript extensively to address each of the points raised.\n• Such small datasets cannot robustly support claims of cross-domain generalization.\nWe thank the reviewer for this comment and agree that claims of cross-domain generalization must be supported by careful validation. We would like to clarify an important point regarding the experimental dataset used in Table 1, as it directly addresses this concern.\nAs shown in Table 1, the experimental dataset of 25 manually labeled AFM images per morphology is not used to validate SimuScan-trained models in isolation, but rather to provide a direct performance benchmark against a conventionally trained model. Specifically, we compare (i) models trained exclusively on SimuScan-generated synthetic data against (ii) models trained using standard supervised learning on 25 manually annotated experimental images, with both models evaluated on the same independent experimental test set.\nThis comparison reflects a realistic and commonly encountered scenario in AFM research, where manual annotation is costly and dataset sizes are inherently limited. The fact that SimuScan-trained models achieve performance comparable to—and in several cases exceeding—that of models trained on manually labeled experimental data provides strong evidence that the learned representations are not overfitted to synthetic artifacts but instead capture transferable, physically meaningful features of experimental AFM images.\nWhile the number of manually labeled experimental images per morphology remains limited (25 images per class), the evaluation is performed at the instance level, yielding 756 geometric objects and 1,124 bacterial instances. This provides a statistically meaningful evaluation set for object-level and pixel-level metrics.\nMoreover, the intent of this study is not to claim exhaustive generalization across all possible AFM modalities or experimental conditions. Rather, our goal is to demonstrate that synthetic data generated by SimuScan can replace or substantially reduce the need for manual annotation, while achieving performance on experimental data that is competitive with traditional, annotation-driven training approaches. The head-to-head comparison in Table 1 directly supports this claim.\nTo avoid overstatement, we have revised the manuscript to explicitly frame these results as demonstrating practical and task-relevant synthetic-to-experimental transfer, rather than universal generalization. We believe this positioning accurately reflects both the evidence presented and the intended contribution of the work.\n• Performance metrics in Table 1 appear to be computed primarily on synthetic test sets.\nAll reported performance metrics in Table 1—including AP@0.5, IoU, precision, recall, and F1 score—are computed exclusively against manually annotated experimental AFM images, with no SimuScan-generated data included in the evaluation sets. We have revised the text to explicitly state this and avoid any ambiguity regarding the origin of test data. Where synthetic datasets are used, this is now clearly limited to training only.\n• The evaluation on real data (DNA, bacteria) is qualitative and anecdotal.\nRegarding the evaluation on real AFM data, we would like to clarify that table 1 includes explicit quantitative benchmarking on experimental datasets, rather than relying solely on qualitative demonstrations. Model performance is evaluated on independently annotated experimental AFM images of various bacterial cells and nanostructured shapes using standard metrics (AP@0.5, IoU, precision, recall, and F1-score). These metrics are computed by directly comparing model predictions against manually labeled experimental ground truth and provide objective evidence of synthetic-to-experimental transfer. Analysis is performed both at the feature and global level.\nIn the new manuscript we also include qualitative examples shown for DNA (linear vs circular), DNA origami, microfabricated ORNL logo, and bacteria on non-planar substrates. These are intended to complement—rather than replace—the quantitative results by illustrating representative outputs and failure modes in realistic experimental contexts. As you will see, the qualitative demonstrations involve highly diverse or irregular morphologies for which comprehensive manual annotation would be impractical or counter to the goal of minimizing human intervention. Instead, these experiments serve as out-of-distribution stress tests, demonstrating that models trained exclusively on SimuScan data continue to operate robustly across markedly different length scales, surface topographies, and structural classes. Importantly, these qualitative demonstrations are not used to claim optimized task-specific performance, but rather to assess robustness, failure modes, and practical usability of the approach under realistic experimental conditions.\n• The introduction and results sections are well written but somewhat repetitive and promotional, particularly around AI/AFM “revolution” claims.\n• Statements like “redefining what is achievable” and “establishes a foundation for self-guided experimentation” could be toned down.\n• The paper would benefit from clearer differentiation between demonstrated and aspirational capabilities.\nWe sincerely thank the reviewer for highlighting these points and curbing our enthuasiasm for this approach. We have carefully revised the entire manuscript to reduce repetition and to tone down promotional language. Statements that could be interpreted as aspirational have been either removed or reframed to clearly distinguish between capabilities demonstrated in this work (e.g., semi-autonomous feature detection and targeted imaging) and future directions (e.g., fully autonomous closed-loop experimentation). We now explicitly frame SimuScan as a foundation that enables such developments, rather than claiming them outright.\nPersonally, I would recommend including quantitative evaluation on independent experimental datasets, with metrics such as IoU, mAP@[0.5:0.95], and F1 scores across several morphologies.\nWe thank the reviewer for this recommendation. This has now been fully addressed in the revised manuscript. Specifically, we include quantitative benchmarking on independent experimental AFM datasets across multiple morphologies ( bacterial cells, and engineered nanostructures), reporting standard metrics including IoU, mAP@[0.5:0.95], precision, recall, and F1-score (see Table 1 and Section 2.2). These evaluations are performed on experimental images not used during training or hyperparameter selection, providing objective evidence of synthetic-to-experimental transfer.\nTaken together, these revisions substantially strengthen the evidentiary basis for the manuscript’s central claims and clearly delineate demonstrated performance from forward-looking potential. We believe the revised manuscript now provides a balanced, quantitatively grounded assessment of SimuScan’s capabilities and limitations.\nWe have included in the text:\nModel performance was evaluated using an independently prepared ground-truth dataset consisting exclusively of experimental AFM images; no SimuScan-generated images were included in the evaluation set. The dataset comprised AFM images of geometric objects as well as two microbial morphologies—bacilli (rod-shaped) and cocci (spherical)—with manual annotations performed using Roboflow. Although the number of manually labeled experimental images was limited (25 images per sample type), this was sufficient because individual AFM images typically contain a high density of repeated object instances. Standard data augmentation was applied to introduce controlled variability in orientation, scale, and contrast while preserving underlying morphology. As a result, the evaluation dataset contained 756 geometric object instances and 1,124 bacterial instances, providing a quantitatively informative and morphology-diverse benchmark for assessing segmentation performance.\nWe intentionally did not pursue extensive training or fine-tuning on large numbers of manually annotated experimental AFM images, as the objective of this study was not to maximize task-specific performance through annotation-intensive workflows. In prior AFM segmentation studies using YOLO- or U-Net–based architectures, performance is often improved by training on hundreds of manually labeled experimental images—a process that typically requires days to weeks of expert effort due to careful feature delineation, instance separation, and artifact rejection. In contrast, the central aim of this work is to evaluate whether SimuScan-generated synthetic data can substantially reduce or eliminate this manual labeling burden while still enabling effective model training. In support of this, qualitative inspection of predictions from the manually trained model further confirmed that the level of performance achieved was sufficient for the objectives of the present study, namely assessing the Simuscan data generalization rather than maximizing any task-specific accuracy.\nWhile the authors describe SimuScan as unique, no comparisons are made with existing synthetic AFM data generators (e.g., BioAFMviewer, Degenhardt et al.). Without such benchmarks, it is unclear whether SimuScan provides superior realism or utility for training.\nAdding a benchmark against at least one existing synthetic dataset or model trained on small real datasets to quantify the improvement due to SimuScan.\nWe thank the reviewer for this suggestion and agree that it is important to clearly position SimuScan relative to prior work on synthetic AFM data. We have revised the manuscript to clarify this distinction more explicitly.\nExisting tools such as BioAFMviewer and the framework by Degenhardt et al. are designed for fundamentally different objectives than SimuScan. BioAFMviewer generates molecular-scale AFM images from atomistic structural models to aid structural interpretation, while the HORNET framework targets RNA structure reconstruction under controlled noise assumptions. These methods operate in different resolution regimes, rely on structure-specific or atomistic priors, and are not intended to generate large, diverse, fully labeled datasets for training general-purpose deep learning models.\nIn contrast, SimuScan is designed as a mesoscale, physics-informed synthetic data engine for training segmentation and feature-identification models that must generalize across heterogeneous samples, substrates, and imaging conditions. Given these differences in modeling assumptions, scale, and intended use, we believe direct benchmarking against these tools would not be meaningful.\nInstead, we evaluate SimuScan based on its intended utility: enabling models trained exclusively on synthetic data to generalize to experimentally acquired AFM images. Accordingly, validation focuses on quantitative and qualitative synthetic-to-experimental transfer across independent experimental datasets and diverse morphologies. We have revised the manuscript to clarify this scope and to articulate evaluation criteria aligned with SimuScan’s intended application.\nTable 1 – Informative yet difficult to interpret. Reformat as a clear matrix with error bars or replace colored dots with shaded highlights for print clarity. A complementary bar chart could visualize performance differences.\nFigure 3 – The closed-loop workflow schematic is intuitive but lacks experimental imagery. Numbered process steps and inclusion of a real scan inset would make it more instructive.\nFigure 4 – Impressive quantitative analysis of P. aeruginosa cells. Add scale bars, representative zoom-ins, and explicit sample size (n = 100) with labeled units on plots. Histogram fits should list model parameters.\nFigure 5 – The large-area mapping of mixed bacterial populations is visually striking but needs validation of bacterial identity (e.g., optical overlay) and explicit scales for density maps and insets.\nAcross all figures, maintain uniform color scales, include scale bars, and use accessible color palettes for color-blind readers (just a suggestion)\nWe thank the reviewer for their careful and constructive feedback on the figures and tables. We greatly appreciate the level of detail provided, and we have undertaken a substantial revision of the visual materials throughout the manuscript in response. Many figures have been redesigned, split, or expanded for clarity; color palettes and scale bars have been standardized; and new experimental insets, annotations, and quantitative comparisons have been added where appropriate. Table 1 has also been reformatted to improve readability, including clearer layout, consistent units, and expanded descriptions.\nOur goal throughout the revision process has been to incorporate the reviewer’s suggestions as fully as possible and to enhance the clarity, accessibility, and scientific rigor of the visual presentation. We hope that these improvements meet the reviewer’s expectations and contribute to a clearer and more effective communication of the results.\nThe “autonomous AFM” section presents a compelling integration of real-time segmentation and stage control, yet the process still involves human-defined parameters, thresholds, and stopping criteria. The absence of discussion of failure modes (e.g., misdetections, tip crashes, or drift correction) overstates the level of autonomy. The SPM community wants to know! By recasting this section as a semi-autonomous or guided AFM workflow, and explicitly describing system limitations and failure recovery strategies.\nWe thank the reviewer for this insight which we feel is an important observation. We fully agree that, although our long-term objective is to enable fully autonomous AFM, the present implementation still requires user-defined parameters, thresholds, and stopping criteria, and therefore should be characterized as a semi-autonomous or guided workflow rather than a fully autonomous system. The reviewer is also correct that explicitly discussing limitations and potential failure modes is essential for transparency and for informing the SPM community about realistic operational performance.\nIn response, we have revised this section of the manuscript to clearly frame the approach as a semi-autonomous closed-loop workflow, and we now provide a dedicated discussion of system limitations, including potential misdetections, tip-related failures, drift correction considerations, and strategies for recovery or user intervention. We believe this reframing more accurately reflects the current state of the system while still highlighting the significant hurdle overcome—namely, that models trained entirely on synthetic data can successfully guide real-time AFM operations across diverse sample types.\nWe thank the reviewer again for encouraging this clarification, which we believe improves both accuracy and relevance for the AFM community.\nAlthough SimuScan includes key AFM-specific artifacts (tip convolution, noise, flattening), their quantitative accuracy is not evaluated. It is unclear whether the simulated distortions statistically resemble real AFM data. This point is also important to know for the end-users.\nProviding a quantitative comparison between simulated and experimental AFM images, for instance, using height–height correlation functions, noise spectra, or power spectral density analysis will certainly be helpful.\nIn the present work, however, our goal is not to reproduce a statistically exact digital twin of a specific AFM instrument, but rather to generate artifact-informed synthetic data with sufficient realism and variability to enable effective training and generalization of deep learning models.\nAccordingly, SimuScan models AFM artifacts at the mechanistic and phenomenological level—including tip–sample convolution, electronic and 1/f noise, line-related distortions, and flattening effects—using parameterized representations that span ranges commonly observed in experimental practice. The primary validation criterion we adopt is therefore synthetic-to-experimental transfer performance: models trained exclusively on SimuScan data are evaluated on independent experimental AFM images, where successful generalization provides an integrated, task-relevant measure of whether the simulated artifacts capture the dominant statistical and structural features that matter for downstream analysis.\nWe agree that detailed statistical matching of individual artifact distributions (e.g., PSDs or correlation functions) would be informative for instrument-specific digital-twin applications. However, such analyses would require conditioning SimuScan on a particular AFM system, probe, and operating mode, which is beyond the scope of this study and would reduce generality. Instead, SimuScan is intentionally designed to expose models to broad, controllable ranges of artifact realizations, improving robustness across instruments and experimental conditions rather than optimizing fidelity to a single setup.\nTo address the reviewer’s concern and improve clarity for end users, we have revised the manuscript to explicitly state this design philosophy and to clarify that SimuScan prioritizes training utility and generalization robustness over strict statistical replication of a specific instrument. We also note in the revised discussion that incorporating quantitative, instrument-specific artifact calibration (e.g., PSD- or correlation-based matching) represents a natural extension of the framework for future studies focused on digital-twin fidelity.\nThe paper states that SimuScan is “available upon request,” which contradicts the claim of open science. Reproducibility depends on full code and configuration availability.\nMy recommendations will be to publicly release the full SimuScan source code and documentation (or a Docker container) to ensure replicability, even though some parts are on GitHub and I haven’t tested it so far … but I certainly will!\nWe thank the reviewer for raising this important point regarding reproducibility and open science. We fully agree that transparency, accessibility, and reproducibility are essential for advancing machine-learning–enabled AFM research, and it is our intention to make SimuScan broadly available to the community.\nAt present, portions of the SimuScan framework are undergoing institutional intellectual property review, with a patent application in preparation and discussions with an AFM vendor are ongoing. Until this process is complete, we are not permitted to publicly release the full source code. For this reason, the software is currently described as “available upon request,” which allows us to share the framework with researchers under appropriate licensing during the IP review period.\nTo support reproducibility during this interim phase, we have:\n• publicly released all non-restricted components of the codebase on GitHub,\n• provided detailed configuration files, example datasets, and documentation describing simulation parameters, model training, and evaluation workflows, and\n• ensured that all experiments reported in the manuscript can be reproduced using the released components and documented configurations.\nWe have revised the manuscript to clarify this status and to avoid ambiguity regarding availability. Upon completion of the IP review, we plan to release the full SimuScan package, including comprehensive documentation and containerized environments, to enable straightforward replication and adoption by the community. In the meantime, we would be pleased to provide access to interested researchers under a research license, and we welcome the reviewer’s interest in testing the framework.\nThe bacterial and DNA demonstrations are visually appealing but lack quantitative biological validation. The models’ specificity (ability to distinguish true cells from debris) and robustness to sample variation remain unclear.\nMaybe the authors could include, in SI section, confusion matrices or precision/recall data for biological classifications, ideally compared to manual expert annotation.\nIn the present study, our primary objective is not biological classification per se, nor the maximization of task-specific performance for any single sample type, but rather to evaluate whether models trained exclusively on synthetic data can robustly detect and segment nanoscale features across diverse experimental contexts. Accordingly, we focus our quantitative evaluation on controlled experimental benchmarks (Table 1), where manual annotation is well defined and enables reliable computation of precision, recall, F1-score, and IoU on real AFM images. These metrics provide the principal quantitative evidence supporting synthetic-to-experimental generalization.\nFor additional demonstrations involving DNA, bacterial samples on pillar substrate and nanostructured samples, we therefore emphasize qualitative robustness and specificity under realistic imaging conditions, including heterogeneous substrates, surface debris, and morphological variability. In these experiments, model predictions were consistently assessed against expert interpretation, and representative examples—illustrating both correct discrimination between biological features and background structures as well as typical failure modes—are presented. We now clarify this distinction explicitly in the revised manuscript to avoid the impression that these demonstrations are intended as fully quantitative biological classification benchmarks.\nImportantly, this design choice reflects the broader goal of SimuScan: to enable rapid, annotation-light deployment of AFM automation workflows, rather than annotation-intensive optimization that can require days to weeks of expert effort and still remain subject to human bias and inter-annotator variability. We believe that this combination of rigorous quantitative benchmarking where ground truth is well defined, together with qualitative stress testing on biologically complex datasets, provides an appropriate and transparent assessment of model performance for the scope and aims of this study.\nMinor Comments\n1. Terminology: In Figure 4, “Bacillus cells” likely refers to Pseudomonas aeruginosa; please correct to avoid taxonomic confusion.\n2. Metrics: Use consistent metrics (preferably mAP@[0.5:0.95]) across models for fair comparison.\n3. Figures: Figures 2–5 contain excessive subpanels and dense captions; consider streamlining for readability.\n4. Data Volume: Clarify how 5,000 synthetic images suffice for training deep architectures—were data augmentations or tiling used?\n5. Manuscript Tone: Several statements (e.g., “redefining what is achievable”) are overly promotional; suggest tempering to reflect demonstrated results.\n6. Formatting: Minor typographical inconsistencies (µ vs μ, superscripts, spacing) should be corrected.\nWe thank the reviewer for these helpful minor suggestions and have addressed each point accordingly. Terminology, formatting, and tone have been corrected; figures and captions streamlined; metrics standardized to mAP@[0.5:0.95]; and additional clarification added regarding training data volume and augmentation. We appreciate the reviewer’s careful attention to detail, which has improved the clarity and consistency of the manuscript.\nIn conclusion, this work presents an exciting and potentially field-shifting approach to autonomous AFM. However, its claims of synthetic-to-real generalization and full autonomy require stronger experimental evidence, quantitative benchmarking, and improved reproducibility. With these revisions, the paper could make a substantial contribution to autonomous nanometrology and AI-driven instrumentation.\nI recommend major revision but I strongly believe that by addressing my comments and remarks, the paper will be among the key-ones in this growing field merging SPM and AI.\nWe thank the reviewers for their thoughtful summary and for recognizing the potential impact of this work on autonomous AFM and AI-driven instrumentation. We especially appreciate the reviewers call for stronger experimental validation, quantitative benchmarking, and enhanced reproducibility. In response to the reviewer’s suggestions, we have undertaken substantial revisions; including expanded experimental datasets, new quantitative evaluations, methodological extensions and we are confident that that paper is now ready for publications.\nWe are grateful for the reviewer’s constructive guidance and share their optimism that the revised manuscript will make a meaningful contribution to the emerging intersection of SPM and AI.\nReviewer #3 (Remarks to the Author):\nMillan-Solsona et al present a novel tool, SimuScan, to create artificial AFM datasets based on specific criteria. They show that autonomous operation of AFM based on artificially-trained machine learning (ML) is possible over a range of samples, from simple geometrical patterns on hard substrates to bacteria. They also emphasise the analysis capabilities of ML tools trained on with SimuScan, as illustrated on DNA structures.\nThe authors argue that the absence of tractable and consistent datasets for ML is the largest bottleneck to wide adoption of ML strategies in AFM. I agree with the authors about this being a major roadblock, both for automation and image interpretation. Several attempts to create extensive AFM databases for ML have not succeeded for lack of suitable large sets and/or metadata information. Most successful publications tend to focus on a narrow and well defined problem.\nIn this context, SimuScan clearly offers a step in the right direction. However, it remains to be seen whether this step is incremental or a step-change.\nResponse:\nWe sincerely thank the reviewer for the detailed reading and the positive comments on our contribution. We are pleased that the reviewer highlighted both the value of SimuScan and the relevance of the challenge we aim to address—namely, the lack of large, consistent, and well-annotated datasets for training machine-learning models in AFM. We fully agree that this limitation has hindered the development of robust automation and ML-based analysis strategies within the AFM community for many years.\nWe also appreciate the reviewer’s remark that SimuScan represents a step in the right direction. The primary goal of our work is precisely to provide a flexible, physically informed, and easily extensible tool capable of overcoming current data-availability constraints and enabling new AI-based workflows. In the revised manuscript, we have expanded the discussion to better reflect this context and to clarify in which ways SimuScan constitutes a step toward more advanced automation and analysis capabilities. We have also toned down the language to clearly separate capabilities demonstrated in this work from future directions.\nIn response to the reviewer’s question regarding whether this represents an incremental improvement or a qualitative change. We have added additional components to the SimuScan package, including a experimental self seeded approach which we are excited about and significantly expanded the demonstrations by including additional experiments. We have additional text in the manuscript explicitly outlining the current limitations of our approach, as well as its potential to evolve toward more complex scenarios as additional simulation modules are incorporated (e.g., more advanced tip–sample interactions, digital twins, spectroscopic modes, nonlinear dynamics). We hope that this clarification helps readers accurately position the present scope and future trajectory of the tool.\nMy main concern with SimuScan as presented here is that it is illustrated on clearly defined and easily identified criteria for samples such as geometrical shapes or loop vs elongated strand. While likely sufficient for large (>100 nm) samples, I am not convinced that it is enough for nanoscale images where countless known and unknown effects may be at play, from convolution to intermittent molecular contamination of the tip, asymmetric tip shapes, unstable sample fixation, dirty sample, inappropriate scanning parameters, etc. I feel this is important because the power of AFM lies at the nanoscale, where optical approaches are less straightforward.\nWe thank the reviewer for raising this important and technically substantive point. We agree that nanoscale AFM image formation is governed by many interacting—and often poorly characterized—factors, including asymmetric tip convolution, intermittent contamination, unstable sample fixation, and suboptimal scan parameters. We also agree that in the previous version of the manuscript our examples could be seen as those of simple samples such as geometrical shapes or loop vs elongated strand which could be represented as analytically defined shape models which is not universally the case.\nTo directly address this challenge, we have significantly expanded SimuScan in the revised manuscript to support non-parameterized, morphology-driven synthetic data generation. Specifically, SimuScan now includes self-seeded geometry workflows in which either an experimentally acquired AFM images or externally defined CAD/STL geometries are used directly as the morphological seed for the subsequent synthetic dataset generation. In this mode, more complex shapes, including sometimes unknown nanoscale effects present in real AFM data are implicitly embedded in the training data without requiring explicit modeling of each contributing mechanism. This capability substantially extends SimuScan beyond the simple geometric and topology-based examples shown in the initial submission.\nThe authors show that SimuScan can distinguish different DNA shapes, but this is still a relatively simple question regardless of the possible issues mentioned above. What about distinguishing the orientation of an adsorbed (small) molecule? Or a clean from a dirty tip? Generally, how can realistic nanoscale data be generated without knowing all the details about the sample and the tip-sample interactions that can dramatically change the resulting image? Is this a limitation of SimuScan?\nResponse:\nWe sincerely thank the reviewer for their insights. The initial demonstrations using simple geometric features and DNA topology were intentionally chosen as controlled benchmarks with well-defined ground truth. In response to the reviewers valid concerns, we have expanded the manuscript to include substantially more complex experimental systems, including bacterial cells imaged on nanopatterned pillar substrates and DNA origami nanoassemblies, which introduce non-planar backgrounds, increased morphological complexity, and realistic substrate effects.\nWe further acknowledge that more dynamic or intermittent phenomena; such as time-dependent molecular contamination, unstable adsorption, or poorly optimized scan parameters, are inherently difficult to capture in their entirety. Rather than attempting exhaustive modeling upfront, SimuScan is intended as a robust and rapid starting point: in cases involving more complex interactions or requiring very high levels of task-specific precision, we fully expect that tuning of the SimuScan data generator, as well as model architecture and hyperparameters, will be necessary, and the framework has been explicitly designed with this flexibility in mind. However, such task-specific optimization is not the goal of the present work. Instead, SimuScan is designed as a modular and extensible framework, allowing additional effects to be incorporated progressively as needed.\nImportantly, we want to stress that SimuScan’s primary objective is not to reproduce every nanoscale interaction with quantitative fidelity, instead we aim to enable robust, annotation-free model training under uncertainty by exposing deep learning models to dominant AFM artifact mechanisms sampled across broad, physically plausible ranges.\nWe therefore view the reviewer’s concern as clarifying the intended scope of SimuScan rather than identifying a fundamental limitation. SimuScan is not designed to solve all nanoscale AFM interpretation problems, but to provide a flexible, generalizable pathway toward automated feature detection across diverse, imperfect, and evolving experimental conditions. Consistent with this perspective, we have also tempered the manuscript’s tone to present SimuScan as a significant step toward scalable synthetic datasets and semi-autonomous AFM workflows, rather than a complete or final solution.\nA second concern/question is the apparent lack of spectroscopic information. Currently, most AFM operate in spectroscopy mode (peak force tapping, wave mode, etc) with considerable information in the spectroscopy curve obtained at each pixel. Can SimuScan create relevant information to train ML of the spectroscopy curves?\nWe thank the reviewer for raising this important question. SimuScan, in its present form, is focused exclusively on generating realistic morphological (topographic) datasets and does not simulate full spectroscopy curves such as those obtained in peak-force tapping, WaveMode, or force–distance spectroscopy. While our approach is compatible with topography channels derived from these techniques, the framework does not currently aim to reproduce the underlying per-pixel spectroscopic signals.\nWe have clarified this scope in the revised manuscript.\nWhile SimuScan captures a broad range of AFM-specific artifacts relevant for realistic synthetic data generation, this first implementation makes deliberate scope choices leaving clear avenues for future extension. At present, the framework focuses on the topographic channel, which is broadly applicable across common AFM modes (e.g., dynamic, static, PeakForce Tapping, and wave-based operation), while additional contrast channels such as phase, amplitude, or spectroscopic signals are not explicitly modeled. Long-timescale thermal and mechanical drift is also not simulated, reflecting the prevalence of closed-loop AFM systems and standard post-processing procedures that mitigate these effects in many experiments. In addition, SimuScan models static double-tip artifacts but does not yet capture intermittent or time-dependent probe contamination. Extending the framework to incorporate additional signal channels, drift dynamics, and evolving probe conditions represents a natural and modular path forward, and would further expand the realism, versatility, and applicability of SimuScan across a wider range of AFM modalities and experimental conditions.\nAt the same time, we agree that ML applied to spectroscopy curves represents an exciting direction, and SimuScan-trained segmentation models already enable precise identification of features or regions of interest where spectroscopy could be targeted. In future extensions, we plan to incorporate modules for generating synthetic functional property maps and, ultimately, spectroscopic curves, building on the same modular architecture.\nThe presentation of the paper is generally clear, but Fig 2 contains too much information (and too small in h/i) to be easily appreciated.\nWe thank the reviewer for this helpful suggestion. We agree that the original Fig. 2 contained too much information and that panels h/i were difficult to appreciate at the provided scale. In the revised manuscript, we have reorganized the figures by separating the pipeline schematic (new Figure 2) from the dataset examples (new Figure 3), enlarging key panels, and simplifying the layout to improve readability and visual clarity."}, {"round": 2, "reviewer_comments": {"reviewer_1": "All my questions were answered and with large help of questions of the other referees the manuscript was significantly improved. From my point of view it is now acceptable for publication.", "reviewer_2": "Nice improvement according to the comments and suggestions made by the three referees!", "reviewer_3": "The authors have extensively revised their manuscript and addressed the bulk of my concerns. I am happy to recommend publication after they have revised typos and textual mistake (e.g. references mis-formatted: \"Stage automation extends this process beyond the intrinsic ~100 µm AFM scan range,{Millan-Solsona, 2025 #44} enabling tiling across large sample areas and revisiting of features identified by segmentation\". )"}, "author_response": ""}]

Decision letter