Recycling Randomness with Structure for Sublinear time Kernel Expansions

Krzysztof Choromanski, Vikas Sindhwani

Introduction

Consider a kk-dimensional feature map of the form,

In recent years, such random feature maps have been used to dramatically accelerate the training time and inference speed of kernel methods (Schölkopf & Smola, 2002) across a variety of statistical modeling problems (Rahimi & Recht, 2007; Xie et al., 2015) and applications (Huang et al., 2014; Vedaldi & Zisserman, 2012). Standard linear techniques applied to random nonlinear embeddings of data are equivalent to learning with approximate kernels. To quantify the benefits, consider solving a kernel ridge regression task given ll training examples. With traditional kernel methods, dense linear algebra operations on the Gram matrix associated with the exact kernel function imply that the training complexity grows as O(l3+l2n)O(l^{3}+l^{2}n) and the time to make a prediction on a test sample grows as O(ln)O(ln). By contrast, random feature approximations reduce training complexity to O(lk2+lkn)O(lk^{2}+lkn) and test speed to O(kn)O(kn). This is a major win on big datasets where ll is very large, provided that a small value of kk can provide a good approximation to the kernel function.

In practice, though, the optimal value of kk is often large, albeit still much smaller than ll. For example, in a speech recognition application (Huang et al., 2014) involving around two million training examples, about hundred thousand random features are required to achieve state of the art results. In such settings, the time to construct the random feature map is dominated by matrix multiplication against the dense Gaussian random matrix, which becomes the new computational bottleneck. To alleviate this bottleneck, (Le et al., 2013) introduce the “Fastfood” approach where Gaussian random matrices are replaced by Hadamard matrices combined with diagonal matrices with Gaussian distributed diagonal entries. It was shown in (Le et al., 2013) that for the specific case of the complex exponential nonlinearity, the Fastfood feature maps provide unbiased estimates for the Gaussian kernel function, at the expense of additional statistical variance, but with the computational benefit of reducing the feature map construction time from O(kn)O(kn) to O(klog⁡ n)O(k\log~{}n) by using the Fast Walsh-Hadamard transform for matrix multiplication. The Fastfood construction for kernel approximations is akin to the use of structured matrices - in lieu of Gaussian random matrices - in Fast Johnson-Lindenstrauss transform (FJLT) (Alon & Chazelle, 2009) for dimensionality reduction, fast compressed sensing (Bajwa et al., 2007; Rauhut et al., 2012), and randomized numerical linear algebra techniques (Alon & Chazelle, 2011; Mahoney, 2011) Specific structured matrices were recently applied for approximating angular kernels (Choromanska et al., 2016). Some heuristic results for approximating kernels with circulant matrices were given in (Yu et al., 2015).

Our contributions in this paper are as follows:

We study a general family of structured random matrices that can be constructed by recycling a Gaussian random vector using a sequence of elementary generator matrices (introduced in Section 3). This family includes Circulant, Toeplitz and Hankel matrices. It also includes the Fastfood construction of (Le et al., 2013) as a special case. We show that fast sublinear time random feature maps obtained from these matrices provide unbiased estimates of the exact kernel, with variance comparable to the fully unstructured Gaussian case (Section 4). We introduce various structural coherence and graph-theoretic constants that control the quality of randomness we get from our model. Our approach generalizes across various choices of nonlinearities and kernel functions.

Of particular interest for us is the class of generalized structured matrices that have low-displacement rank (Pan, 2001; Sindhwani et al., 2015). Such matrices span an increasingly rich class of structures as the displacement rank is increased: from Circulant and Toeplitz matrices, to inverses and products of Toeplitz matrices, and more. The displacement rank provides a knob with which the degree of structure and randomness can be controlled to tradeoff computational and storage requirements against statistical variance.

We provide empirical support for our theoretical results (Section 5). In particular, we show that Circulant, Fastfood and low-displacement Toeplitz-like matrices provide high quality sublinear-time feature maps for approximating various kernels. With increasing displacement rank, the quality of the approximation approaches that of the fully Gaussian random matrix.

Background and Preliminaries

We start by giving a brisk background on random feature maps and structured matrices.

Random feature maps may be viewed as arising from Monte-Carlo approximations to integral representations of kernel functions. The original construction by Rahimi & Recht (2007) was motivated by a classical result that characterizes the class of shift-invariant positive definite functions.

While studying synergies between kernel methods and deep learning, (Cho & Saul, 2009) introduce bthb^{th}-order arc-cosine kernels via the following integral representation:

where i(⋅)i(\cdot) is the step function, i.e. i(x)=1i(x)=1 if x>0x>0 and otherwise; and the density pp is chosen to be standard Gaussian. These kernels evaluate inner products in the representation induced by an infinitely wide single hidden layer neural network with random Gaussian weights, and admit closed form expressions in terms of the angle θ=cos−1(xTz∥x∥2∥z∥2)\theta=cos^{-1}(\frac{\mathbf{x}^{T}\mathbf{z}}{\|\mathbf{x}\|_{2}\|\mathbf{z}\|_{2}}) between x\mathbf{x} and z\mathbf{z}:

where ∥⋅∥2\|\cdot\|_{2} denotes l2l_{2} norm.

Monte Carlo approximations to the integral representations above lead to the following,

where the feature map Ψ(x)\Psi(\mathbf{x}) has the form given in Eqn. 1, with rows of M\mathbf{M}, i.e. wj\mathbf{w}_{j} vectors, drawn from the Gaussian density, and the nonlinearity ss set to the following: complex exponential, s(x)=eixσs(x)=e^{i\frac{x}{\sigma}}, for the Gaussian kernel with bandwidth σ\sigma; hard-thresholding, s(x)=i(x)s(x)=i(x), for the angular similarity kernel in Eqn. 2; and ReLU activation, s(x)=max⁡(x,0)s(x)=\max(x,0), for the first order arc-cosine kernel in Eqn. 3.

2 Structured Matrices

A m×nm\times n matrix is called a structured matrix if it satisfies the following two properties: (1) it has much fewer degrees of freedom than mnmn independent entries, and hence can be implicitly stored more efficiently than general matrices, and (2) the structure in the matrix can be exploited for fast linear algebra operations such as fast matrix-vector multiplication. Examples include the Discrete Fourier Transform (DFT), the Discrete Cosine Transform (DCT) and the Walsh-Hadamard Transform (WHT) matrices. Here, we give other examples particularly relevant to this paper. The matrices described below are square. Rectangular matrices can be obtained by appropriately selecting rows or columns.

