Year: 2019

Abstract:
Word embeddings learnt from large corpora have been adopted in various applications in natural language processing and served as the general input representations to learning systems. Recently, a series of post-processing methods have been proposed to boost the performance of word embeddings on similarity comparison and analogy retrieval tasks, and some have been adapted to compose sentence representations. The general hypothesis behind these methods is that by enforcing the embedding space to be more isotropic, the similarity between words can be better expressed. We view these methods as an approach to shrink the covariance/gram matrix, which is estimated by learning word vectors, towards a scaled identity matrix. By optimising an objective in the semi-Riemannian manifold with Centralised Kernel Alignment (CKA), we are able to search for the optimal shrinkage parameter, and provide a post-processing method to smooth the spectrum of learnt word vectors which yields improved performance on downstream tasks.

heading: 1 INTRODUCTION
text: Distributed representations of words have been widely dominating the Natural Language Processing research area and other related research areas where discrete tokens in text are part of the learning systems. Fast learning algorithms are being proposed, criticised, and improved. Despite the fact that there exist various learning algorithms (Mikolov et al., 2013a; Pennington et al., 2014; Bojanowski et al., 2017) for producing high-quality distributed representations of words, the main objective is roughly the same, which is drawn from the Distributional Hypothesis (Harris, 1954). The algorithms assume that there is a smooth transition of meaning at the word-level, thus they learn to assign higher similarity for adjacent word vectors than those that are not adjacent.
The overwhelming success of distributed word vectors leads to subsequent questions and analyses on the information encoded in the learnt space. As the learning algorithms directly and only utilise the co-occurrence provided by large corpora, it is easy to hypothesise that the learnt vectors are correlated with the frequency of each word, which may not be relevant to the meaning of a word (Turney & Pantel, 2010) and might hurt the expressiveness of the learnt vectors. One can theorise the frequency-related components in the learnt vector space, and remove them (Arora et al., 2017; Mu et al., 2018; Ethayarajh, 2018). These post-processing methods, whilst very effective and appealing, are derived from heavy assumptions on the representation geometry and the similarity measure.
In this work we re-examine the problem of post-processing word vectors as a shrinkage estimation of the true/underlying oracle gram matrix of words, which is a rank-deficient matrix due to the existence of synonyms and antonyms. Constrained from the semi-Riemannian manifold (Benn & Tucker, 1987; Abraham et al., 1983) where positive semi-definite matrices, including gram matrices, exist, and Centralised Kernel Alignment (Cortes et al., 2012), we are able to define an objective to search for the optimal shrinkage parameter, also called mixing parameter, that is used to mix the estimated gram matrix and a predefined target matrix with the maximum similarity with the oracle matrix on the semi-Riemannian manifold. Our contribution can be considered as follows:
1. We define the post-processing on word vectors as a shrinkage estimation, in which the estimated gram matrix is calculated from the pretrained word embeddings, and the target matrix is a scaled identity matrix for smoothing the spectrum of the estimated one. The goal is to find the optimal mixing parameters to combine the estimated gram matrix with the target in the semi-Riemannian manifold that maximises the similarity between the combined matrix and the oracle one.
2. We choose to work with the CKA, as it is invariant to isotropic scaling and also rotation, which is a desired property as the angular distance (cosine similarity) between two word vectors is commonly used in downstream tasks for evaluating the quality of learnt vectors. Instead of directly deriving formulae from the CKA (Eq. 1), we start with the logarithm of CKA (Eq. 2), and then find an informative lower bound (Eq. 5). The remaining analysis is done on the lower bound.
3. A useful objective is derived to search for the optimal mixing parameter, and the performance on the evaluation tasks shows the effectiveness of our proposed method. Compared with two other methods, our approach shows that the shrinkage estimation on a sub-Riemannian manifold works better than that on an Euclidean manifold for word embedding matrices, and it provides an alternative way to smooth the spectrum by adjusting the power of each linearly independent component instead of removing top ones.

