## 3 The Materials and Methods
### Perturbed Multi-Branch Variational Module  
Face recognition technologies pose enormous risks to forensic identification and disaster response applications when used in non-ideal conditions--in the case of occlusions, visual noise, partial facial trauma, or uncontrolled spectral quality. Uncertainty estimation is crucial in such high-stakes scenarios where the workload is far more difficult than the system has seen, especially since conventional deterministic deep neural networks are extremely overconfident in their predictions with even mildly degraded or unfamiliar inputs. To mitigate this limitation, HUE-Net implements the perturbed multi-branch variational module (PMB-VM), which is one of the main structural elements intended to capture and quantify predictive uncertainty. Based on concepts of Bayesian neural networks and stochastic dropouts, PMB-VM replaces determinism with an estimated framework, enabling the model, in addition to learning to facially represent the details robustly, to estimate confidence in the output's validity through variance estimation across multiple sampled branches. Within this framework, two main types of uncertainty are accounted for: epistemic uncertainty, gaps in the model's knowledge due to insufficient data or representation limitations, and aleatoric uncertainty, caused by the signal's inherent variability and noise, like occluded or poorly lit faces. By tackling both issues, PMB-VM improves model performance in unpredictable environments, which are commonly encountered in real-world face recognition tasks. PMB-VM introduces randomness across five slender branches at training time, stitching together depthwise separable convolutions, variational linear layers, and standard Monte Carlo Dropout. Each line computes an identity code while simultaneously recording uncertainty as the spread of angular distances among the sampled codes. Weight posteriors are approximated through the Bayes-by-Backprop routine, with optimization directed at the Evidence Lower Bound. During inference, ten separate forward passes with dropout still engaged feed into a pooling step that produces the final embedding and its confidence score. Data augmentation and noise modeling techniques can partially alleviate aleatoric uncertainty. On the other hand, epistemic uncertainty requires probabilistic reasoning for model parameters. Therefore, we use a variational Bayesian approximation in which every branch in PMB-VM approximates the posterior distribution over parameters by a Gaussian distribution with a mean and variance that can be adjusted through learning:  
\[q_{\phi}(\omega)=N\left(\omega;\mu,\sigma^{2}\right)\text{, }\phi=\left\{\mu, \sigma\right\} \tag{8}\]  
This enables the network to capture multiple realizations of its parameters during inference, yielding a distribution over output embeddings corresponding to the model's level of confidence. The PMB-VM module is integrated after the final backbone stage and comprises M independent stochastic branches. Each of these branches is designed as a lightweight residual block followed by a variational sampling layer. Each branch shares the same structural template but is perturbed during training via stochastic dropout and noise-injected weight sampling. \(F\in R^{d\times d\times C}\) denotes the high-level feature map from the backbone. Each branch \(m\in\left\{1,\dots,M\right\}\) applies  
\[z^{(m)}=f_{m}(F;\omega_{m})\text{, }\omega_{m}\sim q_{\phi}(\omega) \tag{9}\]  
The outputs of all branches are aggregated via expectation:  
\[\overline{z}=\frac{1}{M}\text{$\sum_{m=1}^{M}z^{(m)}$, }Var(z)=\frac{1}{M}\text{$\sum_{m=1}^{M}\left(z^{(m)}- \overline{z}\right)^{2}$} \tag{10}\]  
Here, \(\overline{z}\) is the final deterministic embedding used for recognition, while the variance provides a calibrated measure of predictive uncertainty. Each branch within the perturbed multi-branch variational module (PMB-VM) is meticulously designed to achieve a trade-off between computational load and uncertainty modeling potential.