Circulant Matrices: These matrices are intimately associated with circular convolutions and have been used for fast compressed sensing in (Rauhut et al., 2012). A n×nn\times n Circulant matrix is completely determined by its first column/row, i.e., nn parameters. Each column/row of a Circulant matrix is generated by cyclically down/right-shifting the previous column/row. A skew-Circulant matrix has identical structure to Circulant, except that the upper triangular part of the matrix is negated. This general structure looks like,

with f=1f=1 for Circulant and f=−1f=-1 for skew-Circulant matrix. Both these matrices admit O(n log⁡ n)O(n~{}\log~{}n) matrix-vector multiplication as they are diagonalized by the DFT matrix (Pan, 2001). We will use the notation circ[g]\texttt{circ}[\mathbf{g}] and scirc[g]\texttt{scirc}[\mathbf{g}] for Circulant and skew-Circulant matrices respectively.

Toeplitz and Hankel Matrices: These matrices implement discrete linear convolution and arise naturally in dynamical systems and time series analysis. Toeplitz matrices are characterized by constant diagonals as follows,

Closely related Hankel matrices have constant anti-diagonals. Toeplitz-vector multiplication can be reduced to O(n log⁡ n)O(n~{}\log~{}n) Circulant-vector multiplication. For detailed properties of Circulant and Toeplitz matrices, we point the reader to (Gray, 2006)

For a given displacement rank parameter rr, the class of matrices for which the rank of L[T]L[\mathbf{T}] is at most rr is called Toeplitz-like. Remarkably, this class of matrices admits a closed-form parameterization in terms of the low-rank factorization of L[T]L[\mathbf{T}]:

: If an n×nn\times n matrix T\mathbf{T} satisfies rank(Z1T−TZ−1)≤rrank(\mathbf{Z}_{1}\mathbf{T}-\mathbf{T}\mathbf{Z}_{-1})\leq r, then it can be written as,

The family of matrices expressible by Eqn. 15 is very rich (Pan, 2001), i.e., it covers (i) all Circulant and Skew-circulant matrices for r=1r=1, (ii) all Toeplitz matrices and their inverses for r=2r=2, (iii) Products, inverses, linear combinations of distinct Toeplitz matrices with increasing rr, and (iv) all n×nn\times n matrices for r=nr=n. Since Toeplitz-like matrices under the parameterization of Eqn. 15 are a sum of products between Circulant and Skew-circulant matrices, they inherit fast FFT based matrix-vector multiplication with cost O(nrlog n)O(nrlog~{}n), where rr is the displacement rank. Hence, rr provides a knob on the degree of structure imposed on the matrix with which storage requirements, computational constraints and statistical capacity can be explicitly controlled. Recently such matrices were used in the context of learning mobile-friendly neural networks in (Sindhwani et al., 2015). We note in passing that the displacement rank framework generalizes to other types of base structures (e.g. Vandermonde); see (Pan, 2001).

3 FastFood

In the context of fast kernel approximations, (Le et al., 2013) introduce the Fastfood technique where the matrix M\mathbf{M} in Eqn. 1 is parameterized by a product of diagonal and simple matrices as follows:

Here, S,G,B\mathbf{S},\mathbf{G},\mathbf{B} are diagonal random matrices, P\mathbf{P} is a permutation matrix and H\mathbf{H} is the Walsh-Hadamard matrix. The k×nk\times n matrix M\mathbf{M} is obtained by vertically stacking k/nk/n independent copies of the n×nn\times n matrix F\mathbf{F}. Multiplication against such a matrix can be performed in time O(klog⁡ n)O(k\log~{}n). The authors prove that (1) the Fastfood approximation is unbiased, (2) its variance is at most the variance of standard Gaussian random features with an additional O(1k)O(\frac{1}{k}) term, and (3) for a given error probability δ\delta, the pointwise approximation error of a n×nn\times n block of Fastfood is at most O(log⁡(n/δ))O(\sqrt{\log(n/\delta)}) larger than that of standard Gaussian random features. However, note that the Fastfood analysis is limited to the Gaussian kernel and their variance bound uses properties of the complex exponential. The authors also conjecture that the Hadamard matrix H\mathbf{H} above, can be replaced by any matrix T\mathbf{T} such that T/n\mathbf{T}/\sqrt{n} is orthonormal, the maximum entry in T\mathbf{T} is small, and matrix-vector product against T\mathbf{T} can be computed in O(nlog⁡ n)O(n\log~{}n) time.

Structured Matrices from Gaussian Vectors

In this section, we present a general structured matrix model that allows a small Gaussian vector to be recycled in order to mimic the properties of a Gaussian random matrix suitable for generating random features. We first introduce some basic concepts in our construction. Note that we emphasize intuitions in our exposition - formal proofs are provided in our supplementary material.

Budget of Randomness: Let tt be some given parameter. Consider the column vector g=(g1,...,gt)T\mathbf{g}=(g_{1},...,g_{t})^{T}, where each entry is an independent Gaussian taken from N(0,1)\mathcal{N}(0,1). This vector stands for the “budget of randomness” used in our structured matrix construction scheme.

Our goal is to recycle the Gaussian vector g\mathbf{g} to construct random matrices with desirable properties. This is accomplished using a sequence of matrices which we call the P\mathcal{P}-model.

where g\mathbf{g} is a Gaussian random vector of length tt.

In the constructions of interest to us, the sequence P\mathcal{P} is designed to separate structure from Gaussian randomness; though elements of P\mathcal{P} can be deterministic or itself random, Gaussianity is restricted to the vector g\mathbf{g}. The ability of P\mathcal{P} to recycle a Gaussian vector effectively depends on certain structural constants that we now define.

For P={Pi}i=1m\mathcal{P}=\{\mathbf{P}_{i}\}_{i=1}^{m}, let Pij\mathbf{P}_{ij} denote the jthj^{th} column of the ithi^{th} matrix. The coherence of a P\mathcal{P}-model is defined as,

Note that μ[P]\mu[\mathcal{P}] is a maximum over all pairs of rows 1≤i≤j≤m1\leq i\leq j\leq m of the rescaled sums of cross-correlations Pi,n1TPj,n2\mathbf{P}^{T}_{i,n_{1}}\mathbf{P}_{j,n_{2}} for all pairs of different column indices n1,n2n_{1},n_{2}. Lower values of μ[P]\mu[\mathcal{P}] will lead to better quality models. In practice, as we will see in subsequent analysis, it suffices if μ[P]=O(poly(log⁡(n)))\mu[\mathcal{P}]=O(poly(\log(n))) which is the case for instance for Toeplitz and Circulant matrices.