heading: 2 RELATED WORK
text: Several post-processing methods have been proposed for readjusting the learnt word vectors (Mu et al., 2018; Arora et al., 2017; Ethayarajh, 2018) to make the vector cluster more isotropic w.r.t. the origin such that cosine similarity or dot-product can better express the relationship between word pairs. A common practice is to remove top principal components of the learnt word embedding matrix as it has been shown that those directions are highly correlated with the occurrence. Despite the effectiveness and efficiency of this family of methods, the number of directions to remove and also the reason to remove are rather derived from empirical observations, and they don’t provide a principled way to estimate these two factors. In our case, we derive a useful objective that one could take to search for the optimal mixing parameter on their own pretrained word vectors.
As described above, we view the post-processing method as a shrinkage estimation on the semiRiemannian manifold. Recent advances in machine learning research have developed various ways to learn word vectors in hyperbolic space (Nickel & Kiela, 2017; Dhingra et al., 2018; Gulcehre et al., 2019). Although the Riemannian manifold is a specific type of hyperbolic geometry, our data samples on the manifold are gram matrices of words instead of word vectors themselves in previous work, , which makes our work different from previous ones. The word vectors themselves are still considered in Euclidean space for the simple computation of similarity between pairs, and the intensity of the shrinkage estimation is optimised to adjust the word vectors.
Our work is also related to previously proposed shrinkage estimation of covariance matrices (Ledoit & Wolf, 2004; Schäfer & Strimmer, 2005). These methods are practically useful when the number of variables to be estimated is much more than that of the samples available. However, the mixing operation between the estimated covariance matrix and the target matrix is a weighted sum, and l2 distance is used to measure the difference between the true/underlying covariance matrix and the mixed covariance matrix. As known, covariance matrices are positive semi-definite, thus they lie on a semi-Riemannian manifold with a manifold-observing distance measure. A reasonable choice is to conduct the shrinkage estimation on the semi-Riemannian manifold, and CKA is applied to measure the distance as rotations and istropic scaling should be ignored with measuring two sets of word vectors. The following sections will discuss our approach in details.

heading: 3 SHRINKAGE OF GRAM MATRIX
text: Learning word vectors can be viewed as estimating the oracle gram matrix where the relationship of words is expressed, and the post-processing method we propose here aims to best recover the oracle gram matrix. Suppose there exists an ideal gram matrix K ∈ Rn×n where each entry represents the similarity of a word pair defined by a kernel function k(wi, wj). Given the assumption of a gram matrix and the existence of polysemies, the oracle gram matrix K is positive semi-definite and its rank is between 0 and n and denoted as k.
A set of pretrained word vectors is provided by a previously proposed algorithm, and for simplicity, an embedding matrix E ∈ Rn×d is constructed in which each row is a word vector vi. The estimated gram matrix K′ = EE> ∈ Rn×n has rank d and d ≤ k. It means that overall, the previously proposed algorithms give us a low-rank approximation of the oracle gram matrix K.
The goal of shrinkage is to, after the estimated gram matrix K′ is available, find an optimal postprocessing method to maximise the similarity between the oracle gram matrix K and the estimated one K′ given simple assumptions about the ideal one without directly finding it. Therefore, a proper similarity measure that inherits and respects our assumptions is crucial.

heading: 3.1 CENTRALISED KERNEL ALIGNMENT (CKA)
text: The similarity measure between two sets of word vectors should be invariant to any rotations and also to isotropic scaling. A reasonable choice is the Centralised Kernel Alignment (CKA) (Cortes et al., 2012) defined below:
ρ(Kc,K ′ c) = 〈Kc,K′c〉F ||Kc||F ||K′c||F
(1)
where Kc = [ I − 1 n 11> ] K [ I − 1 n 11> ] , and 〈Kc,K′c〉F = Tr(KcK′c). For simplicity of the derivations below, we assume that the ideal gram matrix K is centralised, and the estimated one K′ can be centralised easily by removing the mean of word vectors. In the following section, K and K′ are used to denote centralised gram matrices.
As shown in Eq. 1, it is clear that ρ(K,K′) is invariant to any rotations and isotropic scaling, and doesn’t suffer from the issues of K and K′ being low-rank. The centralised kernel alignment has been recommended recently as a proper measure for comparing the similarity of features learnt by neural networks (Kornblith et al., 2019). As learning word vectors can be thought of as a one-layer neural network with linear activation function, ρ(K,K′) is a reasonable similarity measure between the ideal gram matrix and our shrunken one provided by learning algorithms. Given the CauchySchwartz inequality and also the non-negativity of the Frobenius norm, ρ(K,K′) ∈ [0, 1].
Since both K and K′ are positive semi-definite, their eigenvalues are denoted as {λσ1 , λσ2 , ..., λσk} and {λν1 , λν2 , ..., λνd} respectively, and the eigenvalues of KK
′ are denoted as {λ1, λ2, ..., λd} as the rank is determined by the matrix with lower rank.1 The log-transformation is conducted to simplify the derivation.
log ρ(K,K′) = logTr(KK′)− 1 2 log Tr(KK>)− 1 2 log Tr(K′K′>)
≥ 1 d log (det(K) det(K′))− 1 2 log Tr(KK>)− 1 2 log Tr(K′K′>)
= 1 d ∑k i=1 log λσi + 1 d ∑d i=1 log λνi − 1 2 log ∑k i=1 λ 2 σi − 1 2 log ∑d i=1 λ 2 νi (2)
where the lower bound is given by the AM−GM inequality, and the equality holds when all eigenvalues of KK ′ are the same λ1 = λ2 = ... = λd.

