# Physics-Based Data Augmentation Enables Accurate Machine Learning Prediction of Melt Pool Geometry
## 2 Materials and Methods
### Machine Learning Modeling and Optimization  
To achieve robust and accurate prediction of melt pool geometry, three supervised machine learning (ML) algorithms with complementary modeling characteristics were employed: (i) Multilayer Perceptron (MLP), (ii) Random Forest (RF), and (iii) eXtreme Gradient Boosting (XGBoost). These models were trained using the augmented dataset comprising 36 experimental samples and 15 physically consistent synthetic samples, and evaluated in terms of generalization and predictive accuracy. MLP, a type of feedforward artificial neural network, consists of an input layer, one or more hidden layers, and an output layer. Each neuron computes a weighted sum of inputs and applies a nonlinear activation function (e.g., ReLU) to produce the output. Weight updates are achieved via backpropagation by minimizing the loss between the predicted and actual values, typically using a mean squared error (MSE) loss function. A schematic of the MLP architecture is shown in Figure 3a. To stabilize training and improve convergence, all input features were normalized. The network was trained using the Adam optimizer, a learning rate of 0.001, and a maximum of 1000 epochs. Several architectures with different hidden layer configurations were tested, and 5-fold cross-validation was used to evaluate performance. The best-performing architecture (Model 4), which comprises five layers of decreasing neuron sizes, is summarized in Table 4. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Model Number**} & \multicolumn{5}{c}{**The Number of Neurons in the Hidden Layer**} \\ \cline{2-6}  & **First Layer** & **Second Layer** & **Third Layer** & **Forth Layer** & **Fifth Layer** \\ \hline Model 1 & 48 & 32 & - & - & - \\ Model 2 & 48 & 32 & 16 & - & - \\ Model 3 & 64 & 48 & 32 & 16 & - \\ Model 4 & 64 & 48 & 32 & 16 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: MLP hidden layer parameters. Figure 2: An explicit-model-augmented machine learning framework for melt pool geometry prediction. Random Forest is an ensemble learning algorithm that combines multiple decision trees to enhance robustness and mitigate overfitting. Each tree is trained on a bootstrap sample, and final predictions are averaged. Hyperparameters including the number of estimators, maximum tree depth, and minimum sample splits were optimized using Bayesian optimization. The model structure is illustrated in Figure 3b, and optimal parameters are listed in Table 5.  
XGBoost is a gradient boosting framework optimized for speed and regularization. It builds additive regression trees sequentially, where each tree corrects the residual errors of the previous ensemble. Compared to standard Gradient Boosting Decision Tree (GBDT), XGBoost introduces L1/L2 regularization (\(\alpha\) and \(\lambda\)) and shrinkage to control overfitting--features particularly important for small sample sizes. Hyperparameter tuning was also conducted via Bayesian optimization. The final parameter selection is detailed in Table 5.  
All models underwent hyperparameter tuning using the Tree-structured Parzen Estimator (TPE) algorithm implemented in the HyperOpt Python3.11 library. The objective was to maximize the coefficient of determination (R2) and minimize error metrics. The search space for each algorithm was defined based on preliminary sensitivity analysis. To ensure robustness and mitigate overfitting under small sample conditions, 5-fold cross-validation was adopted throughout the optimization and validation process. The performance of each model was evaluated using three metrics:  
* \(R^{2}\) (coefficient of determination): measures how well predictions approximate actual values. * MAE (mean absolute error): evaluates average absolute deviation. * RMSE (root mean squared error): penalizes larger errors more severely. Figure 3: Schematic diagram of the algorithms: **(a)** MLP; **(b)** Random Forest.