The coherence of the P\mathcal{P}-model is an extremal statistic of pairwise correlations. We couple it with another set of objects describing global structural properties of the model, namely the coherence graphs.

Let 1≤i,j≤m1\leq i,j\leq m. We define by Gi,j\mathcal{G}_{i,j} an undirected graph with the set of vertices V(Gi,j)={{n1,n2}:1≤n1≠n2≤nV(\mathcal{G}_{i,j})=\{\{n_{1},n_{2}\}:1\leq n_{1}\neq n_{2}\leq n and Pi,n1TPj,n2≠0}\mathbf{P}^{T}_{i,n_{1}}\mathbf{P}_{j,n_{2}}\neq 0\} and the set of edges E(Gi,j)={{{n1,n2},{n2,n3}}:{n1,n2},{n2,n3}∈V(Gi,j)}E(\mathcal{G}_{i,j})=\{\{\{n_{1},n_{2}\},\{n_{2},n_{3}\}\}:\{n_{1},n_{2}\},\{n_{2},n_{3}\}\in V(\mathcal{G}_{i,j})\}. In other words, edges are between these vertices such that their corresponding 22-element subsets intersect. The chromatic number χ(i,j)\chi(i,j) of a graph Gi,j\mathcal{G}_{i,j} is the smallest number of colors that can be used to color all vertices of Gi,j\mathcal{G}_{i,j} in such a way that no two adjacent vertices share the same color.

The chromatic number of a P\mathcal{P}-model is defined as follows:

The chromatic number χ[P]\chi[\mathcal{P}] of a P\mathcal{P}-model is given as:

where Gi,j\mathcal{G}_{i,j} are associated coherence graphs.

As it was the case for the coherence μ[P]\mu[\mathcal{P}], smaller values of the chromatic number χ[P]\chi[\mathcal{P}] lead to better theoretical results regarding the quality of the model. Intuitively speaking, coherence graphs encode in a compact combinatorial way correlations between different rows of the structured matrix produced by the P\mathcal{P}-model. The chromatic number χ[P]\chi[\mathcal{P}] is a single combinatorial parameter measuring quantitatively these dependencies. It can be easily computed or at least upper-bounded (which is enough for us) for P\mathcal{P}-models related to all structured matrices considered in this paper. The following is a well-known fact from graph theory:

The chromatic number χ(G)\chi(G) of an undirected graph GG with maximum degree dmaxd_{max} satisfies: χ(G)≤dmax+1\chi(G)\leq d_{max}+1.

For all instantiations of P\mathcal{P}-models considered in this paper leading to various structured matrices, the vertices of associated coherence graphs will turn out to have small degrees and hence, by Lemma 3.1, small chromatic numbers.

We will introduce one more structural parameter of the P\mathcal{P}-model, depending on whether it is specified deterministically or randomly.

2 Examples of 𝒫𝒫\mathcal{P}-model structured matrices

Below we observe that various structured random matrices can be constructed according to the P\mathcal{P}-model, i.e. by specifying a sequence of matrices Pi\mathbf{P}_{i} in Eqn. 17. We note that chromatic numbers and coherence values of these P\mathcal{P}-models are low. In the next section, we show that this implies that we can get unbiased, low-variance kernel approximations from these matrices, for various choices of nonlinearities. Here we consider square structured matrices for which m=nm=n, or rectangular matrices with m<nm<n obtained by selecting first mm rows of a structured matrix.

2.2 Toeplitz and Hankel matrices

2.3 Fastfood matrices

2.4 Toeplitz-like semi-Gaussian matrices

Random discretized vectors hi\mathbf{h}^{i}: Each dimension of each hi\mathbf{h}^{i} is chosen independently at random from the binary set {−1nr,1nr}\{-\frac{1}{\sqrt{nr}},\frac{1}{\sqrt{nr}}\}.

Sparse setting: Each hi\mathbf{h}^{i} is sparse (but nonzero), i.e. has only few nonzero entries. Furthermore, the sign of each hji\mathbf{h}^{i}_{j} is chosen independently at random and the following holds: ∥h1∥2+...+∥hr∥2=1\|\mathbf{h}^{1}\|^{2}+...+\|\mathbf{h}^{r}\|^{2}=1. This setting is characterized by a parameter κ\kappa defining the size of the set of dimensions that are nonzero for at least one hi\mathbf{h}^{i}.

We refer to such matrices as Toeplitz-like semi-Gaussian matrices. We now sketch how they can be obtained from the P\mathcal{P}-model. We take t=nrt=nr and g=(g11,...,gn1,...,g1r,...,gnr)T\mathbf{g}=(g^{1}_{1},...,g^{1}_{n},...,g^{r}_{1},...,g^{r}_{n})^{T}. The matrix P1\mathbf{P}_{1} is constructed by vertically stacking rr matrices Sj\mathbf{S}_{j} for j=1,...,rj=1,...,r, where each Sj\mathbf{S}_{j} is constructed as follows. The first column of Sj\mathbf{S}_{j} is hj\mathbf{h}^{j} and the subsequent columns are obtained from previous by skew-Circulant downward shifts. Matrix Pi\mathbf{P}_{i} for i>1i>1 is obtained from Pi−1\mathbf{P}_{i-1} by upward Circulant shifts, independently for each column at each block Sj\mathbf{S}_{j}.

Matrices constructed according to this procedure satisfy conditions regarding certain structural parameters of the P\mathcal{P}-model (see: Theorem 4.4). In particular, in the sparse semi-Gaussian setting the corresponding coherence graphs have vertices of degrees bounded by a constant; thus, by Lemma 3.1 the P\mathcal{P}-models associated with them have low chromatic numbers.

3 Construction of Random Feature Maps

Given S[P]S[\mathcal{P}], the m×nm\times n structured random matrix defined by a P\mathcal{P}-model, in lieu of using the k×nk\times n Gaussian random matrix M\mathbf{M} in Eqn. 1, the feature map for a data vector x\mathbf{x} is constructed as follows.

Return Ψ(x)=1ks(xˉ)\Psi(\mathbf{x})=\frac{1}{\sqrt{k}}s(\mathbf{\bar{x}})

Note that the displacement rank rr for low displacement rank matrices and the number of rows mm of a single structured block can be used to control the “budget of randomness”; m=1m=1 reduces to a completely unstructured matrix.

Theoretical results

In this section we provide concentration results regarding P\mathcal{P}-model for Gaussian and arc-cosine kernels, showing in particular that the variance of the computed structured approximation of the kernel is close to the unstructured one. We also present results targeting specifically low displacement rank structured matrices, and show how the displacement rank knob can be used to increase the budget of randomness and reduce the variance.