heading: 3.2 SHRINKAGE OF GRAM MATRIX ON SEMI-RIEMANNIAN MANIFOLD
text: As the goal is to find a post-processing method that maximises the similarity ρ(K,K′), a widely adopted approach is to shrink the estimated gram matrix K′ towards the target matrix T with a predefined structure. The target matrix T is usually positive semi-definite and has same or higher rank than the estimated gram matrix. In our case, we assume T is full rank as it simplifies equations.
Previous methods rely on a linear combination of K′ and T in Euclidean space (Ledoit & Wolf, 2004; Schäfer & Strimmer, 2005). However, as gram matrices are positive semi-definite, they naturally lie on the semi-Riemannian manifold. Therefore, a suitable option for shrinkage is to move the estimated gram matrix K′ towards the target matrix T on a semi-Riemannian manifold (Brenier, 1987), and the resulting matrix Y is given by
Y = T 1/2(T−1/2K′T−1/2)βT 1/2 (3)
where β ∈ [0, 1] is the mixing parameter that indicates the strength of the shrinkage, and T 1/2 is the square root of the matrix T . The objective is to find the optimal β that maximises log ρ(K,K′).
β? = argmaxβ log ρ(K,Y ) = argmaxβ log ρ ( K,T 1/2(T−1/2K′T−1/2)βT 1/2 ) (4)
The objective defined in Eq. 4 is hard to work with, instead, we maximise the lower bound in Eq. 2 to find optimal mixing parameter β?. By plugging Y into Eq. 2 and denoting λyi as the i-th eigenvalue of Y , we have:
log ρ(K,Y ) ≥ 1 d ∑k i=1 log λσi + 1 d ∑d i=1 log λyi − 1 2 log ∑k i=1 λ 2 σi − 1 2 log ∑d i=1 λ 2 yi (5)
1λσk = λνd = 0 due to the centralisation.

heading: 3.3 SCALED IDENTITY MATRIX AS TARGET FOR SHRINKAGE
text: Recent progress in analysing pretrained word vectors (Mu et al., 2018; Arora et al., 2017) recommended to make them isotropic by removing top principal components as they highly correlate with the frequency information of words, and it results in a more compressed eigenspectrum. In Euclidean space-based shrinkage methods (Anderson, 2004; Schäfer & Strimmer, 2005), the spectrum is also smoothed by mixing the eigenvalues with ones to balance the overestimated large eigenvalues and underestimated small eigenvalues. In both cases, the goal is to smooth the spectrum to make it more isotropic, thus an easy target matrix to start with is the scaled identity matrix, which is noted as T = αI, where α is the scaling parameter and I is the identity matrix. Thus, the resulting matrix Y and the lower bound in Eq. 2 become
Y = (αI)1/2 ( (αI)−1/2K′(αI)−1/2 )β (αI)1/2 = α1−βK′β (6)
log ρ(K,Y ) ≥ L(β) = 1 d ∑k i=1 log λσi + 1 d ∑d i=1 log λ β νi − 1 2 log ∑k i=1 λ 2 σi − 1 2 log ∑d i=1 λ 2β νi (7)
It is easy to show that, when β = 0, the resulting matrix Y becomes the target matrix αI, and when β = 1, no shrinkage is performed as Y = K′. Eq. 7 indicates that the lower bound is only a function of β with no involvement from the scaling parameter α brought by the target matrix as the CKA is invariant to isotropic scaling.

