Abstract
Additive Friction Stir Deposition (AFSD) is a solid-state manufacturing technique that avoids melting-related defects. Incorporating nanodiamond (ND) and titanium nitride (TiN) nanoparticles into AA5083 deposits offers in situ composite strengthening, but the extremely small experimental datasets demand rigorous, leakage-resistant validation strategies. This study investigates a nested group-wise cross-validation pipeline for Vickers microhardness (HV) prediction from spindle speed (RPM), vertical feed rate (Vz), and nanoparticle addition (binary), establishing a reproducible template for small-data machine learning in solid-state additive manufacturing. The dataset comprises 13 unique AFSD conditions yielding 78 indentations. Gradient Boosting (GB) hyperparameters are tuned exclusively inside the inner loop of nested Leave-One-Group-Out cross-validation; outer LOGO provides the leakage-resistant performance estimate. Preprocessing is embedded in scikit-learn Pipelines and fitted solely on training folds. Exact interventional SHAP values are computed on raw features, with explicit acknowledgment of the confounded experimental design. The nested CV GB model achieved R2 = 0.770 (95% CI: 0.487–0.859) and RMSE = 3.57 HV. Linear Regression performed comparably (R2 = 0.802), but the limited sample size precludes detection of nonlinearity. SHAP attributed the largest contribution to powder addition (3.56 HV), followed by Vz (3.14 HV) and RPM (1.49 HV); these values cannot be interpreted causally. Nested evaluation of raw features alone gave R2 = 0.893, indicating that engineered features increased variance without detectable gain at this sample size. The pipeline provides a rigorous standard for future ML studies. A linear model on engineered features is recommended as a transparent baseline for process planning after external validation.