The orthogonality condition Pi,jTPi,k=0\mathbf{P}^{T}_{i,j}\mathbf{P}_{i,k}=0 is trivially satisfied by Hankel, circulant or Toeplitz structured matrices produced by the P\mathcal{P}-model as well as Toeplitz-like semi-Gaussian matrices, where each hi\mathbf{h}^{i} has one nonzero entry. It is also satisfied in expectation (which in practice suffices) for all presented Toeplitz-like semi-Gaussian matrices.

For a P\mathcal{P}-model, where matrices Pi\mathbf{P}_{i} were chosen randomly we denote as η[P]\eta[\mathcal{P}] the maximum possible value that a random variable (Pi,n1TPj,n1)2(\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{1}})^{2} can take for 1≤i<j≤m,1≤n1≤n1\leq i<j\leq m,1\leq n_{1}\leq n. Without loss of generality we will assume that data vectors are drawn from the ball B(0,1)\mathcal{B}(0,1) centered at of unit l2l_{2} norm. Below we state results regarding dthd^{th} moments of the obtained kernel’s approximation via the P\mathcal{P}-model that lead to the concentration results.

and expectations are taken in respect to random choice for a Gaussian vector g\mathbf{g}. If Pis\mathbf{P}_{i}s are chosen from the probabilistic model then the above holds with probability at least 1−pwrong1-p_{wrong} in respect to random choices of Pis\mathbf{P}_{i}s, where

Let us comment on the result above. The upper bound is built from two main components: pgenp_{gen} and pstructp_{struct}. The first one depends on the general parameters of the setting: dimensionality of the data nn and order of the computed moment dd. The second one is crucial to understand how the structure of the matrix influences the quality of the model. We can immediately see that low chromatic numbers χ(i,j)\chi(i,j) (see: Section 3.1) improve quality since they decrease computed upper bound. Furthermore, low values of the coherence μ[P]\mu[\mathcal{P}] and chromatic number χ[P]\chi[\mathcal{P}] also lead to stronger concentration results. Both observations were noticed by us before, but now we see how they are implied by general theoretical results. Finally, for all considered settings, where matrices Pi\mathbf{P}_{i} are constructed randomly parameter η[P]\eta[\mathcal{P}] is of order O(1)O(1) thus pwrongp_{wrong} in negligibly small.

In particular, if both the chromatic number χ[P]\chi[\mathcal{P}] and the coherence μ[P]\mu[\mathcal{P}] are of the order O(poly(log⁡(n)))O(poly(\log(n))) then pstructp_{struct} if inversely proportional to the superpolynomial function of nn thus is negligible in practice. That, as we will see soon, will be the case for proposed Toeplitz-like semi-Gaussian matrices with sparse vectors hih^{i}.

Theorem 4.1 implies also that variances of the kernel approximation for the structured P\mathcal{P}-model case and unstructured setting are very similar (we borrow denotation from Theorem 4.1).

Consider the setting as in Theorem 4.1. If matrices Pi\mathbf{P}_{i} are chosen deterministically then for any T,ϵ>0T,\epsilon>0 the following is true for nn large enough:

where VarVar stands for the variance and Δ=pgen(T)+pstruct+ϵ\Delta=p_{gen}(T)+p_{struct}+\epsilon. If Pis\mathbf{P}_{i}s are chosen from the probabilistic model then the above holds with probability at least 1−pwrong1-p_{wrong}, where pwrongp_{wrong} is as in Theorem 4.1.

Note that in practice it means that the variance in the structured and unstructured setting is similar. In particular, choosing ϵ=O(1m2)\epsilon=O(\frac{1}{m^{2}}), T>7log⁡(m)T>7\log(m), one can deduce that the variance in the structured setting is of the order O(1m)O(\frac{1}{m}) for nn large enough (the well known fact is that the unstructured variance is of the order O(1m)O(\frac{1}{m})). Note also that as expected, for m=1m=1 the structured setting becomes an unstructured one, since each structured block consists of just one row and different blocks are constructed independently.

Toeplitz-like semi-Gaussian Low-displacement rank matrices: Note that the structure of a matrix affects only the pstructp_{struct} factor in the statements above. Thus, we will focus on the structured parameters of the P\mathcal{P}-model. We will show that Toeplitz-like semi-Gaussian matrices can be set up so that the above parameters are of required order.

The richness of the low displacement rank mechanism comes from the fact that the budget of randomness can be controlled by the rank parameter rr and increasing rr leads to better quality approximations. In particular, we have:

Note that increasing rank rr leads to sharper upper bounds on the coherence μ[P]\mu[\mathcal{P}] (in practice rr polynomial in log(n)log(n) suffices) and thus, from what we have said so far, to better concentration results for the entire structured scheme. Analogous variance bounds can also be derived for Toeplitz-like semi-Gaussian matrices where the hi\mathbf{h}^{i} vectors are chosen to be dense. But due to lack of space, these results are included in our supplementary material.

Empirical Support

In this section, we compare feature maps obtained with fully Gaussian, Fastfood, Circulant, and Toeplitz-like matrices with increasing displacement rank. Our goal is to lend support to the theoretical contributions of this paper by showing that high-quality feature maps can be constructed from a broad class of structured matrices as instantiations of the proposed P\mathcal{P}-model.

Results on publicly available real-world classification datasets, averaged over 100100 runs, are reported in Table 1 for complex exponential nonlinearity (Gaussian kernel). Results with ReLU (arc-cosine) are similar but not shown for lack of space. As observed in previous papers, better Gram matrix approximation is not often correlated with higher classification accuracy. Nonetheless, it is clear that the design of space of valid feature map constructions based on structured matrices is much larger than what has so far been explored in the literature: Circulant and Toeplitz-like matrices are very competitive with Fastfood, and sometimes give better results particularly with increasing displacement rank. The effectiveness of such feature maps for nonlinearities other than the complex exponential also validates our theoretical contributions. Among the unstructured baselines, we also include Quasi-Monte Carlo (QMC) feature maps of (Yang et al., 2014) using Halton low-discrepancy sequences. The use of structured matrices to accelerate QMC techniques building on (Dick et al., 2015) is of interest for future work.

Speedups: Figure 3 shows the speedup obtained in featuremap construction time using structured matrices relative to using unstructured Gaussian random matrices (on a 6-core 32-GB Intel(R) Xeon(R) machine running Matlab R2014a). The benefits of sub-quadratic matrix-vector multiplication with FFT-variations tend to show up beyond 10241024 dimensions. Circulant-based feature maps are the fastest to compute. Fastfood (with DCT instead of Hadamard matrices) is about as fast as Toeplitz-like matrices with displacement rank 1 or 2. Higher displacement rank matrices show speedups at higher dimensions as expected. Fastfood with inbuilt fwht routine in Matlab performed poorly in our experiments.