heading: 3.4 NOISELESS ESTIMATION
text: Starting from the simplest case, we assume that the estimation process from learning word vectors E to constructing the estimated gram matrix K′ is noiseless, thus the first order and the second order derivative of L(β) with respect to β are crucial for finding the optimal β?:
∂L(β) ∂β = d∑ i=1 1 d log λνi − d∑ i=1 λ2βνi∑d j=1 λ 2β νj log λνi (8)
∂2L(β) ∂β2 = −2 d∑ i=1 λ2βνi log 2 λνi∑d i=1 λ 2β νi + 2
(∑d i=1 λ 2β νi log λνi )2 (∑d
i=1 λ 2β νi )2 (9) Since L(β) is invariant to isotropic scaling on {λνi |i ∈ 1, 2, ..., d}, we are able to scale them by the inverse of their sum, then pνi = λνi/ ∑d i=1 λνi defines a distribution. To avoid losing information of the estimated gram matrix K′, we redefine the plausible range for β as (0, 1]. Eq. 8 can be interpreted as
∂L(β) ∂β = ∑d i=1 qi log pνi − ∑d i=1 r(β)i log pνi (qi = 1 d , r(β)i = λ2βνi∑d j=1 λ 2β νj )
= 1 2β (H(r(β))−H(q, r(β))) = 1 2β (H(r(β))−H(q)−DKL(q||r(β))) < 0 (10)
where DKL(q||p) is the Kullback-Leibler divergence and it is non-negative, H(q) is the entropy of the uniform distribution q, and H (r(β), p) is the cross-entropy for r and p. The inequality derives from the fact that the uniform distribution has the maximum entropy. Thus, the first order derivative L′(β) is always less than 0. With the same definition of qi and r(β)i in Eq. 10, the second order derivative L′′(β) can be rewritten as
∂2L(β) ∂β2 = ∑d i=1 r(β)i log pνi (∑d j=1 r(β)i log pνj − ∑d k=1 qk log pνk ) = 1
2β H (r(β), p) (H(r(β))−H(q, r(β))) < 0 (11)
As shown, L′(β) < 0 means that L(β) monotonically decreases in the range of (0, 1] for β, and the resulting matrix Y = αI completely ignores the estimated gram matrix K′. L′(β) also monotonically decreases in the range of (0, 1] for β because L′′(β) < 0.
The observation is similar to the finding reported in previous work (Schäfer & Strimmer, 2005) on shrinkage estimation of covariance matrices that any target will increase the similarity between the oracle covariance matrix and the mixed covariance matrix. In our case, simply reducing β from 1 to 0 increases Eq. 2, and consequently, β → 0+ loses all information estimated which is not ideal.
However, one can rewrite Eq. 11 as L′′(β) = H (r(β), p)2 − H(q)H (r(β), p) and q is the uniform distribution which has maximum entropy, the derivative of L′′(β) with respect to H (r(β), p) gives
2H (r(β), p)−H(q), and by setting the derivative to 0, it tells us that there exists a β which results in a specific r that gives H (r(β), p) = 1
2 H(q). Since H (r(β), p) monotonically increases when β moves
from 0+ to 1, and limβ→0+ H (r(β), p) = H (q, p) < 12H(q) and H (r(1), p) > 1 2 H(q), there exists a single β ∈ (0, 1] that gives the smallest value of L′′(β). This indicates that there exists a β̂ that leads to the slowest change in the function value L(β). Then, we simply set β? = β̂. In practice, β should be larger than 0.5 in order not to make the resulting matrix overpowered by the target matrix, so one could run a binary search on β ∈ [0.5, 1] that gives smallest value of L′′(β).
Intuitively, this method is similar to using an elbow plot to find the optimal number of components to keep when running Principal Component Analysis (PCA) on observed data. To translate in our case, a larger value of β leads to flatter spectrum and higher noise level as the scaled identity matrix represents isotropic noise. The optimal β? gives us a point where the increase of L(β) is the slowest.
Once optimal mixing parameters β? are found, the resulting matrix Y = K′β ? = Eβ ? (Eβ ? )>, and α is omitted here. As a post-processing method for word vectors, we propose to transform the word vectors in the following fashion:
1. E = E − 1 n ∑n i=1 Ei· 2. Singular Value Decomposition E = USV > 3. Optimal Mixing Parameter β? = argminβ L′′ 4. Reconstruct the matrix E? = U(S)β?V >

