  Stochasticity plays a significant role in the low-power operation of a
biological neural network. In an artificial neural network (ANN), stochasticity
also contributes to critical functions such as the uncertainty quantification
(UQ) for estimating the probability for the correctness of prediction. This UQ
is vital for cutting-edge applications, including medical diagnostics,
autopilots, and large language models. Thanks to high computing velocity and
low dissipation, a spin-orbit-torque (SOT) device exhibits significant
potential for implementing the UQ. However, up until now, the application of UQ
for stochastic SOT devices remains unexplored. In this study, based on
SOT-induced stochastic magnetic domain wall (DW) motion with varying velocity,
we fabricated an SOT synapse that could emulate stochastic weight update
following the Spike-Timing-Dependent-Plasticity (STDP) rule. Furthermore, we
set up a stochastic Spiking-Neural-Network (SNN), which, when compared to its
deterministic counterpart, demonstrates a clear advantage in quantifying
uncertainty for diagnosing the type of breast tumor (benign or malignant).
