\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage{natbib}




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}





\usepackage{float}






 

\iflatexml
\documentclass[fleqn, 10pt]{article}
\fi
% \usepackage[english]{babel} % Not (yet) supported by LaTeXML.

\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\usepackage{graphicx}

\usepackage{threeparttable}

% \usepackage[colorinlistoftodos]{todonotes} % Not (yet) supported by LaTeXML.

\RequirePackage[superscript,biblabel,nomove]{cite}

% \usepackage{physics} % Not (yet) supported by LaTeXML.

% \usepackage{kotex} % Not (yet) supported by LaTeXML.

% \usepackage[margins]{trackchanges} % Not (yet) supported by LaTeXML.

% First macro on next line not (yet) supported by LaTeXML: 
% \addeditor{ldh}
% \usepackage{gensymb} % Not (yet) supported by LaTeXML.
% \usepackage[colorinlistoftodos]{todonotes} % Not (yet) supported by LaTeXML.
\newcommand{\beginsupplement}[][]{%
        \setcounter{table}{0}
        \renewcommand{\thetable}{\arabic{table}}%
        \setcounter{figure}{0}
        \renewcommand{\thefigure}{\arabic{figure}}%
        \renewcommand{\figurename}{\textbf{Fig. S}}
        \renewcommand{\tablename}{\textbf{Table S}}
     }
\RequirePackage[left=2cm,                right=2cm,                top=2.25cm,                bottom=2.25cm,                headheight=12pt,                letterpaper]{geometry}


\begin{document}

\title{\textbf{Supporting Information for ''Predicting AFM Topography From Optical Microscopes Using Deep-Learning'' }}



\author[1]{Jaewoo Jeong}%
\author[1]{Taeyeong Kim}%
\author[1]{Bong Jae Lee}%
\author[1]{Jungchul Lee}%
\affil[1]{Affiliation not available}%


\vspace{-1em}



  
  \date{May 27, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup








\sloppy


\selectlanguage{english}
\begin{abstract}
This Supporting Information includes information regarding topography prediction results, latent dimension analysis, and simulation of topography transformation

{ \emph{} }Corresponding author Email: { \emph{~{bongjae.lee@kaist.ac.kr}}, \emph{~{jungchullee@kaist.ac.kr}} }%
\end{abstract}%

\section*{Topography prediction results}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Fig/Fig.-S1}
\caption{{\label{fig:1} Comparison between true surfaces (A) and the predicted surfaces (B) for all annealing durations. Each prediction is based on OM-AFM corrleations of three other annealing duration, and prediction error is 22.6\%, 8.7\%, 7.9\%, and 15.2\% from 5 to 150 min. predictions. Each error is the lowest value out of 5 separate training iterations.%
}}
\end{center}
\end{figure}

\section*{Latent dimension analysis}

When training the encoder-decoder model without any constraint, the latent variables' distributions are randomly generated. Specifically, latent variable distribution after training depends on the initialization of model's neural network weights. In this context, the weights refer to the neural network parameters that transform the input data within the network's hidden layers, which are modified during training. These weights are randomly initialized from a normal distribution using glorot initialization. Therefore, since starting from different weight initializations, each iteration of training results in discretely different distributions of latent variables, regardless of each's performance in topography prediction. Since OM images of 4 different annealing durations are used as training data, the encoded latent variable must have a correlation with annealing duration in order to differentiate the OM images and reconstruct different AFM topographies from the latent variables. When evaluating such a correlation, an exponential relationship between the latent variables and time has been empirically manifested due to the nature of the training data. Their latent variable distributions are expressed as an exponential correlation in the latent dimension with a linear time scale (figure S\ref{fig:2}A) and vice-versa (figure S\ref{fig:3}A).
 
On the other hand, training the latent variables under a manual constraint enabled construction of a desired distribution of latent variables. Compared to an empirical correlation, enforcing a manual constraint allowed a more accurate correlation between time and latent variable since the discrepancy between the two are precisely minimized for the constrained training scheme. In doing so, instead of training the entire network at once, the encoder is separately trained with tailored latent variable labels. For this task, the encoder's latent space labels are manually generated to enforce a linear relationship between encoded latent variable and time. Subsequently, the trained encoder is forced to train the decoder to reconstruct the AFM topographies based on the linearly distributed latent variables. Figure S\ref{fig:2} and S\ref{fig:3} compare the latent space distribution with and without constraint.\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Fih/Fig.-S2}
\caption{{\label{fig:2} Comparison of latent space databases generated without (A) and with (B) constraint. For the \textit{x}-axis, time is expressed in a linear manner.%
}}
\end{center}
\end{figure}

\newpage\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Fii/Fig.-S3}
\caption{{\label{fig:3} Comparison of latent space databases generated without (A) and with (B) constraint. Annealing time is expressed in a non-linear manner, with same length of spacing between the 5, 15, 60, and 150 min. clusters.%
}}
\end{center}
\end{figure}

The main advantage of training with constraint is that it allows for a near perfect correlation between latent variables and time, with an $R^2$ value of 0.9999 for the linearly fitted function. When training the entire encoder-decoder model without constraint, the error between predicted and label topography is minimized. In that sense, the linear correlation is empirically determined based on the trend of training data and the randomly initialized weights. The freely trained variables repetitively show an exponential relationship with time, a quantitative representation of time encoded into the OM images. On the other hand, compared to training the entire encoder-decoder network, initial training of the encoder network minimizes the error between the encoded variables and the ground truth labels itself. For the purpose of manufacturing monitoring based on OM images, an accurate representation of encoded latent variables is the sole interest. Therefore, instead of relying on an empirical correlation, directly training the model to minimize the error between encoded latent variables and pre-defined distribution results in a more accurate representation of GON structures using latent variables. Comparing the absolute mean error between label and encoded variables, training with constraint resulted in 10 times smaller error compared to without constraint.

For the purpose of simulation, figure S\ref{fig:4}A and S\ref{fig:4}B compares the temporal change in average height and roughness of continuously reconstructed surface topographies, respectively. Both simulations accurately follow the trend of training data for both graphs, with only a slight discrepancy in slope. As shown in figure S\ref{fig:4}A, simulation with constraint converges to its terminal slope about 20 minutes faster and bears 40\% less fluctuation after reaching the terminal slope. When comparing between simulated average height and training data, the average discrepancies were acquired as 2.33 nm with constraint and 4.77 nm without constraint. Such accuracy verifies the competency of the suggested simulation schemes, both with and without constraint. One interesting phenomenon to note is that the local maximum of roughness is observed before 5 minutes, as shown in figure S\ref{fig:4}B. Such is due to the nature of training data. The overall topography flattens with increasing annealing time, which has manifested when simulating topographies before 5 minutes. While doing so, the maximum height of topographies remained constant, a coupled pattern the deep learning model has naturally acquired from the trend of training data. Therefore, since the overall height increased with identical maximum height, roughness has decreased correspondingly. The supplementary video (figure S5) also compares both simulations by visualizing the dynamic change in topography.

\newpage\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=1.00\columnwidth]{figures/Fij/Fig.-S4}
\caption{{\label{fig:4} Comparison of topography simulation performance with and without constraint. Each figure compares the (A) Average height and (B) roughness, calculated as standard deviation of the average height, from both simulations in reference to the training data%
}}
\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.98\columnwidth]{figures/Fig--S5/Fig--S5}
\caption{{Simulation of GON structures' topography transformation, iterated with
and without time constraint.
{\label{721514}}%
}}
\end{center}
\end{figure}

\selectlanguage{english}
\FloatBarrier
\end{document}