heading: 4 EXPERIMENTS
text: Three learning algorithms are applied to derive word vectors, including skipgram (Mikolov et al., 2013b), CBOW (Mikolov et al., 2013a) and GloVe (Pennington et al., 2014).2 EE> serves as the estimated gram matrix K′. Hyperparameters of each algorithm are set to the recommended values. The training corpus is collected from Wikipedia and it contains around 4600 million tokens. The unique tokens include ones that occur at least 100 times in the corpus and the resulting dictionary size is 366990. After learning, the word embedding matrix is centralised and then the optimal mixing parameter β? is directly estimated from the singular values of the centralised word vectors. Afterwards, the postprocessed word vectors are evaluated on a series of word-level tasks to demonstrate the effectiveness of our method. Although the range of β is set to [0.5, 1.0] and the optimal value is found by minimising L′′(β), it seldomly hits 0.5, which means that searching is still necessary.

heading: 4.1 COMPARISON PARTNERS
text: Two comparison partners are chosen to demonstrate the effectiveness of our proposed method. One is the method (Mu et al., 2018) that removes the top 2 or 3 principal components on the zero-centred word vectors, and the number of top principal components to remove depends on the training algorithm used for learning word vectors, and possibly the training corpus. Thus, the selection process is not automatic, while ours is. The hypothesis behind this method is similar to ours, as the goal is to make the learnt word vectors more isotropic. However, removing top principal components, which are correlated with the frequency of each word, could also remove relevant information that indicates the relationship between words. The observation that our method is able to perform on par with or better than this comparison partner supports our hypothesis.
The other comparison partner is the optimal shrinkage (Ledoit & Wolf, 2004) on the estimated covariance matrices as the estimation process tends to overestimate the directions with larger power and underestimate the ones with smaller power, and the optimal shrinkage aims to best recover the true covariance matrix with minimum assumptions about it, which has the same goal as our method. The resulting matrix Y is defined to be a linear combination of the estimated covariance matrix and the target with a predefined structure, and it is denoted as Y = (1− β)αI + βΣ′, where in our case, Σ′ = E>E ∈ Rd×d. The optimal shrinkage parameter β is found by minimising the Euclidean distance between the true covariance matrix Σ and the resulting matrix Y . The issue here is that Euclidean distance and linear combination may not be the optimal choice for covariance matrices, and also Euclidean distance is not invariant to isotropic scaling which is a desired property when measuring the similarity between sets of word vectors.
2https://github.com/facebookresearch/fastText, https://github.com/stanfordnlp/GloVe

heading: 4.2 WORD-LEVEL EVALUATION TASKS
text: Three categories of word-level evaluation tasks are considered, including 8 tasks for word similarity, 3 for word analogy and 6 for concept categorisation. The macro-averaged results for each category of tasks are presented in Table 1. Details about tasks are included in the appendix.

heading: 4.3 WORD TRANSLATION TASKS
text: Table 2 presents results on supervised and unsupervised word translation tasks (Lample et al., 2018) 3 given pretrained word vectors from FastText (Bojanowski et al., 2017). The supervised word translation is formalised as solving a Procrustes problem directly. The unsupervised task first trains a mapping through adversarial learning and then refines the learnt mapping through the Procrustes problem with a dictionary constructed from the mapping learnt in the first step. The evaluation is done by k-NN search and reported in top-1 precision.

