# Multimodal Shot Prediction Based on Spatial-Temporal Interaction between Players in Soccer Videos
## 2 Proposed Multimodal Shot Prediction in Soccer Videos
### Uncertainty-Based Event Prediction
#### 2.3.1 Construction with Bayesian Neural Networks
Specifically, Bayes by Backprop approximates the posterior probability distribution \(p(\mathbf{\theta}|\mathcal{D})\) by minimizing the following equation:\[\lambda^{*} =\operatorname*{arg\,min}_{\lambda}\operatorname{KL}[q(\theta|\lambda) ||p(\theta|\mathcal{D})]\] \[=\operatorname*{arg\,min}_{\lambda}\int\!q(\theta|\lambda)\log\frac{ q(\theta|\lambda)}{p(\theta)p(\mathcal{D}|\theta)}d\theta\] \[\approx\operatorname*{arg\,min}_{\lambda}\sum_{k=1}^{K}[\log q( \theta_{k}|\lambda)-\log p(\theta_{k})-\log p(\mathcal{D}|\theta_{k})], \tag{13}\]  
where \(\lambda\) is the variational parameter, and \(\theta_{k}\) represents the \(k\)-th Monte Carlo sample taken from \(q(\theta|\lambda)\). To make the variational distribution \(q(\theta|\lambda)\) closer to the true posterior distribution \(p(\theta|\mathcal{D})\), we minimize the Kullback-Leibler (KL) Divergence. The marginal likelihood is a constant value independent of \(\lambda\) and does not affect the minimization; thus, it can be ignored. The final equation transformation is approximated by a Monte Carlo method, which eliminates the need to compute integrals and simplifies the computational process. Furthermore, the variational posterior parameters \(\lambda=(\mu,\sigma^{2})\) are updated using the reparameterization trick in conjunction with gradient descent. The reparameterization trick is a critical component in Bayes by Backprop for facilitating efficient backpropagation through stochastic weights. It involves expressing the sampled weights \(\theta\) as a deterministic function of the variational parameters \(\lambda\) and independent noises \(\epsilon\), typically sampled from a standard normal distribution. Specifically, the reparameterization is formulated as \(\theta=g(\epsilon,\lambda)\), where \(g(\cdot)\) is a differentiable function. This transformation allows the gradient of the loss function with respect to the variational parameters \(\lambda\) to be computed directly and enables standard gradient-based optimization methods to be applied. The reparameterization trick thus addresses the challenge of backpropagating gradients through random variables by transforming the randomness into an external and independent noise source. This technique significantly reduces variance in the gradient estimates and leads to more stable and efficient optimization in BNNs. Each term in this approximation cost is dependent on a specific weight obtained from the variational posterior, which ensures efficient and precise adjustments at each step of model learning. By employing the reparameterization trick, Bayes by Backprop optimizes the variational parameters in a way that the variational distribution \(q(\theta|\lambda)\) closely approximates the true posterior \(p(\theta|\mathcal{D})\), thereby capturing the uncertainty in the model weights effectively. In the proposed method, we involve multiple forward passes at each training step to obtain various prediction results. These results are then aggregated to form a comprehensive prediction distribution. The mean of this distribution represents the expected value of the predictions, while the variance indicates the prediction uncertainty. Furthermore, this predictive uncertainty can be decomposed into two distinct components [56]: aleatoric uncertainty \(\mathbf{u}_{t}^{alt}\) and the epistemic uncertainty \(\mathbf{u}_{t}^{ept}\) as follows:  
\[\mathbf{u}_{t}^{alt} =\frac{1}{M}\sum_{m=1}^{M}[\operatorname{diag}(\tilde{y}_{t,m})- \tilde{y}_{t,m}\tilde{y}_{t,m}^{\top}], \tag{14}\] \[\mathbf{u}_{t}^{ept} =\frac{1}{M}\sum_{m=1}^{M}(\tilde{y}_{t,m}-\tilde{y}_{t})(\tilde{ y}_{t,m}-\tilde{y}_{t})^{\top}, \tag{15}\]  
where \(M\) is the number of forward passes. \(\tilde{y}_{t,m}\) is the output value at time step \(t\) of the \(m\)-th layer of BNNs, and \(\tilde{y}_{t}\) is the mean value of the output from each layer. Aleatoric uncertainty reflects the inherent noise and randomness present in the data, which cannot be reduced even with more data or a more complex model.