Skip to Content
MathematicsMathematics
  • Article
  • Open Access

29 September 2026

30 Pages

Cosine-Consistent Deep Metric Learning with Sub-Gaussian Risk Analysis for Contactless Palmprint Verification

,
,
and
1
Digital Technologies and Artificial Intelligence Research Institute, Tashkent 100125, Uzbekistan
2
Department of Software Engineering, Samarkand State University Named After Sharof Rashidov, Samarkand 140104, Uzbekistan
3
Department of Information Systems and Technologies, Jizzakh Branch of the National University of Uzbekistan Named After Mirzo Ulugbek, Jizzakh 130100, Uzbekistan
*
Author to whom correspondence should be addressed.

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.

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
∥ u − v ∥ 2 2 = 2 − 2 u T v .
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 − 1 , 1 , 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.

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 X denote the space of contactless palmprint images, Y the set of palm identities, and G the set of participants. Each observation is represented as
x i , y i , g i ∈ X × Y × G ,
where x i is a palmprint image, y i denotes a palm identity, and g i 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:
D = D t r ∪ D v a l ∪ D t e .
The corresponding participant sets satisfy
G t r ∩ G v a l = G t r ∩ G t e = G v a l ∩ G t e = ∅ .
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 0.60 , an anatomical consistency score of at least 0.65 , a normalized alignment residual not exceeding 0.12 , and a boundary score of at least 0.90 . The estimated palm width and height must also remain within the admissible image fractions 0.08 , 0.90 , and the required boundary-safe crop zoom must not exceed 1.65 .
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
landmark   ROI → contour / valley   ROI → contour / PCA   ROI .
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
q R O I l a n d = 0.40 q d e t + 0.40 q a n a t + 0.20 q b o u n d ,
whereas the contour-route score is
q R O I c o n t = 0.35 q s e g + 0.40 q g e o m + 0.25 q b o u n d .
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 256 × 256 pixels and subsequently resized to 224 × 224 pixels for the neural encoder.
CLAHE is then applied to reduce spatially nonuniform illumination [32]. For a local tile containing N pixels and L gray levels, the normalized histogram is
p k = n k N ,     k = 0 , … , L − 1 ,
where n k is the number of pixels with intensity k . Histogram values above the selected clip limit are truncated, and the excess mass is redistributed. The local mapping is
T k = L − 1 ∑ j = 0 k p c l i p j .
Bilinear interpolation between the mappings of adjacent tiles reduces artificial block boundaries. The implementation uses a clip limit of 2.0 and an 8 × 8 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
H l + 1 = R e L U F H l ; W l + P H l ,
where H l and H l + 1 denote the input and output feature tensors of the l -th residual block, respectively; F ( H l ; W l ) is the learned residual mapping with parameters W l ; and P ( H l ) denotes either the identity mapping or a 1 × 1 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 c , GeM is defined as
g c = 1 Ω ∑ r ∈ Ω 1 / p ,
where Ω denotes the spatial support of the feature map, | Ω | is the number of spatial locations, F c , r denotes the activation of channel c at spatial location r , and p > 0 is the learnable GeM pooling exponent initialized to 3. Thus, F c , r   p denotes the p -th power of the corresponding feature activation.
The resulting 512-dimensional representation is projected to a 256-dimensional feature vector:
z θ x = f θ x , z θ x ∈ R 256 .
Here, x denotes the preprocessed palm image, f θ ( ⋅ ) is the feature extraction and projection mapping parameterized by θ , and z θ ( x ) ∈ R 256 is the resulting pre-BN feature vector.
Two normalized embedding spaces are constructed from this projection. The pre-BN normalized descriptor is
u θ x = z θ x ∥ z θ x ∥ 2 ,
u θ x ∈ S 255 .
The vector u θ ( x ) is the L2-normalized pre-BN descriptor. Since z θ ( x ) ∈ R 256 , its normalized version lies on the unit hypersphere S 255 .
The BNNeck feature and normalized post-BN descriptor are
h θ x = B N z θ x ,
v θ x = h θ x ∥ h θ x ∥ 2 ,
v θ x ∈ S 255 .
Here, h θ ( x ) denotes the unnormalized BNNeck feature, while v θ ( x ) 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 u θ is used by the triplet objective. The unnormalized BNNeck feature h θ is supplied to the identity classifier, whereas the normalized post-BN descriptor v θ 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 P = 16 palm identities and K = 4 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
L t r i = 1 P K ∑ i = 1 P ∑ a = 1 K m a x p = 1 , … , K p ≠ a ∥ u i , a − u i , p ∥ 2 2 − m i n j ≠ i n = 1 , … , K ∥ u i , a − u j , n ∥ 2 2 + m + .
where P = 16 is the number of palm identities in a mini-batch and K = 4 is the number of images per identity. The descriptor u i , a denotes the L2-normalized pre-BN representation of anchor image a from identity i . The first inner term selects the farthest positive descriptor u i , p from the same identity, with p ≠ a , whereas the second inner term selects the nearest negative descriptor u j , n from any different identity j ≠ i . The operator [ r ] + = m a x ( 0 , r ) denotes the positive-part (hinge) function, and m > 0 is the triplet margin. The Hybrid Core configuration uses the prespecified margin
m = 0.30 .
The BNNeck representation is simultaneously supplied to an auxiliary identity classifier. Its cross-entropy loss is
L i d = − 1 P K ∑ i = 1 P K l o g e x p w y i T h i + b y i ∑ c = 1 C t r e x p w c T h i + b c ,
where P K is the mini-batch size, h i is the unnormalized BNNeck feature of sample i , y i denotes its ground-truth training identity, C t r is the number of palm identities in the training subset, and w c and b c are the classifier weight vector and bias associated with class c , respectively. The numerator is the exponential logit of the ground-truth class y i , whereas the denominator sums the exponential logits over all C t r training identities. The classifier is used only during optimization and is removed during verification.
The complete training objective is
L = λ t r i L t r i + λ i d L i d ,
with
λ t r i = 1 ,
λ i d = 1 .
The coefficients λ t r i and λ i d 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 K e enrollment images, the normalized post-BN descriptors are averaged and renormalized:
t = ∑ k = 1 K e v θ x k ∑ k = 1 K e v θ x k 2 .
Here, K e denotes the number of enrollment images for the palm identity, v θ ( x k ) is the L2-normalized post-BN descriptor of the k -th enrollment image, and t is the resulting L2-normalized enrollment template.
For a query image x q , cosine similarity is calculated as
s t , x q = t T v θ x q ∈ − 1 , 1 .
Here, x q denotes the query image and v θ ( x q ) is its L2-normalized post-BN descriptor. The superscript T denotes vector transposition; therefore, t T v θ ( x q ) is the inner product between the two unit-normalized vectors and is equal to their cosine similarity.
The verification decision is
δ τ t , x q = 1 , s t , x q ≥ τ , 0 , s t , x q < τ ,
where δ τ = 1 denotes acceptance and δ τ = 0 denotes rejection. The threshold τ is estimated exclusively from validation scores and frozen before test evaluation.
Proposition 1.
Distance–cosine equivalence. For any unit vectors  a , b ∈ S d − 1 , where  S d − 1  denotes the unit hypersphere in  R d ,
∥ a − b ∥ 2 2 = 2 − 2 a T b .
Proof. 
Because a T a = b T b = 1 ,
∥ a − b ∥ 2 2 = ( a − b ) T ( a − b ) = a T a + b T b − 2 a T b = 2 − 2 a T b .
This proves Equation (1). □
For the normalized pre-BN descriptors, the individual triplet loss can, therefore, be expressed as
L t r i = 2 s a n p r e − s a p p r e + m + ,
where
s a p p r e = u a T u p ,
s a n p r e = u a T u n .
Here, u a , u p , and u n denote the L2-normalized pre-BN descriptors of the anchor, positive, and negative samples, respectively. Accordingly, s a p p r e and s a n p r e denote the anchor–positive and anchor–negative cosine similarities in the pre-BN embedding space.
The loss is zero if and only if
s a p p r e − s a n p r e ≥ m 2 .
Here, τ s denotes the cosine-similarity threshold and τ d denotes the corresponding squared-Euclidean-distance threshold.
Thus, normalized squared-Euclidean triplet learning enforces a minimum cosine-score difference of m / 2 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 τ s corresponds to the squared-Euclidean threshold
τ d = 2 − 2 τ s .
However, Proposition 1 does not imply that u θ ( x ) = v θ ( x ) , where u θ ( x ) and v θ ( x ) 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
D T = s a p p r e − s a n p r e
denote the cosine-score difference produced by the pre-BN triplet-sampling mechanism. Define the triplet-violation event as
V = D T < m 2 ,
and its probability as
ε v = P r V .
Here, D T denotes the anchor–positive minus anchor–negative cosine-score difference induced by the pre-BN triplet-sampling mechanism, V T is the corresponding triplet-violation event, and π T 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
E D T ≥ 1 − ε v m 2 − 2 ε v .
Proof. 
Using conditional expectation,
E D T = 1 − ε v E D T V c + ε v E D T V .
On the non-violation set V c ,
D T ≥ m 2 .
Since both cosine similarities belong to − 1 , 1 ,
− 2 ≤ D T ≤ 2 ,
and therefore
E D T V ≥ − 2 .
Combining these inequalities gives Equation (2). □
The lower bound is positive when
ε v < m m + 4 .
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 S G and S I denote genuine and impostor cosine-score variables in the post-BN verification space, with means
μ G = E S G ,
μ I = E S I .
Here, S G and S I denote genuine and impostor cosine-score random variables in the normalized post-BN verification space, while μ G and μ I are their corresponding population means.
Assume conditionally that the centered scores satisfy the sub-Gaussian moment-generating-function bounds
E e x p λ S G − μ G ≤ e x p λ 2 σ G 2 2 ,
E e x p λ S I − μ I ≤ e x p λ 2 σ I 2 2 .
The parameter λ ∈ R is the moment-generating-function argument, while σ G 2 and σ I 2 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 − 1 , 1 , Hoeffding’s lemma provides the universally valid but conservative choice
σ G 2 = σ I 2 = 1 .
Because cosine similarity is bounded in [ − 1 , 1 ] , this choice is distribution free but generally conservative.
Proposition 3.
Conditional verification-risk bounds. For a threshold satisfying
μ I ≤ τ ≤ μ G .
Here, τ denotes the cosine-similarity decision threshold used in the post-BN verification space.
F A R τ ≤ e x p − ( τ − μ I ) 2 2 σ I 2 ,
and
F R R τ ≤ e x p − ( μ G − τ ) 2 2 σ G 2 .
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 S I − μ I gives
P r S I − μ I ≥ t ≤ i n f λ > 0   e x p − λ t + λ 2 σ I 2 2 .
The minimum occurs at λ = t / σ I 2 , which gives Equation (4). Applying the same argument to μ G − S G 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
τ b a l = σ I μ G + σ G μ I σ I + σ G .
The quantity τ b a l is the threshold at which the standardized genuine and impostor deviations from the decision boundary are equal.
At this threshold,
m a x F A R τ b a l , F R R τ b a l ≤ e x p − ( μ G − μ I ) 2 2 ( σ G + σ I ) 2 .
For the universal choice σ G = σ I = 1 ,
τ b a l = μ G + μ I 2 ,
and the bound becomes
m a x { F A R , F R R } ≤ e x p − ( μ G − μ I ) 2 8 .
For a desired theoretical FAR upper bound α ∈ 0 , 1 , Equation (4) yields
τ α = μ I + σ I 2 l n 1 α .
Here, α ∈ ( 0 , 1 ) denotes the desired theoretical upper bound on FAR, and the resulting threshold is meaningful only if it lies within the valid cosine-score domain [ − 1 , 1 ] .
If τ α > 1 , 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 m = 0.30 was fixed for the Hybrid Core model. Margin values 0.10 , 0.20 , 0.30 , 0.40 , and 0.50 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:
K e = 3 .
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 C denote the number of palm identities in a validation or test partition and let Q c denote the number of query images for palm identity c . The number of genuine trials is
N G = ∑ c = 1 C Q c .
When each query is compared with every nonmatching enrollment template, the number of impostor trials is
N I = ∑ c = 1 C Q c C − 1 .
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 F A , F R , T A , and T R denote false acceptances, false rejections, true acceptances, and true rejections. The false acceptance and false rejection rates are
F A R = F A N I ,
F R R = F R N G .
Here, N F A is the number of impostor trials incorrectly accepted, N F R is the number of genuine trials incorrectly rejected, N T A is the number of genuine trials correctly accepted, and N T R is the number of impostor trials correctly rejected.
The true acceptance rate (TAR) and true rejection rate (TRR) are
T A R = 1 − F R R = T A N G ,
T R R = 1 − F A R = T R N I .
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
A c c u r a c y = T A + T R N G + N I ,
B A c c = T A R + T R R 2 .
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
F A R τ E E R ≈ F R R τ E E R .
Here, τ E E R 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
Δ ^ = μ ^ G − μ ^ I ,
and the symmetric separation coefficient
J ^ s e p = ( μ ^ G − μ ^ I ) 2 s ^ G 2 + s ^ I 2 .
Here, μ ^ G and μ ^ I denote the empirical means of the genuine and impostor cosine-score samples, respectively, while σ ^ G and σ ^ I 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 99.16 ± 0.25 % , balanced accuracy of 98.90 ± 0.17 % , EER of 1.27 ± 0.16 % , and AUC of 0.9983 ± 0.0006 . On BMPD, the corresponding results were 96.43 ± 0.68 % , 93.89 ± 0.39 % , 6.51 ± 0.64 % , and 0.9837 ± 0.0064 .
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 s ^ G and s ^ I 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 J ^ s e p 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
σ G 2 = σ I 2 = 1 .
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 − 1 , 1 , including distributions much less concentrated than the observed scores.
For the target value α = 0.001 , 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 ( t )-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 99.89 ± 0.03 % accuracy and 0.27 ± 0.07 % 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 m ∈ { 0.10 , 0.20 , 0.30 , 0.40 , 0.50 } . All models used the same participant split, trial construction, and five model seeds. The value m = 0.30 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 m = 0.50 , whereas the lowest mean EER was obtained with m = 0.40 . On BMPD, m = 0.10 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 ( m   =   0.10 ) to 99.07–99.45% at ( m   =   0.50 ), while the EER intervals range from 1.07–1.51% at ( m   =   0.10 ) to 0.94–1.48% at ( m   =   0.50 ). 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 ( m = 0.30 ) 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 ε v 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 σ G 2 = σ I 2 = 1 . The resulting bounds are valid but highly conservative and cannot certify a target FAR of 0.001 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

  1. 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]
  2. 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]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. 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]
  9. 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]
  10. Hermans, A.; Beyer, L.; Leibe, B. In Defense of the Triplet Loss for Person Re-Identification. arXiv 2017, arXiv:1703.07737. [Google Scholar]
  11. Fawcett, T. An Introduction to ROC Analysis. Pattern Recognit. Lett. 2006, 27, 861–874. [Google Scholar] [CrossRef] [Scilit]
  12. ISO/IEC 19795-1:2021; Information Technology—Biometric Performance Testing and Reporting—Part 1: Principles and Framework. International Organization for Standardization: Geneva, Switzerland, 2021.
  13. Vershynin, R. High-Dimensional Probability: An Introduction with Applications in Data Science; Cambridge University Press: Cambridge, UK, 2018. [Google Scholar]
  14. Wainwright, M.J. High-Dimensional Statistics: A Non-Asymptotic Viewpoint; Cambridge University Press: Cambridge, UK, 2019. [Google Scholar]
  15. 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]
  16. 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]
  17. 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]
  18. Feng, Y.; Kumar, A. BEST: Building Evidences from Scattered Templates for Accurate Contactless Palmprint Recognition. Pattern Recognit. 2023, 138, 109422. [Google Scholar] [CrossRef] [Scilit]
  19. Kaya, M.; Bilge, H.Ş. Deep Metric Learning: A Survey. Symmetry 2019, 11, 1066. [Google Scholar] [CrossRef] [Scilit]
  20. Kulis, B. Metric Learning: A Survey. Found. Trends Mach. Learn. 2013, 5, 287–364. [Google Scholar] [CrossRef] [Scilit]
  21. 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]
  22. 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]
  23. 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]
  24. Ranjan, R.; Castillo, C.D.; Chellappa, R. L2-Constrained Softmax Loss for Discriminative Face Verification. arXiv 2017, arXiv:1703.09507. [Google Scholar]
  25. 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]
  26. 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]
  27. 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]
  28. 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]
  29. 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]
  30. 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]
  31. 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]
  32. 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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.