heading: 4.4 SENTENCE-LEVEL EVALUATION TASKS
text: The evaluation tasks include five tasks from SemEval Semantic Textual Similarity (STS) in 2012- 2016 (Agirre et al., 2012; 2013; 2014; 2015; 2016). A sentence vector is constructed by simply averaging word vectors or postprocessed word vectors, and the similarity measure is cosine similarity as well. The performance on each task is reported as the Pearson’s correlation score.
We evaluate our post-processing at two different levels, in which one applies the post-processing methods on word vectors before averaging them to form sentence vectors (Mu et al., 2018), and the other one applies methods on averaged word vectors, which are sentence vectors, directly (Arora
3https://github.com/facebookresearch/MUSE
et al., 2017). Applying the post-processing to sentence vectors results in better performance and our method leads to the best performance on each dataset. Results are reported in Table 3.

heading: 5 DISCUSSION
text: The results presented in Table 1, 2 and 3 indicate the effectiveness of our methods. In addition, by comparing to two most related post-processing methods, which are removing top principal components (Mu et al., 2018; Arora et al., 2017) and the optimal shrinkage estimation on covariance matrices in Euclidean space (Ledoit & Wolf, 2004; Schäfer & Strimmer, 2005), our method combines the best of the both worlds - the good performance of the first method and the automaticity property of the second one.
Specifically, our method derives the resulting gram matrix in a semi-Riemannian manifold, and the shrinkage is done by moving the estimated gram matrix K′ to the scaled identity matrix αI on the geodesic on the semi-Riemannian manifold defined in Eq. 6. Compared to measuring the Euclidean distance between two covariance matrices (Ledoit & Wolf, 2004), we chose a distance measure that respects the structure of the space where positive semi-definite matrices exist. Also, since we are working with improving the quality of learnt word vectors, given that mostly the angular distance between a pair of word vectors matters, the similarity measure between two spaces needs to be invariant to rotation and isotropic scaling, and the Centralised Kernel Alignment is a good fit in our case. Compared to the post-processing method that removes top principal components, our method defines an objective function where the unique minimum point in the specific range indicates the optimal shrinkage parameter β?, and which doesn’t require any human supervision on finding the parameters (the number of principal components to remove in that method).
The derivations in our work are mostly done on the lower bound in Eq. 2 of the original log of CKA ρ(K,K′), and the bound is tight when KK′ has a flat spectrum. In this sense, the lower bound essentially defines the similarity of the resulting matrix Y and a scaled identity matrix where the scaling factor is the average of the eigenvalues of KK′. As the isotropic scaling can be ignored in our case, intuitively, the lower bound (Eq. 2) gives us how to shrink an estimated gram matrix to an identity matrix. Since the target matrix T = αI is also a scaled identity matrix, the lower bound keeps increasing as Y travels from K′ to T , and it explains why the first order derivative is negative and the second order derivative is more informative. Our method is very similar to using an elbow plot to find the number of eigenvalues to keep in PCA. Future work should focus on finding a tighter bound that considers the interaction between the true gram matrix K and the estimated one K′.
Figure 1 shows that our methods give solid and stable improvement against two comparison partners on learnt word vectors provided by skipgram and CBOW with different dimensions, and slightly worse than removing top PCs on GloVe. However, skipgram and CBOW provide much better performance thus improvement on these algorithms is more meaningful, and our method doesn’t require manual speculations on the word vectors to determine the number of PCs to remove. An interesting observation is that there is a limit on the performance improvement from increasing the dimensionality of word vectors, which was hypothesised and analysed in prior work (Yin & Shen, 2018). Figure 2 shows that our method consistently outperforms two comparison partners when limited amount of
training corpus is provided, and the observation is consistent across learnt word vectors with varying dimensions. From the perspective of shrinkage estimation of covariance matrices, the main goal is to optimally recover the oracle covariance matrix under a certain assumption about the oracle one when limited data is provided. The results presented in Figure 2 indicate that our method is better at recovering the gram matrix of words, where relationships of word pairs are expressed, as it gives better performance on word-level evaluation tasks on average.

heading: 6 CONCLUSION
text: We define a post-processing method in the view of shrinkage estimation of the gram matrix. Armed with CKA and geodesic measured on the semi-Riemannian manifold, a meaningful lower bound is derived and the second order derivative of the lower bound gives the optimal shrinkage parameter β? to smooth the spectrum of the estimated gram matrix which is directly calculated by pretrained word vectors. Experiments on the word similarity and sentence similarity tasks demonstrate the effectiveness of our model. Compared to the two most relevant post-processing methods (Mu et al., 2018; Ledoit & Wolf, 2004), ours is more general and automatic, and gives solid performance improvement. As the derivation in our paper is based on the general shrinkage estimation of positive semi-definite matrices, it is potentially useful and beneficial for other research fields when Euclidean measures are not suitable. Future work could expand our work into a more general setting for shrinkage estimation as currently the target in our case is an isotropic covariance matrix.

heading: ACKNOWLEDGEMENTS

heading: A WORD-LEVEL EVALUATION TASKS
text: 8 word similarity tasks: MEN(Bruni et al., 2014), SimLex999(Hill et al., 2015), MTurk(Halawi et al., 2012), WordSim353(Finkelstein et al., 2002), WordSim-353-REL(Agirre et al., 2009), WordSim-353-SIM(Agirre et al., 2009), RG65(Rubenstein & Goodenough, 1965). On these, the similarity of a pair of words is calculated by the cosine similarity between two word vectors, and the performance is reported by computing Spearman’s correlation between human annotations with the predictions from the learnt vectors.
3 word analogy tasks: Google Analogy(Mikolov et al., 2013a), SemEval-2012(Jurgens et al., 2012), MSR(Mikolov et al., 2013c). The task here is to answer the questions in the form of “a is to a? as b is to b?”, where a, a? and b are given and the goal is to find the correct answer b?. The ”3CosAdd” method (Levy et al., 2015) is applied to retrieve the answer, which is denoted as argmaxb?∈Vw\{a?,b,a} = cos(b ?, a? − a+ b). Accuracy is reported.
6 concept categorisation tasks: BM(Baroni et al., 2010), AP(Almuhareb, 2006), BLESS(Jastrzebski et al., 2017), ESSLI(Baroni et al., 2008). The task is to measure whether words with similar meanings are nicely clustered together. An unsupervised clustering algorithm with predefined number of clusters is performed on each dataset, and the performance is reported also in accuracy.

heading: B PYTHON CODE
text: 1 i m p o r t numpy as np 2 3 d e f b e t a p o s t p r o c e s s i n g ( emb ) : 4 # embedding s i z e : number o f word v e c t o r s x dim of v e c t o r s 5 6 mean = np . mean ( vecs , a x i s =0 , keepdims=True ) 7 c e n t r e d e m b = emb − mean 8 u , s , vh = np . l i n a l g . svd ( c e n t r e d e m b ) 9
10 d e f o b j e c t i v e ( b ) : 11 l = s ** 2 12 l o g l = np . l o g ( l ) 13 l 2 b = l ** (2* b ) 14 15 f i r s t t e r m = np . mean ( l o g l * l 2 b * l o g l ) *np . mean ( l 2 b ) 16 s e c o n d t e r m = np . mean ( l o g l * l 2 b ) * * 2 . 17 d e r i v a t i v e = − 1 . / ( np . mean ( l 2 b ) ** 2 . ) * ( f i r s t t e r m − s e c o n d t e r m ) 18 r e t u r n d e r i v a t i v e 19 20 v a l u e s = l i s t ( map ( o b j e c t i v e , np . a r a n g e ( 0 . 5 , 1 . 0 , 0 . 0 0 1 ) ) ) 21 o p t i m a l b e t a = np . argmin ( v a l u e s ) / 1000 . + 0 . 5 22 23 p r o c e s s e d e m b = u @ np . d i a g ( s ** o p t i m a l b e t a ) @ vh 24 25 r e t u r n p r o c e s s e d e m b
Listing 1: Python code for searching for the optimal β?

Review summaries:
The authors propose a novel word embedding post-processing method that maximizes the similarity between the estimated Gram matrix of word vectors and its oracle matrix. To find the optimal Gram matrix, they adopt the shrink method to make Gram matrix K' to target matrix T on semi-Riemannian space. The authors use the shrinkage method to find optimal K' and formulate the maximization on CKA problem as finding the optimal shrinkage parameter that maximizes the lower bound of the CKA between the estimated Gram matrix and oracle. By applying the proposed method to various word embedding methods, the authors show the performance of their post-processing method on word analogy/similarity task, word translation task, and sentence similarity task.