## 3 Materials and Methods
### Euclidean and Riemannian Dissimilarity Frameworks  
The formulation of the abstract concept of the proposed RDV for WI-SV purposes necessitates an elucidation of the association between the formation of difference vectors in both vector space methods and those based on Riemannian manifolds. This is achieved by following a historical roadmap, which mainly follows the steps of [51; 64]. To begin, let us consider the data matrix \(X\in\mathbb{R}^{d\times k}:=\{x_{i}\}_{i=1}^{k},\,\,x_{i}\in\mathbb{R}^{d}\) comprised of a set of vectors (or descriptors). Gaussian mixture models (GMMs) have been proposed as a probabilistic approach for representing the \(x_{i}\) data instances. In detail,  
\[p(x_{i}|\lambda)=\sum_{j=1}^{N}\pi_{j}\mathcal{N}\big{(}x_{i}\big{|}\mu_{j}, \mathbf{C}_{j}\big{)} \tag{6}\]  
in which \(\lambda=\big{\{}\tau_{j},\mu_{j},\mathbf{C}_{j}\big{\}}\) represents the mixing probability, the mean, and the covariance of each one of the \(j\)-th corresponding Gaussian factors. In view of the fact that in the field of statistics a score function is defined as the log-likelihood of the data on the model, the Fisher Vectors (FVs) encode the data through the use of the GMM score function. The gradient with respect to the mean, \(\mu_{j}\), is expressed as  
\[\
abla_{\mu_{j}}\text{log}\,p(X|\lambda)=\sum_{i=1}^{N}\gamma_{j}(x_{i})\mathbf{C} _{j}^{-1}\gamma_{j}(\mu_{j}-x_{i}) \tag{7}\]  
where the term \(\gamma_{j}(x_{i})\) represents the soft assignment of the \(x_{i}\) vector to the corresponding \(j\)-th Gaussian factor  
\[\gamma_{j}(x_{i})=\frac{\pi_{j}\mathcal{N}\big{(}x_{i}\big{|}\mu_{j},\mathbf{C}_{ j}\big{)}}{\sum_{i=1}^{N}\pi_{j}\mathcal{N}\big{(}x_{i}\big{|}\mu_{j},\mathbf{C}_{j} \big{)}} \tag{8}\]  
[PERSON] et al. [65] simplified the FV by proposing the Vector of Locally Aggregated Descriptors (VLAD) encoding. This was made by (a) having the covariance matrices \(\mathbf{C}_{j}\) be fixed and diagonal and (b) exploiting a hard assignment of the local descriptors instead of the soft ones in FVs. By dropping the normalization terms of the Gaussian function, VLAD evaluates the gradient of the Euclidean distance. In other words, given a set \(d_{j}\in\mathbb{R}^{d}\) of points in a vector space by means of a dictionary \(\mathfrak{D}\in\mathbb{R}^{N\times d},\mathfrak{D}=\big{\{}d_{j}\big{\}}_{j=1} ^{N}\), any query set of vectors \(X^{Q}\) comprising the \(x_{i}^{Q}\in\mathbb{R}^{d}\) query vectors is encoded with the concatenation of \(N\)-local difference vectors (LDV) \(v_{j}^{Euc}\) by accumulating the differences between a query \(x_{i}^{Q}\) and a center \(d_{j}\) according to the following:  
\[v_{j}^{Euc}=\sum_{x_{i}^{Q}\in d_{j}}\Big{(}d_{j}-x_{i}^{Q}\Big{)} \tag{9}\]  
An insightful analysis is now provided regarding the physical content of the Euclidean-based VLAD of Equation (9). To begin, the assignment term \(x_{i}^{Q}\in d_{j}\) denotes the fact that \(x_{i}^{Q}\) has a hard (closest) contribution to the \(d_{j}\) center. This assignment term relates to the notion of a metric \(\delta_{v^{Euc}}(\cdot,\cdot)\): \(\mathbb{R}^{d}\times\mathbb{R}^{d}\to\mathbb{R}^{+}\), which measures how close the \(x_{i}^{Q}\) point is compared to the \(d_{j}\) point. The second term \(d_{j}-x_{i}^{Q}\) of Equation (9) relates to the encoding among the \(x_{i}^{Q}\) and \(d_{j}\) vectors by means of the dissimilarity operator \((-):\mathbb{R}^{d}\times\mathbb{R}^{d}\to\mathbb{R}^{d}\); for this case, the dissimilarity is implemented with the standard operator of vector subtraction. In addition, it should be noted here that the vector subtraction between \(d_{j},\,\,x_{i}^{Q}\) qualitatively depicts the fact that the LDV \(v_{j}^{Euc}\) between two vectors is associated with the gradient of the \(l^{2}\) norm or their Euclidean distance. We now extend the aforementioned concepts and formulations to a framework that is applicable to any Riemannian matrix manifold \(\mathcal{M}\).