Conclusions

We have theoretically justified and empirically validated the use of a broad family of structured matrices for accelerating the construction of random embeddings for approximating various kernel functions. In particular, the class of Toeplitz-like semi-Gaussian matrices allows our construction to span highly compact to fully random matrices.

References

Appendix

We now prove all theoretical results of the paper. We need to introduce some technical denotation.

where g1,...,gmg^{1},...,g^{m} is the set of mm gaussian vectors forming gaussian matrix GG, each obtained by sampling independently nn values from the distribution N(0,1)\mathcal{N}(0,1) and ϕi\phi_{i}s differ by the choice of nonlinear mapping fi∈Ff_{i}\in\mathcal{F}, can be accurately approximated by its structured version Tv1,v2A,d((R,α1,...,αr)T^{A,d}_{v^{1},v^{2}}((\mathcal{R},\alpha_{1},...,\alpha_{r}) which is of the form:

where a1,...,ama^{1},...,a^{m} are rows of the structured matrix A=GstructiA=G_{struct}^{i}. The importance of Tv1,v2G,d(R,α1,...,αr)T^{G,d}_{v^{1},v^{2}}(\mathcal{R},\alpha_{1},...,\alpha_{r}) and Tv1,v2A,d(R,α1,...,αr)T^{A,d}_{v^{1},v^{2}}(\mathcal{R},\alpha_{1},...,\alpha_{r}) lies in the fact that dthd^{th} moments of the random variables approximating considered kernels in the unstructured and structured mechanism can be expressed as weighted sums of the expressions of the form Tv1,v2G,d(α1,...,αr)T^{G,d}_{v^{1},v^{2}}(\alpha_{1},...,\alpha_{r}) and Tv1,v2A,d(α1,...,αr)T^{A,d}_{v^{1},v^{2}}(\alpha_{1},...,\alpha_{r}) respectively if Ψ(x1,...,xr)=x1⋅...⋅xr\Psi(x_{1},...,x_{r})=x_{1}\cdot...\cdot x_{r}. Thus if Tv1,v2A,d(α1,...,αr)T^{A,d}_{v^{1},v^{2}}(\alpha_{1},...,\alpha_{r}) closely approximates Tv1,v2G,d(α1,...,αr)T^{G,d}_{v^{1},v^{2}}(\alpha_{1},...,\alpha_{r}) then the corresponding moments are similar. That, as we will see soon, implies several theoretical guarantees for the structured method. In particular, this means that the variances are similar. Since in the unstructured setting the variance is of the order O(1m)O(\frac{1}{m}), that will be also the case for the structured setting. This in turn will imply concentration results providing theoretical explanation for the observations from the experimental section that show the quality of the proposed structured setting.

Note that the value of the function ϕi(v1,v2,gi)αi\phi_{i}(v^{1},v^{2},g^{i})^{\alpha_{i}} depends only on the projection gprojig^{i}_{proj} of gig^{i} on the 22-dimensional space spanned by v1v^{1} and v2v^{2}. Thus for a given pair v1,v2v^{1},v^{2} function ϕ\phi is in fact a function Biv1,v2B^{v^{1},v^{2}}_{i} of this projection.

where the supremum is taken over all indices i=1,...,mi=1,...,m, all pairs of linearly independent vectors from the domain, all coordinate systems in span(v1,v2)span(v^{1},v^{2}) and vectors ζ\zeta of L1L_{1}-norm at most ϵ\epsilon in some of these coordinate systems.

We will use the following notation: σi,j(n1,n2)=Pi,n1TPj,n2\sigma_{i,j}(n_{1},n_{2})=\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{2}}. To compress the statements of our theoretical results, we will use also the following notation:

Note first that the preprocessing step preserves kernels’ values since transformation HD0HD_{0} is an isometry and considered kernels are spherically-invariant. We start with Lemma 4.1.

where GG is the unstructured gaussian matrix. Let gstructi,jg^{i,j}_{struct} be the jthj^{th} row of GstructiG^{i}_{struct} and let gjg^{j} be the jthj^{th} row of GG. Note that we have:

The latter follows from the fact that gstructi,jg^{i,j}_{struct} has the same distribution as gg. To see this note that gstructi,j=g⋅Pig^{i,j}_{struct}=g\cdot P_{i}. Thus dimensions of gstructi,jg^{i,j}_{struct} are projections of gg onto columns of PiP_{i}. Each projection is trivially gaussian from N(0,1)\mathcal{N}(0,1) (that is implied by the fact that each column is normalized). The independence of different dimensions of gstructi,jg^{i,j}_{struct} comes from the observation that different columns are orthogonal. Thus we can use a simple property of gaussian vectors stating that the projections of a gaussian vector on mutually orthogonal directions are independent. The equation 25 implies equation 26 by the linearity of expectation and that completes the proof. ∎

Now we prove Theorem 4.1. This one is easily implied by a more general result that we state below. We will assume that function Ψ\Psi from equations: 22, 23 is MM-bounded for some given M>0M>0. We will assume that expected values defining TA,dT^{A,d} are not with respect to the random choices determining PisP_{i}s.

If PisP_{i}s are chosen from the probabilistic model then the above holds with probability at least 1−pwrong1-p_{wrong}, where pwrong=2∑i≤i1<i2≤me−n28log⁡6(n)∑j=1n(σi1,i2(j,j))2p_{wrong}=2\sum_{i\leq i_{1}<i_{2}\leq m}e^{-\frac{n^{2}}{8\log^{6}(n)\sum_{j=1}^{n}(\sigma_{i_{1},i_{2}}(j,j))^{2}}}.

We will show that si,js^{i,j}s, even though not necessarily pairwise orthogonal, are close to be pairwise orthogonal with high probability. Let us assume now that vectors si,js^{i,j} can be chosen in such a way that each si,js^{i,j} satisfies: si,j=wi,j+ρ(i,j)s^{i,j}=w^{i,j}+\rho(i,j), where vectors wi,jw^{i,j} are mutually orthogonal, we have ∥si,j∥2=∥wi,j∥2\|s^{i,j}\|_{2}=\|w^{i,j}\|_{2} and furthermore ∥ρ(i,j)∥2≤ρ\|\rho(i,j)\|_{2}\leq\rho for some given ρ>0\rho>0. We call this property the ρ\rho-orthogonality property. We will later show that the ρ\rho-orthogonality property depends on the random diagonal matrix D1D_{1}.

Assume now that the ρ\rho-orthogonality property is satisfied. Denote by gHg^{\mathcal{H}} the projection of the “budget-of-randomness” vector gg onto 2r2r-dimensional linear space H\mathcal{H} spanned by vectors from {si,j}\{s^{i,j}\}. Note that then the coordinates of aprojisa^{i}_{proj}s in B\mathcal{B} can be rewritten as g⋅wi,j+ϵ(i,j)g\cdot w^{i,j}+\epsilon(i,j), where ∣ϵ(i,j)∣≤ϵ|\epsilon(i,j)|\leq\epsilon and ϵ=∥gH∥2ρ\epsilon=\|g^{\mathcal{H}}\|_{2}\rho. Thus each ψi\psi_{i} in the formula from equation 23 can be then expressed as Biv1,v2(gproji+ϵ(i))B_{i}^{v^{1},v^{2}}(g^{i}_{proj}+\epsilon(i)), where gprojisg^{i}_{proj}s stand for the projections onto 22-dimensional linear space spanned by v1v^{1} and v2v^{2} of independent copies of gaussian vectors gig^{i}. Each gig^{i} is of the same distribution as the corresponding structured vector aia^{i} and ϵ(i)s\epsilon(i)s are vectors with the L1L_{1}-norm satisfying ∥ϵ(i)∥≤ϵ\|\epsilon(i)\|\leq\epsilon. The independence comes from the fact that variables of the form g⋅wi,jg\cdot w^{i,j} are independent. That, as in the proof of Lemma 4.1 is implied by the well known fact that dot products of a given gaussian vector with orthogonal vectors are independent. Note that if not the term ϵ(i)\epsilon(i) then the formula for TA,dT^{A,d} would collapse to its unstructured counterpart TG,dT^{G,d}. We will argue that both expressions are still close to each other if ϵ(i)\epsilon(i) have small L1L_{1}-norm.

Let us fix λ>0\lambda>0. Our goal is to count these indices ii that satisfy the following: ∣ψi(v1,v2,gi)αi−ψi(v1,v2,gi)αi∣>λ|\psi_{i}(v^{1},v^{2},g^{i})^{\alpha^{i}}-\psi_{i}(v^{1},v^{2},g^{i})^{\alpha^{i}}|>\lambda, where gisg^{i}s corresponds to the aforementioned independent counterparts of aisa^{i}s. We call them bad indices. Based on what we have said so far, we can conclude that the latter inequality can be expressed as ∣Biv1,v2(gproji+ϵ(i))−Biv1,v2(gproji)∣>λ|B_{i}^{v^{1},v^{2}}(g^{i}_{proj}+\epsilon(i))-B_{i}^{v^{1},v^{2}}(g^{i}_{proj})|>\lambda. Let us first find the upper bound on the probability of the event that the number of bad indices is jj for some fixed 1≤j≤d1\leq j\leq d. Note that since gisg^{i}s are independent, we can use Bernoulli scheme to find that upped bound. Using the definition of pλ,ϵp_{\lambda,\epsilon} we obtain an upper bound of the form pupper≤(dj)(pλ,ϵ)jp_{upper}\leq{d\choose j}(p_{\lambda,\epsilon})^{j}. If the number of bad indices is jj then by the definition of MM and ΔλΨ\Delta^{\Psi}_{\lambda} we see that TA,dT^{A,d} differs from TG,dT^{G,d} by at most iM+(d−i)ΔλΨiM+(d-i)\Delta^{\Psi}_{\lambda}. Summing up over all indices jj we get the second term of the upper bound on qv1,v2dq^{d}_{v^{1},v^{2}} from the statement of the theorem.

However the ρ\rho-orthogonality does not have to hold. Note that (by the definition of Ψmax\Psi_{max}) to finish the proof of the theorem it suffices to show that the probability of ρ\rho-orthogonality not to hold is at most pgen+pstructp_{gen}+p_{struct}.

The ρ\rho-orthogonality property holds with probability at least 1−(pgen+pstruct)1-(p_{gen}+p_{struct}).

Let x=(x1,...,xn)x=(x_{1},...,x_{n}) be a vector with ∥x∥2=1\|x\|_{2}=1. We say that xx is θ\theta-balanced if ∣xi∣≤θn|x_{i}|\leq\frac{\theta}{\sqrt{n}} for i=1,...,ni=1,...,n.

We will use the following concentration inequality, calles Azuma’s inequality

Let X1,...,XnX_{1},...,X_{n} be a martingale and assume that −αi≤Xi≤βi-\alpha_{i}\leq X_{i}\leq\beta_{i} for some positive constants α1,...,αn,β1,...,βn\alpha_{1},...,\alpha_{n},\beta_{1},...,\beta_{n}. Denote X=∑i=1nXiX=\sum_{i=1}^{n}X_{i}. Then the following is true:

for l=1,...,tl=1,...,t, where sli,js^{i,j}_{l} stands for the lthl^{th} dimension of si,js^{i,j}, pl,kip^{i}_{l,k} is the entry in the lthl^{th} row and kthk^{th} column of PiP_{i} and drsd_{r}s are the values on the diagonal of the matrix D0D_{0}. As we noted earlier, we want to show that si,jss^{i,j}s are close to be mutually orthogonal. To do it, we will compute dot products si1,j1⋅si2,j2s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}}. We will first do it for i1=i2i_{1}=i_{2}. We have:

