Decoding the Past: An Uncertainty-Aware Deep Learning Framework for Sex Attribution in Prehistoric Hand Stencils
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
Decoding the Past: An Uncertainty-Aware Deep Learning Framework for Sex Attribution in Prehistoric Hand Stencils Karel Becerraa , Boris Mederosb , Dean Snowc , Ramón A. Mollinedad,1 a
b
Data Science and AI Division, Azyri, Miami, Florida, USA Departamento de Física y Matemáticas, Instituto de Ingeniería y Tecnología, Universidad Autónoma de Ciudad Juárez, Ciudad Juárez, Mexico c Professor Emeritus of Anthropology at Pennsylvania State University, Pennsylvania, USA d Institute of New Imaging Technologies, Universitat Jaume I, Castelló de la Plana, Spain
Abstract
arXiv:2608.14539v1 [cs.CV] 14 Aug 2026
Determining the biological sex of the individuals who created Upper Paleolithic hand stencils remains a challenging problem due to the absence of ground truth, population differences between contemporary and prehistoric groups, and the uncertainty introduced by image degradation. Traditional morphometric methods suffer from high structural overlap across sexes, poor cross-population generalizability, and subjective feature engineering. This study presents an uncertainty-aware deep learning framework for sex attribution in prehistoric hand stencils that explicitly models, propagates, and aggregates uncertainty throughout the analytical pipeline. The methodology combines dual image processing, dual contour extraction, structured silhouette augmentation, model architectural diversity, and ensemble-based decision aggregation. The pipeline generates twelve plausible silhouette realizations per stencil to capture boundary uncertainties, which are processed by two ensembles of ten deep neural networks each (EfficientNet-B3 and MobileViT-S) trained on 14,036 contemporary hand samples. Furthermore, a triangulated validation scheme integrates ensemble predictions with unsupervised 2D latent-space manifold mapping (UMAP + k-NN) and explainable AI spatial attributions (LayerCAM) to ensure anatomical consistency. On contemporary data, ensemble models achieve strong classification performance, with accuracies exceeding 88% in older age groups. When applied to prehistoric stencils, the framework produces both sex predictions and confidence measures of internal agreement, enabling the distinction between morphologically stable and ambiguous cases. The convergence observed across ensemble predictions, latent-space structure, and interpretability analyses suggests that uncertainty can be transformed into an explicit and measurable component of archaeological inference, providing a robust, transparent, and reproducible approach to decoding ancient rock art. Keywords: Prehistoric hand stencils, hand silhouettes, sex classification, deep learning, uncertainty management, explainable AI 1. Introduction Echoes of ancient hands in cave art can be found worldwide, with hand stencils—negative handprints created by spraying pigment around the hand—being the most common form (Snow 2006; Lundborg 2014). ∗
Corresponding author: mollined@uji.es Email addresses: karel.becerra@azyri.com (Karel Becerra), boris.mederos@uacj.mx (Boris Mederos), drs17@psu.edu (Dean Snow), mollined@uji.es (Ramón A. Mollineda)
They provide some of the earliest evidence of symbolic behavior and artistic expression, that some researchers have related to personal signatures, ritual marks, or protective symbols to ward off danger (Janssens 1957; Permana, Pojoh, et al. 2017). As suggested by (Fernández-Navarro, Fidalgo-Casares, et al. 2025), widespread participation in rock art may indicate group cohesion, as well as an intention to transmit cultural values across generations. Recent research has leveraged advanced, non-destructive techniques for analyzing and measuring ar-
chaeological hands (Snow 2013). To mitigate the inaccuracies and optical distortions associated with 2D photographs and in-situ measurements, photogrammetric 3D models of archaeological hand stencils have been used to generate 2D orthophotos, on which landmarks and semilandmarks were subsequently identified for morphometric analysis (Fernández-Navarro, Camarós, et al. 2022; Fernández-Navarro, FidalgoCasares, et al. 2025). While most studies have focused on estimating the sex of the artists behind Palaeolithic cave art (Wang et al. 2010; Snow 2013), recent groundbreaking work has expanded this focus to include age prediction (Fernández-Navarro, FidalgoCasares, et al. 2025). Strong evidence suggests that both sexes, including children and subadults, were actively involved in these artistic practices, challenging the long-standing belief that they were primarily created by adult males. The biological evidence for sexual dimorphism in human hands is extensive and well-established, encompassing differences in hand size, shape, bone structure, dermatoglyphic patterns, and morphometric traits (Snow 2013; Karakostis et al. 2015; Bindurani et al. 2016; Yune et al. 2019; Polcerová et al. 2023). Studies consistently show that males have larger and more robust hands—with broader palms and thicker finger bones—than females, with these differences emerging in early childhood (by age 3) and becoming more pronounced during development (Karakostis et al. 2015; Bindurani et al. 2016). Skeletal analyses reveal that the proximal phalanges are significantly larger in men, with the greatest dimorphism observed in the thumb (Karakostis et al. 2015). Hand proportions, such as the hand index (breadth-to-length ratio), are also reliably higher in males and have proven useful for sex estimation across populations, albeit with moderate accuracy (Bindurani et al. 2016; Suleiman et al. 2024). Dermatoglyphic studies demonstrate consistent sexbased differences in ridge counts, particularly on the radial sides of the thumb and index finger, which may reflect prenatal developmental influences (Polcerová et al. 2023). Geometric morphometric analyses and recent advances in machine learning further support the presence of subtle but detectable shape and proportion differences that can be leveraged for sex classification, even in cases where such differences are imperceptible to human observers (Králík et al. 2014; Yune et al. 2019; Fernández-Navarro, GarateMaidagan, et al. 2024). Collectively, these findings provide robust multidisciplinary support for the pres2
ence of sexual dimorphism in human hands. The analysis of prehistoric handprints to determine the sex of Paleolithic cave artists has attracted growing interest in archaeology, offering insights into gender roles. However, while some studies have shown promising results, critical methodological and population-based challenges remain. Traditional morphometric methods for sexing prehistoric handprints, based on size, angles, and digit ratios, are limited by significant hand size overlap between sexes and ages, poor generalizability across populations, and low accuracy (often around 60–65%) (Snow 2006; Snow 2013; Jowaheer and Agnihotri 2011; Galeta et al. 2014). Manning index (2D:4D ratio) also show substantial withinand between-population variation (McIntyre 2006; J. T. Manning et al. 2007), reducing reliability unless population parameters are known (Nelson, J. Manning, et al. 2006). Another challenge, noted by (Gunn 2006), is that stencil images created from a same hand can vary in size measurements by up to 5 mm. Unsurprisingly, earlier studies aimed at estimating the sex of prehistoric hand stencils have yielded notably conflicting results (Nelson, Hall, et al. 2017). Traditional approaches rely on manually extracted handcrafted features, such as geometric measurements and digit ratios, which are heavily dependent on subjective domain expertise, often fail to generalize across datasets, capture only predefined low-level traits, and scale poorly. Some of the aforementioned limitations were addressed by an early automated approach (Wang et al. 2010) combining image processing techniques with a machine learning algorithm (Support Vector Machines) to extract a number of hand features. A more recent work (Fernández-Navarro, Fidalgo-Casares, et al. 2025) also automates the location of landmarks, the calculation of engineered features, and decisionmaking using discriminant analysis. Nonetheless, subjectivity persists in the selection of human-designed features, while more abstract morphological patterns remains unexplored. Recent work (Mollineda et al. 2025; FernándezNavarro, González-Marfil, et al. 2025) introduces deep learning techniques for sex prediction from prehistoric handprints. In the absence of annotated ancient data, deep neural networks (DNNs) are trained on contemporary hand silhouettes and then transferred to Paleolithic samples. By learning hierarchical representations directly from images, these models avoid manual feature engineering and capture complex, data-driven patterns that may enhance accuracy and robustness
aware inference methodology that models, propagates, and aggregates variation hierarchically across a deep learning pipeline. Building upon the classifier ensemble and spatial attribution-based interpretability method proposed in (Mollineda et al. 2025), the present work substantially expands the previous framework in both methodological scope and uncertainty management. The extended framework systematically incorporates variability across all stages of the analysis: source-level variation through dual image processing, annotation-level variation through dual contour extraction, morphological variation through structured silhouette generation, uncertainty quantification at multiple stages, an additional interpretability tool based on latent-space analysis and manifold mapping, and a triangulated validation scheme designed to identify convergent evidence across predictions, interpretability findings, and uncertainty measures. By propagating controlled variability throughout the pipeline, the proposed methodology goes beyond the previous ensemble-based approach, deriving final classifications from the convergence of multiple, highly structured yet individually imperfect observations. Nine hand-stencil images are considered as case studies to demonstrate the practical applicability of the proposed methodology and its value as a tool to support archaeological interpretation. The cases are analyzed jointly through their sex predictions, associated confidence measures, latent-space organization, and spatial attribution patterns, providing complementary evidence for interpreting the model outputs. Importantly, the nine cases encompass a broad range of outcomes, from highly consistent predictions supported by multiple sources of evidence to cases characterized by substantial uncertainty or disagreement. This diversity enables a detailed examination of different analytical scenarios and illustrates how the methodology can support the interpretation of both well-supported and ambiguous cases. These nine images are not intended to provide a representative sample of the morphological variability of Upper Palaeolithic hand stencils; rather, their sole purpose is to demonstrate the practical value and analytical capabilities of the proposed methodology. The main contributions of this work are summarized below:
across domains. The underlying hypothesis is that hand morphology encodes high-level, sex-informative features that remain sufficiently invariant across age and long-term evolutionary change. While DNNs offer significant promise, the analysis of prehistoric hand stencils remains affected by a range of archaeological and technical uncertainties. Pigment erosion, incomplete preservation, surface irregularities, uneven illumination, and poorly defined stencil boundaries can hinder both automated segmentation and manual contour delineation, with the latter being particularly sensitive to observer judgment and image noise. These challenges are illustrated in Figure 1 using examples from El Castillo Cave (Snow 2006). Representations based on photogrammetric 3D models and 2D orthophotos can reduce viewpoint- and scale-related distortions, but they do not eliminate these inherent sources of uncertainty. Moreover, uncertainty may arise during 3D reconstruction and orthophoto generation: reconstruction errors can propagate to the final representation, while orthoprojection depends on the reconstructed surface geometry and the choice and orientation of the projection plane. Orthoprojection does not generally preserve intrinsic distances on curved or irregular cave surfaces, and the resulting distortions may vary across the same hand stencil according to local surface orientation. Although such distortions are small on nearly planar surfaces, they can introduce relevant geometric uncertainty into morphometric measurements on irregular ones. This issue is particularly relevant to sex-attribution methods, for which small variations in finger dimensions, hand proportions, or landmark locations can affect the extracted descriptors and subsequent classification. Finally, the absence of biological ground truth for Palaeolithic individuals represents an intrinsic source of uncertainty that cannot be resolved through geometric preprocessing alone. Overall, these limitations, ranging from the absence of biological ground truth to surface degradation, underscore the need for approaches that explicitly account for uncertainty to support robust interpretations. Accordingly, methods that generate diversity through plausible geometric realizations of multiple source representations, identify patterns across multiple hypotheses, quantify uncertainty, and provide interpretable evidence for their decisions appear well suited to this task. This study proposes a multi-layered, uncertainty-
• A novel uncertainty-informed computational framework for sex attribution in prehistoric hand stencils, which explicitly models, propagates, and 3
(a) img_26
(b) img_28
(c) img_31
(d) img_38
Figure 1: Four prehistoric hand images from El Castillo cave (Snow 2006).
aggregates uncertainty across all stages of the analytical pipeline.
2. Related work The analysis of hand stencils in rock art for sex estimation has evolved substantially, progressing from traditional anthropological measurements to more advanced computational approaches. In contrast to most reviews in this field, this section adopts a distinct perspective by focusing on four key dimensions: the nature of the hand data (Paleolithic stencils, simulated stencils, or contemporary), the feature extraction approach (manually handcrafted features, automatically extracted handcrafted features, or automatically learned features), the decision rule and the experimental protocol. Structuring the reviewed studies along these dimensions enables a clearer categorization and helps reveal common trends in hand stencil analysis. Table 1 summarizes the selected studies, chosen for their experimental designs combining hand feature extraction and automatic sex classification. One of the earliest and foundational studies was conducted by (Snow 2006), who introduced a twostage analytical approach based on predictive discriminant analysis. Using a modern reference sample of 111 adult individuals of European descent, the first stage applied Fisher’s linear discriminant functions to overall hand length and finger lengths (D2–D5) to separate adult males from individuals with smaller hands, a group that in archaeological contexts may include both adult females and subadults. Because absolute size alone cannot reliably distinguish women from young boys, the second stage applied the same discriminant framework to digit ratios (D2:D4 and D2:D5) to separate adult females from subadult males. The predictive equations, learned from the contemporary training set, were then applied to a small sample of six Paleolithic stencils, yielding one of the first demographic interpretations of cave artists. Expanding on this, (Wang et al. 2010) introduced an automated machine learning pipeline using con-
• A structured silhouette representation strategy that generates multiple plausible contour realizations through dual annotation, morphological perturbations, and multi-channel compositions, capturing annotation and morphological uncertainty. • A triangulated validation scheme integrating ensemble predictions, latent-space analysis (UMAP + k-NN), and aggregated interpretability maps (LayerCAM), providing convergent evidence and enabling the diagnosis of epistemic stability. The remainder of this manuscript is organized as follows. Section 2 reviews previous research on sex estimation from hand morphology and prehistoric hand stencils, with particular attention to the evolution from traditional morphometric approaches to contemporary machine learning and deep learning methodologies. Section 3 introduces the contemporary and prehistoric datasets and the proposed inference framework, detailing the silhouette extraction and augmentation procedures, the ensemble-based classification strategy, and the post-hoc analysis techniques used for validation and interpretation. Section 4 presents the experimental protocol adopted to benchmark the deep learning models on contemporary hand silhouettes and to deploy the framework on prehistoric hand stencils, including results obtained on both data domains. Section 5 discusses the significance of the findings, the strengths and limitations of the proposed approach, and practical considerations for archaeological interpretation. Finally, Section 6 summarizes the main conclusions and outlines potential directions for future research.
4
Training data
Test data
Features extraction
Decision rule
Protocol
Contemporary
Paleolithic
Automatically learned
DNN
Cross-domain
Contemporary
Simulated, Paleolithic
Automatically handcrafted
LDA
Cross-domain
Contemporary
Paleolithic
Automatically learned
DNN
Cross-domain
Contemporary
Paleolithic
Manually handcrafted
LDA
Cross-domain
Contemporary
Contemporary
Fisher’s LDA
Leave-one-out
Contemporary
Paleolithic
Nearest class mean
Cross-domain
Contemporary
Contemporary
Fisher’s LDA
Leave-one-out, Cross-domain
(Wang et al. 2010)
Contemporary
Paleolithic
SVM
Cross-domain
(Snow 2006)
Contemporary
Paleolithic
Fisher’s LDA
Cross-domain evaluation
Reference (FernándezNavarro, González-Marfil, et al. 2025) (FernándezNavarro, Fidalgo-Casares, et al. 2025) (Mollineda et al. 2025) (RabazoRodríguez et al. 2017) (Nelson, Hall, et al. 2017) (Permana, Arifin, et al. 2015). (Galeta et al. 2014)
Automatically handcrafted Manually handcrafted Manually handcrafted Automatically handcrafted Manually handcrafted
Table 1: Studies on sex attribution in prehistoric hand stencils, categorized by the type of hand data used (simulated stencils, Paleolithic stencils, or contemporary hand images). Abbreviations: LDA = Linear Discriminant Analysis; DNN = Deep Neural Network; SVM = Support Vector Machine.
side the D2:D4 and D2:D5 ratios were determined directly on the French dataset using a leave-one-out cross-validation scheme. Second, to evaluate generalizability across populations, they applied pre-existing discriminant functions trained on a U.S. sample by (Snow 2006) directly to the French dataset. The model trained on U.S. data exhibited poor generalization; differences in average hand size between the U.S. and French populations led to heavily biased classifications. Consequently, the authors concluded that modern morphometric references are unreliable for estimating the sex of prehistoric artists. Concurrently, other researchers investigated the application of these methods across diverse geographical contexts. (Permana, Arifin, et al. 2015) employed the manually extracted D2:D4 digit ratio on both contemporary individuals—181 adults and juveniles from three villages—and hand stencils from Pettakere Cave in Indonesia. Their approach used a simple decision rule based on comparison with class means, applying a rule derived from contemporary data directly to archaeological samples. In a similar vein, (RabazoRodríguez et al. 2017) examined sexual dimorphism in hand stencils from El Castillo Cave (Spain). Their
temporary hand images. Their methodology involved transforming the images into the HSV color space and applying K-means clustering to isolate hand contours. By identifying key points of interest, specifically fingertips and valleys, they extracted geometric features including finger lengths, finger widths, palm dimensions, and the well-known D2:D4 ratio. To reduce the effect of scale differences across images, these measurements were normalized by the length of the middle finger. The middle finger was omitted after normalization due to its constant value, and the thumb was excluded due to unreliable measurements. Finally, a Support Vector Machine (SVM) classifier, trained on modern data represented as 33-dimensional feature vectors, was applied to prehistoric handprints from French caves. This study constitutes one of the earliest applications of machine learning to sex estimation in archaeological handprints. The issue of population variability and methodological reliability was directly addressed by (Galeta et al. 2014) using an independent modern French dataset of 100 right-hand prints from the University of Bordeaux. In a first analysis, linear discriminant functions based on hand and finger lengths (D2–D5) along5
mented using Procreate1 ; conversely, silhouettes from study relied on a contemporary dataset of 77 hand the contemporary data were extracted automatically. stencils, from which three key features were extracted: To achieve this automation, a ResU-Net model (Dioverall hand length, index finger length, and ring finakogiannis et al. 2020) was initially trained on the 247 ger length. A discriminant analysis model was trained scanned hands and then applied to the 11K Hands on this modern dataset and directly applied to classify dataset. To refine the model, 120 high-quality pre21 Paleolithic stencils. dictions from the 11K Hands collection were manuA significant shift towards geometric morphometally selected, added to the original training set, and rics is evident in the work of (Nelson, Hall, et al. used to retrain the architecture from scratch. After 2017). This study relied on a contemporary dataset of 132 hand stencils, capturing hand morphology through filtering for motion blur or shape-altering artifacts, 5,556 high-quality silhouettes were successfully ex19 two-dimensional landmarks. The authors applied tracted from the 11K Hands database. These were Generalized Procrustes Analysis for shape alignment, combined with the 247 scanned silhouettes and 61 followed by Principal Component Analysis for dimenexperimental stencils to form the training and evalsionality reduction, and Fisher’s Linear Discriminant uation sets. The authors assessed several pretrained Analysis for classification. Their experimental protoconvolutional neural networks across ten independent col relied on cross-validation to estimate performance, train-validation-test splits. EfficientNetV2-S emerged due to the absence of an independent test set. A comprehensive framework proposed by (Fernández- as the most stable model and was subsequently deployed to predict the biological sex of the 45 archaeoNavarro, Fidalgo-Casares, et al. 2025) leverages a dilogical stencils from Spanish caves. Beyond improving verse, multi-source dataset to enhance the classificageneralization, the combination of scanned and extion of ancient hand stencils. This dataset includes perimental data served to narrow the domain gap becontemporary scans from 546 individuals (categorized tween modern and ancient samples; nonetheless, the by sex and age), 53 experimental stencils created in a model’s outputs remain susceptible to variations in limestone quarry using Paleolithic techniques (ochre manual segmentation and the documented bias toand plant tubes), and 124 authentic Paleolithic stenward classifying subadult hands as female. cils from eight Iberian caves. The methodology utiExisting literature has relied largely on handcrafted lizes 32 anatomical landmarks to capture hand morfeatures, ranging from linear measurements and digit phology. To isolate shape from external variables, ratios to landmark-based geometric morphometrics. Procrustes coordinates were computed to remove the Recent studies have begun to move beyond this paraeffects of size, position, and orientation. Hand size digm by using deep learning models trained on conwas quantified via centroid size, while pairwise shape temporary hand data and evaluated on archaeologdifferences and variability were assessed using Proical samples. In particular, (Mollineda et al. 2025; crustes distances and Principal Component Analysis, Fernández-Navarro, González-Marfil, et al. 2025) exrespectively. By applying discriminant analysis to plore data-driven pipelines where sex-discriminant feathese handcrafted features, the framework provides tures are automatically learned from hand silhouettes, a robust and generalizable model for characterizing moving away from hand-engineered linear measurethe authors of prehistoric rock art. An alternative approach was explored by (Fernández- ments. This shift represents a key step toward more objective and flexible frameworks for the analysis of Navarro, González-Marfil, et al. 2025), who developed prehistoric hand stencils, while highlighting the need a supervised deep learning pipeline utilizing hand silfor robust cross-domain validation when models trained houettes. Their multi-source dataset comprised 247 on modern data are applied to the Paleolithic field. contemporary hand scans, 11,076 images from the Despite these advancements, significant challenges public 11K Hands database (representing 190 unique persist. A fundamental limitation is the lack of definisubjects with a female-to-male ratio of approximately tive ground truth, as the biological sex of prehistoric 1.8:1), 61 experimental stencils produced on limestone stencils must be inferred from contemporary reference by modern adults, and 45 Paleolithic stencils. Due to models rather than directly observed. Furthermore, the complexity of the rock backgrounds, the experimental and Paleolithic stencils were manually seg1
Procreate is a professional digital illustration app designed for iPad (https://procreate.com).
6
while the classification pipeline utilizes hand silhouettes, those derived from Paleolithic art are inherently products of manual delineation. This process is susceptible to inter-observer variability and subjective bias, further compounded by factors such as pigment diffusion, rock texture, and varying states of preservation, Consequently, subtle inaccuracies in the traced contours may propagate through the model, amplifying the uncertainty of the final predictions. An additional challenge stems from the cross-domain setting, where models trained on modern or experimental data are deployed on archaeological samples. Moreover, discrepancies in pose, acquisition conditions, and population-specific characteristics can hinder the generalization of learned features. Collectively, these challenges underscore the necessity for robust frameworks that account for segmentation variability, dataset representativeness, and domain adaptation, while moving beyond simple accuracy to provide reliable measures of predictive uncertainty.
Table 2: Summary of RSNA Bone Age Challenge dataset.
training set validation set test set
females 5,778 652 100
males 6,833 773 100
total 12,611 1,425 200
which comprises 14,036 X-ray images of the left hand from pediatric patients aged between 1 month and 19 years. The data were collected from two institutions: Lucile Packard Children’s Hospital at Stanford University (2,983 images) and Children’s Hospital Colorado (11,053 images) (Larson et al. 2018). The dataset was randomly partitioned into 12,611 samples (approximately 90%) for training and 1,425 samples (approximately 10%) for validation. In addition, a separate test set of 200 hand radiographs (100 male and 100 female) was constructed from the picture archiving and communication systems at Stanford, ensuring no overlap with the training and validation studies. Each radiograph is annotated with 3. Materials and methods skeletal (bone) age and patient sex based on the associated clinical radiology report. Silhouettes were 3.1. Overview obtained using the Segment Anything Model (SAM) The proposed study aims to infer biological sex (Kirillov et al. 2023) with a zero-prompt segmentation from prehistoric cave hand stencils through a silhouapproach (Mollineda et al. 2025). Table 2 summarizes ette-based computer vision pipeline, which is orgathe sample counts and class distribution, while Fig. 3 nized into three main phases: (i) silhouette extraction presents representative test cases across both sexes and augmentation, (ii) ensemble-based classification and age groups. of silhouettes, and (iii) post-hoc analysis. Figure 2 Figure 4 illustrates the class-conditional bone age illustrates this computer vision pipeline. distributions for the training, validation, and test sets. While the male and female classes exhibit unimodal 3.2. Datasets Experiments were conducted using two data sources: and bimodal patterns, respectively, the highest concentration of samples lies between 10 and 16 years of a large set of 14,036 annotated X-ray images from age for both sexes. This age range corresponds to the contemporary subjects, used to train DNNs, and a attainment of skeletal and structural maturity of the specialized collection of nine prehistoric hand-stencil hand, where sexually dimorphic traits become more images, used as case studies to illustrate the practistable and pronounced. The inclusion of a wide range cal value of the proposed methodology. Samples from of ages and morphological variability is expected to both sources were represented as binary hand silhouenhance the robustness and generalization capacity ettes, enabling their integration within a unified exof the learned models. perimental framework. This standardized representation supported the development of a DNN-based sex 3.2.2. Prehistoric data classifier trained on contemporary annotated silhouettes, which was then applied to the prehistoric data A total of nine prehistoric hand stencils from two to generate sex-related hypotheses. distinct sources are used as independent case studies. The first subset comprises four samples from El 3.2.1. Contemporary data Castillo cave (Spain), illustrated in Figure 1, which were selected for their superior contrast and well-defined This study relies on the RSNA Bone Age Chaledge morphology. These characteristics facilitate highly lenge dataset (Larson et al. 2018; Halabi et al. 2019), 7
Figure 2: Uncertainty-aware inference system: quantifying sexual dimorphism in prehistoric cave hand stencils. Generated using Gemini Notebook from authors’ prompts and methodology.
certainty across the entire analytical pipeline. The uncertainty management strategies are summarized below across the three operational phases:
reliable manual contouring during the silhouette extraction process. The second subset consists of five samples previously analyzed by (Mollineda et al. 2025), originating from at least four well-known sites (Cosquer, Chauvet, Pech Merle, and El Castillo). These images, shown in Figure 5, were chosen because earlier studies proposed initial hypotheses regarding their sex attribution. Re-examining these cases under the substantially expanded uncertainty-aware framework introduced in this study is expected to provide more robust and reliable assessments, while offering a broader analysis of the evidence supporting each prediction. In addition, the use of nine hand stencils enables a detailed, case-by-case examination of the framework and illustrates how its different analytical components can support archaeological interpretation under conditions of substantial uncertainty.
Phase 1 Silhouette extraction and augmentation Source-level uncertainty At the archaeological and image-acquisition level, uncertainty arises from the absence of biological ground truth, surface degradation, pigment erosion, illumination variability, and historical interpretative disagreement. To mitigate photometric ambiguity, each stencil is processed along two parallel paths: the original image and a tonally enhanced version. This dual representation avoids committing to a single visual interpretation of degraded cave art. Annotation-level uncertainty Manual contour extraction introduces boundary ambiguity and annotator bias. Instead of assuming a single definitive silhouette, the framework derives two independent contours from the original and enhanced images, yielding two plausible hand silhouettes. These are treated as alternative representations within a range of admissible boundaries rather than as exact geometries.
3.3. Methodology 3.3.1. Overview The proposed methodology adopts a multi-layered, uncertainty-aware inference design to address key challenges in the analysis of Paleolithic hand stencils, particularly the lack of ground-truth information on the artists’ biological sex. Rather than attempting to eliminate uncertainty, the framework models, propagates, diversifies, and hierarchically aggregates un8
Figure 3: Representative samples of contemporary test X-ray images (top row) and their corresponding extracted silhouettes (bottom row). Each column displays a unique case identified by its 4-digit ID above, with associated sex and age metadata provided below.
Figure 4: Bone age distribution by sex across the training, validation, and test subsets of the RSNA Bone Age Challenge dataset. Source: (Mollineda et al. 2025). Reproduced with permission.
Morphological-level uncertainty To explicitly model contour variability, structured shape perturbations are generated through binary operators: intersection (AND), union (OR), arithmetic averaging, and a morphological mid-set interpolation. In addition, three-channel compositional variants are built to account for representation dependency in convolutional architectures. In total, 12 silhouette representations are produced per stencil, expanding the morphological hypothesis space prior to classification. Phase 2 Ensemble-based classification of silhouettes Model-level uncertainty Epistemic and stochastic uncertainties are addressed through 9
architectural diversity and model replication. Two DNN architectures (EfficientNet-B3 and MobileViT-S), each trained across 10 independent runs with distinct random initializations, process all 12 silhouette variants, yielding a total of 120 probabilistic predictions per architecture (240 per stencil). This strategy intentionally amplifies variability prior to aggregation. Hierarchical decision aggregation For each architecture, predictions are aggregated using both sum-based and max-based fusion strategies. Consensus class labels are paired with a silhouette support rate, defined as the proportion of silhouette variants consistent with the predicted class. This met-
(a) Cosquer
(b) Chauvet
(c) Unknown
(d) Pech Merle
(e) El Castillo
Figure 5: Five prehistoric hand images analyzed in the exploratory study (Mollineda et al. 2025). Labels identify the source caves.
ric serves as a morphological agreement index across contour realizations.
3.3.2. Phase 1: silhouette extraction and augmentation
This phase comprises a multi-stage pipeline (see Fig. 6) encompassing two preprocessing operations: Latent-space structural validation To assess silhouette extraction and silhouette augmentation. Silhouette extraction transforms raw hand stencils into whether sex-specific structure is intrinsic normalized, binary silhouettes, while silhouette augto the latent space learned by one the DNN architectures, latent feature vectors are pro- mentation manages manual tracing uncertainty by generating anatomically consistent, locally perturbed conjected into two-dimensional (2D) space using an unsupervised manifold learning tech- tour variants through a series of controlled spatial and pixel-wise transformations. nique. A non-parametric k-nearest neighSilhouette extraction. The silhouette extracbors (k-NN) classifier is then applied in the tion process consists of several key steps: 2D embedding space. Agreement between ensemble predictions and 2D space classi• Adjustment of tonal image parameters (sofication indicates structural robustness unurce-level uncertainty management). Cave der dimensionality reduction. art images typically present substantial chalInterpretability-level aggregation Interprelenges for automated segmentation due to untability is assessed using attribution maps even illumination, pigment degradation, surface generated across silhouette variants and Efirregularities, and background textures. The ficientNet model instances. To suppress original image undergoes parametric adjustment explanation noise and model-specific artithrough multiple enhancement areas: exposure, facts, 120 maps are aggregated via the geobrightness, contrast, highlights, shadows, and metric median, yielding a robust prototype sharpness. The methodology then branches into explanation per stencil. two separate paths, applying silhouette outlining and extraction to both the original and enIn summary, the framework follows five key prinhanced images to mitigate uncertainties arising ciples: (i) multiplicity before commitment, (ii) strucfrom degraded image quality. tured perturbation, (iii) architectural diversification, Phase 3 Post-hoc analysis
(iv) hierarchical aggregation, and (v) explicit quantification of internal agreement. The pipeline operates as a controlled uncertainty propagation and consensus system rather than as a single deterministic rule. The next subsections provide a detailed description of the three phases outlined above.
• Manual contouring (annotation-level uncertainty management). Hand silhouette extraction was achieved by manually contouring both original and enhanced cave hand images to isolate hand morphology. This dual-image approach (see Fig. 7) establishes a robust foundation for mitigating subjective annotation bias 10
Figure 6: Silhouette extraction and augmentation pipeline (phase 1). From left to right: manual contouring is performed on both original and enhanced hand stencils, followed by the extraction of two primary silhouettes and their subsequent geometric normalization. The data augmentation phase comprises four binary operations (AND, OR, AVG, and morphological mid-set) between the extracted silhouettes. Finally, 3D composition operators combine the six resulting variants (two primary + four binary augmentations) into three-channel representations. Generated using Gemini Notebook from authors’ prompts and methodology.
holes, and regularize contour boundaries.
while providing complementary perspectives on ambiguous boundaries. By processing these two versions, the pipeline also compensates for the degraded quality and irregular pigmentation of ancient rock art. • Silhouette extraction. The manual contours derived from the original and enhanced cave images feed into a hand silhouette extraction stage via contour masking. This process transforms outlined hand regions into clean binary hand masks (silhouettes) while suppressing background information. By decoupling hand morphology from photographic variability and surface irregularities, this approach enables standardized shape analysis in subsequent phases (see Fig. 6). This process comprises three primary steps: i) background suppression, ii) binary silhouette extraction, and iii) denoising and smoothing. Background suppression isolates the hand by zeroing out all background pixels. Binary silhouette extraction maps all hand pixels to white, yielding a binary image. Denoising and smoothing mitigate impulse noise via median filtering, while morphological operations eliminate artifacts, fill 11
• Geometric normalization. Manual axis alignment standardizes hand poses through rotation, scaling, and translation, ensuring consistency while strictly preserving anatomical morphology (see geometric in Fig. 6). Silhouette augmentation. Silhouette augmentation operations, defined from the two normalized hand silhouettes, explicitly account for both morphological and representational uncertainty. Motivated by the uncertainty of manually contouring degraded, low-contrast images, silhouette augmentation acknowledges that contour placement is influenced by noise, surface deterioration, and subjective judgment; therefore, extracted silhouettes should be interpreted as plausible instances within a broader space of admissible shapes rather than precise geometries. From the two manually contoured silhouettes, augmentation generates locally perturbed variants via pixel-wise, morphological, and stacking operators, simulating other plausible contour variations without compromising global anatomy. From a learning perspective, each augmented silhouette represents a noisy observation (or a stochastic
(a) Manual contouring
(b) Original hand stencil
(c) Enhanced hand stencil
Figure 7: Manual contouring applied to original versus enhanced cave hand stencil images.
• Average (probabilistic): Savg = 21 (S1 + S2 ). The average silhouette requires careful consideration since it transitions from binary to continuousvalued representation (soft silhouette). It can be interpreted as the probability that a pixel belongs to the true silhouette; thus, it can be called “probabilistic silhouette”.
realization) of the underlying hand morphology. By evaluating all variants with ensembles of silhouettebased sex classifiers and fusing their weak predictions, the approach promotes statistical consensus through aggregation: consistent morphological cues are reinforced across variants, whereas spurious or annotationspecific artifacts are averaged out. This strategy enables the final prediction to emerge from the convergence of multiple imperfect observations, yielding decisions that are less sensitive to local contour inaccuracies and more representative of the latent hand shape supported by the available visual evidence. Let S1 and S2 be the two primary extracted binary silhouettes from the original and the enhanced hand images, respectively, such that S1 , S2 ∈ {0, 1}H×W . Ten new augmented variants were generated from four binary and six 3D composition operators. Binary operators. Silhouette augmentation is partially achieved using a set of binary operators detailed below:
• Morphological mid-set (geometric): Let Sand and Sor be the inner and the outer silhouettes, such that Sand ⊆ Sor . The morphological midc )}, set is Smid = {p ∈ Sor | d(p, Sand ) ≤ d(p, Sor where d denotes Euclidean distance. Unlike statistical approaches, this geometric operation performs a distance-based shape interpolation, where each point in the output is closer (or equidistant) to the inner silhouette than to the outer boundary. The result is a geometrically intermediate shape that captures continuous transitions between contours. 3D composition operators. The silhouettebased sex classification DNNs were originally designed to process RGB images with three input channels. To adapt these architectures for grayscale or binary inputs, these 2D images were broadcast across three channels to construct a data structure equivalent to standard RGB data. This allowed for the full retraining of the DNNs on the new image domain. Consequently, the analysis of the original silhouettes (S1 , S2 ), as well as their augmented versions (Sand , Sor , Savg , Smid ), required replicating each silhouette across three channels prior to being presented to the models.
• Pixel-wise AND (logic): Sand = S1 ∩ S2 . The AND operation yields an intersection silhouette, representing a high-confidence region where both silhouettes agree. It can be understood as a lower bound on the true hand shape, and referred to as “consensus silhouette”. • Pixel-wise OR (logic): Sor = S1 ∪S2 . The OR operation produces a union silhouette, forming a comprehensive shape envelope that includes all pixels from either silhouette. It could be an upper bound on the true hand shape, and referred to as “composite silhouette”. 12
This architectural requirement motivated the exploration of alternative three-channel inputs, constructed by stacking various silhouette variants—derived from the two primary hand silhouettes and their four augmentations—into composite 3D tensors. These stacked 3D compositions were then used as inputs to the pre-trained DNNs. Within this pilot study, the following three-channel compositions were constructed and evaluated: • S12A = (S1 , S2 , Sand ) • S12O = (S1 , S2 , Sor ) • S12V = (S1 , S2 , Savg ) • S12M = (S1 , S2 , Smid ) • SAOV = (Sand , Sor , Savg ) • SAOM = (Sand , Sor , Smid ) In summary, for each cave image of a prehistoric handprint, a total of 12 silhouette representations were generated: S1 , S2 , Sand , Sor , Savg , Smid , S12A , S12O , S12V , S12M , SAOV , and SAOM . 3.3.3. Phase 2: silhouette classification (sex prediction via score aggregation)
(across architectures and instances) into a consensus decision obtained through the fusion of numerous individual predictions. As a result, it enhances robustness to outliers and yields more stable classification outcomes. Specifically, two ensembles of 10 model instances each are constructed from two complementary deep neural network architectures: EfficientNet-B3 (Tan and Le 2019) and MobileViT-S (Mehta and Rastegari 2022). The former provides a favorable performance–complexity trade-off for capturing fine-grained geometric details, whereas the latter employs a hybrid convolutional–transformer design to combine local feature extraction with long-range contextual modeling. This architectural diversity helps reduce systematic bias and promotes predictive variability within the ensemble. Given a cave image, 10 EfficientNet-B3 and 10 MobileViT-S model instances process 12 distinct silhouette representations (2 manually contoured and 10 augmented variants), yielding 120 predictions per architecture (240 predictions per image in total). Each prediction is expressed as a probability distribution over two classes: Female and Male. For each architecture, predictions from the 10 independent model instances are aggregated using two strategies: • Sum aggregation: Computes the cumulative posterior probability for each class across all ensemble members, favoring the class with the highest overall support.
In the absence of biological ground truth, sex prediction from cave hand stencils is formulated as a cross-domain classification task. Models are trained on a source domain with sufficient labeled samples (RSNA Bone Age Challenge dataset) and subsequently applied to a target domain lacking annotations (prehistoric hand stencils). Furthermore, the scarcity of high-quality samples in the target domain precludes the reliable use of domain adaptation techniques to mitigate distributional discrepancies between contemporary and prehistoric hand data. Together, the lack of ground truth, the inability to reduce distributional shifts between source and target domains, and the ambiguity and subjectivity inherent in manually tracing prehistoric hand contours introduce significant uncertainty into individual model predictions. To address this issue, this section proposes a classification strategy based on aggregating multiple weak (i.e., individually unreliable) predictions generated by ensembles of models applied to all silhouette variants. This approach integrates both representational diversity (across silhouette variants) and model diversity
• Max aggregation: Selects the maximum predicted probability for each class across all models, prioritizing the most confident individual prediction. To ensure comparability, all model instances share a consistent standard training configuration: a batch size of 24, an initial learning rate of 0.001, and 100 training epochs. The Adam optimizer is employed for its adaptive convergence properties. Training is guided by a cross-entropy loss with equal class weights, ensuring a balanced objective for binary classification. This configuration achieves stable convergence while maintaining strong generalization performance on the contemporary validation subset. To further enhance generalization and robustness to viewpoint and alignment variations, data augmentation is applied using moderate geometric transformations: rotation (±10◦ ), width shifts of up to 10%, and height 13
shifts of up to 10%. These transformations preserve the semantic integrity of the silhouettes while simulating realistic stochastic distortions. Since comprehensive benchmarking for sex classification falls outside the scope of this work, explicit hyperparameter optimization was deliberately omitted in favor of developing an accessible, inference framework rather than maximizing predictive performance. This design choice helps ensure that the methodology remains user-friendly for non-specialists. Therefore, more thorough hyperparameter tuning represents a clear avenue for further improvements. 3.3.4. Phase 3: post-hoc analysis and interpretation The final phase of the methodology focuses on post hoc interpretability and analysis, aiming to substantiate the model’s decision-making process. Specifically, this stage aims to provide insight into the internal mechanisms of the deep learning ensemble by examining both the geometric structure of feature representations in latent space and spatial attribution mapping. These post-hoc techniques foster model transparency and provide a rigorous means to explain and justify sex predictions through anatomically coherent evidence. Latent-Space Analysis and Manifold Mapping. For each trained EfficientNet-B3 instance in the ensemble, the model automatically learns 1,536 high-level, sex-discriminant features. To make this high-dimensional data human-readable, these features are projected into a two-dimensional (2D) space using UMAP (Uniform Manifold Approximation and Projection) (McInnes et al. 2018). This technique learns a nonlinear manifold in an unsupervised manner, meaning it reorganizes the data based on structural similarities without initially knowing the class labels. This dimensionality reduction serves two key purposes. First, it enables the visual assessment of the location of prehistoric hand stencils within the distribution of modern training samples. Second, it supports a secondary, non-parametric sex classification directly in the 2D space using the k-NN rule. The 12 silhouette variants of the nine Paleolithic hand stencils are projected into each learned 2D space, yielding 108 projections per model (12 variants × 9 cave images). This provides a robust test set composed exclusively of samples designed to mitigate uncertainties associated with manual delineation. Figure 8 illustrates a representative 2D projection gener-
Figure 8: Interpretable 2D manifold generated by one of the ten EfficientNet-B3 models, using only the three silhouette variants Sand , Sor , Smid per stencil to reduce visual clutter.
ated by one of the ten EfficientNet-B3 instances, using only three silhouette representations (Sand , Sor , and Smid ) per stencil to avoid visual clutter. For each variant, a complementary classification is derived using a k-NN decision rule, utilizing the manifold-projected contemporary training silhouettes as reference data. These individual predictions are first combined via majority voting across variants to produce an instance-level consensus for each cave image. In a second aggregation step, majority voting across all ensemble instances (all manifolds) determines the final classification consensus. Model interpretability via spatial attribution. Spatial attribution maps aim to evaluate whether model decisions rely on coherent and anatomically meaningful regions of the hand silhouette. The resulting heatmaps emphasize areas such as finger proportions and palm width that contribute to the predicted sex. For each prehistoric hand image, attribution maps were generated via LayerCAM (Jiang et al. 2021) across the 12 silhouette representations and the 10 independent EfficientNet-B3 instances, yielding 120 maps per image. Therefore, these maps capture variability arising from contour uncertainty and model stochasticity. They were subsequently combined using the geometric median method (Weiszfeld 1937), building a single robust prototype attribution map per cave image, which emphasizes spatial patterns while suppressing outliers. Results are analyzed in Sect. 4.2.3. 14
4. Experiments This section is organized into two subsections to bridge the gap between controlled model validation and practical archaeological application. The first subsection evaluates the ensemble’s performance on contemporary hand silhouettes, establishing a performance baseline within the source domain where ground-truth labels are certain. The second subsection details the deployment of the inference framework on prehistoric hand stencils, the target domain of this study. By benchmarking the models on modern samples first, we provide a transparent and justified foundation for interpreting classification results and post-hoc analysis on the Paleolithic data. 4.1. Contemporary data: model benchmarking on modern silhouettes 4.1.1. Experimental design A contemporary dataset of hand silhouettes with sex annotations was derived from the RSNA Bone Age Challenge, which contains 14,036 left-hand Xray images from pediatric patients aged between 1 month and 19 years. Silhouettes were extracted using the Segment Anything Model (SAM) (Kirillov et al. 2023) through the zero-prompt segmentation strategy proposed in (Mollineda et al. 2025). This approach achieved a silhouette detection sensitivity exceeding 99% on the training and validation subsets, and 98% on the test subset. Accordingly, the numbers of modern hand silhouettes used to train, validate, and test the DNN models are 12,509, 1,416, and 196, respectively. The broad age range is expected to facilitate the learning of robust sexual dimorphism features across all stages of skeletal development. Importantly, the highest concentration of samples occurs between 10 and 16 years for both sexes, a stage at which bone maturity is largely attained, thereby providing highly informative patterns for sex-related morphological differentiation. All images were resized to a 400 × 300 resolution and normalized to the [0, 1] range. The EfficientNet-B3 and MobileViT-S architectures were implemented in PyTorch (Paszke et al. 2019) using the Torchvision and timm libraries, respectively, and initialized with ImageNet-pretrained weights (Deng et al. 2009). Each model was adapted with a single fully connected output layer to predict the classconditional probability distribution for each input sample. While initialized with pretrained weights to pro15
vide a meaningful starting point, all models were fully retrained on the hand silhouette images. Hyperparameter values remained constant across all classification tasks, as specified in Sect. 3.3.3. For each architecture, ten independent model instances were trained, sharing identical designs, initial weights, and hyperparameters. For each model instance, the training subset is used to optimize the DNN parameters over 100 epochs, the validation subset to select the optimal model checkpoint (i.e., the epoch yielding the highest validation accuracy), and the test subset to conduct a final independent evaluation of the selected model. The primary source of diversity across the ten individual model was the stochasticity in optimization introduced by the random ordering of training samples. Given the non-convex nature of deep learning loss landscapes, varying the sample sequence dictates the optimization trajectory through the highdimensional weight space. This path-dependency causes models with identical configurations to converge toward different local minima and develop unique decision boundaries, thereby fostering the predictive diversity essential for a robust ensemble. The resulting ensembles (one per architecture) aggregated the predictions of their ten constituent models using both sum and max rules. Classification performance was evaluated based on the overall accuracy (success rate). Training and inference were conducted on an onpremise server equipped with an AMD Ryzen™ 9 7950X CPU, 64 GB of DDR5 RAM, and an NVIDIA GeForce RTX 4090 GPU (24 GB). The software environment included Ubuntu 22.04.4 LTS, Python 3.10.16, and PyTorch 2.5.1. 4.1.2. Sex prediction results on contemporary data The benchmarking of the models on modern silhouettes acts as a critical baseline to validate the ensemble’s predictive performance within a source domain where ground-truth sex labels are certain. The results in Table 3 demonstrate that both the EfficientNet-B3 and MobileViT-S architectures, and particularly their respective ensembles, exhibit a high capacity for sex prediction, achieving substantial accuracy across the contemporary test set. This performance is particularly pronounced in the [6–12) and [12–19] age groups, where the EfficientNet-B3 ensemble using sum aggregation achieves accuracies of up to 85.4%
Table 3: Performance of EfficientNet-B3 and MobileViT-S on contemporary data, featuring age-stratified results for the test set and overall results for training and validation sets. Results are reported as mean accuracy ± Standard Error of the Mean (SEM) for individual model instances, alongside ensemble accuracy achieved via sum and max aggregation rules. Square brackets indicate inclusion of the boundary values, whereas parentheses indicate their exclusion.
Architecture
Model
Training data
Validation data
All ages
Test data [0–6) y [6–12) y
[12–19] y
EfficientNet-B3
Mean±SEM Sum aggregation Max aggregation
82.6 ± 0.7 85.4 85.9
75.8 ± 0.3 77.7 78.1
81.7 ± 0.4 85.7 84.7
68.1 ± 1.9 76.2 76.2
81.5 ± 1.0 85.4 84.3
85.3 ± 0.6 88.4 87.2
MobileViT-S
Mean±SEM Sum aggregation Max aggregation
80.3 ± 1.4 84.2 84.6
74.8 ± 0.7 77.0 77.8
80.6 ± 1.7 82.7 83.2
66.7 ± 4.1 66.7 61.9
79.4 ± 1.9 82.0 83.1
85.2 ± 1.6 87.2 88.4
and 88.4%, respectively. A clear trend is observed whereby classification accuracy improves with increasing age of the subjects. This pattern appears to reflect two main factors. First, the dataset exhibits a higher sample density between 10 and 16 years, leading to greater representation in the older strata ([6–12) and [12–19]), which likely supports more robust learning of sexdiscriminative features than in the youngest cohort [0–6). Second, morphological manifestations of sexual dimorphism become progressively more pronounced with age and are further consolidated during adolescence, yielding more distinct and informative skeletal patterns for model discrimination. This finding provides evidence for the models’ ability to reliably classify adult hands. Results also highlight the effectiveness of the ensemble approach, as these configurations consistently outperform the mean performance of individual model instances. This improvement is particularly pronounced for EfficientNet-B3 with both aggregation rules in the [0–6) age stratum, where the ensemble accuracy (76.2%) substantially exceeds the average accuracy of individual instances (68.1% ± 1.9%). Across all datasets and test age strata, EfficientNetB3 achieves higher average performance than MobileViT-S for individual models, and this advantage extends to most ensemble configurations under both aggregation rules. This behavior may be attributed to the greater architectural capacity of EfficientNet-B3 (both in depth and parameterization) which enables the capture of more subtle morphological patterns. In addition, MobileViT architectures may be more sensitive to specific hyperparameter settings than the highly optimized and robust EfficientNet framework, particularly given that no hyperparameter tuning was 16
conducted in this study. Nevertheless, these observations should be interpreted with caution and do not support broad claims regarding the general superiority of one architecture over another, as the analysis is restricted to specific model variants applied to a single, specialized task. Figure 9 presents the confusion matrices, detailing class-wise correct and incorrect predictions across age-stratified test data for both ensembles (architectures) under the sum-aggregation rule. They show a clear and coherent pattern across age groups and architectures, with classification performance improving with age and both ensembles exhibiting similar behavior under sum-based aggregation. Predictions for the Male class are consistently more stable, while those for the Female class display greater variability, particularly in the youngest age group. This difference becomes less pronounced in older strata, where both classes are recognized with higher accuracy. Importantly, although Male predictions tend to achieve higher recall, this does not imply that Female predictions are intrinsically more reliable. Rather, the results suggest that Female classifications may require stronger or more distinctive evidence, leading to fewer correct detections overall. Consequently, these patterns should be interpreted as reflecting differences in class-specific model sensitivity rather than straightforward differences in prediction confidence. 4.2. Prehistoric data: model application and interpretability on cave hand stencils This section presents the application of the inference and analysis pipeline described in 3.3 to the Paleolithic hand stencils. It consists of three parts, each reporting results obtained by aggregating evidence across all silhouette variants and model instances:
Figure 9: Confusion matrices summarizing class-wise correct and incorrect predictions across age-stratified test data for both ensembles (architectures) under the sum-aggregation rule.
tial patterns relevant to sex prediction.
Sex prediction results on prehistoric data. The two ensembles, each comprising 10 model instances of EfficientNet-B3 and MobileViT-S trained on contemporary hand silhouettes from the RSNA Bone Age Challenge dataset, are applied to the 12 silhouette representations of the nine Paleolithic hand stencils. The ensemble strategy is explained below.
4.2.1. Sex prediction results on prehistoric data
This section provides the necessary details to understand the ensemble strategies and presents and discusses the aggregated results for sex prediction of the hand stencils. Section 3.3.3 introduced the general methodology Post-hoc latent-space analysis and manifold map- for sex prediction via score aggregation. In summary, ping. Both contemporary and Paleolithic hand siltwo ensembles of 10 model instances each process the houettes are projected into 2D manifolds derived from 12 silhouette variants of every hand stencil, yielding EfficientNet-B3 latent spaces using UMAP. Each sil120 predictions per ensemble. For each architecture, houette variant is classified via a k-NN rule based on these predictions are aggregated using both sum- and the distribution of projected contemporary training max-based strategies to produce robust predictions. samples. Predictions are aggregated across variants Each prediction is expressed as a probability distriand EfficientNet-B3 instances to provide a complebution over two classes, Female and Male. mentary sex classification for each stencil. At the first level of aggregation, the outputs across the 10 ensemble instances are combined for each inPost-hoc interpretability analysis via spatial dividual silhouette variant. Under sum aggregation, attribution. For each prehistoric hand image, vicumulative posterior probabilities are computed for sual attribution maps are generated using LayerCAM each class, while under max aggregation, the maxiacross the 12 silhouette variants and the 10 Efficientmum probability per class is selected. The consenNet-B3 instances, yielding 120 maps per image. These sus class for each silhouette variant is defined as the maps are aggregated into a single, robust consensus one with the highest aggregated score. Additionally, attribution map for each cave image, highlighting spa17
a classification margin is computed as the difference between the class ensemble scores (normalized for the sum rule). The sign of this margin indicates the ensemble’s preferred class for that variant, while its magnitude, the ensemble’s confidence. At the second aggregation level, the predictions obtained from the 12 silhouette variants are combined to determine the final classification of the original hand stencil. The final prediction is assigned to the majority class among the 12 variants and is evaluated using two confidence metrics: the Silhouette Support Rate (SSR) and the Average Classification Margin (ACM). The SSR quantifies the proportion of silhouette variants supporting the final consensus class. Given the two-class system without an abstention mechanism, the SSR ranges from 0.5 (maximum ambiguity) to 1 (complete consensus across all variants). The ACM is computed by first averaging the signed classification margins across all variants, and then taking the absolute value of that mean as a finegrained confidence measure ranging from 0 (minimum certainty) to 1 (maximum confidence). Table 4 summarizes sex prediction results for the nine Paleolithic hand stencils using classifier ensembles based on two DNN architectures (EfficientNet-B3 and MobileViT-S), under both sum- and max-based fusion strategies. Final predictions are compared with prior or existing hypotheses derived from earlier statistical or morphometric approaches. The results indicate that ensembles produce stable and coherent predictions across architectures and aggregation strategies, with most cases showing agreement between sum and max rules within the same model. This internal consistency suggests that the aggregation process effectively reduces variability across the 120 individual predictions per stencil, yielding robust consensus outputs. In particular, cases with high SSR (i.e., SSR ≈ 1) and high ACM (i.e., ACM ≥ 0.5) can be interpreted as high-confidence predictions, reflecting strong agreement across both silhouette variants and ensemble members. This level of certainty is exemplified by the samples img_26 (Female), img_28 (Female), Cosquer cave (Female), and El Castillo 25 (Male), all of which exhibit complete agreement among the 12 silhouette variants (SSR = 1) across both deep learning ensembles and both aggregation strategies, while also demonstrating strong model confidence (ACM > 0.5). A broader pattern emerges when comparing the two DNN architectures: EfficientNet-B3 typically yields 18
more stable predictions than MobileViT-S, frequently accompanied by higher confidence measures. This trend is consistent with earlier observations on contemporary data, where EfficientNet-B3 demonstrated superior average performance, suggesting that its latent representations are more effective at capturing discriminative features for this task. Nonetheless, MobileViT-S maintains a high level of classification consistency, further validating the overall robustness and cross-model reliability of the ensemble approach. This evidence further supports the decision to conduct the post-hoc analyses using the EfficientNet-B3 ensemble. When comparing the ensemble predictions with prior hypotheses, the results reveal a heterogeneous pattern of agreement and divergence. Several cases are consistent with earlier morphometric or statistical interpretations, particularly those historically regarded as less ambiguous. For example, img_26, and Cosquer were unanimously classified as Female with high SSR and ACM values, aligning perfectly with existing archaeological hypotheses. Similarly, El Castillo 25 was strongly classified as Male across all configurations, in complete agreement with prior estimations. In contrast, strong divergences were identified in two other El Castillo cases (img_28 and img_38), where all ensembles produced highly consistent and confident predictions that differed from prior hypotheses. Cases like img_31 and Pech Merle remain complex, as the models split between Male and Female predictions, mirroring the lack of consensus found in traditional morphometric or statistical approaches. Confidence measures (SSR and ACM) play a key role in interpreting these results. Cases with lower SSR or ACM values tend to correspond to historically ambiguous or controversial stencils, suggesting that the ensemble appropriately reflects underlying uncertainty rather than forcing overconfident decisions. Conversely, high-confidence cases indicate strong structural consistency across silhouette variants and model instances. Overall, the results suggest that while AI can provide highly confident sex attributions for well-defined stencils, cases with low SSR and ACM values indicate inherent morphological ambiguity in the prehistoric data. The combination of aggregation strategies and confidence metrics provides a nuanced view of the results, allowing both agreement and uncertainty to be explicitly quantified.
19
Strong Female Weak Female Strong Female Strong Female
Step 1 Strong Female Weak Male Weak Male Female
Step 2
(Snow 2006)
Adult Female Adolescent Male Adolescent Male Adult Female
Inference F F M M
1/0.66 1/0.71 0.83/0.18 1/0.26
F F M M
F F F M
F F F M
MobileVit-S
1/0.71 1/0.77 0.83/0.05 1/0.24
1/0.55 1/0.57 0.92/0.05 1/0.24
Sum aggregation Max aggregation Sum aggregation Max aggregation
EfficientNet-B3
1/0.56 1/0.63 0.92/0.19 1/0.32
Female Male Male Male Male
N/A N/A N/A Female Male
Female Strong Male Strong Male Weak Male Strong Male
F F M M M
1/0.75 1/0.29 0.83/0.09 0.92/0.15 1/0.68
F F M M M
1/0.72 1/0.33 0.67/0.04 0.50/0.05 1/0.62
F F M F M
1/0.81 0.75/0.08 0.92/0.17 0.83/0.17 1/0.79
F M F F M
1/0.66 0.58/0.04 0.58/0.03 0.83/0.13 1/0.75
(Wang et al. 2010) (Snow 2013) (Mollineda et al. 2025) Class SSR/ACM Class SSR/ACM Class SSR/ACM Class SSR/ACM
Prior / Existing Hypotheses
MobileVit-S
Class SSR/ACM Class SSR/ACM Class SSR/ACM Class SSR/ACM
Cases from the work (Mollineda et al. 2025)
* Case names are consistent with those used in (Mollineda et al. 2025).
Cosquer Chauvet Unknown Pech Merle El Castillo 25
Cave Image*
EfficientNet-B3
Sum aggregation Max aggregation Sum aggregation Max aggregation
* Case names are consistent with the ID numbers shown in the original images.
img_26 img_28 img_31 img_38
Cave Image*
Prior / Existing Hypotheses
Cases from El Castillo cave (selected for their high contrast and well-defined edges)
Table 4: Sex attribution results for nine Upper Paleolithic hand stencils using EfficientNet-B3 and MobileViT-S ensembles, including fusion strategies, silhouette support rates (SSR), average classification margins (ACM), and comparison with prior archaeological hypotheses. F and M denote the Female and Male classes, respectively.
Table 5 summarize the sex classification results for the nine cave hand stencils, including both the predictions obtained using the k-NN rule on the 2D manifold mappings and those produced by the EfficientNet-B3 ensembles. This comparison aims to evaluate the degree of convergence between the highly interpretable 2D representations and the DNN models, which exhibit strong generalization capabilities. Overall, there is strong concordance between the k-NN classifications and the EfficientNet-B3 ensemble predictions. In all nine cases, the predicted sex label obtained from the k-NN classifier matches the Figure 10: Mean SSR (support for the predicted class across label reported by the ensemble. This consistency sugall silhouette variants) as a function of k. A sensitivity analysis gests that the class structure encoded in the highwas conducted over the range k ∈ [1, 50). Since SSR remains dimensional latent spaces is largely preserved in the consistently above 0.5, the k-NN predictions are shown to be robust and largely insensitive to the choice of k. reduced two-dimensional manifold and remains separable using a simple distance-based method. Four cases show particularly strong support val4.2.2. Post-hoc latent-space analysis and manifold mapues across both averaging schemes (embedding-space ping averaging and fusion-strategy averaging), indicating robust local clustering in the 2D space. These include Each projected silhouette variant is classified usimg_26 and img_28 from El Castillo Cave (Female, ing the k-NN rule based on the distribution of contem0.966–1.0 support), the Cosquer case from Cosquer porary training samples embedded within 2D maniCave (Female, 0.989–1.0 support), and El Castillo 25 folds. The resulting predictions are aggregated, first (Male, 0.981–1.0 support). In these cases, the k-NN across silhouette variants and then across 2D mapclassifier identifies highly discriminant neighborhoods pings, yielding a complementary sex classification hyin the 2D projection, consistent with the decisive enpothesis for each stencil. Consistent with the confisemble predictions. The classification for these four dence measures defined in 4.2.1, the SSR is computed hand stencils is illustrated in Figure 8. The three for each hand stencil within each 2D manifold, and points (silhouettes) corresponding to each case are pothe resulting SSR values are averaged across the ten sitioned consistently outside the region of confusion mappings. Accordingly, the SSR ranges from 0.5, inbetween the two classes. dicating maximum ambiguity, to 1, indicating comModerate support values are observed in img_31 plete consensus across all silhouette variants. (Male, 0.697–0.87), img_38 (Male, 0.821–1.0), the Rather than selecting an arbitrary value for k, a Chauvet case (Female, 0.656–1.0), the unknown case sensitivity analysis was conducted across the range (Male, 0.793–0.75), and the Pech Merle case (Male, k ∈ [1, 50), leveraging the high density of the pro0.823–0.71). Although their support levels are lower jected contemporary data. For each value of k, the than in the most robust examples, the predicted class mean SSR was calculated across all 2D mappings to remains stable across both approaches. The reduced generate a curve representing SSR behavior as a funcsupport values indicate less compact clustering of the tion of k for each hand stencil (see Figure 10). This 12 silhouette variants in the 2D space, but do not analysis revealed that the k-NN aggregation predicresult in label inversion relative to the ensemble outtions are invariant to changes in k (SSR initially scales put. In contrast to the higher-confidence cases, as ilwith k before stabilizing significantly above 0.5), delustrated in Figure 8, the points associated with these monstrating the robustness of the class-conditional five hands are located much closer to the inter-class densities within the mappings and aggregation apoverlap region, thereby explaining the lack of consenproach based on k-NN. As illustrated in Figure 10, sus among the different classification rules. the SSR curves stabilize for k ≥ 20; then, the average Notably, no discrepancies were observed between SSR across the interval [20, 50) was adopted as the fithe k-NN classifier applied to the 2D manifolds and nal confidence measure for the k-NN classification of the EfficientNet-B3 ensemble predictions. While modeach stencil. 20
Table 5: Aggregated k-NN classification performance within 2D manifolds across the 12 silhouette variants and the 10 EfficientNetB3 instances.
Cave Image img_26 img_28 img_31 img_38 Cosquer Chauvet Unknown Pech Merle El Castillo 25
k-NN Predicted Class Female Female Male Male Female Female Male Male Male
SSR+ 0.982 0.966 0.697 0.821 0.989 0.656 0.793 0.823 0.981
EfficientNet-B3 Predicted Class SSR/ACM∗ Female 1/0.61 Female 1/0.67 Male 0.87/0.18 Male 1/0.29 Female 1/0.73 Female 1/0.31 Male 0.75/0.06 Male 0.71/0.10 Male 1/0.65
+
Average of the mean SSRs (computed across all 2D manifolds) over the interval k ∈ [20, 50). * Average SSR and ACM values across both fusion strategies for the EfficientNet-B3 ensemble (derived from Table 4).
stable spatial patterns across both silhouette uncertainty and model replication. Across all nine cases, relevance is consistently concentrated along the fingers and interdigital spaces, particularly around middle and proximal phalanges and the metacarpal heads, while the central palm and wrist regions show minimal activation. This spatial selectivity suggests that the models rely primarily on finger geometry and relative spacing (features conFigure 11: Robust LayerCAM attribution maps obtained by geometric median aggregation across 12 silhouette variants and sistent with sexually dimorphic morphology) rather 10 EfficientNet model instances. than on global hand size or background structure. Table 6 brings together predictive, latent-space, and interpretability indicators for each case. est variations in support metrics occurred, they did A clear distinction emerges within the four fenot alter the final class assignments. This alignment suggests that the sex-specific structure captured within male predictions. A first group composed of img_26, img_28, and the Cosquer case shares a highly consisthe high-dimensional latent representations learned tent relevance structure characterized by distributed by EfficientNet-B3 instances is robust enough to reactivation across the central phalangeal regions of the main discriminable even after aggressive unsupervised dimensionality reduction and to be recoverable through index, middle and ring fingers, with consistent emphasis on interdigital spacing and some minor activation a simple neighborhood-based decision rule. on the thumb. These maps are spatially compact and anatomically organized. Importantly, all three cases 4.2.3. Post-hoc interpretability analysis via spatial atexhibit maximal or near-maximal silhouette support tribution in Table 4 and strong k-NN support in the 2D manTo assess whether the predicted sex labels were ifolds in Table 5, indicating both predictive stabilsupported by coherent and anatomically meaningful ity and compact latent-space clustering. In contrast, visual cues, 120 LayerCAM attribution maps (12 silthe Chauvet stencil exhibits a more diffuse attribution houette variants × 10 EfficientNet-B3 instances) were pattern, irregularly distributed across the middle and generated for each stencil and aggregated using the proximal phalanges of the index and middle fingers. geometric median. This aggregation suppresses contour- This case corresponds to the lowest k-NN support specific artifacts and model stochasticity, yielding a among female classifications in Table 5 and to one of robust prototype explanation per hand. The nine rethe largest discrepancies between prior archaeological sulting maps, which are shown in Fig. 11, represent hypotheses and deep learning predictions (Table 4). 21
22
Sex
F
F
M
M
F
F
M
M
M
Stencil
img_26
img_28
img_31
img_38
Cosquer
Chauvet
Unknown
Pech Merle
El Castillo 25
Focal activation at palm–finger junction.
Weakly focused activation at palm–finger junction.
Sharp, focal activation at palm–finger junction.
Diffuse activation in the mid region of the index fingers.
Broad activation across the index, middle and ring fingers with interdigital sensitivity.
Sharp, focal activation in proximal middle-ring regions.
Broad activation across the index, middle and ring fingers with interdigital emphasis. Focal activation in the central ring finger with interdigital emphasis. Dispersed activation mainly in the proximal regions of the little and index fingers.
Attribution Pattern
1.0
0.50–0.92
Moderate
High
0.58–0.92
0.58–1
1.0
1.0
0.83–0.92
1.0
1.0
Ensemble SSR
Moderate
Low
High
High
Moderate
High
High
Spatial Coherence
High
Moderate
Moderate
Moderate
High
Moderate
Low
High
High
k-NN SSR Morphologically stable female pattern consistent with maximal ensemble agreement. Structurally compact female pattern consistent with maximal ensemble agreement. A dispersed activation pattern reflects architectural disagreement and small classification margins. Internally confident classification despite reversal of prior interpretation. Strong agreement across models, silhouette variants and prior hypotheses; stable embedded representation. Structurally ambiguous female case mirrors discrepancy with prior hypotheses and architectural disagreement. Stable but not compact; moderate support across decision approaches. Morphologically ambiguous case; mirrors historical interpretive discrepancy and architectural disagreement. Strongly stable male pattern with maximal ensemble and latent-space agreement.
Interpretive Assessment
Table 6: Case-by-case interpretive analysis integrating spatial attribution patterns and aggregation model confidence measures.
ity results provide independent support for the internal coherence of the framework. Because each LayerCAM map aggregates 120 individual attribution instances, the resulting spatial patterns reflect relevance structures that are stable under both contour uncertainty and stochastic model variation. Across cases, activation patterns consistently target anatomically meaningful regions of the hand, particularly the fingers, interdigital spaces, proximal and middle phalanges, and metacarpal heads, while assigning comparatively little relevance to the palm and wrist. This observation is noteworthy because several of these structures have previously been identified as important sources of sexual dimorphism in skeletal studies. For example, the proximal phalanges have been reported to exhibit significant sex-related differences, with the thumb showing particularly pronounced dimorphism. The correspondence between these anthropologically established markers and the regions highlighted by the attribution maps suggests that the classifiers are relying on biologically plausible morphological cues rather than on spurious image characteristics or global size-related proxies. Although attribution maps cannot establish causal rela5. Discussion tionships between anatomical traits and classification The proposed methodology was structured as a outcomes, the observed spatial consistency provides multi-layered uncertainty management system. Inadditional evidence that the models capture meaningstead of treating uncertainty as noise to be suppressed, ful aspects of hand morphology associated with sexual it is modeled and propagated across the full analytidifferentiation. The convergence of these activation cal pipeline before being resolved through hierarchical patterns across multiple silhouette variants and enaggregation. Uncertainty is addressed at the source semble members further suggests that the identified level (dual image processing), annotation level (dual anatomical regions are robust to contour uncertainty contour extraction), morphological level (structured and model stochasticity, thereby strengthening confisilhouette perturbations), representational level (muldence in the interpretability of the resulting predictiple three-channel compositions), model level (architions. tectural diversity and stochastic replication), and deMoreover, a qualitative correspondence emerges cision level (ensemble fusion with silhouette support between attribution coherence, ensemble confidence rates). Each stage introduces controlled variability rates, and latent-space separability. Cases exhibitprior to aggregation, ensuring that final predictions ing maximal internal consensus (SSR ≈ 1) display emerge from the convergence of multiple imperfect sharply localized and anatomically organized activabut systematically structured observations. tion patterns. By contrast, cases associated with arThe decision-making process incorporates criteria chitectural disagreement or reduced silhouette supbeyond simple probability estimates. Structural valiport show more diffuse and spatially heterogeneous dation was conducted using an unsupervised UMAP relevance distributions. This alignment indicates that projection followed by non-parametric k-NN classifispatial dispersion in the geometric median maps may cation to test whether class separability persists unfunction as a visual correlate of epistemic ambiguity der aggressive dimensionality reduction. Additionrather than mere saliency noise. The layered design ally, spatial attribution maps are aggregated via the thus transforms uncertainty from a liability into an geometric median to ensure explanation stability across analyzable signal. Agreement across predictive aggrecontour variants and model instances. The interpretabil- gation, latent-space validation, and attribution stabilThe spatial dispersion observed in the Chauvet map therefore aligns with its reduced structural support and interpretive ambiguity. The five male-classified cases generally exhibit less focal patterns, with strong activation around the metacarpophalangeal joints of fingers, and occasionally extending toward the ulnar side of the palm below the little finger. Among them, img_38 and El Castillo 25 (both with maximal support in Table 4) present well-defined spatial clusters. Their compact attribution patterns mirror their strong ensemble agreement and high latent-space support in Table 5. In contrast, img_31 and Pech Merle show broader activation zones consistent with intermediate or reduced support values (Table 4). Notably, Pech Merle, characterized by interpretive disagreement, exhibits one of the most diffuse patterns among male cases, paralleling its lower silhouette support and architectural divergence. As in the Chauvet example, spatial dispersion appears to reflect underlying morphological or representational ambiguity rather than classification instability alone.
23
deep learning, necessarily rely on modern reference data because no ground-truth sex labels exist for archaeological hand stencils. Consequently, the models assume that at least part of the morphological signatures of sexual dimorphism observed in present-day human populations remain sufficiently stable across long temporal scales. While this assumption is supported by the persistence of broad anatomical differences between sexes, it cannot be directly verified for Upper Paleolithic populations. Evolutionary, demographic, nutritional, developmental, and populationspecific factors may have influenced hand morphology over thousands of years, potentially altering the distribution of sex-related traits. Previous studies have already demonstrated that predictive functions developed in one contemporary population may generalize poorly to another due to differences in average hand morphology and population structure. Therefore, even highly consistent predictions should not be interpreted as direct determinations of biological sex, but rather as probabilistic inferences relative to the morphological patterns learned from the available contemporary reference population. Although future methodologies based on unlabeled target-domain data may help narrow the gap between contemporary and prehistoric populations, the feasibility of such approaches remains strongly conditioned by the limited number, quality, and representativeness of currently available archaeological samples. Consequently, the proposed framework should be understood as a tool for generating evidence-based hypotheses and quantifying their internal consistency, rather than as a mechanism for obtaining definitive sex attributions. This framework could be further advanced by enhancing its ability to represent input variability and quantify uncertainty within the predictive process. Moving toward a more continuous and expressive representation of plausible hand shapes would enable a richer characterization of morphological variability and a more robust assessment of prediction stability under structured perturbations. In parallel, incorporating mechanisms to capture uncertainty in model predictions would shift from point estimates to predictive distributions, enabling a more systematic quantification of confidence and its integration into result interpretation. More broadly, virtually all stages of the analytical pipeline offer opportunities for systematic scaling to improve uncertainty modeling. From early image processing and manual contour delineation—where inde-
ity provides convergent evidence for morphologically stable classifications, whereas divergence across these layers highlights structurally ambiguous cases. The framework therefore functions not merely as a predictive system, but as a structured mechanism for diagnosing stability in the absence of archaeological ground truth. From a practical perspective, the proposed framework is intended to support archaeological interpretation through the joint analysis of predictions, confidence measures, latent-space organization, and attribution patterns, rather than through binary sex labels alone. Hand stencils exhibiting strong consistency across ensemble configurations, high silhouette support rates, large classification margins, consistent positioning within the latent-space manifolds, and agreement between ensemble and k-NN classifications may be considered relatively robust candidates for sex attribution. In contrast, cases characterized by reduced support rates, small classification margins, proximity to the overlap region between classes in the latent-space projections, or disagreement among analytical components should be interpreted as inherently ambiguous. Such cases are not necessarily classification failures; instead, they may reflect genuinely intermediate morphologies, insufficient visual information, or limitations of the available reference population. Accordingly, the confidence indicators produced by the framework should be treated as archaeological evidence in their own right. High-confidence predictions can contribute to broader demographic interpretations, whereas low-confidence cases may be more appropriately reported as indeterminate rather than being forced into categorical assignments. This perspective shifts the focus from obtaining definitive classifications toward evaluating the strength and reliability of the available evidence, promoting more transparent and reproducible interpretations of prehistoric hand stencils. A fundamental limitation of this study arises from the difficulty of establishing how closely contemporary reference populations resemble the Upper Paleolithic populations to which the framework is ultimately applied. Given the considerable temporal and evolutionary separation between these groups, substantial differences in the distribution of sex-related hand morphology are plausible, yet their magnitude remains unknown. All supervised learning approaches for prehistoric hand stencil analysis, whether based on morphometric measurements, engineered features, or 24
pendent realizations can be incorporated—each stage can be expanded to propagate variability forward. The cumulative combination of outputs across stages enables a more comprehensive exploration of plausible interpretations, strengthening the robustness of final predictions. Together, these directions point toward a more fully probabilistic formulation of the framework, enhancing its ability to disentangle data-driven ambiguity from model uncertainty, particularly in the absence of reliable ground truth. 6. Conclusions This study introduced a multi-layered uncertaintyaware framework for sex attribution in prehistoric hand stencils. Rather than treating uncertainty as an undesirable artifact to be eliminated, the proposed methodology models, propagates, and aggregates uncertainty across multiple levels of analysis, including image acquisition, manual annotation, silhouette representation, model training, and decision making. The resulting framework combines controlled variability with hierarchical aggregation, allowing final classifications to emerge from the convergence of multiple complementary observations rather than from a single deterministic prediction. Experimental results on contemporary hand silhouettes proved that ensemble-based deep learning models can reliably capture sexually dimorphic morphological patterns, particularly in age groups where such traits are more strongly expressed. When transferred to prehistoric hand stencils, the framework produced stable predictions for several cases while simultaneously identifying others as intrinsically ambiguous through reduced silhouette support and lower classification margins. These confidence indicators offer valuable guidance in mitigating the overinterpretation of uncertain archaeological evidence. A key contribution of the study is the triangulation of evidence through three complementary perspectives: ensemble-based classification, latent-space validation through unsupervised learning of interpretable 2D manifold, and aggregated LayerCAM explanations. The strong agreement observed among these components indicates that the inferred classifications are supported by consistent latent representations and anatomically meaningful visual cues. Conversely, cases exhibiting disagreement across these analyses reveal regions of epistemic uncertainty that warrant cautious interpretation. 25
More broadly, the proposed framework demonstrates that uncertainty itself can be treated as an informative signal. Agreement across predictive, structural, and interpretability analyses provides convergent evidence for morphologically stable classifications, whereas divergence highlights cases where the available evidence remains insufficient for definitive attribution. In this sense, the methodology functions not only as a predictive system but also as a tool for assessing the reliability of archaeological inferences in the absence of ground truth. Future work should move the framework toward more explicitly probabilistic formulations, strengthening its capacity to represent input variability and to quantify uncertainty in predictions. These developments may help disentangle morphological ambiguity from model-related uncertainty. Acknowledgments The authors would like to express their sincere gratitude to Professor Roberto Ontañón Peredo for kindly providing the scaled images of the El Castillo cave hand stencils used in Figures 1 and 5, as well as in part of Figure 7a. These images were instrumental in both the development of the proposed methodology and the presentation of the results. The authors also acknowledge the partial financial support provided by grant AIA2025-163919-C54, funded by MICIU/AEI/10.13039/501100011033 (Spain). Declaration of competing interest The authors declare that there is no conflict of interest that could affect the independence of the research reported in this paper. Data availability To promote transparency, reproducibility, and independent verification of the reported results, the datasets generated in this study are publicly available.2 . The source code developed for the classification pipeline and the visualization of the experimental results is also publicly available.3 2
The data generated in this work is available through this link: https://www.kaggle.com/datasets/karelbecerra/decodingthe-past-in-prehistoric-hand-stencils 3 The code written in this work is available through this link: https://github.com/karelbecerra/hand-paintings-in-rock-art
Fernández-Navarro, V, D Fidalgo-Casares, D GarcíaMartínez, and D Garate-Maidagan (2025). “DeNot applicable. coding Palaeolithic Hand Stencils: Age and Sex Identification Through Geometric Morphometrics”. Declaration of generative AI and AI-assisted In: Journal of Archaeological Method and Theory technologies in the manuscript preparation pro32.1, p. 24. doi: https : / / doi . org / 10 . 1007 / cess s10816-025-09693-w. Fernández-Navarro, V, D Garate-Maidagan, and D During the preparation of this work, the authors García-Martínez (2024). “Ontogeny and sexual diused generative artificial intelligence tools, specifically morphism in the human hands through a 2D geChatGPT (GPT-5.5) developed by OpenAI, to imometric morphometrics approach”. In: American prove the readability and clarity of selected sections of Journal of Biological Anthropology 185.1, e25001. the manuscript, and Gemini Notebook to generate indoi: https://doi.org/10.1002/ajpa.25001. fographics. All scientific ideas, analyses, and interpreFernández-Navarro, V, A González-Marfil, I Argandatations were conceived and developed independently Carreras, and D Garate-Maidagan (2025). “Recby the authors. The authors carefully reviewed and ognizing past shapes: sex differentiation through edited all AI-assisted content and assume full respondeep learning on European Upper Palaeolithic hand sibility for the accuracy, integrity, and conclusions of stencils”. In: Digital Applications in Archaeology the published article. and Cultural Heritage, e00453. doi: https://doi. org/10.1016/j.daach.2025.e00453. References Galeta, Patrik, Jaroslav Bruzek, and Martina LázničkováGaletová (2014). “Is sex estimation from handBindurani, MK, AN Kavyashree, and LP Subhash prints in prehistoric cave art reliable? A view from (2016). “Sexual dimorphism on metric valuation biological and forensic anthropology”. In: Journal of hand dimensions”. In: International Journal of of Archaeological Science 45, pp. 141–149. doi: Anatomy and Research 4.2, pp. 2212–2215. doi: http : / / dx . doi . org / 10 . 1016 / j . jas . 2014 . http://dx.doi.org/10.16965/ijar.2016.180. 01.028. Deng, Jia, Wei Dong, Richard Socher, Li-Jia Li, Kai Gunn, Robert G (2006). “Hand sizes in rock art: inLi, and Li Fei-Fei (2009). “ImageNet: A large-scale terpreting the measurements of hand stencils and hierarchical image database”. In: 2009 IEEE Conprints”. In: Rock Art Research: The Journal of the ference on Computer Vision and Pattern RecogAustralian Rock Art Research Association (AURA) nition, pp. 248–255. doi: https://doi.org/10. 23.1, pp. 97–112. 1109/CVPR.2009.5206848. Halabi, Safwan S, Luciano M Prevedello, Jayashree Diakogiannis, Foivos I, Francois Waldner, Peter CacKalpathy-Cramer, Artem B Mamonov, Alexancetta, and Chen Wu (2020). “ResUNet-a: A deep der Bilbily, Mark Cicero, Ian Pan, Lucas Araújo learning framework for semantic segmentation of Pereira, Rafael Teixeira Sousa, Nitamar Abdala, remotely sensed data”. In: ISPRS Journal of Phoet al. (2019). “The RSNA pediatric bone age matogrammetry and Remote Sensing 162, pp. 94–114. chine learning challenge”. In: Radiology 290.2, pp. 498– doi: https://doi.org/10.1016/j.isprsjprs. 503. doi: http://dx.doi.org/10.1148/radiol. 2020.01.013. 2018180736. Fernández-Navarro, V, E Camarós, and D Garate (2022). Janssens, Paul A (1957). “Medical views on prehis“Visualizing childhood in Upper Palaeolithic socitoric representations of human hands”. In: Medical eties: Experimental and archaeological approach History 1.4, pp. 318–322. doi: http://dx.doi. to artists’ age estimation through cave art hand org/10.1017/S0025727300021499. stencils”. In: Journal of Archaeological Science 140, Jiang, Peng-Tao, Chang-Bin Zhang, Qibin Hou, Mingp. 105574. doi: https://doi.org/10.1016/j. Ming Cheng, and Yunchao Wei (2021). “Layerjas.2022.105574. CAM: Exploring Hierarchical Class Activation Maps for Localization”. In: IEEE Transactions on Image Processing 30, pp. 5875–5888. issn: 1057-7149. doi: https://doi.org/10.1109/TIP.2021.3089943. Ethics approval
26
doi: http://dx.doi.org/10.1186/1477-7827Jowaheer, Vandna and Arun Kumar Agnihotri (2011). 4-10. “Sex identification on the basis of hand and foot Mehta, Sachin and Mohammad Rastegari (2022). “Momeasurements in Indo-Mauritian population - A bileViT: Light-weight, General-purpose, and Mobilemodel based approach”. In: Journal of Forensic friendly Vision Transformer”. In: arXiv preprint. and Legal Medicine 18.4, pp. 173–176. doi: https: doi: https://doi.org/10.48550/arXiv.2110. //doi.org/10.1016/j.jflm.2011.02.007. 02178. Karakostis, FA, E Zorba, and K Moraitis (2015). “SexMollineda, Ramón A, Karel Becerra, and Boris Mederos ual dimorphism of proximal hand phalanges”. In: International Journal of Osteoarchaeology 25.5, pp. 733– (2025). “Sex classification from hand X-ray images in pediatric patients: How zero-shot Segment Any742. doi: http://dx.doi.org/10.1002/oa.2340. thing Model (SAM) can improve medical image Kirillov, Alexander, Eric Mintun, Nikhila Ravi, Hanzi analysis”. In: Computers in Biology and Medicine Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, 197, p. 111060. issn: 0010-4825. doi: https : / / Spencer Whitehead, Alexander C. Berg, Wan-Yen doi.org/10.1016/j.compbiomed.2025.111060. Lo, Piotr Dollár, and Ross Girshick (2023). “Segurl: https://www.sciencedirect.com/science/ ment Anything”. In: 2023 IEEE/CVF International article/pii/S001048252501412X. Conference on Computer Vision (ICCV), pp. 3992– 4003. doi: https://doi.org/10.1109/ICCV51070. Nelson, Emma, Jason Hall, Patrick Randolph-Quinney, and Anthony Sinclair (2017). “Beyond size: The 2023.00371. potential of a geometric morphometric analysis of Králík, Miroslav, Stanislav Katina, and Petra Urbanová shape and form for the assessment of sex in hand (2014). “Distal part of the human hand: study of stencils in rock art”. In: Journal of Archaeological form variability and sexual dimorphism using geScience 78, pp. 202–213. doi: https://doi.org/ ometric morphometrics”. In: Anthropologia integra 10.1016/j.jas.2016.11.001. 5.2, pp. 7–25. doi: http://dx.doi.org/10.5817/ Nelson, Emma, John Manning, and Anthony Sinclair AI2014-2-7. (2006). “News Using the length of the 2nd to 4th Larson, David B, Matthew C Chen, Matthew P Lundigit ratio (2D: 4D) to sex cave art hand stencils: gren, Safwan S Halabi, Nicholas V Stence, and Factors to consider”. In: Before Farming 2006.1, Curtis P Langlotz (2018). “Performance of a deeppp. 1–7. learning neural network model in assessing skelePaszke, Adam, Sam Gross, Francisco Massa, Adam tal maturity on pediatric hand radiographs”. In: Lerer, James Bradbury, Gregory Chanan, Trevor Radiology 287.1, pp. 313–322. doi: http://dx. Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, doi.org/10.1148/radiol.2017170236. Alban Desmaison, Andreas Köpf, Edward Z. Yang, Lundborg, Göran (2014). “The Hand and the Brain: Zach DeVito, Martin Raison, Alykhan Tejani, Sasank From Lucy’s Thumb to the Thought-Controlled Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, Robotic Hand”. In: Springer. Chap. Handprints and Soumith Chintala (2019). “PyTorch: An Imfrom the Past, pp. 41–48. doi: 10 . 1007 / 978 perative Style, High-Performance Deep Learning 1-4471-5334-4_5. Library”. In: arXiv preprint. doi: https://doi. Manning, John T, Andrew JG Churchill, and Michael org/10.48550/arXiv.1912.01703. Peters (2007). “The effects of sex, ethnicity, and Permana, R, K Arifin, and I Pojoh (2015). “The Apsexual orientation on self-measured digit ratio (2D: plication of Digit Ratio 2D:4D in Predicting Male4D)”. In: Archives of sexual behavior 36.2, pp. 223– Female Hands on Prehistoric Cave Hand Stencils 233. doi: https://doi.org/10.1007/s10508in Indonesia”. In: Asian Journal of Humanities 007-9171-6. and Social Studies (ISSN: 2321–2799) 3.05. doi: McInnes, Leland, John Healy, and James Melville (2018). https://doi.org/10.24203/ajhss.v3i5.3249. “UMAP: Uniform Manifold Approximation and Permana, R, Ingrid HE Pojoh, and Karina Arifin (2017). Projection for Dimension Reduction”. In: arXiv “Mabedda Bola ritual in South Sulawesi; The relapreprint. doi: https : / / doi . org / 10 . 48550 / tionship between handprints in traditional house arXiv.1802.03426. and hand stencils in prehistoric caves”. In: WaMcIntyre, Matthew H (2006). “The use of digit ratios cana, Journal of the Humanities of Indonesia 18.3, as markers for perinatal androgen action”. In: Reproductive biology and endocrinology 4, pp. 1–9. 27
p. 6. doi: https://doi.org/10.17510/wacana. v18i3.633. Polcerová, Lenka, Richard L Jantz, Miroslav Králík, Mária Chovancová, and Martin Čuta (2023). “Sex differences in radioulnar contrasts of the finger ridge counts across 21 human population samples”. In: Annals of human biology 50.1, pp. 370– 389. doi: http://dx.doi.org/10.1080/03014460. 2023.2247970. Rabazo-Rodríguez, Ana María, Mario Modesto-Mata, Lucía Bermejo, and Marcos García-Díez (2017). “New data on the sexual dimorphism of the hand stencils in El Castillo Cave (Cantabria, Spain)”. In: Journal of Archaeological Science: Reports 14, pp. 374–381. Snow, Dean R (2006). “Sexual dimorphism in Upper Palaeolithic hand stencils”. In: Antiquity 80.308, pp. 390–404. doi: http://dx.doi.org/10.1017/ S0003598X00093704. — (2013). “Sexual dimorphism in European Upper Paleolithic cave art”. In: American Antiquity 78.4, pp. 746–761. doi: http://dx.doi.org/10.7183/ 0002-7316.78.4.746. Suleiman, Muritala Odidi, B Danborno, SA Musa, JA Timbuak, AO Yusuf, and HO Suleiman (2024). “Sex estimation and sexual dimorphism analysis through hand anthropometry: Insights from a crosssectional study”. In: Forensic Science International: Reports 10, p. 100374. doi: https://doi.org/ 10.1016/j.fsir.2024.100374. Tan, Mingxing and Quoc Le (2019). “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks”. In: arXiv preprint. doi: https://doi. org/10.48550/arXiv.1905.11946. Wang, James Z, Weina Ge, Dean R Snow, Prasenjit Mitra, and C Lee Giles (2010). “Determining the sexual identities of prehistoric cave artists using digitized handprints: a machine learning approach”. In: Proceedings of the 18th ACM international conference on Multimedia, pp. 1325–1332. doi: http : / / dx . doi . org / 10 . 1145 / 1873951 . 1874214. Weiszfeld, Endre (1937). “Sur le point pour lequel la somme des distances de n points donnés est minimum”. In: Tohoku Mathematical Journal, First Series 43, pp. 355–386. Yune, Sehyo, Hyunkwang Lee, Myeongchan Kim, Shahein H Tajmir, Michael S Gee, and Synho Do (2019). “Beyond human perception: sexual dimorphism in hand and wrist radiographs is discernible 28
by a deep learning model”. In: Journal of Digital Imaging 32.4, pp. 665–671. doi: http://dx.doi. org/10.1007/s10278-018-0148-x.
Related documents
- Decoding the Past: An Uncertainty-Aware Deep Learning Framework for Sex Attribution in Prehistoric Hand Stencils#609695
- The Routledge Handbook of European Penology#253356
- Mapping Palaeolithic Imprints: Spatial Analysis of Hand Stencils in El Castillo Cave (Spain) Through Geomatic Techniques#220586
- Sex estimation from patellar measurements in a contemporary Italian population: a machine learning approach#1158428
- OpenVeinNet: Robust Open-Set Finger Vein Verification with Dynamic Snake Convolution and Graph Learning#792835
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive