Abstract
Contactless palmprint verification must generalize to unseen identities while remaining robust to variations in hand pose, scale, illumination, camera distance, and background. This study presents a cosine-consistent deep metric-learning framework combining landmark-first Hybrid region-of-interest (ROI) extraction, contrast-limited adaptive histogram equalization (CLAHE) enhancement, an ImageNet-initialized ResNet18 encoder, trainable generalized-mean (GeM) pooling, a compact projection head, batch-normalization neck (BNNeck), batch-hard triplet learning, and auxiliary identity supervision. The principal contribution lies not in introducing a new backbone or individual architectural component, but in the mathematically consistent integration of metric learning and verification with a rigorously controlled open-set evaluation protocol. The triplet objective operates on L2-normalized pre-batch-normalization (pre-BN) descriptors, whereas enrollment and cosine-based verification use L2-normalized post-batch-normalization (post-BN) descriptors. For unit-normalized vectors, squared Euclidean distance is shown to be a strictly decreasing affine function of cosine similarity, establishing exact ranking equivalence within each embedding space. A training-distribution lower bound relates the triplet margin and violation probability to the expected pre-BN score difference, without extending this result to post-BN test scores. Conditional sub-Gaussian false acceptance rate (FAR) and false rejection rate (FRR) bounds and Hoeffding-based plug-in threshold evaluations are also developed, with empirical score statistics explicitly distinguished from finite-sample risk certificates. Experiments on Tongji Session 1 and BMPD use one fixed participant-disjoint split, validation-only threshold selection, five model-training seeds, controlled one-factor ablations, and participant-level bootstrap confidence intervals for principal verification measures. The results provide the clearest empirical support for auxiliary identity supervision under the more variable BMPD acquisition conditions. The effect of ROI normalization is acquisition-dependent, while the effects of CLAHE, pooling, BNNeck, mining strategy, embedding normalization, and triplet margin are generally smaller or more variable across seeds and datasets. Normalized Euclidean and cosine matching produce identical verification results when applied to the same normalized post-BN descriptors.
Keywords:
contactless palmprint verification; deep metric learning; cosine similarity; triplet loss; hyperspherical embedding; Hybrid ROI; ResNet18; BNNeck; subject-disjoint evaluation; sub-Gaussian risk analysis MSC:
68T45; 68T07; 68T10; 60E15
1. Introduction
Biometric verification has become an important component of access control, mobile authentication, financial services, and identity management systems. Unlike passwords and physical tokens, biometric traits are directly associated with an individual and cannot be easily forgotten or shared [1]. Palmprints are particularly suitable for personal verification because the palm surface contains principal lines, wrinkles, ridges, and multiscale texture patterns that provide complementary identity information [2]. Contactless acquisition further improves hygiene and user convenience by eliminating direct interaction with a sensing surface.
The absence of physical contact, however, reduces acquisition stability. Variations in hand rotation, scale, finger posture, camera distance, illumination, perspective, and background can substantially change the appearance and location of the palm region. These factors affect both ROI localization and feature extraction. Consequently, a contactless palmprint verification system must simultaneously address geometric normalization, appearance variation, discriminative representation learning, and reliable decision-threshold selection.
Early palmprint recognition systems relied on handcrafted representations, including orientation codes, Gabor filters, local binary patterns, wavelet features, phase information, and keypoint descriptors. Their effectiveness depended strongly on the quality of ROI normalization and the assumptions made about image acquisition. Deep convolutional networks can learn hierarchical representations directly from palmprint images and have consequently become dominant in recent contactless palmprint research [3,4,5,6,7,8]. Nevertheless, a conventional Softmax classifier is optimized for the identities included in the training set. Enrolling a new user changes the class set and may require classifier retraining, making this formulation inconvenient for practical biometric enrollment.
Deep metric learning addresses this limitation by mapping input images into an embedding space, in which samples of the same palm identity are close and samples from different identities are separated. Verification can then be performed for identities not observed during training by comparing an enrollment template with a query descriptor. Triplet loss is a widely used objective for learning such representations [9,10]. Its effectiveness depends on embedding normalization, margin selection, batch composition, and the mining of informative positive and negative samples.
A further issue arises when different metrics are used during training and verification. Some systems optimize Euclidean distances but perform final matching using cosine similarity without specifying whether the involved descriptors are normalized or whether the training and verification pathways use the same representation. For unit-normalized vectors, squared Euclidean distance and cosine similarity are related exactly by
Thus, they generate equivalent rankings within the same normalized embedding space. This equivalence does not imply that pre-BN and post-BN descriptors are identical, because batch normalization is not generally angle preserving. A mathematically precise formulation must, therefore, distinguish the normalized pre-BN descriptors used by the metric-learning branch from the normalized post-BN descriptors used for enrollment and verification.
Verification also requires an operating threshold. Empirical measures such as FAR, FRR, equal error rate (EER), receiver operating characteristic (ROC), and detection error tradeoff (DET) describe the observed relationship between genuine and impostor scores [11,12]. However, selecting a threshold from test scores introduces information leakage, while reporting only EER does not provide an operating policy for applications in which false acceptance and false rejection have different consequences. A reproducible protocol should estimate thresholds exclusively from validation scores and apply them unchanged to the independent test set.
Concentration inequalities provide an additional mathematical perspective on verification risk. Under explicitly stated sub-Gaussian assumptions, genuine and impostor score tails can be bounded to obtain conditional upper bounds for FAR and FRR [13,14]. Nevertheless, an empirical sample variance is not automatically a valid sub-Gaussian variance proxy. Because cosine scores belong to , Hoeffding’s lemma supplies a universally valid but potentially conservative proxy. This distinction is important: empirical score dispersion may support descriptive or model-based threshold analysis, whereas a distribution-free risk certificate requires a theoretically justified concentration parameter.
Preprocessing introduces another source of uncertainty. Anatomically normalized ROIs can reduce translation, rotation, scale, and background variation in unconstrained smartphone images. Conversely, when acquisition already provides stable framing and a uniform background, additional geometric normalization may remove useful peripheral information or introduce localization variability. Therefore, the effectiveness of ROI normalization should be evaluated by controlled ablation rather than assumed to be universal.
This study develops a contactless palmprint verification framework that combines landmark-first anatomical Hybrid ROI extraction, CLAHE, ResNet18, trainable GeM pooling, a compact projection layer, BNNeck, batch-hard triplet learning, auxiliary identity supervision, and cosine matching. The Hybrid ROI first attempts anatomical alignment using wrist and metacarpophalangeal landmarks. Invalid landmark detections invoke a deterministic fallback hierarchy: contour/valley localization is attempted first, followed by contour/principal component analysis (PCA) localization only if the preceding route fails its quality gates. The recognition network applies triplet learning to normalized pre-BN descriptors, whereas enrollment and verification use normalized post-BN descriptors. The mathematical analysis treats the corresponding normalized spaces explicitly instead of assuming that the two descriptor pathways are identical.
Experiments are conducted on Tongji Session 1 and BMPD using one fixed subject-disjoint training, validation, and test partition. The same partition, enrollment/query trials, and evaluation protocol are reused across five model seeds and all one-factor ablations. Operating thresholds are estimated from validation scores and frozen before test evaluation. This design measures optimization variability across model initializations under one identity partition; it does not represent variability across independently resampled subject partitions.
The main contributions of this work are as follows:
- Methodological and protocol contribution. We formulate a cosine-consistent open-set palmprint verification framework that explicitly separates the L2-normalized pre-BN representation used for triplet-based metric learning from the L2-normalized post-BN representation used for enrollment and verification. The framework is evaluated using participant-disjoint training, validation, and test partitions, fixed enrollment/query trials, validation-only checkpoint and threshold selection, five aligned model-training seeds, participant-level uncertainty analysis, and exact one-factor ablations.
- Theoretical contribution. We establish the exact equivalence between squared Euclidean distance and cosine similarity within the same L2-normalized embedding space and derive the corresponding cosine-gap interpretation of the triplet margin. We further derive a training-distribution lower bound relating the triplet margin and violation probability to the expected cosine-score difference, together with conditional sub-Gaussian FAR and FRR bounds and a distribution-free Hoeffding-based analysis. The scope of these results is stated explicitly so that training-stage statements are not interpreted as post-BN test-time guarantees.
- Dataset-specific empirical findings. Experiments on Tongji Session 1 and BMPD confirm the implementation-level equivalence of normalized-Euclidean and cosine matching within the post-BN verification space. The ablation results provide the clearest empirical support for auxiliary identity supervision under the more variable BMPD acquisition conditions, while the effect of ROI normalization is acquisition-dependent. The effects of CLAHE, pooling, BNNeck, mining strategy, embedding normalization, and triplet margin are generally smaller or more variable across seeds and datasets.
The remainder of this paper is organized as follows. Section 2 reviews contactless palmprint representation, ROI normalization, open-set metric learning, hyperspherical embeddings, and verification-threshold analysis. Section 3 describes the datasets, identity-disjoint protocol, Hybrid ROI pipeline, joint metric-learning framework, cosine-consistent formulation, statistical risk analysis, implementation details, and evaluation measures. Section 4 presents the verification, score geometry, ablation, and margin-sensitivity results. Section 5 discusses the mathematical and practical implications and limitations. Section 6 concludes this study.
2. Related Work
2.1. Contactless Palmprint Representation and ROI Normalization
Palmprint recognition exploits identity-related structures such as principal lines, wrinkles, ridges, and local texture patterns [2]. In contact-based acquisition, the hand position is mechanically constrained, which reduces variation in scale, rotation, and translation. Contactless acquisition is more convenient and hygienic, but it introduces substantial geometric and photometric variability. Changes in camera–hand distance, in-plane rotation, finger articulation, illumination, background, motion blur, and partial hand visibility can all affect the extracted palm representation [5,6].
ROI normalization is, therefore, an important component of contactless palmprint systems. Earlier approaches commonly relied on handcrafted landmarks, finger valleys, or geometric rules to locate and align the central palm region. More recent methods employ learned keypoint or ROI localization models. PKLNet, for example, uses palm keypoint localization to support contactless palmprint recognition [15]. Image-quality assessment has also been investigated because recognition reliability can degrade when the captured palm is blurred, poorly illuminated, or geometrically distorted [16]. Deep and shallow feature fusion has been proposed to combine semantic information with fine palm-line details [17]. BEST constructs recognition evidence from spatially scattered local templates, reducing dependence on a single globally aligned palm region and improving robustness under challenging contactless conditions [18].
These studies show that ROI normalization and local evidence extraction remain active research problems. However, an ROI procedure that is effective for one acquisition protocol is not necessarily optimal for another. A tightly controlled dataset may already contain sufficiently centered palm images, whereas a mobile or unconstrained dataset may benefit from landmark-based localization. Consequently, ROI normalization should be evaluated as a dataset-dependent design choice rather than assumed to provide universal improvement.
The present study adopts a Hybrid ROI strategy that combines landmark-based localization with a deterministic fallback procedure. This design improves processing reliability when landmark detection is uncertain or unavailable. Nevertheless, the ROI method is treated as a preprocessing component rather than as the principal methodological novelty. Its contribution is, therefore, evaluated empirically through dataset-specific ablation experiments.
2.2. Open-Set Palmprint Verification and Deep Metric Learning
Many palmprint studies formulate recognition as a closed-set classification problem, in which the identities appearing during testing are also represented during training. Although such protocols are useful for classification evaluation, they do not fully reflect biometric verification, where a deployed system must compare samples from identities that were not observed during model training. Open-set verification, therefore, requires identity-disjoint training, validation, and test partitions [4].
Deep metric learning addresses this requirement by learning an embedding space, in which samples from the same identity are close and samples from different identities are separated [19,20]. Triplet-based learning optimizes an anchor, a positive sample, and a negative sample simultaneously [9]. Batch-hard triplet mining further concentrates optimization on the most difficult positive and negative samples available within each mini-batch [10]. This strategy often produces more discriminative embeddings, but its effectiveness depends on identity-balanced batch construction and the availability of informative positive and negative pairs.
Metric-learning objectives have also been applied to contactless palmprint recognition, including open-set formulations designed to improve generalization to unseen identities [4]. Recent preprints have explored additional directions, including federated palmprint learning [21] and cross-domain or foundation-model-based palmprint representation [22]. Because these studies are currently available as preprints, their conclusions should be interpreted separately from peer-reviewed benchmark results.
In the proposed framework, classification and metric-learning objectives serve complementary roles. The identity-classification loss encourages global separation among training identities, while the batch-hard triplet loss enforces relative intra-identity compactness and inter-identity separation. Evaluation is conducted on subject-disjoint identities so that the reported verification results measure generalization rather than memorization of training classes.
It is important to distinguish the negative samples selected by batch-hard mining from the complete impostor distribution encountered during verification. The hardest negative within a training mini-batch is drawn from a conditional sampling mechanism and does not represent all possible impostor comparisons. Accordingly, theoretical results derived for mined triplets are interpreted as training-stage sampling statements and are not directly presented as bounds on the full test-time false-acceptance distribution.
2.3. Hyperspherical Embeddings and Cosine Matching
Cosine similarity is widely used in biometric recognition because it measures angular agreement independently of embedding magnitude [23]. Several classification losses explicitly constrain features or class weights to a hypersphere [24,25,26]. These approaches encourage angular discrimination and improve compatibility between the training objective and cosine-based inference.
For two unit-normalized descriptors , Euclidean distance and cosine similarity satisfy the exact identity
Therefore, minimizing squared Euclidean distance is equivalent to maximizing cosine similarity when both descriptors belong to the same unit hypersphere. This equivalence also implies that the two measures produce identical pair rankings and equivalent decision thresholds after the appropriate monotonic transformation.
Modern embedding architectures frequently combine generalized-mean pooling with feature normalization. GeM pooling provides a learnable transition between average-like and maximum-like spatial aggregation [27]. BNNeck separates the feature used by the metric objective from the batch-normalized feature commonly used by the identity-classification objective [28]. These components are established architectural mechanisms; the contribution of the present work lies in their cosine-consistent organization and mathematical analysis rather than in claiming them individually as new.
A necessary distinction is made between the pre-BN descriptor used by the triplet loss and the post-BN descriptor used for verification. Because batch normalization generally changes both feature direction and magnitude, the normalized pre-BN and post-BN descriptors should not be assumed to represent an identical geometry. The Euclidean–cosine identity holds exactly within each normalized space, but it does not imply equality between the two spaces. Consequently, the normalized-Euclidean ablation verifies metric equivalence only for the selected verification descriptor; it does not establish that pre-BN triplet geometry and post-BN verification geometry are identical.
2.4. Verification Thresholds and Statistical Error Control
A biometric verification system accepts a comparison when its similarity score exceeds a decision threshold. Its performance is commonly characterized using false-acceptance and false-rejection rates, ROC or DET curves, and the equal-error rate [11,12]. Because the selected threshold directly affects the reported operating point, choosing it on the test set produces optimistic estimates. A reproducible protocol should determine model parameters and thresholds using training and validation data, then evaluate the fixed decision rule once on the held-out test identities.
Performance variability is evaluated across five model-training seeds while holding the participant split and all evaluation trials fixed. The resulting standard deviations characterize stochastic variability arising from initialization and optimization [29], not uncertainty across independently resampled participant partitions.
Theoretical error control provides a complementary perspective. If genuine and impostor score variables satisfy an explicitly stated conditional sub-Gaussian assumption, tail inequalities can relate score means, dispersion parameters, and the selected threshold [13,14]. Such bounds clarify how angular separation and score concentration affect false-acceptance and false-rejection risks.
An empirical sample standard deviation alone does not prove that a score distribution is sub-Gaussian with the same variance proxy. Therefore, conditional sub-Gaussian results in this work are reported only under an explicit distributional assumption. Since cosine similarity is bounded in , a universal Hoeffding-type bound can also be obtained without estimating an empirical variance proxy. This distribution-free bound is mathematically valid but usually conservative. The theoretical analysis is, thus, intended to explain the relationship between cosine separation, score concentration, and verification risk; it does not replace empirical ROC, EER, and fixed-threshold evaluation.
2.5. Research Gap and Positioning of the Present Work
Existing contactless palmprint methods have produced substantial progress in ROI localization, local-template representation, feature fusion, quality assessment, and deep metric learning [15,16,17,18,21,22]. Nevertheless, several issues remain insufficiently integrated within a single reproducible verification framework.
First, the metric used during triplet optimization is often discussed independently of the similarity function used during inference. Second, studies using BNNeck do not always distinguish the geometry of pre-BN training descriptors from that of post-BN verification descriptors. Third, performance gains are sometimes reported without a strict subject-disjoint protocol, validation-only threshold selection, or repeated-seed uncertainty analysis. Fourth, empirical score dispersion is occasionally treated as if it automatically provided a theoretically valid sub-Gaussian variance proxy. Finally, ROI normalization is frequently presented as universally beneficial even though its effect can depend strongly on the acquisition protocol.
The present work addresses these issues through a cosine-consistent deep metric-learning framework with the following positioning: a hybrid but dataset-dependent ROI procedure; ResNet18-based feature extraction with GeM pooling and a compact embedding head; joint identity and batch-hard triplet supervision; explicit separation of pre-BN training and post-BN verification spaces; subject-disjoint evaluation with validation-selected thresholds; repeated-seed variability analysis; and conditional as well as distribution-free verification-risk bounds. The individual network components are established techniques, whereas the contribution lies in their coherent formulation, careful protocol design, and mathematically qualified interpretation. Accordingly, the principal novelty of the present study lies in the mathematically consistent integration of these components with a rigorously controlled open-set verification protocol rather than in introducing a new backbone, pooling operator, normalization layer, or loss function.
3. Materials and Methods
Conceptually, the proposed framework consists of three stages. First, each contactless palmprint image is localized and geometrically normalized to obtain a reliable palm region for feature extraction. Second, the network learns two related but distinct representations: an L2-normalized pre-BN descriptor for triplet-based metric learning and a post-BN representation for auxiliary identity supervision and verification. Third, enrollment templates and query descriptors are compared in the normalized post-BN space using cosine similarity, while all operating thresholds are estimated exclusively from validation identities. The following subsections formalize these stages and define the corresponding training, verification, and risk-analysis procedures.
This section describes the open-set verification problem, the datasets and subject-disjoint evaluation protocol, the image-preprocessing and feature-learning framework, the joint optimization objective, cosine-based verification, and the associated statistical risk analysis. A strict distinction is maintained between the normalized pre-BN representation used for triplet learning and the normalized post-BN representation used for enrollment and verification.
3.1. Datasets and Identity-Disjoint Evaluation Protocol
Let denote the space of contactless palmprint images, the set of palm identities, and the set of participants. Each observation is represented as
where is a palmprint image, denotes a palm identity, and identifies the participant. The left and right palms of the same participant are treated as different biometric classes. However, they are assigned to the same participant group during data partitioning to prevent identity-related information leakage.
The complete dataset is divided into mutually exclusive training, validation, and test subsets:
The corresponding participant sets satisfy
Consequently, no palm belonging to a validation or test participant occurs during model training. The resulting protocol evaluates open-set verification, because the network is tested using palm identities that are absent from the training class set.
Two public contactless palmprint datasets were used: the Tongji Contactless Palmprint Dataset [30] and BMPD [6]. Only session 1 of Tongji was included. It contains 6000 images from 600 palms belonging to 300 participants, with 10 images per palm. The images were acquired using a dedicated contactless device under relatively controlled illumination and with a predominantly dark background. Although the official dataset contains two sessions, using only session 1 means that the present experiment does not evaluate the inter-session variation available in the complete Tongji dataset.
BMPD contains 1640 smartphone-acquired images from 82 palms belonging to 41 participants, with 20 images per palm. In comparison with Tongji, BMPD presents greater variability in hand pose, camera-to-hand distance, illumination, and background. It also contains two acquisition sessions, enabling preferential cross-session enrollment and query selection.
A fixed participant-disjoint split was generated using protocol seed 1701. Approximately 60% of the participants were assigned to training, 20% to validation, and 20% to testing. The exact composition is reported in Table 1.
Table 1.
Dataset composition and fixed participant-disjoint partition.
The same participant partition was reused for all model seeds and all ablation variants. Therefore, variation across the five reported model seeds reflects stochastic optimization and model-initialization variability under one fixed identity partition. It must not be interpreted as variability across independently resampled train–validation–test partitions.
The training subset was used exclusively to optimize network parameters. The validation subset controlled early stopping, checkpoint selection, and all decision thresholds. After selecting the checkpoint and threshold, the resulting decision rule was applied unchanged to the held-out test subset.
3.2. Overall Framework and Hybrid ROI Preprocessing
The proposed framework consists of landmark-first palm localization, geometric ROI normalization, CLAHE-based contrast enhancement, ResNet18 feature extraction, GeM pooling, a 256-dimensional projection, BNNeck, joint metric and identity supervision, and cosine-based verification.
Figure 1 illustrates the training and inference pathways of the proposed framework. During training, the normalized pre-BN projection is supplied to the batch-hard triplet loss, whereas the BNNeck representation is supplied to the auxiliary identity classifier. During inference, the normalized post-BN descriptor is used for enrollment and cosine matching. The ROI module initially uses MediaPipe Hands (Google LLC, Mountain View, CA, USA) to estimate 21 hand landmarks [31]. The wrist and the metacarpophalangeal joints of the index, middle, ring, and little fingers are used to construct the palm coordinate system. The line joining the index and little metacarpophalangeal (MCP) joints defines the transverse palm axis, whereas the direction from the wrist to the MCP centroid determines the longitudinal axis.
Figure 1.
End-to-end contactless palmprint verification framework. The landmark-first ROI route invokes contour/valley localization and then contour/PCA localization only when the preceding route fails its quality gates. Training employs an L2-normalized pre-BN triplet descriptor and a BNNeck-based auxiliary identity classifier. Enrollment and verification employ the L2-normalized post-BN descriptor and cosine similarity. Colors are used to distinguish the functional components within the ROI preprocessing, feature extraction/projection, and training/verification stages, while dashed arrows indicate fallback ROI localization paths.
The geometric normalization is restricted to translation, rotation, and uniform scaling. Perspective homography, shear transformation, and non-rigid warping are not used because such transformations may distort identity-related palm-line structures.
A landmark-based ROI is accepted only when all predefined quality conditions are satisfied. These conditions include a detector confidence of at least , an anatomical consistency score of at least , a normalized alignment residual not exceeding , and a boundary score of at least . The estimated palm width and height must also remain within the admissible image fractions , and the required boundary-safe crop zoom must not exceed .
When initial landmark detection fails, the locator is reapplied to rotated and contrast-normalized versions of the image. These transformations are used only to estimate reliable geometry; the final palm texture is extracted from the corresponding geometrically transformed source image.
If the landmark route does not satisfy the acceptance conditions, a contour-based fallback evaluates both Otsu threshold polarities and selects a plausible hand mask. The distance transform is used to estimate the central palm region, and convexity defects are examined to identify finger-valley structures. A valid valley configuration must satisfy the predefined depth, angular, spatial-span, and concentration conditions.
When reliable finger valleys cannot be identified, palm orientation is estimated using principal component analysis. The PCA route is accepted only if its orientation confidence and contour-quality measures satisfy the corresponding thresholds. The complete fallback hierarchy is, therefore
During ROI selection, the pipeline evaluates the localization route, transformation parameters, detector confidence, anatomical consistency, boundary coverage, alignment residual, center occupancy, hand coverage, and composite ROI-quality score. A composite score alone is not sufficient for acceptance; all route-specific hard conditions must also be satisfied.
These ROI acceptance thresholds are used as quality-control criteria rather than as verification-model hyperparameters. They were fixed before the final test evaluation and were applied unchanged across model seeds and ablation variants. Their purpose is to reject anatomically inconsistent, poorly aligned, or boundary-truncated crops before feature extraction. Test verification scores were not used to adjust these criteria.
The landmark-route quality score is calculated as
whereas the contour-route score is
The coefficients in the landmark-route and contour-route quality scores are fixed engineering weights used to combine complementary localization-quality criteria. Greater weights are assigned to criteria that directly reflect anatomical consistency, alignment reliability, and crop validity, whereas secondary criteria receive smaller weights. These coefficients are not trainable parameters and remain unchanged during network optimization.
Samples rejected by all ROI routes are not silently converted into successful ROI outputs. To ensure a fair comparison, all ablation variants use exactly the same accepted sample identifiers. The no-ROI variant reads the corresponding original images instead of the geometrically normalized crops, but it does not introduce additional samples rejected by the Hybrid ROI procedure.
The accepted palm region is exported at pixels and subsequently resized to pixels for the neural encoder.
CLAHE is then applied to reduce spatially nonuniform illumination [32]. For a local tile containing pixels and gray levels, the normalized histogram is
where is the number of pixels with intensity . Histogram values above the selected clip limit are truncated, and the excess mass is redistributed. The local mapping is
Bilinear interpolation between the mappings of adjacent tiles reduces artificial block boundaries. The implementation uses a clip limit of 2.0 and an tile grid. Identical preprocessing is applied during training, validation, enrollment, and testing. The effect of CLAHE is assessed using a one-factor ablation.
3.3. Feature Extraction and Joint Metric Learning
ResNet18 is used as the convolutional backbone because it provides a suitable balance between representational capacity and computational complexity [3]. A residual block computes
where and denote the input and output feature tensors of the -th residual block, respectively; is the learned residual mapping with parameters ; and denotes either the identity mapping or a projection when the spatial or channel dimensions change.
The original ImageNet classification layer is removed. The final convolutional feature tensor is aggregated using generalized-mean pooling [27]. For channel , GeM is defined as
where denotes the spatial support of the feature map, is the number of spatial locations, denotes the activation of channel at spatial location , and is the learnable GeM pooling exponent initialized to 3. Thus, denotes the -th power of the corresponding feature activation.
The resulting 512-dimensional representation is projected to a 256-dimensional feature vector:
Here, denotes the preprocessed palm image, is the feature extraction and projection mapping parameterized by , and is the resulting pre-BN feature vector.
Two normalized embedding spaces are constructed from this projection. The pre-BN normalized descriptor is
The vector is the L2-normalized pre-BN descriptor. Since , its normalized version lies on the unit hypersphere .
The BNNeck feature and normalized post-BN descriptor are
Here, denotes the unnormalized BNNeck feature, while is its L2-normalized post-BN descriptor used for enrollment and verification.
In the numerical implementation, the normalizing denominator is lower bounded by a small positive tolerance. Degenerate outputs whose norms remain below this tolerance are treated as invalid.
The pre-BN descriptor is used by the triplet objective. The unnormalized BNNeck feature is supplied to the identity classifier, whereas the normalized post-BN descriptor is used for enrollment and verification. These representations are related through the same network but are not assumed to define identical geometries.
Each mini-batch contains palm identities and images per identity, giving a batch size of 64. For every anchor, batch-hard mining selects the farthest positive belonging to the same palm and the nearest negative belonging to a different palm [10]. The corresponding loss is
where is the number of palm identities in a mini-batch and is the number of images per identity. The descriptor denotes the L2-normalized pre-BN representation of anchor image from identity . The first inner term selects the farthest positive descriptor from the same identity, with , whereas the second inner term selects the nearest negative descriptor from any different identity . The operator denotes the positive-part (hinge) function, and is the triplet margin. The Hybrid Core configuration uses the prespecified margin
The BNNeck representation is simultaneously supplied to an auxiliary identity classifier. Its cross-entropy loss is
where is the mini-batch size, is the unnormalized BNNeck feature of sample , denotes its ground-truth training identity, is the number of palm identities in the training subset, and and are the classifier weight vector and bias associated with class , respectively. The numerator is the exponential logit of the ground-truth class , whereas the denominator sums the exponential logits over all training identities. The classifier is used only during optimization and is removed during verification.
The complete training objective is
with
The coefficients and control the relative contributions of the metric-learning and auxiliary identity-classification objectives; both are fixed to 1 in the Hybrid Core configuration.
The triplet component enforces relative compactness and separation in the normalized pre-BN space, whereas the auxiliary identity loss promotes global discrimination among training classes. Augmented derivatives of the same physical image are not allowed to form an anchor–positive pair. Horizontal flipping is excluded because it alters palm laterality and may introduce anatomically invalid samples.
3.4. Cosine Verification and Metric Consistency
For a palm identity with enrollment images, the normalized post-BN descriptors are averaged and renormalized:
Here, denotes the number of enrollment images for the palm identity, is the L2-normalized post-BN descriptor of the -th enrollment image, and is the resulting L2-normalized enrollment template.
For a query image , cosine similarity is calculated as
Here, denotes the query image and is its L2-normalized post-BN descriptor. The superscript denotes vector transposition; therefore, is the inner product between the two unit-normalized vectors and is equal to their cosine similarity.
The verification decision is
where denotes acceptance and denotes rejection. The threshold is estimated exclusively from validation scores and frozen before test evaluation.
Proposition 1.
Distance–cosine equivalence. For any unit vectors
, where denotes the unit hypersphere in ,
Proof.
Because ,
This proves Equation (1). □
For the normalized pre-BN descriptors, the individual triplet loss can, therefore, be expressed as
where
Here, , , and denote the L2-normalized pre-BN descriptors of the anchor, positive, and negative samples, respectively. Accordingly, and denote the anchor–positive and anchor–negative cosine similarities in the pre-BN embedding space.
The loss is zero if and only if
Here, denotes the cosine-similarity threshold and denotes the corresponding squared-Euclidean-distance threshold.
Thus, normalized squared-Euclidean triplet learning enforces a minimum cosine-score difference of within the pre-BN space.
Equation (1) also applies to the normalized post-BN descriptors used during verification. Therefore, cosine similarity and squared Euclidean distance produce identical pair rankings, ROC curves, area under the curve (AUC) values, and EER values in the post-BN inference space. A cosine threshold corresponds to the squared-Euclidean threshold
However, Proposition 1 does not imply that , where and are the normalized pre-BN and post-BN descriptors defined in Section 3.3, respectively.
Batch normalization can change the direction and scale of a feature vector. Consequently, the pre-BN training geometry and post-BN verification geometry must not be presented as identical. The normalized-Euclidean ablation confirms metric equivalence only within the post-BN verification space.
3.5. Statistical Verification-Risk Analysis
Let
denote the cosine-score difference produced by the pre-BN triplet-sampling mechanism. Define the triplet-violation event as
and its probability as
Here, denotes the anchor–positive minus anchor–negative cosine-score difference induced by the pre-BN triplet-sampling mechanism, is the corresponding triplet-violation event, and is its probability under the specified training-time sampling and batch-hard mining procedure.
Proposition 2.
Training-distribution separation bound. The expected triplet-score difference satisfies
Proof.
and therefore
Using conditional expectation,
On the non-violation set ,
Since both cosine similarities belong to ,
Combining these inequalities gives Equation (2). □
The lower bound is positive when
This result shows that increasing the margin alone does not guarantee stronger separation. A larger margin is useful only if the violation probability remains sufficiently small.
The expectation in Proposition 2 is, therefore, taken with respect to the training-time triplet-sampling distribution and should not be interpreted as an expectation over the complete test-time impostor population.
Proposition 2 is restricted to the pre-BN triplet-sampling distribution. Batch-hard mining selects unusually difficult negatives and, therefore, does not reproduce the complete test-time impostor distribution. Moreover, test verification uses post-BN descriptors. Equation (2) is consequently not presented as a lower bound on the test genuine–impostor mean separation.
For test-time risk analysis, let and denote genuine and impostor cosine-score variables in the post-BN verification space, with means
Here, and denote genuine and impostor cosine-score random variables in the normalized post-BN verification space, while and are their corresponding population means.
Assume conditionally that the centered scores satisfy the sub-Gaussian moment-generating-function bounds
The parameter is the moment-generating-function argument, while and are sub-Gaussian variance proxies for the genuine and impostor score distributions, respectively. These quantities are theoretical concentration parameters and are not assumed to equal the empirical score variances.
Accordingly, empirical score standard deviations are not substituted into the theoretical error bounds unless the required moment-generating-function inequality is independently justified.
Since cosine scores are bounded in , Hoeffding’s lemma provides the universally valid but conservative choice
Because cosine similarity is bounded in , this choice is distribution free but generally conservative.
Proposition 3.
Conditional verification-risk bounds. For a threshold satisfying
Here, denotes the cosine-similarity decision threshold used in the post-BN verification space.
and
Equation (4) bounds the probability that an impostor score exceeds the threshold, whereas Equation (5) bounds the probability that a genuine score falls below the threshold.
Proof.
Applying the Chernoff argument to gives
The minimum occurs at , which gives Equation (4). Applying the same argument to gives Equation (5). □
These bounds do not require normally distributed scores. However, the distribution-free proxies in Equation (3) may produce conservative values. Empirical ROC and DET analyses, therefore, remain necessary.
Equating the standardized genuine and impostor distances gives the bound-balanced threshold
The quantity is the threshold at which the standardized genuine and impostor deviations from the decision boundary are equal.
At this threshold,
For the universal choice ,
and the bound becomes
For a desired theoretical FAR upper bound , Equation (4) yields
Here, denotes the desired theoretical upper bound on FAR, and the resulting threshold is meaningful only if it lies within the valid cosine-score domain .
If , the requested risk level cannot be certified using a nontrivial cosine threshold under the adopted bound. Simply clipping the value to 1 would not preserve the theoretical guarantee.
The theoretical thresholds in Equations (6) and (7) are not assumed to coincide with the empirical EER threshold. Empirical EER and fixed-FAR operating points are determined independently from validation score vectors. When empirical validation means are substituted into these theoretical expressions for numerical illustration, the resulting values are interpreted only as plug-in evaluations and not as finite-sample risk certificates.
3.6. Implementation and Trial Construction
The experiments were implemented in Python 3.12.0 using PyTorch 2.14.0 and TorchVision 0.29.0. The software environment also included OpenCV-Contrib 4.11.0.86, MediaPipe 0.10.21, NumPy 1.26.4, Scikit-learn 1.9.1, and SciPy 1.17.1.
The principal implementation parameters are summarized in Table 2.
Table 2.
Configuration of the Hybrid Core model.
Automatic mixed precision was used during training. The best checkpoint was selected according to validation EER after at least 50 training epochs. The maximum training duration was 100 epochs, with an early-stopping patience of 20 epochs.
The value was fixed for the Hybrid Core model. Margin values , , , , and were evaluated separately to analyze margin sensitivity. The additional values were not used to select the final model retrospectively from test results.
Enrollment and query selection was fixed using evaluation seed 2701. Three images were selected for enrollment:
Their normalized post-BN descriptors were averaged and subsequently L2-normalized to construct the enrollment template. All remaining eligible images were used as queries. For BMPD, different acquisition sessions were preferred for enrollment and query samples. Tongji Session 1 permits only within-session evaluation. Let denote the number of palm identities in a validation or test partition and let denote the number of query images for palm identity . The number of genuine trials is
When each query is compared with every nonmatching enrollment template, the number of impostor trials is
Under the three-image enrollment protocol, the fixed trial sets are as follows:
- Tongji validation: 840 genuine and 99,960 impostor trials;
- Tongji test: 840 genuine and 99,960 impostor trials;
- BMPD validation: 272 genuine and 4080 impostor trials;
- BMPD test: 272 genuine and 4080 impostor trials.
The same enrollment samples, query samples, and genuine/impostor trials are reused for every model seed and ablation variant. Therefore, comparisons among variants are paired at the protocol level.
The exact one-factor ablation experiments remove or replace one component at a time while retaining all other settings. The evaluated changes include removing CLAHE, removing Hybrid ROI, replacing GeM, removing BNNeck, removing the auxiliary identity loss, removing embedding normalization, changing the mining strategy, and replacing cosine similarity with normalized-Euclidean distance.
Rank-1 identification is reported only as a supplementary result using the same gallery and query sets. Verification remains the primary task because the principal outputs are FAR, FRR, EER, AUC, and threshold-dependent acceptance performance.
3.7. Evaluation Measures and Uncertainty Analysis
Let , , , and denote false acceptances, false rejections, true acceptances, and true rejections. The false acceptance and false rejection rates are
Here, is the number of impostor trials incorrectly accepted, is the number of genuine trials incorrectly rejected, is the number of genuine trials correctly accepted, and is the number of impostor trials correctly rejected.
The true acceptance rate (TAR) and true rejection rate (TRR) are
Accordingly, TAR measures the proportion of genuine trials correctly accepted, whereas TRR measures the proportion of impostor trials correctly rejected.
Overall and balanced accuracies are defined as
Overall accuracy measures the fraction of all verification trials classified correctly, whereas balanced accuracy gives equal weight to the genuine and impostor classes through the average of TAR and TRR.
Because the number of impostor trials substantially exceeds the number of genuine trials, overall accuracy is interpreted together with balanced accuracy, EER, and AUC.
The empirical equal-error threshold satisfies
Here, denotes the empirical operating threshold at which FAR and FRR are equal, and the corresponding common error rate is reported as the EER.
When no observed threshold gives exact equality, the EER is estimated by interpolation between adjacent ROC or DET operating points [11,12]. AUC and TAR at prespecified FAR levels are additionally calculated from the empirical score vectors.
All empirical thresholds are determined independently for each model seed using validation scores. The selected threshold is subsequently applied unchanged to the corresponding test scores. Test scores are not used for checkpoint selection, threshold estimation, or hyperparameter optimization.
The empirical score geometry is described using
and the symmetric separation coefficient
Here, and denote the empirical means of the genuine and impostor cosine-score samples, respectively, while and denote their corresponding sample standard deviations. These standard deviations are used for descriptive analysis only and are not treated as theoretically justified sub-Gaussian variance proxies.
Performance is reported as the mean and standard deviation over model seeds 17, 29, 43, 71, and 101. Because all five runs use one fixed participant partition, the across-seed standard deviation quantifies stochastic training variability rather than uncertainty associated with participant composition.
For the principal verification measures, participant-level bootstrap confidence intervals are additionally calculated by resampling held-out query participants while preserving the verification comparisons associated with each sampled participant. These intervals, therefore, characterize uncertainty due to the composition of the held-out participant set and are distinct from the across-seed variability reported as mean ± standard deviation.
Ablation effects are summarized using paired differences between aligned model seeds. Because only five aligned seeds are available, inference for small ablation effects has limited statistical power; consequently, effect magnitude, direction, variability, and confidence intervals are considered jointly rather than relying solely on binary significance decisions.
4. Results
This section reports the five-seed verification performance, validation-score geometry, theoretically valid threshold bounds, component ablations, and triplet-margin sensitivity. All model variants use the same participant-disjoint split, enrollment/query trials, and five model seeds. Unless otherwise stated, values are reported as the mean and standard deviation over model seeds 17, 29, 43, 71, and 101.
4.1. Overall Verification Performance
The Hybrid Core model was evaluated on the fixed test subsets using thresholds estimated exclusively from the corresponding validation subsets. The threshold was independently selected for each model seed and then applied unchanged to the test scores.
Table 3 reports variability across model seeds. Tongji produced higher verification performance than BMPD. On Tongji, the model obtained an accuracy of , balanced accuracy of , EER of , and AUC of . On BMPD, the corresponding results were , , , and .
Table 3.
Hybrid Core verification results across five model seeds.
The difference between test FAR and FRR does not contradict the use of an EER-based validation threshold. The EER threshold was selected on validation scores; after applying the fixed threshold to an independent test subset, the test FAR and FRR are not required to remain equal. Their difference reflects the distributional shift between validation and test participants.
Results in Table 3 are reported as the mean and standard deviation over five model seeds evaluated on one fixed participant-disjoint split. These standard deviations quantify stochastic training variability under a fixed participant partition and should not be interpreted as participant-level confidence intervals. In addition, participant-level bootstrap analysis was performed for the principal verification measures by resampling held-out query participants while preserving the verification comparisons associated with each sampled participant. The resulting 95% confidence intervals (CIs), therefore, characterize uncertainty associated with the composition of the held-out participant set rather than model-initialization variability. For Tongji, the participant-level bootstrap intervals across the five model seeds ranged from 0.31% to 2.22% for EER, from 98.11% to 99.57% for balanced accuracy, and from 0.9941 to 0.9998 for AUC. Table 4 reports the corresponding participant-level bootstrap 95% confidence intervals separately for each model seed on both Tongji and BMPD.
Table 4.
Participant-level bootstrap 95% confidence intervals for the Hybrid Core model.
The participant-level bootstrap intervals quantify uncertainty associated with the composition of the held-out participant set and are distinct from the across-seed standard deviations reported in Table 3. The BMPD intervals are noticeably wider than those obtained on Tongji, particularly for EER and balanced accuracy. Across the five Hybrid Core seeds, the BMPD EER intervals span approximately 1.84–15.44%, which is consistent with the limited size of the held-out BMPD cohort. These results support a cautious interpretation of BMPD point estimates and motivate evaluation on larger or repeated participant-disjoint test sets.
However, the comparison should not be interpreted as a universal ranking of dataset difficulty. Tongji was evaluated using Session 1 only, whereas BMPD contains stronger variation in background, acquisition session, and hand pose.
4.2. Score Geometry and Threshold Analysis
Table 5 summarizes the validation genuine and impostor cosine-score distributions. The symbols and denote empirical sample standard deviations (SDs). They are descriptive dispersion estimates and are not treated as theoretically validated sub-Gaussian variance proxies.
Table 5.
Validation-score geometry of the Hybrid Core model, reported as mean ± SD over five model seeds.
Both datasets exhibit substantial mean separation between genuine and impostor scores. Tongji has a slightly larger mean-score gap and a considerably larger separation coefficient. The main difference arises from impostor-score dispersion: BMPD has a higher empirical impostor standard deviation, which reduces and increases score overlap.
Proposition 2 characterizes the pre-BN triplet-sampling distribution during metric learning. It is retained as a training-stage theoretical result and is not interpreted as a numerical bound on the post-BN genuine–impostor score separation. Test-time separation is, therefore, evaluated directly from the post-BN validation cosine scores.
The earlier version of Table 6 substituted empirical score standard deviations for the sub-Gaussian variance proxies. Such substitution is not theoretically justified by the available data. The corrected analysis, therefore, uses the distribution-free Hoeffding choice
Table 6.
Empirical validation thresholds and Hoeffding-based plug-in evaluations using empirical validation means.
Table 6 distinguishes empirical validation results from Hoeffding-based plug-in evaluations. Values obtained from score means use the reported five-seed mean validation statistics and are not cross-seed confidence intervals. Because the unknown population means are replaced by empirical validation means, the reported numerical values are illustrative plug-in evaluations rather than finite-sample risk certificates.
The underlying Hoeffding inequalities are valid when the population means are known. However, the numerical values reported in Table 6 are obtained by substituting empirical validation means and, therefore, must not be interpreted as certified finite-sample FAR or FRR bounds.
The empirical validation EER thresholds provide useful operating points, whereas the universal bounds are too conservative to describe the observed verification performance closely. For example, the empirical Tongji validation FAR is below 1%, while the distribution-free theoretical FAR upper bound evaluated from the mean statistics is approximately 95.44%. This is not a contradiction: the universal bound is designed to remain valid for any score distribution supported on , including distributions much less concentrated than the observed scores.
For the target value , the distribution-free threshold formula gives values greater than the maximum possible cosine score. Therefore, neither dataset supports a nontrivial theoretical FAR certificate at this target using only the universal Hoeffding proxy. Clipping these thresholds to 1 would not preserve the stated guarantee.
A tighter theoretical result would require a statistically validated sub-Gaussian proxy or another distribution-specific concentration analysis. Empirical standard deviations alone are insufficient for this purpose.
4.3. Component Ablation Analysis
Exact one-factor ablations were conducted using the same participant groups, accepted sample identifiers, enrollment/query trials, and five model seeds as the Hybrid Core configuration. Each variant changes only one component. Paired differences are calculated seed by seed relative to Hybrid Core.
The normalized-Euclidean variant reuses the Core checkpoint and changes only the inference metric. It, therefore, directly tests the distance–cosine ranking equivalence stated in Proposition 1.
For clarity, “No CLAHE” removes contrast enhancement; “No ROI” removes the Hybrid ROI normalization stage; “global average pooling (GAP) instead of GeM” replaces generalized-mean pooling with global average pooling; “No BNNeck” removes the batch-normalization neck; “No identity loss” sets the auxiliary identity-classification loss to zero; “Normalized Euclidean” replaces cosine matching with squared Euclidean distance on the same L2-normalized post-BN descriptors; “Semi-hard triplet” replaces batch-hard mining with semi-hard mining; “Softmax ResNet18” uses identity classification without the triplet-learning objective; and “No embedding normalization” removes L2 normalization from the embedding used by the corresponding metric-learning configuration. Table 7 summarizes the one-factor ablation results for Tongji and BMPD.
Table 7.
(a) One-factor ablation results on Tongji with paired 95% confidence intervals. (b) One-factor ablation results on BMPD with paired 95% confidence intervals.
Here, () denotes the paired seed-wise difference between each ablation variant and Hybrid Core. Positive accuracy and negative EER indicate improvement relative to Hybrid Core. The 95% confidence intervals were calculated from the five aligned seed-wise differences using a two-sided ()-interval. On Tongji, only the No-ROI ablation shows clearly resolved changes in both accuracy and EER, whereas the confidence intervals for the remaining architectural and training ablations include zero. Because only five aligned seeds are available, these intervals have limited power for resolving small effects.
On Tongji, removing Hybrid ROI increased accuracy by 0.73 percentage points and reduced EER by 1.00 percentage point relative to Hybrid Core. The no-ROI configuration achieved accuracy and EER.
This result does not support a claim that explicit ROI normalization is universally beneficial. Tongji Session 1 already provides relatively stable palm placement and a controlled dark background. Additional geometric recropping may remove useful peripheral texture or introduce small localization variations. The high Tongji performance must, therefore, not be attributed solely to the Hybrid ROI module.
The remaining Tongji effects are comparatively small. Paired 95% confidence intervals calculated from the five seed-aligned differences include zero for the No CLAHE, GAP instead of GeM, No BNNeck, No identity loss, semi-hard triplet, Softmax ResNet18, and No embedding normalization variants. In contrast, the No-ROI effect is clearly resolved across the aligned seeds, with an accuracy difference of (+0.73) percentage points (95% CI: (0.40) to (1.05)) and an EER difference of (−1.00) percentage point (95% CI: (−1.19) to (−0.81)). Because only five aligned seeds are available, these intervals have limited power for detecting small effects and should be interpreted together with effect magnitude and direction.
On BMPD, the effects are more variable. Removing the auxiliary identity loss produces the largest mean deterioration: accuracy decreases by 2.60 percentage points and EER increases by 4.61 percentage points. The paired 95% confidence interval for the EER increase is 3.19–6.02 percentage points and does not include zero, providing the clearest evidence among the evaluated BMPD ablations. Removing embedding normalization also increases EER by 2.61 percentage points, with a 95% confidence interval of 1.01–4.21 percentage points. In contrast, the confidence intervals for CLAHE, ROI, pooling, BNNeck, mining strategy, and the Softmax ResNet18 comparison include zero for the reported measures, indicating that these effects are not clearly resolved under the present five-seed design.
Removing embedding normalization decreased mean accuracy by 0.84 percentage points (95% CI: (−2.54) to (0.85)) and increased EER by 2.61 percentage points (95% CI: (1.01) to (4.21)). The accuracy effect is not clearly resolved, whereas the EER increase is consistently positive across the paired-seed analysis, indicating a clearer contribution of embedding normalization to BMPD verification error.
CLAHE, GeM, BNNeck, and mining strategy produced smaller or more variable differences, with paired 95% confidence intervals including zero for both accuracy and EER. Their contributions should, therefore, be interpreted as dataset-dependent rather than universally positive.
Normalized-Euclidean matching reproduced Hybrid Core accuracy and EER exactly on both datasets. This result is expected from Proposition 1 because normalized squared Euclidean distance is a strictly decreasing affine transformation of cosine similarity. It validates the implementation-level equivalence of the two metrics within the post-BN normalized verification space. It does not establish equality between pre-BN and post-BN embeddings.
Overall, the ablation results support three conclusions:
- Cosine and normalized-Euclidean matching are exactly equivalent within the selected normalized inference space;
- Auxiliary identity supervision is particularly important under the more variable BMPD acquisition conditions;
- The effects of ROI normalization, CLAHE, pooling, BNNeck, mining strategy, and embedding normalization are acquisition-dependent and, in several cases, small relative to across-seed variability.
4.4. Triplet-Margin Sensitivity
The triplet margin was evaluated at . All models used the same participant split, trial construction, and five model seeds. The value remained the prespecified Hybrid Core configuration. The remaining margins were evaluated to determine whether performance changed monotonically with the nominal cosine constraint. The triplet-margin sensitivity results for Tongji and BMPD are summarized in Table 8.
Table 8.
Triplet-margin sensitivity on Tongji and BMPD, reported as mean ± SD over five model seeds.
On Tongji, the highest mean accuracy was obtained with , whereas the lowest mean EER was obtained with . On BMPD, produced both the highest mean accuracy and the lowest mean EER. Therefore, no single margin was optimal for every dataset and metric.
For Tongji, the 95% confidence intervals across the five model seeds overlap substantially among the evaluated margin settings. For example, the accuracy intervals range from 98.97–99.34% at () to 99.07–99.45% at (), while the EER intervals range from 1.07–1.51% at () to 0.94–1.48% at (). These intervals describe uncertainty across stochastic training runs under the same fixed participant split and are not participant-level confidence intervals.
Increasing the margin did not produce a monotonic improvement. In particular, the largest investigated margin reduced BMPD accuracy and increased its EER. This behavior is consistent with Proposition 2: a larger nominal margin is useful only when the corresponding triplet-violation probability remains controlled. Accordingly, the observed margin response is interpreted empirically and is not used to estimate the triplet-violation probability. Figure 2 illustrates the triplet-margin sensitivity results for Tongji and BMPD.
Figure 2.
Triplet-margin sensitivity on Tongji and BMPD: (a) test accuracy and (b) EER. Error bars indicate standard deviations across five model seeds evaluated on one fixed participant-disjoint split.
The sensitivity experiment does not justify changing the prespecified Hybrid Core margin after observing test performance. Because the observed differences are generally small relative to across-seed variability, no evaluated margin is interpreted as uniformly superior. The prespecified value () is, therefore, retained for the principal model, while the remaining settings are treated as sensitivity analyses.
5. Discussion
5.1. Mathematical Interpretation
Proposition 1 establishes the exact equivalence of squared Euclidean distance and cosine similarity for L2-normalized descriptors. The normalized-Euclidean ablation confirmed this property by reproducing the Hybrid Core accuracy and EER on both datasets. However, this equivalence holds separately within each normalized feature space. The pre-BN descriptor used by the triplet loss and the post-BN descriptor used for verification are not assumed to be identical because batch normalization can change feature directions.
Proposition 2 shows that increasing the triplet margin improves the theoretical training-stage separation only when the violation probability remains sufficiently small. Consistent with this result, increasing the margin did not produce monotonic performance gains. The best empirical margins differed between Tongji and BMPD. Proposition 2 is, therefore, interpreted as a training-stage theoretical result and is not presented as a numerical bound on post-BN test-score separation. The corrected sub-Gaussian analysis uses the universal Hoeffding proxy . The resulting bounds are valid but highly conservative and cannot certify a target FAR of for either dataset. Thus, the theoretical analysis explains the relationship between score separation, thresholding, and verification risk, but it does not replace empirical ROC, EER, and validation-based threshold calibration.
5.2. Empirical and Practical Implications
The ablation results demonstrate that preprocessing effects depend on acquisition conditions. On Tongji, the no-ROI variant outperformed Hybrid Core. Tongji Session 1 already contains relatively stable palm positioning and a controlled background; additional ROI localization may remove useful texture or introduce crop variability.
On BMPD, removing Hybrid ROI reduced accuracy, although its effect on EER was less stable. Therefore, ROI normalization should be treated as an acquisition-dependent component rather than a universally beneficial procedure.
Removing the auxiliary identity loss produced the largest mean deterioration on BMPD, with accuracy decreasing by 2.60 percentage points and EER increasing by 4.61 percentage points relative to Hybrid Core. Among the evaluated ablations, this provides the clearest empirical support for combining triplet learning with auxiliary identity supervision under the more variable BMPD acquisition conditions. Removing embedding normalization also increased BMPD EER, although its effect was smaller and less consistent across datasets.
CLAHE, GeM, BNNeck, mining strategy, and several other ablations produced smaller or more variable effects across datasets and model seeds. In several cases, the paired confidence intervals included zero, and the five-seed design provides limited statistical power for resolving small effects. These components should, therefore, not be presented as universally beneficial. Similarly, the margin-sensitivity experiment showed substantial overlap in across-seed uncertainty and did not identify a uniformly superior margin across datasets and evaluation measures.
Thresholds selected near the validation EER did not necessarily produce equal FAR and FRR on the independent test subset, particularly on BMPD. This finding confirms that decision thresholds depend on the calibration population and should be estimated using validation data representative of the intended deployment environment.
5.3. Limitations
This study has several limitations. First, all five model-training seeds use one fixed participant-disjoint split. The resulting across-seed statistics quantify stochastic optimization variability but do not capture uncertainty associated with alternative identity partitions. Repeated participant-disjoint splits would provide a stronger assessment of split sensitivity and generalization.
Second, the BMPD test subset contains only eight participants, corresponding to 16 palm identities and 320 images. Consequently, EER and other verification measures may be sensitive to the particular participants included in the held-out test set. Participant-level bootstrap confidence intervals characterize this source of uncertainty but do not substitute for evaluation on a larger cohort or repeated participant partitions.
Third, only Tongji Session 1 was evaluated, and no cross-dataset verification experiment was conducted. The reported performance, therefore, does not establish generalization across acquisition devices, sessions, or datasets.
Fourth, the theoretical triplet separation result applies to the pre-BN training-time sampling distribution and is not interpreted as a quantitative guarantee for post-BN test-time verification. Similarly, the Hoeffding-based verification-risk calculations are conservative theoretical evaluations and should not be interpreted as finite-sample operational risk certificates.
Fifth, the reported verification metrics are conditional on samples that satisfy the ROI acceptance criteria. A complete operational evaluation should additionally report route-specific ROI rejection rates and the end-to-end failure-to-acquire rate.
Finally, competing palmprint methods were not retrained using exactly the same participant split, enrollment/query protocol, and threshold selection procedure, and computational efficiency was not measured on target mobile hardware. Future work should, therefore, consider repeated participant partitions, both Tongji sessions, larger BMPD-style cohorts, cross-dataset generalization, end-to-end ROI failure analysis, and deployment-oriented latency and memory measurements.
Accordingly, the strongest conclusions concern the exact equivalence of cosine and normalized-Euclidean matching within the same normalized embedding space, the comparatively clear BMPD benefit of auxiliary identity supervision, and the acquisition-dependent effect of ROI normalization. Claims of universal component superiority, operational risk certification, or deployment readiness are not made.
6. Conclusions
This study presented a cosine-consistent deep metric-learning framework for open-set contactless palmprint verification. The principal contribution lies in the mathematically consistent integration of Hybrid ROI extraction, contrast enhancement, residual feature extraction, generalized-mean pooling, BNNeck, batch-hard triplet learning, auxiliary identity supervision, and cosine-based matching within a rigorously controlled participant-disjoint evaluation protocol. Evaluation used one fixed participant-disjoint split, five model-training seeds, and validation-only checkpoint and threshold selection. Tongji evaluation was restricted to the 6000 images from Session 1.
The mathematical analysis established the exact equivalence of cosine similarity and squared Euclidean distance within an L2-normalized embedding space. This property was also confirmed experimentally through normalized-Euclidean matching. However, the pre-BN training representation and post-BN verification representation were explicitly distinguished and were not assumed to define identical geometries.
The ablation experiments provided the clearest empirical support for auxiliary identity supervision under the more variable BMPD acquisition conditions. The effect of ROI normalization was acquisition-dependent: removing ROI improved the mean Tongji results but reduced BMPD accuracy. In contrast, the effects of CLAHE, pooling, BNNeck, mining strategy, embedding normalization, and triplet margin were generally smaller or more variable across model seeds and datasets. These effects should, therefore, not be interpreted as universal improvements.
The theoretical analysis clarified the relationship between the triplet-learning objective and the expected pre-BN score difference under the specified training-time sampling distribution. This result was not interpreted as a guarantee of post-BN test-time separation. The distribution-free verification-risk bounds were mathematically valid but highly conservative, and plug-in evaluations using empirical validation means were not treated as finite-sample risk certificates. Empirical threshold calibration based exclusively on validation scores, therefore, remains necessary for practical verification.
Future work should evaluate repeated participant-disjoint partitions, both Tongji sessions, larger and more diverse smartphone cohorts, cross-dataset generalization, route-specific ROI acceptance and rejection behavior, end-to-end failure-to-acquire rates, and deployment-oriented latency and memory consumption. These extensions are particularly important for assessing the stability of EER and other verification measures beyond the present fixed-split experimental design.
Author Contributions
Conceptualization, S.F. and O.Y.; methodology, O.Y. and A.Q.; software, A.Q. and R.M.; validation, O.Y., A.Q. and R.M.; formal analysis, O.Y.; investigation, O.Y., A.Q. and R.M.; resources, S.F. and O.Y.; data curation, A.Q. and R.M.; writing—original draft preparation, O.Y. and A.Q.; writing—review and editing, S.F., O.Y. and A.Q.; visualization, A.Q. and R.M.; supervision, S.F.; project administration, S.F. and O.Y. All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported by the Agency for Innovative Development under the Ministry of Higher Education, Science and Innovation of the Republic of Uzbekistan, project No. AL-9224104661. The project supported the development of the proposed cosine-consistent deep metric-learning methodology, including its mathematical formulation, statistical risk analysis, and experimental validation.
Data Availability Statement
The Tongji Contactless Palmprint Dataset and BMPD are publicly available for scientific research, subject to their respective access conditions. The Tongji dataset is described in detail in [30]. Additional implementation details are available from the corresponding author upon reasonable request.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Jain, A.K.; Ross, A.; Prabhakar, S. An Introduction to Biometric Recognition. IEEE Trans. Circuits Syst. Video Technol. 2004, 14, 4–20. [Google Scholar] [CrossRef] [Scilit]
- Zhang, D.; Kong, W.K.; You, J.; Wong, M. Online Palmprint Identification. IEEE Trans. Pattern Anal. Mach. Intell. 2003, 25, 1041–1050. [Google Scholar] [CrossRef] [Scilit]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Scilit]
- Shao, H.; Zhong, D. Towards Open-Set Touchless Palmprint Recognition via Weight-Based Meta Metric Learning. Pattern Recognit. 2022, 121, 108247. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Izadpanahkakhk, M.; Razavi, S.M.; Taghipour-Gorjikolaie, M.; Zahiri, S.H.; Uncini, A. Deep Region of Interest and Feature Extraction Models for Palmprint Verification Using Convolutional Neural Networks Transfer Learning. Appl. Sci. 2018, 8, 1210. [Google Scholar] [CrossRef] [Scilit]
- Izadpanahkakhk, M.; Razavi, S.M.; Taghipour-Gorjikolaie, M.; Zahiri, S.H.; Uncini, A. Novel Mobile Palmprint Databases for Biometric Authentication. Int. J. Grid Util. Comput. 2019, 10, 465–474. [Google Scholar] [CrossRef] [Scilit]
- Stoimchev, M.; Ivanovska, M.; Štruc, V. Learning to Combine Local and Global Image Information for Contactless Palmprint Recognition. Sensors 2022, 22, 73. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Amrouni, N.; Benzaoui, A.; Bouaouina, R.; Khaldi, Y.; Adjabi, I.; Bouglimina, O. Contactless Palmprint Recognition Using Binarized Statistical Image Features-Based Multiresolution Analysis. Sensors 2022, 22, 9814. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schroff, F.; Kalenichenko, D.; Philbin, J. FaceNet: A Unified Embedding for Face Recognition and Clustering. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 815–823. [Google Scholar] [CrossRef] [Scilit]
- Hermans, A.; Beyer, L.; Leibe, B. In Defense of the Triplet Loss for Person Re-Identification. arXiv 2017, arXiv:1703.07737. [Google Scholar]
- Fawcett, T. An Introduction to ROC Analysis. Pattern Recognit. Lett. 2006, 27, 861–874. [Google Scholar] [CrossRef] [Scilit]
- ISO/IEC 19795-1:2021; Information Technology—Biometric Performance Testing and Reporting—Part 1: Principles and Framework. International Organization for Standardization: Geneva, Switzerland, 2021.
- Vershynin, R. High-Dimensional Probability: An Introduction with Applications in Data Science; Cambridge University Press: Cambridge, UK, 2018. [Google Scholar]
- Wainwright, M.J. High-Dimensional Statistics: A Non-Asymptotic Viewpoint; Cambridge University Press: Cambridge, UK, 2019. [Google Scholar]
- Liang, X.; Fan, D.; Yang, J.; Jia, W.; Lu, G.; Zhang, D. PKLNet: Keypoint Localization Neural Network for Touchless Palmprint Recognition Based on Edge-Aware Regression. IEEE J. Sel. Top. Signal Process. 2023, 17, 662–676. [Google Scholar] [CrossRef] [Scilit]
- Zhang, C.; Liang, X.; Fan, D.; Chen, J.; Zhang, B.; Wu, B.; Zhang, D. HGAIQA: A Novel Hand-Geometry-Aware Image Quality Assessment Framework for Contactless Palmprint Recognition. IEEE Trans. Instrum. Meas. 2024, 73, 1–13. [Google Scholar] [CrossRef] [Scilit]
- Wu, Y.; Hu, J. Deep and Shallow Feature Fusion in Feature Score Level for Palmprint Recognition. IET Biom. 2024, 2024, 5683547. [Google Scholar] [CrossRef] [Scilit]
- Feng, Y.; Kumar, A. BEST: Building Evidences from Scattered Templates for Accurate Contactless Palmprint Recognition. Pattern Recognit. 2023, 138, 109422. [Google Scholar] [CrossRef] [Scilit]
- Kaya, M.; Bilge, H.Ş. Deep Metric Learning: A Survey. Symmetry 2019, 11, 1066. [Google Scholar] [CrossRef] [Scilit]
- Kulis, B. Metric Learning: A Survey. Found. Trends Mach. Learn. 2013, 5, 287–364. [Google Scholar] [CrossRef] [Scilit]
- Yang, Z.; Chen, Y.; Gao, C.; Teoh, A.B.J.; Zhang, B.; Zhang, Y. FedPalm: A General Federated Learning Framework for Closed- and Open-Set Palmprint Verification. IEEE Trans. Inf. Forensics Secur. 2026, 21, 3093–3107. [Google Scholar] [CrossRef] [Scilit]
- Zhang, C.; Yang, Z.; Yan, L.; Li, S.; Teoh, A.B.J.; Zhang, B.; Zhang, Y. PalmBridge: A Plug-and-Play Feature Alignment Framework for Open-Set Palmprint Verification. arXiv 2026, arXiv:2601.20351. [Google Scholar]
- Wojke, N.; Bewley, A. Deep Cosine Metric Learning for Person Re-Identification. In Proceedings of the Winter Conference on Applications of Computer Vision (WACV), Lake Tahoe, NV, USA, 12–15 March 2018; pp. 748–756. [Google Scholar] [CrossRef] [Scilit]
- Ranjan, R.; Castillo, C.D.; Chellappa, R. L2-Constrained Softmax Loss for Discriminative Face Verification. arXiv 2017, arXiv:1703.09507. [Google Scholar]
- Liu, W.; Wen, Y.; Yu, Z.; Li, M.; Raj, B.; Song, L. SphereFace: Deep Hypersphere Embedding for Face Recognition. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 6738–6746. [Google Scholar] [CrossRef] [Scilit]
- Deng, J.; Guo, J.; Xue, N.; Zafeiriou, S. ArcFace: Additive Angular Margin Loss for Deep Face Recognition. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 4690–4699. [Google Scholar] [CrossRef] [Scilit]
- Radenović, F.; Tolias, G.; Chum, O. Fine-Tuning CNN Image Retrieval with No Human Annotation. IEEE Trans. Pattern Anal. Mach. Intell. 2019, 41, 1655–1668. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Luo, H.; Jiang, W.; Gu, Y.; Liu, F.; Liao, X.; Lai, S.; Gu, J. A Strong Baseline and Batch Normalization Neck for Deep Person Re-Identification. IEEE Trans. Multimed. 2020, 22, 2597–2609. [Google Scholar] [CrossRef] [Scilit]
- Bouthillier, X.; Delaunay, P.; Bronzi, M.; Trofimov, A.; Nichyporuk, B.; Szeto, J.; Mohammadi Sepahvand, N.; Raff, E.; Madan, K.; Voleti, V.; et al. Accounting for Variance in Machine Learning Benchmarks. Proc. Mach. Learn. Syst. 2021, 3, 747–769. [Google Scholar]
- Zhang, L.; Li, L.; Yang, A.; Shen, Y.; Yang, M. Towards Contactless Palmprint Recognition: A Novel Device, a New Benchmark, and a Collaborative Representation Based Identification Approach. Pattern Recognit. 2017, 69, 199–212. [Google Scholar] [CrossRef] [Scilit]
- Zhang, F.; Bazarevsky, V.; Vakunov, A.; Tkachenka, A.; Sung, G.; Chang, C.-L.; Grundmann, M. MediaPipe Hands: On-Device Real-Time Hand Tracking. arXiv 2020, arXiv:2006.10214. [Google Scholar]
- Chang, Y.; Jung, C.; Ke, P.; Song, H.; Hwang, J. Automatic Contrast-Limited Adaptive Histogram Equalization with Dual Gamma Correction. IEEE Access 2018, 6, 11782–11792. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.