Now we take advantage of the normalization property of the matrices PiP_{i} and the fact that x1x^{1} is orthogonal to x2x^{2} and conclude that the first term on the RHS of the equation above is equal to . Thus we have:

Note that if for any fixed PiP_{i} any two different columns of PiP_{i} are orthogonal then σi1,i1(n1,n2)=0\sigma_{i_{1},i_{1}}(n_{1},n_{2})=0 and thus si1,j1⋅si1,j2=0s^{i_{1},j_{1}}\cdot s^{i_{1},j_{2}}=0. This is the case for many structured matrices constructed according to the P\mathcal{P}-model, for instance circulant, Toeplitz or Hankel matrices.

Let us consider now si1,j1⋅si2,j2s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}} for i1≠i2i_{1}\neq i_{2}. By the previous analysis, we obtain:

This time in general we cannot get rid of the first term in the RHS expression. This can be done if columns of the same indices in different PisP_{i}s are orthogonal. This is in fact again the case for circulant, Toeplitz or Hankel matrices.

For {n1,n2}\{n_{1},n_{2}\} such that n1≠n2n_{1}\neq n_{2} and σi1,i1(n1,n2)≠0\sigma_{i_{1},i_{1}}(n_{1},n_{2})\neq 0 let us now consider random variables Yn1,n2Y_{n_{1},n_{2}} that are defined as follows

