Let us represent the local descriptor \(\mathbf {x}\)  to be \(d\) -dimensional vector (e.g. SURF or SIFT descriptors). Codebook or visual words are denoted as \(\mu = \left[\mu _1, \mu _2, \dots , \mu _K\right]\) , where \(K\)  represents the size of the vocabulary. Let \(NN(\mathbf {x})\)  represent the nearest-neighbor function that maps an input descriptor \(\mathbf {x}\)  to its nearest visual word \(i\)  where \(1 \le i \le K\) . In the original VLAD [1]}, [2]}, to represent a given image, a set of local descriptors are extracted first. Then, the contribution of each visual word \(v_i\)  is defined by accumulating distances of all the descriptors that belong to the \(i^{th}\)  visual word \(\mu _i\)  as:
\(v_i = \sum _{\mathbf {x}:NN(\mathbf {x})=i} \mathbf {x} - \mu _i\) 
