# Identification of AI-Generated Rock Thin-Section Images by Feature Analysis Under Data Scarcity
## 3 Results and Discussion
For the analyzed dataset, Benford Deviation values were slightly but consistently higher for generated data, suggesting subtle differences in numerical structure between natural and synthetic images. This may be an intriguing starting point for further data authenticity or provenance analyses. The following steps were performed to calculate this feature: the grayscale image was converted into a vector, the absolute values of pixel intensities were extracted, and each value was rounded down to the nearest integer. Zeros were removed, since zero cannot appear as the first digit and is not covered by Benford's Law. The frequency of occurrence of digits 1 to 9 as the leading digits was then computed. Finally, the sum of differences between the observed distribution and the theoretical Benford distribution [29] was calculated (Equations (3) and (4)). \[P_{exp}(i)=log_{10}\bigg{(}1+\frac{1}{i}\bigg{)},\ i=1,\ \ldots,\ 9 \tag{3}\]  
\[Benford\ Deviation=\sum_{i=1}^{9}\abs{P_{obs}(i)-P_{exp}(i)} \tag{4}\]  
In analyzing object-based features (Figure 10) derived from early-stage color clusters, several parameters enabled the distinction between real and generated images. One particularly relevant feature was Eccentricity, especially its skewness and mean. Another interesting finding concerned differences in the mean area metric (average object area), where synthetic data exhibited a lower median and reduced variability compared to real  
Figure 4:0 Examples of box plots for selected texture-based features. data. Although the absolute values varied across rock types, the key observation was the consistency of the overall trend rather than the specific results for individual samples. A similar pattern was observed for the number of objects metric, interpreted as the number of detected homogeneous clusters. In all analyzed samples, generated images consistently exhibited lower values for this metric than real images. This may indicate lower structural diversity in synthetic data, simplified morphology, and a tendency of the generative model to produce more homogeneous regions without subtle textural transitions. The most pronounced discrepancies were observed in the Schist and Dolomite II samples, suggesting that generative algorithms may struggle to replicate complex geological structures, consistent with expert observations. The absence of a higher number of object values, typical of real images, may reflect the model's limitations in capturing local morphological nuances and its tendency to smooth out content, leading to cluster merging and a reduced cluster count. To evaluate the effectiveness of selected features in classifying images as \"real\" or \"generated,\" a comparative experiment was conducted using six different classifiers. The dataset was split into training and test sets in an 80/20 ratio. Models were trained and evaluated. Figure 11 presents the confusion matrices obtained from classification using all available features, without remediation after the prior removal of non-informative features containing unmeasurable values (e.g., NaN). The results obtained were satisfactory. Only a few individual images were misclassified, except for the Random Forest classifier, which correctly classified all images without confusion. The presence of NaN values is directly  
Figure 4:1 Examples of box plots for selected object-based features. linked to segmentation challenges, particularly when using a universal (i.e., identical) segmentation method across all image types and rock categories. In geological practice, segmentation methods are often adapted to specific rock types due to the need to detect different geological characteristics, such as anisotropy, grain size distribution, or tortuosity. Therefore, applying a single segmentation strategy may lead to suboptimal feature extraction in some cases, resulting in missing values (NaNs).