From the definition of the chromatic number χ(i1,i1)\chi(i_{1},i_{1}) we can deduce that the set of all this random variables can be partitioned into at most χ(i1,i1)\chi(i_{1},i_{1}) subsets such that random variables in each subset are independent. Let us denote these subsets as: L1,...,Lr\mathcal{L}_{1},...,\mathcal{L}_{r}, where r≤χ(i1,i1)r\leq\chi(i_{1},i_{1}). Note that an event {∣∑1≤n1<n2≤ndn1dn2xn1j1xn2j22σi1,i1(n1,n2)∣>κ}\{|\sum_{1\leq n_{1}<n_{2}\leq n}d_{n_{1}}d_{n_{2}}x^{j_{1}}_{n_{1}}x^{j_{2}}_{n_{2}}2\sigma_{i_{1},i_{1}}(n_{1},n_{2})|>\kappa\} is contained in the sum of the events: E=E1∪...∪Er\mathcal{E}=\mathcal{E}_{1}\cup...\cup\mathcal{E}_{r}, where each Ej\mathcal{E}_{j} is defined as follows:

Now we can use Azuma’s inequality to find an upper bound on P[Ei]\mathcal{P}[\mathcal{E}_{i}] and we obtain:

We can conclude, using the union bound again, that for a log⁡(n)\log(n)-balanced basis B\mathcal{B} the probability that there exist i1,j1,j2i_{1},j_{1},j_{2} such that: ∣si1,j1⋅si1,j2∣>κ|s^{i_{1},j_{1}}\cdot s^{i_{1},j_{2}}|>\kappa is at most

Assume first that PisP_{i}s are chosen deterministically. Note that by log⁡(n)\log(n)-balanceness, we have:

Thus, by the triangle inequality, we have:

Using the same analysis as before, we then obtain the following bound on pbad(κ,θ)p_{bad}(\kappa,\theta):

We can conclude that in the setting where PisP_{i}s are chosen deterministically, under our assumptions on λ(i1,i2)\lambda(i_{1},i_{2}), for κ>0\kappa>0 that does not depend on nn and nn large enough the following is true. The probability that there exist two different vector si1,j1s^{i_{1},j_{1}}, si2,j2s^{i_{2},j_{2}} such that ∣si1,j1⋅si2,j2∣>κ|s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}}|>\kappa satisfies:

Now let us assume that PisP_{i}s are chosen probabilistically. In that setting we also assume that columns of different indices are chosen independently (this is the case for instance for the FastFood Transform). Let us now denote:

If we now take a=1log⁡(n)a=\frac{1}{\log(n)} and under log⁡(n)\log(n)-balanceness assumption, we obtain:

Thus, using our bound on YY for a fixed κ\kappa and nn large enough we can repeat previous analysis and conclude that in the probabilistic setting of PisP_{i}s the following is true:

Thus we can conclude that in both the deterministic and probabilistic setting for PisP_{i}s we get:

Now we will show that the squared lengths of vectors si,js^{i,j} are well concentrated around their means and that these means are equal to 11. Let us remind that we have:

where the last inequality comes from the fact that each column of each PiP_{i} has l2l_{2}-norm equal to 11.

We can again apply Azuma’s inequality and the union bound as we did before and obtain:

where ps=4∑i=1mχ(i,i)e−12ξ2(i,i)log⁡2(n)n2log⁡4(n)p_{s}=4\sum_{i=1}^{m}\chi(i,i)e^{-\frac{1}{2\xi^{2}(i,i)\log^{2}(n)}\frac{n^{2}}{\log^{4}(n)}}.

We will assume now that all si,js^{i,j} satisfy: ∣∥si,j∥22−1∣≤1log⁡(n)|\|s^{i,j}\|^{2}_{2}-1|\leq\frac{1}{\log(n)}, in particular:

Let us assume right now that the above inequality holds. Let {wi,j}\{w^{i,j}\} be a set of vectors obtained from {si,j}\{s^{i,j}\} by the Gram-Schmidt process. Without loss of generality we can assume that ∥wi,j∥2=∥si,j∥2\|w^{i,j}\|_{2}=\|s^{i,j}\|_{2}. Note that the size of the set {si,j}\{s^{i,j}\} is in fact not 2m2m, but 2r2r and in all practical application r≪mr\ll m. Assume now that ∣si1,j1⋅si2,j2∣≤κ|s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}}|\leq\kappa for any two different vectors si1,j1,si2,j2s^{i_{1},_{j_{1}}},s^{i_{2},j_{2}} and some fixed κ>0\kappa>0. Now, one can easily note that directly from the description of the Gram-Schmidt process that it leads to the set of vectors {wi,j}\{w^{i,j}\} such that ∥si,j−wi,j∥2≤κΓ(2r)\|s^{i,j}-w^{i,j}\|_{2}\leq\kappa\Gamma(2r), where Γ\Gamma is some constant that depends just on the size of the set {si,j}\{s^{i,j}\}. Thus if we want ρ\rho-orthogonality with ρ=ϵ∥gH∥2\rho=\frac{\epsilon}{\|g^{\mathcal{H}}\|_{2}}, where gHg^{\mathcal{H}} stands for the random projection of a vector gg onto 2r2r-dimensional linear space spanned by vectors from {si,j}\{s^{i,j}\}, then we want to have:

Thus we can conclude that the probability that gHg^{\mathcal{H}} has l2l_{2} norm larger than 2r⋅T\sqrt{2r}\cdot\sqrt{T} is at most pgauss(T)≤4r2πTp_{gauss}(T)\leq\frac{4r}{\sqrt{2\pi T}}. In such a case we need to take κ\kappa of the form:

We are ready to finish the proof of Lemma 7.1. Take κ=ϵΓ(2r)2rT\kappa=\frac{\epsilon}{\Gamma(2r)\sqrt{2r}\sqrt{T}}. Let us first take the setting where PisP_{i}s are chosen deterministically. Take an event Ebad\mathcal{E}_{bad} which is the sum of the events which probabilisites are upper-bounded by pgauss(T)p_{gauss}(T), 1−pbalanced1-p_{balanced}, pbad(κ)p_{bad}(\kappa) and psp_{s}. By the union bound, the probability of that event is at most pgauss+(1−pbalanced)+pbad(κ)+psp_{gauss}+(1-p_{balanced})+p_{bad}(\kappa)+p_{s} which is upper-bounded by pgen+pstructp_{gen}+p_{struct} for nn large enough. Note that if Ebad\mathcal{E}_{bad} does not hold then ρ\rho-orthogonality is satisfied. Now let us take the probabilistic setting for choosing PisP_{i}s. We proceed similarly. The only difference is that right now we need to assume that the event upper-bounded by pwrongp_{wrong} does not hold (this one depends only on the random choices for setting up PisP_{i}s). Thus again we get the statement of the lemma. That completes the proof of Lemma 7.1. ∎

As mentioned above, the proof of Lemma 7.1 completes the proof of the theorem. ∎

The last inequality in Eqn.62 is implied by the fact that different blocks of the structured matrix are computed independently and thus covariance related to rows from different blocks is .

where Xi,jPX^{\mathcal{P}}_{i,j} stands for the version of Xi,jX_{i,j} if A\mathbf{A} was costructed via the P\mathcal{P}-model and Xi,jGX^{\mathbf{G}}_{i,j} stands for the fully unstructured one.

where the latter inequality is implied by the fact that different blocks are constructed independently.

where β\beta is an upper bound as in Theorem 7.1 for d=2d=2. Now we can proceed in the same way as in the proof of Theorem 4.1 and the proof is completed. ∎

The fact that μ[P]≤κ\mu[\mathcal{P}]\leq\kappa comes directly from the definition of the coherence number and the sparse setting of semi-gaussian matrices. To see that, note that any given column colcol of any matrix Pi\mathbf{P}_{i} in the related P\mathcal{P}-model has a nonzero dot-product with at most κ2\kappa^{2} other columns of any matrix Pj\mathbf{P}_{j}. This in turn is implied by the fact that different columns are obtained by applying skew-circulant shifts blockwise, thus the number of columns from Pj\mathbf{P}_{j} that have nonzero dot product with colcol is at most the product of the number of nonzero dimensions of colcol and Pj\mathbf{P}_{j}. This is clearly upper bounded by κ2\kappa^{2}. This leads to the upper bound on the coherence μ[P]\mu[\mathcal{P}].

The bound regarding the chromatic number is implied by the observation that each coherence graph in the corresponding P\mathcal{P}-model has degree at most κ2\kappa^{2}. That follows directly from the observation we used to prove the upper bound on μ[P]\mu[\mathcal{P}]. But now we can use Lemma 3.1 and that completes the proof of Theorem 4.3. ∎

Below we present the proof of Theorem 4.4.

Fix two columns Pi,n1\mathbf{P}_{i,n_{1}} and Pj,n2\mathbf{P}_{j,n_{2}} and consider the expression Pi,n1TPj,n2\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{2}}. We have already mentioned in the previous proof the right approach to finding strong upper bound on ∣Pi,n1TPj,n2∣|\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{2}}|. We first note that Pi,n1TPj,n2\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{2}} can be written as a sum w1+...+wnrw_{1}+...+w_{nr}, where wisw_{i}s are not necessarily independent but can be partitioned into at most three sets such that wariables in each of these sets are independent. This is true since GstructiG^{i}_{struct} is produced by skew-circulant shifts and the corresponding coherence graphs has verrtices of degree at most 22. Note also that each wkw_{k} satisfies: ∣wk∣≤1αr|w_{k}|\leq\frac{1}{\alpha r}. In each of the sum we get rid of these wisw_{i}s that are equal to . Then, by applying Azuma’s inequality independently on each of these subsets and taking union bound over these subsets, we conclude that for any a>0a>0:

Now we can take the union bound over all pairs of columns and notice that for every columcn colcol in Pi\mathbf{P}_{i} and any Pj\mathbf{P}_{j} there exists at most κ\kappa columns in Pj\mathbf{P}_{j} that have nonzero dot product with colcol. We can then take a=τκa=\frac{\tau}{\kappa} and the proof is completed. ∎

Let us now switch to dense semi-gaussian matrices. The following is true.

Consider the setting as in Theorem 4.1. Assume that entries of any fixed column of PiP_{i} are chosen independently at random. Assume also that for any 1≤i≤j≤m1\leq i\leq j\leq m and any fixed column colcol of PiP_{i} each column of PjP_{j} is a downward shift of colcol by bb entries (possibly with signs of dimensions swapped) and that b=0b=0 for O(1)O(1) columns in PjP_{j}. Then for and T>0T>0 and nn large enough the following holds:

where Δ=pgen(T)+pstruct(T)+dϵ+e−n13\Delta=p_{gen}(T)+p_{struct}(T)+d\epsilon+e^{-n^{\frac{1}{3}}} and

The proof of this result follows along the lines of the proof of Theorem 4.1 and Theorem 4.2. Take the formulas for si1,j1⋅si2,j2s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}} derived in the proof of Theorem 7.1. Note that we want to have: ∣si1,j1⋅si2,j2∣≤ϵΓ(2d)∥gH∥2|s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}}|\leq\frac{\epsilon}{\Gamma(2d)\|g^{\mathcal{H}}\|_{2}}, where Γ\Gamma is a constant that depends only on the degree dd. Each si1,j1⋅si2,j2s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}} is a sum of random variables that can be decoupled into O(1)O(1) subsums such that variables in each subsum are independent (here we use exactly the same trick as in the proof of Theorem 4.1). In each subsum we apply Azuma’s inequality. Straightforward computations lead to the conclusion that if one sets up ϵ\epsilon as in the statement of Theorem 7.2 then the probability that there exist different si1,j1s^{i_{1},j_{1}}, si2,j2s^{i_{2},j_{2}} such that ∣si1,j1⋅si2,j2∣>ϵΓ(2d)∥gH∥2|s^{i_{1},j_{1}}\cdot s^{i_{2},j_{2}}|>\frac{\epsilon}{\Gamma(2d)\|g^{\mathcal{H}}\|_{2}} is of the order e−n13e^{-n^{\frac{1}{3}}} for nn large enough. That is the extra term in the formula for Δ\Delta that was not present in the staement of Theorem 4.1. The variance results follows immediately by exactly the same analysis as in the proof of Theorem 4.2. ∎

Note that introduced dense semi-gaussian matrices trivially satisfy conditions of Theorem 7.2 (look for the description of matrices Pi\mathbf{P}_{i} from Subsection: 3.2.4). The role of rank is similar as in the sparse setting, i.e. larger values of rr lead to sharper concentration results. Theorem 7.2 can be applied to classes of matrices for which ∣∑1≤n1<n2≤nPi,n1TPj,n2∣|\sum_{1\leq n_{1}<n_{2}\leq n}\mathbf{P}_{i,n_{1}}^{T}\mathbf{P}_{j,n_{2}}| is small and random dense semi-gaussian matrices satisfy this condition with high probability.