-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtext.tex
More file actions
2400 lines (2219 loc) · 177 KB
/
Copy pathtext.tex
File metadata and controls
2400 lines (2219 loc) · 177 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\begin{abstract}
%The SRHT low-rank matrix approximation algorithm, which is based upon randomized dimension reduction via the Subsampled Randomized Hadamard Transform, is the fastest known low-rank matrix approximation technique. Novel Frobenius and spectral norm error bounds are provided which improve upon previous efforts to provide quality-of-approximation guarantees for this method. In particular, a much sharpened spectral norm error bound is obtained.
%%
%Similarly, the SRHT least-squares algorithm solves regressions problems efficiently via dimension reduction and the Subsampled Randomized Hadamard Transform.
%We also provide a novel analysis of this approximation algorithm and show improved quality-of-approximation guarantees.
%Our main theorems are a consequence of results on approximate matrix computations involving SRHT matrices that may themselves be of independent interest.
Several recent randomized linear algebra algorithms rely upon fast dimension reduction methods.
A popular choice is the Subsampled Randomized Hadamard Transform (SRHT). In this article, we
address the efficacy, in the Frobenius and spectral norms, of an SRHT-based low-rank matrix
approximation technique introduced by Woolfe, Liberty, Rohklin, and Tygert. We establish a
slightly better Frobenius norm error bound than currently available, and a much sharper spectral
norm error bound (in the presence of reasonable decay of the singular values). Along the way, we
produce several results on matrix operations with SRHTs (such as approximate matrix multiplication)
that may be of independent interest. Our approach builds upon Tropp's in ``Improved analysis of the Subsampled Randomized Hadamard Transform".
\end{abstract}
\section{Introduction}
\label{sec:introduction}
Numerical linear algebra algorithms are traditionally deterministic. For example, given a full-rank matrix $\matA \in \R^{m \times m}$
and a vector $\b \in \R^{m}$, Gaussian elimination requires at most $ 2 m^3 / 3$ arithmetic operations to compute a vector $\x \in \R^n$
that satisfies $\matA \x = \b$, while the matrix-matrix multiplication $\matA \matA\transp$ requires at most $(2m-1)m^2$ operations,
assuming that the matrix multiplication exponent equals $3$.
Another important problem is eigenvalue computation: current state-of-the-art solvers compute
all $m$ eigenvalues of $\matA \matA\transp$ in $\const{O}(m^3)$ arithmetic operations.
All these computations are deterministic, i.e ensure that the solution of the underlying problem is returned after the corresponding operation count.
%In some other applications, one seeks to decompose the
%matrix $\matA$ into a product of two or more matrices; for example, the $QR$ decomposition decomposes $\matA$ as $\matA = \matQ \matR$,
%where $\matQ \in \R^{m \times m}$ is an orthonormal basis for the range of $\matA$ and $\matR \in \R^{m \times m}$ is an upper triangular matrix.
%The Gram-Schmidt process, another popular deterministic numerical linear algebra algorithm, computes such a decomposition in at most $2m^3$
%arithmetic operations.
Although these algorithms are numerically stable and run in polynomial time,
$\const{O}(m^3)$ arithmetic operations can be prohibitive for many applications when the size of the matrix is large, e.g. on the order of millions or billions~\cite{MMDS08,Mah10}.
One way to speed up these algorithms is to reduce the size of $\matA$, and then apply standard deterministic procedures to the
resulting matrix. In more detail, for a matrix $\matOmega \in \R^{m \times r}$ ($ m > r = \const{o}(m) $), let $\matY = \matA \matOmega \in \R^{m \times r}$.
$\matOmega$ is a so-called ``dimension reduction'' matrix and $\matY$ contains as much information of $\matA$ as possible.
Consider for example the matrix-matrix multiplication operation mentioned above. In this setting, one can compute
$\matY \matY\transp$ instead of $\matA \matA\transp$. If $\matOmega$ is chosen carefully, then
$$\matY \matY\transp \approx \matA \matA\transp,$$
and the number of operations needed to compute $\matY \matY\transp$ is at most $\const{o}(m^3)$~\cite{DK01,DKM06a}.
Recent years have produced a large body of research on designing random matrices $\matOmega$ with which many popular problems
in numerical linear algebra (e.g. low-rank matrix approximation~\cite{DKM06b,DKM06c}, least-squares regression~\cite{Sar06,BD09,Cla13}, k-means clustering~\cite{BZD10})
can be solved approximately
%and with positive probability
in $\const{o}(m^3)$ arithmetic operations. We refer the reader to a recent comprehensive
survey of the topic~\cite{HMT}, which has now emerged as \emph{Randomized Numerical Linear Algebra}.
Some proposed choices for $\matOmega$ include: (i) every entry of $\matOmega$ takes the values $+1,-1$ with equal probability~\cite{CW09,Zou10}; (ii) the entries of $\matOmega$ are
i.i.d. Gaussian random variables with zero mean and unit variance~\cite{HMT};
(iii) the columns of $\matOmega$ are chosen independently from the columns of the $m \times m$ identity matrix
with probabilities that are proportional to the Euclidean length of the columns of $\matA$~\cite{FKV98,DKM06b};
(vi) the columns of $\matOmega$ are chosen independently from the columns of the $m \times m$ identity matrix uniformly at random~\cite{Git12};
(v) $\matOmega$ is designed carefully such that $\matA \matOmega$ can be computed in at most $\const{O}(\nnz(\matA)) $ arithmetic operations,
where $\nnz(\matA)$ denotes the number of non-zero entries in $\matA$~\cite{CW12}.
In this article we focus on the so-called Subsampled Randomized Hadamard Transform (SRHT), i.e. the matrix
$\matOmega$ contains a subset of the columns of a randomized Hadamard matrix (see Definitions~\ref{def:walsh} and~\ref{def:srht} below).
This form of dimension reduction was introduced in~\cite{AC06}.
It is of particular interest because the highly structured nature of $\matOmega$ can be
exploited to reduce the time of computing $\mat{Y} = \mat{A} \mat{\Omega}$ from $\const{O}(m^2r)$ to $\const{O}(m^2\log_2 r)$
(see Lemma~\ref{prop:SRHT-compute-time} below).
\begin{definition}[Normalized Walsh--Hadamard Matrix]
\label{def:walsh}
Fix an integer $n = 2^p$, for $p = 1,2,3, ...$. The (non-normalized) $n \times n$ matrix of the Walsh--Hadamard transform is defined recursively as,
\vspace{-.0751in}
%
$$ \matH_n = \left[
\begin{array}{cc}
\matH_{n/2} & \matH_{n/2} \\
\matH_{n/2} & -\matH_{n/2}
\end{array}\right],
%
\qquad \mbox{with} \qquad
%
\matH_2 = \left[
\begin{array}{cc}
+1 & +1 \\
+1 & -1
\end{array}\right].
$$
%
The $n \times n$ normalized matrix of the Walsh--Hadamard transform is equal to $\matH = n^{-\frac{1}{2}} \matH_n \in \R^{n \times n}.$
\end{definition}
\begin{definition}[Subsampled Randomized Hadamard Transform (SRHT) matrix]
\label{def:srht}
Fix integers $r$ and $n = 2^p$ with $r < n$ and $p = 1,2,3, ...$. An SRHT matrix is an $r \times n$ matrix of the form $$ \matTh = \sqrt{\frac{n}{r}} \cdot \matR \matH \matD;$$
\begin{itemize}
\item $\matD \in \R^{n \times n}$ is a random diagonal matrix whose entries are independent random signs, i.e. random variables uniformly distributed on $\{\pm 1\}$.
\item $\matH \in \R^{n \times n}$ is a normalized Walsh--Hadamard matrix.
\item $\matR \in \R^{r \times n}$ is a subset or $r$ rows from the $n \times n$ identity matrix, where the rows are chosen uniformly at random and without replacement.
%a random matrix that restricts an $n$-dimensional vector to $r$ coordinates, which are chosen uniformly at random and without replacement.
%$\matR$ is constructed as follows: for $i=1,2,...,r$ $i.i.d$
%random trials pick a vector $\e_i$ from the standard basis of $\R^m$ with probability $1/m$
%and set $\matOmega_{(i)}$ equal to that vector.
%\item $\matS \in \R^{r \times r}$ is a rescaling (diagonal) matrix containing the value $\sqrt{\frac{m}{r}}$.
\end{itemize}
\end{definition}
%The following result argues that computations with such SRHT matrices can be implemented efficiently.
\begin{lemma} [Fast Matrix-Vector Multiplication, Theorem 2.1 in~\cite{AL08}]
\label{prop:SRHT-compute-time}
Given $\x \in \R^n$ and $r < n$, one can construct $\matTh \in \R^{r \times n}$ and compute $\matTh \x$ in at most $2 n \log_2(r + 1) )$ operations.
%Here, the logarithm is base two.
\end{lemma}
The purpose of this article is to analyze the theoretical performance of an SRHT-based randomized low-rank approximation algorithm
introduced in~\cite{WLRT07} and analyzed in~\cite{WLRT07,HMT,NDT09}. Our analysis (see Theorem~\ref{thm:quality-of-approximation-guarantee})
provides sharper approximation bounds
than those in~\cite{WLRT07,HMT,NDT09}.
%The setting is as follows. Fix $\matA \in \R^{m \times n}$ of rank $\rho$ and a target rank $k < \rho$.
%We would like to approximate $\matA$ with a matrix $\matX \in \R^{m \times n}$ of rank at most $k$ for which
%$\FNorm{\matA - \matX}$ and $\TNorm{\matA - \matX}$ are small. It is well known that the matrix
%$ \matA_k$ which minimizes both the Frobenius and the spectral norm error can be calculated
%via the Singular Value Decomposition (SVD) in deterministic $\const{O}( m n \min\{m,n\} )$ time.
%(See Section~\ref{sec:preliminaries} for more background on the Singular Value Decomposition.)
%The algorithm of Theorem~\ref{thm:quality-of-approximation-guarantee} employs the SRHT and calculates such a low rank
%approximation in $\const{o}( m n \min\{m,n\} )$ time. The analysis in this theorem improves upon~\cite{WLRT07,HMT,NDT09}.
%Examples of such efforts include~\cite{Sar06,Har06} (Frobenius norm approximations)
%and~\cite{LWMRT07, MRT10, RST09} (spectral norm approximations).
Our study should also be viewed as followup to the work of Drineas et al.~\cite{DMMS11} and~\cite{RT08,AMT10}
on designing fast approximation algorithms for solving least-squares regression problems.
One of the two algorithms presented in~\cite{DMMS11} employs the SRHT
to quickly reduce the dimension of the least squares problem and then solves the smaller problem with a direct least-squares solver,
while~\cite{RT08,AMT10} use the SRHT to design
a good preconditioner for an iterative method, which is then used to solve the regression problem. The results in this article along with
the work in~\cite{Tro11} have implications in all these studies~\cite{RT08,DMMS11,AMT10}. We discuss these implications in Section~\ref{sec:regression}.
\subsection{Beyond the SRHT}
Finally, notice that the SRHT is defined only when the matrix dimension is a power of two.
An alternative option is to use other structured orthonormal randomized transforms such as the
discrete cosine transform (DCT) or the discrete Hartley transform (DHT)~\cite{WLRT07,NDT09,RT08,AMT10}, whose entries are on the order of $n^{-1/2}.$
All these transforms do not place any restrictions on the size of the matrix. The results of this paper - with minimal effort -
can be extended \emph{unchanged} to encompass these transforms. To see this, notice that Lemma 3.3 in~\cite{Tro11} remains unchanged for all these orthogonal transforms.
Thus Lemma~\ref{lemma:SRHT-preserves-geometry} in our work as well as all other results presented in this article are true for these orthogonal transforms as well.
\subsection{Roadmap} This article is structured as follows. Section~\ref{sec:preliminaries} introduces the notation.
In Section~\ref{sec:lowrank}, we present our main results on the quality of SRHT low-rank approximations and compare them to prior results in the literature. In Section~\ref{sec:regression}, we discuss two approaches to least-squares regression involving SRHT dimensionality-reduction.
%and give an improved estimate of the number of samples needed for these approaches to be fruitful.
Section~\ref{sec:SRHT} first recalls known facts on the application of SRHTs to orthogonal matrices and then presents new results on the application of SRHTs to general matrices and the approximation of matrix multiplication using SRHTs under the Frobenius norm. Section~\ref{sec:proofs} contains the proofs of our two main theorems presented in Sections~\ref{sec:lowrank} and~\ref{sec:regression}.
We conclude the paper with an experimental evaluation of the SRHT low-rank approximation algorithm in Section~\ref{sec:experiments}.
\subsection{Preliminaries}
\label{sec:preliminaries}
We use \math{\matA,\matB,\ldots} to denote real matrices and \math{\a,\b,\ldots} to denote real column vectors.
%\math{\matA=[\a_1,\ldots,\a_n] \in \R^{m \times n}} represents a matrix with columns $\a_1,\ldots,\a_n \in \R^{m}$.
$\matI_{n}$ is the $n \times n$ identity matrix; $\bm{0}_{m \times n}$ is the $m \times n$ matrix of zeros; $\bm{e}_i$ is the standard basis (whose dimensionality will be clear from the context). $\matA_{(i)}$ denotes the $i$th row of $\matA$; $\matA^{(j)}$ denotes the $j$th column of $\matA$; $\matA_{ij}$ denotes the $(i,j)$th element of $\matA$.
%We abbreviate ``independent identically distributed'' to ``i.i.d'' and ``with probability'' to ``w.p''.
We use the Frobenius and the spectral norm of a matrix: $ \FNorm{\matA} = \sqrt{\sum_{i,j} \matA_{ij}^2}$ and $\TNorm{\matA} = \max_{\x:\TNorm{\x}=1}\TNorm{\matA \x}$, respectively.
The notation $\XNorm{\matA}$ indicates that an expression holds for both $\xi = 2$ and $\xi = \mathrm{F}$.
%We will also use the maximum column norm of a matrix, i.e. for $\matA \in \R^{m \times n}$, $\MCNorm{\matA} = \sqrt{ \max_{j=1,...,n}\left( \sum_{i=1}^{m} %\matA_{ij}^2 \right)}$.
A (compact) Singular Value Decomposition (SVD) of the matrix $\matA \in \R^{m \times n}$ with $\rank(\matA) = \rho$ is a decomposition of the form
\begin{eqnarray*}
\label{svdA} \matA
= \underbrace{\left(\begin{array}{cc}
\matU_{k} & \matU_{\rho-k}
\end{array}
\right)}_{\matU_{\matA} \in \R^{m \times \rho}}
\underbrace{\left(\begin{array}{cc}
\matSig_{k} & \\
& \matSig_{\rho - k}
\end{array}
\right)}_{\matSig_\matA \in \R^{\rho \times \rho}}
\underbrace{\left(\begin{array}{c}
\matV_{k}\transp\\
\matV_{\rho-k}\transp
\end{array}
\right)}_{\matV_\matA\transp \in \R^{\rho \times n}},
\end{eqnarray*}
where the singular values of $\matA$ are ordered \math{\sigma_1\ge\ldots\sigma_k\geq\sigma_{k+1}\ge\ldots\ge\sigma_\rho > 0}.
Here $k$ is a parameter in the interval $1 \le k \le \rho$ and the above formula corresponds to a partition of the SVD in block form using $k$.
We denote the $i$th singular value of $\matA$ by $\sigma_i\left(\matA\right)$ and sometimes refer to $\sigma_1$ as $\sigma_{\max}$ and $\sigma_\rho$ as $\sigma_{\min}$. The matrices $\matU_k \in \R^{m \times k}$ and $\matU_{\rho-k} \in \R^{m \times (\rho-k)}$ contain the left singular vectors of~$\matA$; similarly, the matrices $\matV_k \in \R^{n \times k}$ and $\matV_{\rho-k} \in \R^{n \times (\rho-k)}$ contain the right singular vectors of~$\matA$. We denote $\matA_k = \matU_k \matSig_{k} \matV_k\transp \in \R^{m \times n}$. $\matA_k$ minimizes $\XNorm{\matA - \matX}$ over all $m \times n$ matrices $\matX$ of rank at most $k$.
$\pinv{\matA} = \matV_\matA \matSig_\matA^{-1} \matU_\matA\transp \in \R^{n \times m}$ denotes the Moore-Penrose pseudo-inverse of $\matA \in \R^{m \times n}.$
Let $\matX \in \R^{m \times n}$ ($n \ge m$) and $\matB=\matX \matX\transp \in \R^{m \times m}$; any matrix that can be written in this form is called a symmetric positive semidefinite (SPSD) matrix. For all $i=1, ...,m$, $\lambda_{i}\left(\matB\right) = \sigma_{i}^2\left(\matX\right)$ denotes the $i$th eigenvalue of $\matB$. We sometimes use $\lambda_{\min}\left(\matB\right)$ and $\lambda_{\max}\left(\matB\right)$ to denote the smallest (nonzero) and largest eigenvalues of $\matB$, respectively.
\section{Low-rank matrix approximation using SRHTs}\label{sec:lowrank}
%We now present our results in obtaining low-rank matrix approximations via using the SRHT matrix (see Definition~\ref{def:srht}) for dimension reduction.
%We present two such results. Suppose that we would like to construct a low rank matrix which approximates the best rank $k$ approximation of a given matrix.
%Theorem~\ref{thm:quality-of-approximation-guarantee} describes the construction of such a matrix with rank $r > k$, while Theorem~\ref{thm2} describes the construction
%of such a matrix with rank exactly $k$. There are certain tradeoffs between the two approximations: the construction of Theorem~\ref{thm:quality-of-approximation-guarantee}
%is more accurate and requires less operations but compares a matrix of rank $r > k$ with a matrix of rank $k$, while the construction of Theorem~\ref{thm2} is less accurate
%and requires more operations but compares a matrix of rank $k$ with a matrix of rank $k$.
Using an SRHT matrix (see Definition~\ref{def:srht}),
one can quickly construct a low-rank approximation to a given matrix $\matA.$
Our main result, Theorem~\ref{thm:quality-of-approximation-guarantee} below, provides theoretical guarantees on the spectral and Frobenius norm accuracy of these approximations.
\begin{theorem}
\label{thm:quality-of-approximation-guarantee}
Let $\matA \in \R^{m \times n}$ %($m \ge n$)
with rank $\rho$ and $n$ is a power of 2. Fix an integer $k$ satisfying $ 2 \leq k < \rho$. Let $0 < \varepsilon < 1/3$
be an accuracy parameter, $0 < \delta < 1$ be a failure probability, and $\const{C}\ge 1$ be any specified constant.
Let
$\matY = \matA \matTh \transp,$
where $\matTh \in \R^{r \times n}$ is an SRHT with $r$ satisfying %$r < m$
\begin{equation}\label{eqn:r}
6 \const{C}^2 \varepsilon^{-1} \left[\sqrt{k} + \sqrt{8\ln(n/\delta)} \right]^2 \ln(k/\delta) \leq r \leq n.
\end{equation}
Let $\ell = \min\{m,r\}$.
Furthermore,
let $\matQ \in \R^{m \times \ell}$ satisfy $\matQ\transp \matQ = \matI_{\ell}$ and be such that the column space of $\matY$ is contained in the range of $\matQ$
(e.g. such a $\matQ$ can be computed with the $QR$ factorization of $\matY$ in $\const{O}(m \ell^2 )$ arithmetic operations),
and let $\tilde{\matA}_k = \matQ \matX_{opt} \in \R^{m \times n},$
%be given by
%$$\tilde{\matA}_k = \matQ \matX_{opt},$$
where $\matX_{opt} $ is computed via the SVD of $ \matQ\transp \matA$ as follows,
$$\matX_{opt} = \argmin_{\matX \in \R^{\ell \times n},\,\, \rank(\matX) \le k}\FNorm{ \matQ\transp \matA - \matX }.$$
Given this setup, with probability at least $1 - \delta^{\const{C}^2 \ln(k/\delta)/4} - 7\delta$ the following Frobenius norm bounds hold simultaneously:
\begin{align}
\FNorm{ \matA - \matY \pinv{\matY} \matA } & \le \left(1 + 22 \varepsilon \right) \cdot \FNorm{\matA-\matA_k}, \tag{i} \\
\FNorm{\matA - \tilde{\matA}_k} & \le \left(1 + 22 \varepsilon \right) \cdot \FNorm{\matA-\matA_k}, \tag{ii}\\
\FNorm{ \matA_k - \matY \pinv{\matY} \matA } & \le \left( 1+ 22 \varepsilon \right) \cdot \FNorm{\matA-\matA_k}, \tag{iii}\\
\FNorm{ \matA_k -\tilde{\matA}_k } & \le \left( 2+ 22 \varepsilon \right) \cdot \FNorm{\matA-\matA_k}. \tag{iv}
\end{align}
Similarly, the same setup ensures that with probability at least $1 - 5\delta,$ the following spectral norm bounds hold simultaneously:
\begin{align}
\TNorm{\matA - \matY \pinv{\matY} \matA} & \leq \left(4 +
\sqrt{\frac{3 \ln(n/\delta)\ln(\rho/\delta)}{r}} \right) \cdot \TNorm{\matA - \matA_k} +
\sqrt{\frac{3 \ln(\rho/\delta)}{r}} \cdot \FNorm{\matA - \matA_k}, \tag{v} \\
\TNorm{\matA - \tilde{\matA}_k } & \leq \left(6 +
\sqrt{\frac{6 \ln(n/\delta)\ln(\rho/\delta)}{r}} \right) \cdot \TNorm{\matA - \matA_k} +
\sqrt{\frac{6 \ln(\rho/\delta)}{r}} \cdot \FNorm{\matA - \matA_k}, \tag{vi} \\
\TNorm{\matA_k - \matY \pinv{\matY} \matA} & \leq
\left(4 + \sqrt{\frac{3 \ln(n/\delta)\ln(\rho/\delta)}{r}} \right) \cdot \TNorm{\matA - \matA_k} +
\sqrt{\frac{3 \ln(\rho/\delta)}{r}} \cdot \FNorm{\matA - \matA_k}, \tag{vii} \\
\TNorm{\matA_k - \tilde{\matA}_k} & \leq \left(7 +
\sqrt{\frac{12 \ln(n/\delta)\ln(\rho/\delta)}{r}} \right) \cdot \TNorm{\matA - \matA_k} +
\sqrt{\frac{6 \ln(\rho/\delta)}{r}} \cdot \FNorm{\matA - \matA_k}. \tag{viii}
\end{align}
Recall that $\ell = \min\{m,r\}.$ The matrix $\matY $ can be constructed using $2 m n \log_2 (r+1)$ arithmetic operations and,
given $\matY,$ the matrices $\matY\pinv{\matY} \matA$ and $\tilde{\matA}_k$ can be formed using
$\const{O}(m n \ell + m r \ell)$ and $\const{O}( mn \ell + \ell^2 n)$ additional arithmetic operations, respectively.
\end{theorem}
We prove this theorem in Section~\ref{sec:guarantees}. Notice that the Theorem provides residual and forward error bounds for two low-rank matrices in the
spectral and Frobenius norms. The matrix $ \matY \pinv{\matY} \matA$ has rank at most $r > k,$ while the matrix $\tilde{\matA}_k$ has rank at most $k.$
Prior works have provided only residual error bounds~\cite{WLRT07,HMT,NDT09}.
The first two Frobenius norm bounds in this theorem (residual error analysis) are slightly stronger than the best bounds appearing in prior efforts~\cite{NDT09}.
%HMT's frobenius norm bound is worse than NDT09
The spectral norm bounds on the residual error are significantly better than the bounds presented in prior work and shed light on an open question mentioned in~\cite{NDT09}.
We do not, however, claim that the error bounds provided are the tightest possible. Certainly the specific constants ($22, 6,$ etc.) in the error estimates are not optimized.
We now present a detailed comparison of the guarantees given in Theorem~\ref{thm:quality-of-approximation-guarantee} with those available in the existing literature. %in Section~\ref{sec:priorwork}. Here we give a quick overview of the spectral norm bound improvement.
\subsection{Detailed Comparison to Prior Work}
\label{sec:priorwork}
\subsubsection{Halko et al.~\cite{HMT}}
To put our result into perspective, we compare it to prior efforts at analyzing the SRHT algorithm introduced above.
Halko et al.~\cite{HMT} argue that if $r$ satisfies
\begin{equation}\label{rhmt}
4 \left[\sqrt{k} + \sqrt{8\ln(kn)} \right]^2 \ln(k) \leq r \leq n,
\end{equation}
then, for both $\xi=2,\mathrm{F}$,
$$ \XNorm{\matA - \matY \pinv{\matY} \matA} \le \left( 1 + \sqrt{7n/r} \right) \cdot \XNorm{\matA - \matA_k},$$
with probability at least $1 - \const{O}(1/k)$. Our first Frobenius norm bound is always tighter than the Frobenius norm bound given here.
To compare the spectral norm bounds, note that our first spectral norm bound is on the order of
\begin{equation}
\label{eqn:residspecbnd}
\max\left\{\sqrt{\frac{ \ln(\rho/\delta) \ln(n/\delta)}{r} } \cdot \TNorm{\matA - \matA_k},\, \sqrt{ \frac{ \ln(\rho/\delta) }{ r } } \cdot \FNorm{\matA - \matA_k}\right\}.
\end{equation}
If the singular values of $\matA$ are flat and $\matA$ has close to full rank, then the spectral norm result in~\cite{HMT} is perhaps optimal. But in the cases where it makes most sense to ask for low-rank approximations---viz., $\matA$ is rank-deficient or the singular values of $\matA$
decay fast---the spectral error norm bound in Theorem~\ref{thm:quality-of-approximation-guarantee} is more useful. Specifically, if
$$ \FNorm{\matA - \matA_k} \ll \sqrt{ \frac{n}{ \ln(\rho/\delta) } } \cdot \TNorm{\matA - \matA_k},$$
then when $r$ is chosen according to Theorem~\ref{thm:quality-of-approximation-guarantee} the quantity in Eqn.~(\ref{eqn:residspecbnd}) is much smaller than $$\sqrt{7 n/r} \cdot \TNorm{\matA - \matA_k}.$$
We were able to obtain this improved bound
by using the results in Section~\ref{sec:SRHT-orthonormal}, which allow one to take into account decays in the spectrum of $\matA$.
Finally, notice that our theorem makes explicit the intuition that the probability of failure can be driven to zero independently of the target rank $k$ by increasing the number of samples $r.$
\subsubsection{Nguyen et al.~\cite{NDT09}}
A tighter analysis of the Frobenius norm error term of the SRHT low-rank matrix approximation algorithm appeared in Nguyen et al.~\cite{NDT09}.
Let $\delta$ be a probability parameter with $0 < \delta < 1$ and $\varepsilon$ be an accuracy parameter with $0 < \varepsilon <1 $.
Then, Nguyen et al. show that in order to
get a rank-$k$ matrix $\tilde{\matA}_k$ satisfying
$$ \FNorm{ \matA - \tilde{\matA}_k} \le \left(1 + \varepsilon \right) \cdot \FNorm{\matA-\matA_k}$$
and
\[
\TNorm{\matA -\tilde{\matA}_k} \leq
\left( 2 + \sqrt{2 n / r} \right) \cdot \TNorm{\matA-\matA_k}
\]
with probability of success at least $1 - 5 \delta$, one requires
\[
r = \Omega\left( \varepsilon^{-1} \max\{ k, \sqrt{k} \ln(2n/\delta) \} \cdot \max\{ \ln k, \ln(3/\delta) \} \right).
\]
Theorem~\ref{thm:quality-of-approximation-guarantee} gives a tighter spectral norm error bound in the cases most of interest, where $\FNorm{\matA - \matA_k} \ll \sqrt{ \frac{n}{ \ln(\rho/\delta) } } \cdot \TNorm{\matA - \matA_k}.$ It also provides an equivalent Frobenius norm error bound with a comparable failure probability for a smaller number of samples. Specifically, if
\[
r \geq 528 \varepsilon^{-1}[\sqrt{k} + \sqrt{8 \ln(8 n/\delta)}]^2 \ln(8k/\delta) = \Omega\left( \varepsilon^{-1} \max\{k, \ln(n/\delta)\} \cdot \max\{\ln k, \ln(1/\delta)\} \right),
\]
then the second Frobenius norm bound in Theorem~\ref{thm:quality-of-approximation-guarantee} ensures $\FNorm{ \matA - \tilde{\matA}_k} \le \left(1 + \varepsilon \right) \cdot \FNorm{\matA-\matA_k},$
with probability at least $1 - 8\delta.$
In the conclusion of~\cite{NDT09}, the authors left as a subject for future research the explanation of a curious experimental phenomenon: when the singular values decay according to power laws, the SRHT low-rank approximation algorithm empirically achieves relative-error spectral norm approximations. Our spectral norm result provides an explanation of this phenomenon: when the singular values of $\matA$ decay fast enough, as in power law decay, one has $ \FNorm{\matA-\matA_k} = \Theta\left( 1 \right) \cdot \TNorm{\matA-\matA_k} $. In this case, by choosing $r$
$$ 24 \varepsilon^{-1} \left[\sqrt{k} + \sqrt{8\ln(n/\delta)} \right]^2 \ln(k/\delta) \ln(n/\delta) \leq r \leq n$$
our second spectral norm bound ensures
$
\TNorm{\matA - \tilde{\matA}_k} \leq \const{O}( 1 ) \cdot \TNorm{\matA-\matA_k}
$
with probability of at least $1 - 8\delta,$ thus predicting the observed empirical behavior of the algorithm.
\subsubsection{The subsampled randomized Fourier transform (SRFT)}
The algorithm in Section 5.2 of~\cite{WLRT07},
which was the first to use the idea of employing subsampled randomized orthogonal transforms to compute low-rank approximations to matrices,
provides a spectral norm error bound but replaces the SRHT with an SRFT, i.e. the matrix $\matH$ of Definition~\ref{def:srht} is replaced by a matrix
where the $(j,h)$th entry is $\matH_{jh} = e^{- 2 \pi i (j-1) (h-1)/n }$, where $i = \sqrt{-1}$, i.e. $\matH$ is the unnormalized discrete Fourier transform.
Woolfe et al.~\cite{WLRT07} (see eqn. 190) argue that, for any $\alpha > 1$, $\beta > 1$,
if
$$r \ge \alpha^2 \beta \left( \alpha-1 \right)^{-1} (2k)^2,$$
then with probability at least $1 - 3/\beta$ ($\omega = \max\{m,n\}$),
$$ \TNorm{ \matA - \tilde{\matU}_k \tilde{\matSig}_k \tilde{\matV}_k\transp } \le
2 \left( \sqrt{2\alpha-1} + 1 \right) \cdot \left( \sqrt{\alpha \omega +1} + \sqrt{ \alpha \omega } \right) \cdot \TNorm{\matA - \matA_k}.$$
Here, $\tilde{\matU}_k \in \R^{m \times k}$ contains orthonormal columns, as does $\tilde{\matV}_k \in \R^{n \times k}$, while
$\tilde{\matSig}_k \in \R^{k \times k} $ is diagonal with nonegative entries. These matrices can be computed deterministically from $\matA \matTh\transp$
in $\const{O}( k^2(m+n) + k r^2 \ln r)$ time. Also, computing $\matY = \matA \matTh\transp$ takes $O( m n \ln r)$ time.
\subsubsection{Two alternative dimensionality-reduction algorithms}
Instead of using an SRHT matrix, one can take $\matTh\transp$ in Theorem~\ref{thm:quality-of-approximation-guarantee} to be a matrix of i.i.d standard Gaussian random variables. One gains theoretically and often empirically better worse-case trade-offs between the number of samples taken, the failure probability, and the error guarantees. The SRHT algorithm is still faster, though, since matrix multiplications with Gaussian matrices require $\const{O}(mnr)$ time.
One can also take $\matTh\transp$ to be a matrix of i.i.d.~random signs ($\pm 1$ with equal probability). In many ways, this is analogous to the Gaussian algorithm---in both cases $\matTh$ is a matrix of i.i.d. subgaussian random variables---so we expect this algorithm to have the same advantages and disadvantages relative to the SRHT algorithm. We now compare the best available performance bounds for these schemes to our SRHT performance bounds.
We use the notion of the stable rank of a matrix,
$$
\stablerank{\matA} = \FNormS{\matA}/\TNormS{\matA},
$$
to capture the decay of the spectrum of $\matA$ (spectrum here refers to the singular values of $\matA$).
As can be seen by considering a matrix with a flat spectrum, in general the stable rank is no smaller than the rank; the smaller the stable rank, the more pronounced the decay in the spectrum of $\matA.$
When $r > k+4,$ Theorem 10.7 and Corollary 10.9 in~\cite{HMT} imply that, when using Gaussian sampling,
with probability at least $1 - 2 \cdot 32^{-(r-k)} - e^{\frac{-(r-k+1)}{2}}$,
\[
% \FNorm{\matA - \matY \pinv{\matY} \matA} \leq \left( 1 + \frac{2\sqrt{12 k}}{\sqrt{r -k}} + \frac{4 \expe}{\sqrt{k}} \right) \cdot \FNorm{\matA - \matA_k}
\FNorm{\matA - \matY \pinv{\matY} \matA} \leq \left( 1 + 32 \frac{ \sqrt{3 k} + \expe \sqrt{r} }{\sqrt{r -k+1}} \right) \cdot \FNorm{\matA - \matA_k}
\]
and with probability at least $1 - 3e^{-(r-k)}$,
\[
\TNorm{\matA - \matY\pinv{\matY} \mat A} \leq \left(1 + 16\sqrt{1 + \frac{k}{r-k}} \right) \cdot \TNorm{\matA - \matA_k} + \frac{8\sqrt{r}}{r-k+1} \cdot \FNorm{\matA - \matA_k}.
\]
Comparing to the guarantees of Theorem~\ref{thm:quality-of-approximation-guarantee} we see that these bounds suggest that with the same number of samples, Gaussian low-rank approximations outperform SRHT low-rank approximations. In particular, the spectral norm bound guarantees that if $\stablerank{\matA - \matA_k} \leq k$, i.e.
$ \FNorm{\matA - \matA_k} \le \sqrt{k} \TNorm{\matA - \matA_k},$
then the Gaussian low-rank approximation algorithm requires $\const{O}(k/\varepsilon^2)$ samples to return a
$(17+\varepsilon)$ constant factor spectral norm error approximation with high probability. Similarly, the Frobenius norm bound guarantees that the same number of samples returns a $(1 + 32 \varepsilon)$ constant factor Frobenius norm error approximation with high probability. Neither the spectral nor Frobenius bounds given in Theorem~\ref{thm:quality-of-approximation-guarantee} for SRHT low-rank approximations apply for this few samples.
\cite{Zou10} does not consider the Frobenius norm error of the random sign low-rank approximation algorithm, but Remark 4 in~\cite{Zou10} shows that when
$r = \const{O}(k/\varepsilon^4 \ln(1/\delta) )$, for $1 < \delta < 0,$ and $\stablerank{\matA - \matA_k} \leq k,$ this algorithm ensures that with high probability of at least $1-\delta$,
\[
\TNorm{\matA - \matY\pinv{\matY} \mat A} \leq (1 + \varepsilon) \TNorm{\matA - \matA_k}.
\]
To compare our results to those stated in~\cite{HMT,Zou10} we assume that $k \gg \ln(n/\delta)$ so that $r > k\ln k$ suffices for Theorem~\ref{thm:quality-of-approximation-guarantee} to apply. Then, in order to acquire a $(4 + \varepsilon)$ relative error bound from Theorem~\ref{thm:quality-of-approximation-guarantee}, it suffices that
(here $\const{C}^\prime$ is an explicit constant no larger than 6)
\[
r \geq \const{C}^\prime \varepsilon^{-2} k \ln(\rho/\delta) \quad \text{and}\quad \stablerank{\matA - \matA_k} \leq \const{C}^\prime k.
\]
We see that the Gaussian and random sign approximation algorithms return $(17+\varepsilon)$ and $(1+\varepsilon)$ relative spectral error approximations, respectively, when $r$ is on the order of $k$ and the relatively weak spectral decay condition $\stablerank{\matA - \matA_k} \leq k$ is satisfied, while our bounds for the SRHT algorithm require $r > k \ln (\rho/\delta)$ and the spectral decay condition
$$\stablerank{\matA - \matA_k} \leq \const{C}^\prime k$$
to ensure a $(6 + \varepsilon)$ relative spectral error approximation. We note that the SRHT algorithm can be used to obtain relative spectral error approximations of matrices with arbitrary stable rank at the cost of increasing $r$ (the same is of course true for the Gaussian and random sign algorithms).
The disparity in the bounds for these three schemes---the presence of the logarithmic factors in the SRHT bounds and the fact that these bounds apply only when $r > k \ln(\rho/\delta)$---may reflect a fundamental trade-off between the structure and randomness of $\matTh\transp$. The highly structured nature of SRHT matrices makes it possible to calculate $\matY$ much faster than when Gaussian or random sign sampling matrices are used, but this moves us away from the very nice isotropic randomness present in the Gaussian $\matTh\transp$ and the similarly nice properties of a matrix of i.i.d subgaussian random variables, thus resulting in slacker bounds which require more samples.
\section{Least squares regression}\label{sec:regression}
We now show how one can use the SRHT to solve least squares problems of the form
$$ \min_{\x} \TNorm{ \matA \x - \b }. $$
Here $\matA$ is an $m \times n$ matrix with $m \gg n$ and $\rank(\matA)=n$, $\b \in \R^m$, and $\x \in \R^n$.
%Broadly speaking, algorithms for the above regression problem belong
%to two categories: non-iterative methods and iterative methods.
One approach to solve this optimization problem is via the SVD of $\matA$: $ \x_{opt} = \pinv{\matA} \b;$
while an example of an iterative algorithm is the LSQR algorithm in~\cite{PS82}.
%Non-iterative methods require $O\left( mn^2 \right)$ time
%to solve the regression problem, while LSQR necessitates $O\left( m n \kappa{\left( \matA \right) \log \frac{1}{\xi}} \right)$ time, where
%$$\kappa{ \left( \matA \right)} = \sigma_{\max}(\matA)/ \sigma_{min}(\matA),$$
%is the condition number of $\matA$, and $\xi > 0$ is an arbitrary small parameter appeared in the backward error analysis of the algorithm.
During the last decade, researchers have developed several randomized algorithms that (approximately) solve the
regression problem in less running time than the approaches mentioned above~\cite{Sar06,RT08,Zou10,AMT10,DMMS11}. We refer the reader to Section 3.3 in~\cite{Bou11a} for a survey of these methods. The fastest non-iterative method is in~\cite{DMMS11} while the fastest iterative algorithm is in~\cite{RT08,AMT10}.
Both approaches employ the Subsampled Randomized Hadamard Transform. %Below we present improvements on the running time of both algorithms.
\subsection{Least-squares via the SRHT and the SVD}
The idea in the SRHT algorithm of Drineas et al.~\cite{DMMS11} is to reduce the dimensions of $\matA$ and $\b$ by pre-multiplication
with an SRHT matrix $\matTh \in \R^{r \times m}$ (the matrix $\matR$ in this case is constructed by uniform sampling without replacement)
and then solve quickly the smaller problem,
$$ \min_{\x} \TNorm{ \matTh \matA \x - \matTh\b }. $$
Let $\tilde{\x}_{opt} = \pinv{ \left( \matTh \matA \right) } \matTh \b$; then, assuming $r$ satisfies ($\varepsilon > 0$ is an accuracy parameter)
$$ r = \max\{ 48^2 n \ln(40 m n) \ln (10^4 n \ln(40 m n)) , 40 n \ln(40 m n) / \varepsilon \}, $$
\cite{DMMS11} shows that with probability at least $0.8$,
$$ \TNorm{ \matA \tilde{\x}_{opt} - \b } \le \left( 1 + \varepsilon \right) \cdot \TNorm{ \matA \x_{opt} - \b }. $$
Furthermore, assume that there exists a $\gamma \in (0,1]$ such that $ \TNorm{\matU_{\matA} \matU_{\matA}\transp\b} = \gamma \TNorm{\b}$.
Then, with the same probability,
\[
\TNorm{ \x_{opt} - \tilde{\x}_{opt} } \le \sqrt{\varepsilon} \left( \kappa{ \left( \matA \right)} \sqrt{ \gamma^{-2} - 1 } \right) \TNorm{\x_{opt}}.
\]
Here, $\kappa(\matA)$ is the two-norm condition number of $\matA$:
\[
\kappa(\matA) = \TNorm{\matA}\TNorm{\pinv{\matA}}.
\]
The running time of this approximation algorithm is $\const{O}( m n \log_2 r + rn^2)$,
since the SRHT multiplication takes $\const{O}( m n \log_2 r)$ time and the solution of the small regression problem
another $\const{O}(rn^2)$.
Below, we provide a novel analysis of this SRHT least squares algorithm which shows that one needs
asymptotically fewer samples $r$. This immediately implies an improvement on the running time of the algorithm.
Additionally, we show logarithmic dependence on the failure probability.
\begin{theorem}
\label{regression1}
Let $\matA \in \R^{m \times n}$ ($m \gg n$) have rank $\rho=n$ and $n$ be a power of 2; let $\b \in \R^m$. Let $0 < \varepsilon < 1/3$
denote an accuracy parameter, $0 < \delta < 1$ be a failure probability, and $\const{C}\ge 1$ be a constant.
Let $\matTh$ be an $r \times m$ SRHT matrix with $r$ satisfying
\[
6 \const{C}^2 \varepsilon^{-1} \left[\sqrt{n} + \sqrt{8\ln(m/\delta)} \right]^2 \ln(n/\delta) \leq r \leq m.
\]
Then, with probability at least $1 - \delta^{\const{C}^2\ln(n/\delta)/4} - 7\delta$,
\[
\TNorm{\matA \tilde{\x}_{opt}-\b } \le \left( 1 + 22 \varepsilon \right) \cdot \TNorm{\matA \x_{opt}-\b}.
\]
Furthermore, assume that there exists a $\gamma \in (0,1]$ such that $ \TNorm{\matU_{\matA} \matU_{\matA}\transp\b} = \gamma \TNorm{\b}$.
Then, with the same probability,
\[
\TNorm{ \x_{opt} - \tilde{\x}_{opt} } \le \left( \frac{ 1-\sqrt{\varepsilon} }{4 \varepsilon} \right)^{\frac{1}{2}} \left( \kappa{ \left( \matA \right)} \sqrt{ \gamma^{-2} - 1 } \right) \TNorm{\x_{opt}}.
\]
\end{theorem}
\noindent
We prove this theorem in Section~\ref{sec:guarantees3}. Another possibility to obtain a better analysis of the method of Drineas et al.
is to use Lemma~\ref{lemma:SRHT-preserves-geometry2} in this article, which was proved in~\cite{IW12} and presents bounds for sampling without
replacement. This analysis is not straightforward and is beyond the scope of this paper.
\subsection{Iterative methods}
The key idea of an iterative algorithm such as the LSQR method of~\cite{PS82} is \emph{preconditioning}.
Blendenpik in~\cite{AMT10} constructs such a preconditioner by using the SRHT
(the matrix $\matR$ in this case is constructed by uniform sampling without replacement) as follows.
First, an SRHT matrix $\matTh \in \R^{r \times m}$ is constructed. Then, one forms a QR factorization
$\matTh \matA = \matQ \matR_{\matA}$, with $\matQ \in \R^{r \times n}$ and $\matR_{\matA} \in \R^{n \times n}$. Finally,
$\matA$ and $\matR_{\matA}$ are given as inputs to LSQR to find a solution to the least squares
problem. We refer the reader to~\cite{AMT10} (see also~\cite{IW12}) for a detailed discussion of this approach. The purpose of our discussion
here is to comment on the first step of the above procedure and
show that a preconditioner of the same quality can be constructed with a smaller $r$.
Avron et al.~\cite{AMT10} argue that if the number of samples is sufficiently large
then the two-norm condition number of $\matA \matR_{\matA}^{-1}$ is small. A small condition number is desirable because
the number of iterations required for convergence of the LSQR method is proportional to the condition number.
More specifically, Theorem 3.2 in~\cite{AMT10} argues that with $r = \Omega\left( n \ln(m) \ln(n \ln(m))\right)$, and with constant probability (e.g. $0.9$),
$$ \kappa{ \left( \matA \matR_{\matA}^{-1} \right) } = \const{O}( 1).$$
The analysis of Blendenpik was recently improved in~\cite{IW12}.
More specifically, Corollary 3.11 in~\cite{IW12}, along with Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices} in our manuscript,
which gives a bound on the coherence, show that if
\[
\frac{8}{3} \varepsilon^{-2} \left[\sqrt{n} + \sqrt{8\ln(m/\delta)} \right]^2 \ln(2n/\delta) \leq r \leq m,
\]
then, with probability at least $1 - 2 \delta$,
$$\kappa{ \left( \matA \matR_{\matA}^{-1} \right) } \le \sqrt{ \frac{1 +\varepsilon}{1 - \varepsilon}}.$$
We now provide a similar bound in the case where the SRHT is constructed via sampling without replacement.
This bound is a simple combination of results in prior work.
More specifically, Theorem 1 in~\cite{RT08} argues that the two-norm condition number of $\matA \matR_{\matA}^{-1}$ equals the two-norm condition number
of $\matU\transp \matTh\transp$, where $\matU \in \R^{m \times n}$ contains the top $n$ left singular vectors of $\matA$.
Combine this fact with the bounds on the singular values of $\matU\transp \matTh\transp$ from Lemma~\ref{lemma:SRHT-preserves-geometry},
to obtain the following observation.
{ \bf Remark.}
Let $\matA \in \R^{m \times n}$ ($m \gg n$) have rank $\rho=n$ and $n$ be a power of $2$. Fix $0 < \delta < 1$ and $0 < \varepsilon < 1/3$.
Construct the upper triangular matrix $\matR_{\matA} \in \R^{n \times n}$ via the QR factorization $\matTh \matA = \matQ \matR_{\matA}$,
where $\matTh$ is an $r \times m$ SRHT matrix with
$r$ satisfying
\[
6 \varepsilon^{-2} \left[\sqrt{n} + \sqrt{8\ln(m/\delta)} \right]^2 \ln(2n/\delta) \leq r \leq m.
\]
Then, with probability at least $1 - 2 \delta$,
$$\kappa{ \left( \matA \matR_{\matA}^{-1} \right) } \le \sqrt{ \frac{1 +\varepsilon}{1 - \varepsilon}}.$$
%Taking, for example, $\varepsilon = 0.25$ and $\delta=10^{-10}$,
%$$\kappa\left( \matA \matR^{-1} \right) = 1.7321$$
%with probability at least $1-3*10^{-10}$ when the number of samples satisfies
%$$ r \ge 240 \left[\sqrt{n} + \sqrt{80\log(10 m)} \right]^2 \log(10 n).$$
%Comparing this to the bound in Blendenpik~\cite{AMT10}, the bound above achieves a better dependence between $r,m$ and $n$.
Finally, notice that we form the SRHT by uniform sampling without replacement while Blendenpik samples the columns of the randomized Hadamard matrix \emph{with} replacement.
A different sampling scheme - Bernoulli sampling - was analyzed in Theorem 6.1 in~\cite{TailBounds} and Section 4 in~\cite{IW12}.
\subsubsection{The subsampled randomized Fourier transform (SRFT)} Finally, we mention the work of Rokhlin and Tygert~\cite{RT08}, which was the first to use
the idea of employing subsampled randomized orthogonal transforms to precondition iterative solvers for least squares regression problems.
~\cite{RT08} replaces the SRHT with the SRFT; notice though that one still needs $O\left( m n \ln r \right)$ time to compute the product $\matTh \matA$.
In this case, for any $\alpha > 1$, $0 < \delta < 1$, if
$$r \ge \left( \frac{\alpha^2+1}{\alpha^2-1} \right)^2 \frac{n^2}{\delta},$$
then with probability at least $1 - \delta$,
$$ \kappa\left( \matA \matR_{\matA}^{-1}\right) \le \alpha.$$
\section{Matrix Computations with SRHT matrices}
\label{sec:SRHT}
\subsection{SRHTs applied to orthonormal matrices}
\label{sec:SRHT-orthonormal}
%\begin{lemma}
%Let $\matA \in \R^{m \times n}$ have rank $\rho.$ Fix $k$ satisfying $0 \leq k \leq \rho$.
%Given a matrix $\matOmega \in \R^{n \times r}$, with $r \ge k$, construct $\matY = \matA \matOmega.$ If $\matV_k \transp \matOmega$ has full row rank, then,
%for $\xi=2, \mathrm{F}$,
%\begin{equation}
%\label{eqn:tropp-structural-result}
%\XNormS{\matA - \matY \pinv{\matY} \matA}
%\leq
%\XNormS{\matA - \Pi_{\matY,k}^{\xi}(\matA) }
%\leq
%\XNormS{ \matA - \matA_k } + \XNormS{\matSig_{\rho - k} \matV_{\rho-k} \transp \matOmega \pinv{\left( \matV_k \transp \matOmega \right)} }.
%\end{equation}
%\end{lemma}
An important ingredient in analyzing the low-rank approximation algorithm of Theorem~\ref{thm:quality-of-approximation-guarantee}
is understanding how an SRHT changes the spectrum of a matrix after postmultiplication: given a matrix $\matX$ and
an SRHT matrix $\matTh$, how are the singular values of $\matX$ and $\matX\matTh\transp$ related? To be more precise,
Lemma~\ref{prop:structural-result} in Section~\ref{sec:presth} suggests that one path towards establishing the efficacy of SRHT-based low-rank approximations lies in understanding how the SRHT perturbs the singular values of orthonormal matrices. To see this, we informally repeat the statement of the lemma here. Let $\matA \in \R^{m \times n}$ have rank $\rho.$ Fix $k$ satisfying $0 \leq k \leq \rho$.
Given a matrix $\matOmega \in \R^{n \times r}$, with $r \ge k$, construct $\matY = \matA \matOmega.$ If $\matV_k \transp \matOmega$ has full row-rank, then,
for $\xi=2, \mathrm{F}$,
\begin{equation}
%\label{eqn:tropp-structural-result}
\XNormS{\matA - \matY \pinv{\matY} \matA}
%\leq
%\XNormS{\matA - \Pi_{\matY,k}^{\xi}(\matA) }
\leq
\XNormS{ \matA - \matA_k } + \XNormS{\matSig_{\rho - k} \matV_{\rho-k} \transp \matOmega \pinv{\left( \matV_k \transp \matOmega \right)} }.
\end{equation}
Now take $\matOmega = \matTh\transp$
%in Lemma~\ref{prop:structural-result}
and observe that if the product $\matSig_{\rho - k}\matV_{\rho-k}\transp \matTh\transp \pinv{\left( \matV_k\transp \matTh\transp\right)}$ has small norm, then the residual error of the approximant $\matY\pinv{\matY}\matA$ is small. The norm of this product is small when the norms of the perturbed orthonormal matrices $\matV_{\rho-k}\transp\matTh\transp$ and $\pinv{\left(\matV_k\transp \matTh\transp\right)}$ are in turn small, because
%
\begin{equation}
\label{eqn:basicestimate}
\XNormS{\matSig_{\rho - k} \matV_{\rho-k} \transp \matTh\transp \pinv{\left( \matV_k \transp \matTh\transp \right)}} \leq \XNormS{\matSig_{\rho - k}} \XNormS{\matV_{\rho-k} \transp \matTh\transp} \XNormS{\pinv{\left( \matV_k \transp \matTh\transp \right)}}.
\end{equation}
%
These perturbed orthogonal matrices have small norm precisely when their singular values are close to those of the original orthogonal matrices.
\subsubsection{SRHTs by uniform sampling without replacement}
In this section, we collect known results on how the singular values of a matrix with orthonormal rows are affected
by postmultiplication by an SRHT matrix.
It has recently been shown by Tropp~\cite{Tro11} that, if the SRHT matrix is of sufficiently large dimensions,
post-multiplying a short-fat matrix with orthonormal rows with an SRHT matrix preserves
the singular values of the orthonormal matrix, with high probability, up to a small multiplicative factor.
The following lemma is essentially a restatement of Theorem 3.1 in~\cite{Tro11}, but we include a full proof (later in this subsection) for completeness.
\begin{lemma}[The SRHT preserves geometry]
\label{lemma:SRHT-preserves-geometry}
Let $\matV \in \R^{n \times k}$ have orthonormal columns and $n$ be a power of 2. Let $0 < \varepsilon < 1/3$ and $0 < \delta < 1.$
Construct an SRHT matrix $\matTh \in \R^{r \times n}$ with $r$ satisfying
\begin{equation}\label{eqn:r2}
6\varepsilon^{-1}\left[\sqrt{k} + \sqrt{8\ln(n/\delta)} \right]^2 \ln (k/\delta) \leq r \leq n.
\end{equation}
Then, with probability at least $1 - 3\delta$, for all $i=1,...,k$,
$$
\sqrt{1 - \sqrt{\varepsilon}} \le \sigma_i( \matV \transp \matTh\transp ) \le \sqrt{1 + \sqrt{\varepsilon}}
$$
and
$$
\TNorm{ \pinv{(\matV\transp \matTh\transp)} - (\matV\transp \matTh\transp)\transp } \le 1.54 \sqrt{\varepsilon}.
$$
\end{lemma}
Tropp~\cite{Tro11} (see also~\cite{AC06}) argues that the above lemma follows from a more fundamental fact: if $\matV$ has orthonormal columns,
then the rows of the product $\matH\matD \matV$ all have roughly the same norm. That is, premultiplication by $\matH\matD$
equalizes the row norms of an orthonormal matrix.
\begin{lemma}[Row norms, Lemma 3.3 in~\cite{Tro11}]
\label{prop:SRHT-equalizes-columns-of-orthonormal-matrices}
Let $\matV \in \R^{n \times k}$ have orthonormal columns ($n$ is a power of 2), $\matH \in \R^{n \times n}$ be a normalized Hadamard matrix, $\matD \in \R^{n \times n}$ be a diagonal matrix of independent random signs, and $0 < \delta < 1$ be a failure probability. Recall that $\left(\matH \matD \matV \right)_{(i)}$ denotes the $i$th row of the matrix $\matH \matD \matV \in \R^{n \times k}$. Then, with probability at least $1-\delta$,
\[
\max\nolimits_{i=1,...,n} \TNorm{\left(\matH \matD \matV \right)_{(i)}} \le \sqrt{\frac{k}{n}} + \sqrt{ \frac{8 \ln(n/\delta)}{n}}.
\]
\end{lemma}
To prove Lemma~\ref{lemma:SRHT-preserves-geometry} we need one more result on uniform random sampling (without replacement) of rows
from tall-thin matrices with orthonormal columns.
\begin{lemma}[Uniform Sampling without replacement from an Orthonormal Matrix, Corollary to Lemma~3.4 of~ \cite{Tro11} ]
\label{lemma:sampling-ortho}
Let $\matW \in \R^{n \times k}$ have orthonormal columns.
Let $0 < \varepsilon < 1$ and $0 < \delta < 1$. Let $ M:= n \cdot \max\nolimits_{i=1,...,n} \TNormS{\matW_{(i)}}$.
Let $r$ be an integer such that
\begin{equation}\label{eqn:r3}
6 \varepsilon^{-2} M \ln (k/\delta) \leq r \leq n \,.
\end{equation}
Let $\matR \in \R^{r \times n}$ be a matrix which consists of a subset of $r$ rows from $\matI_n$
where the rows are chosen uniformly at random and without replacement.
Then, with probability at least $1-2\delta$, for $i\in[k]$:
$$ \sqrt{\frac{r}{n}} \cdot \sqrt{1-\varepsilon} \le \sigma_i( \matR \matW) \le \sqrt{1+\varepsilon} \cdot \sqrt{\frac{r}{n}} .$$
%we have $ \sqrt{1-\varepsilon} \leq \sigma_d(\matS \matQ) \leq \sigma_{d-1}(\matS \matQ) \leq \dots \leq \sigma_1(\matS \matQ) \leq \sqrt{1 + \varepsilon}\,.$
\end{lemma}
\begin{proof}
Apply Lemma 3.4 from~\cite{Tro11} with the following choice of parameters:
$\ell = \alpha M \ln(k/\delta),$
$\alpha = 6/\varepsilon^2,$ and
$\delta_{tropp} = \eta = \varepsilon$.
Here, $\ell$, $\alpha$, $M$, $k$, $\eta$ are the variables of Lemma 3.4 from~\cite{Tro11} (we also use $M$ and $k$), and
$\delta_{tropp}$ plays the role of $\delta$, an error parameter, of Lemma 3.4 from~\cite{Tro11}.
The variables $\varepsilon$ and $\delta$ are from our Lemma.
The choice of $\ell$ proportional to $\ln(k/\delta)$ rather than proportional to $\ln(k)$, as in the original statement of Lemma~3.4, is what results in a probability proportional to $\delta$ instead of $k$; this can easily be seen by tracing the modified choice of $\ell$ through the proof of Lemma~3.4.
%A different choice of parameters gives Theorem~3.1 in \cite{Tro11}. The choice of $\ell$ proportional to $\log(k/\delta)$ rather than proportional to $\log(k)$, as in the original statement of Lemma~3.4, is what results in a probability proportional to $\delta$ instead of $k$; this can easily be seen by tracing the modified choice of $\ell$ through the proof of Lemma~3.4.
\end{proof}
\begin{proof} (of Lemma~\ref{lemma:SRHT-preserves-geometry})
To obtain the bounds on the singular values, we combine Lemmas~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices} and~\ref{lemma:sampling-ortho}.
More specifically, apply Lemma~\ref{lemma:sampling-ortho} with $\matW = \matH \matD \matV$ and use the bound for $M$ from Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices}. Then, the bound on $r$ in Eqn.~(\ref{eqn:r3}), the bound on the singular values in Lemma~\ref{lemma:sampling-ortho},
and the union bound, establish that with probability at least $1 - 3\delta$,
$$ \sqrt{\frac{r}{n}} \cdot \sqrt{1-\varepsilon} \le \sigma_i( \matR \matH \matD \matV) \le \sqrt{1+\varepsilon} \cdot \sqrt{\frac{r}{n}} .$$
Now, multiply this inequality with $\sqrt{n/r}$ and recall the definition $\matTh = \sqrt{\frac{n}{r}} \cdot \matR \matH \matD$ to obtain
$$ \sqrt{1-\varepsilon} \le \sigma_i( \matTh \matV) \le \sqrt{1+\varepsilon}.$$
Replacing $\varepsilon$ with $\sqrt{\varepsilon}$ and using the bound on $r$ in Eqn.~(\ref{eqn:r2}) concludes the proof.
The second bound in the lemma follows from the first bound after a simple algebraic manipulation.
Let $\matX = \matV\transp \matTh\transp \in \R^{k \times r}$ with SVD $\matX = \matU_{\matX} \matSig_{\matX} \matV_\matX\transp $. Here, $\matU_{\matX} \in \R^{k \times k}$, $\matSig_{\matX} \in \R^{k \times k}$, and $\matV_\matX \in \R^{r \times k}$, since $r > k$. Consider taking the SVDs of $\pinv{(\matV\transp \matTh\transp)}$ and $(\matV\transp \matTh\transp)\transp $,
%
\begin{align*}
\TNorm{\pinv{(\matV\transp \matTh\transp)} - (\matV\transp \matTh\transp)\transp} =
\TNorm{\matV_{\matX} \matSig_{\matX}^{-1} \matU_{\matX}\transp - \matV_{\matX} \matSig_{\matX} \matU_{\matX}\transp } &=&
\TNorm{\matV_{\matX}(\matSig_{\matX}^{-1} - \matSig_{\matX}) \matU_{\matX}\transp}\\ &=& \TNorm{\matSig_{\matX}^{-1} - \matSig_{\matX}},
\end{align*}
%
since $\matV_{\matX}$ and $\matU_{\matX}\transp $ can be dropped without changing the spectral norm. Let $\matY = \matSig_{\matX}^{-1} - \matSig_{\matX} \in \R^{k \times k}$. Then, for all $i=1,\ldots ,k$, $\matY_{ii} = \frac{ 1 - \sigma_i^2(\matX) }{ \sigma_{i}(\matX) }.$ We conclude the proof as follows,
\begin{align*}
\TNorm{ \matY } =
\max\nolimits_{1 \leq i \leq k} \abs{\matY_{ii} } =
\max\nolimits_{1 \leq i \leq k} \abs{\frac{ 1 - \sigma_i^2(\matX)}{ \sigma_{i}(\matX) } } =
\max\nolimits_{1 \leq i \leq k} \frac{ \abs{1 - \sigma_i^2(\matX)} }{ \sigma_{i}(\matX) } &\le& \frac{ \sqrt{\varepsilon} }{\sqrt{1-\sqrt{\varepsilon}}} \\ &\le& 1.54 \sqrt{\varepsilon}.
\end{align*}
\end{proof}
\subsubsection{SRHTs by uniform sampling with replacement}
Lemma~\ref{lemma:SRHT-preserves-geometry} and Lemma~\ref{lemma:sampling-ortho} analyze uniform random
sampling without replacement. Below, we present the analogs of these two lemmas for uniform random sampling with replacement.
Lemma~\ref{lemma:sampling-ortho2} is essentially a restatement of Algorithm 2 (with the probabilities set to $1/m$)
along with the third point in Remark 3.9 and Lemma 2.1 (with $\alpha=\sqrt{n/r}$) in~ \cite{IW12}.
\begin{lemma}[Uniform Sampling with replacement from an Orthonormal Matrix~ \cite{IW12} ]
\label{lemma:sampling-ortho2}
Let $\matW \in \R^{n \times k}$ have orthonormal columns.
Let $0 < \varepsilon < 1$ and $0 < \delta < 1$. Let $ M:= n \cdot \max\nolimits_{i=1,...,n} \TNormS{\matW_{(i)}}$.
Let $r$ be an integer such that
\begin{equation}\label{eqn:r3v2}
\frac{8}{3} \varepsilon^{-2} M \ln (k/\delta) \leq r \leq n \,.
\end{equation}
Let $\hat\matR \in \R^{r \times n}$ be a matrix which consists of a subset of $r$ rows from $\matI_n$
where the rows are chosen uniformly at random and with replacement.
Then, with probability of at least $1-2\delta$, for $i\in[k]$:
$$ \sqrt{1-\varepsilon} \le \sigma_i\left( \sqrt{\frac{n}{r}} \hat\matR \matW \right) \le \sqrt{1+\varepsilon} .$$
%we have $ \sqrt{1-\varepsilon} \leq \sigma_d(\matS \matQ) \leq \sigma_{d-1}(\matS \matQ) \leq \dots \leq \sigma_1(\matS \matQ) \leq \sqrt{1 + \varepsilon}\,.$
\end{lemma}
\begin{lemma}[The SRHT preserves geometry]
\label{lemma:SRHT-preserves-geometry2}
Let $\matV \in \R^{n \times k}$ have orthonormal columns and $n$ be a power of 2. Let $0 < \varepsilon < 1$ and $0 < \delta < 1.$
Construct an SRHT matrix $\matTh \in \R^{r \times n}$ ($\matR$ is constructed as in Lemma~\ref{lemma:sampling-ortho2}, i.e. via
uniform random sampling with replacement) with $r$ satisfying
\begin{equation}\label{eqn:r4}
\frac{8}{3} \varepsilon^{-1} \left[\sqrt{k} + \sqrt{8\ln(n/\delta)} \right]^2 \ln (k/\delta) \leq r \leq n.
\end{equation}
Then, with probability at least $1-3\delta,$ for all $i=1,...,k$,
$$
\sqrt{1 - \sqrt{\varepsilon}} \le \sigma_i\left( \matV \transp \matTh\transp \right) \le \sqrt{1 + \sqrt{\varepsilon}}
$$
\end{lemma}
\begin{proof}
To obtain the bounds on the singular values, we combine Lemmas~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices} and~\ref{lemma:sampling-ortho2}.
More specifically, apply Lemma~\ref{lemma:sampling-ortho2} with $\matW = \matH \matD \matV$ and use the bound for $M$ from Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices}. Then, the bound on $r$ in Eqn.~(\ref{eqn:r3}), the bound on the singular values in Lemma~\ref{lemma:sampling-ortho2},
and the union bound, establish that with probability of at least $1 - 3\delta$,
$$ \sqrt{1-\varepsilon} \le \sigma_i\left( \sqrt{\frac{n}{r}} \cdot \matR \matH \matD \matV \right) \le \sqrt{1+\varepsilon} .$$
Replacing $\varepsilon$ with $\sqrt{\varepsilon}$ and using the bound on $r$ in Eqn.~(\ref{eqn:r3}) concludes the proof.
\end{proof}
\subsection{SRHTs applied to general matrices}
\label{sec:SRHT-orthogonal}
The structural result in Lemma~\ref{prop:structural-result},
Lemma~\ref{lemma:SRHT-preserves-geometry} on the perturbative effects of SRHTs on the singular values of orthonormal matrices,
and the basic estimate in~\eqref{eqn:basicestimate} are enough to reproduce the results on the approximation error of SRHT-based low-rank approximation in~\cite{HMT}. The main contribution of this paper is the realization that one can take advantage of the decay in the singular values of $\mat{A}$ encoded in $\matSig_{\rho -k}$ to obtain sharper results. In view of the fact that
%
\begin{equation}
\XNormS{\matSig_{\rho - k} \matV_{\rho-k} \transp \matTh\transp \pinv{\left( \matV_k \transp \matTh\transp \right)}} \leq \XNormS{\matSig_{\rho - k} \matV_{\rho-k} \transp \matTh\transp} \XNormS{\pinv{\left( \matV_k \transp \matTh\transp \right)}},
\end{equation}
%
we should consider the behavior of the singular values of $\matSig_{\rho - k}\matV_{\rho-k} \transp \matTh\transp$ instead of those of $\matV_{\rho-k} \transp \matTh\transp.$ Accordingly, in this section we extend the analysis of~\cite{Tro11} to apply to the application of SRHTs to general matrices.
Our main tool is a generalization of Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices} that states that the maximum column norm of a matrix to which an SRHT has been applied is, with high probability, not much larger than the root mean-squared average of the column norms of the original matrix.
%The proof of this result as well as the others in this section are deferred to Section~\ref{sec:proofs}.
\subsubsection{SRHT equalizes column-norms}
\
\begin{lemma}[SRHT equalization of column-norms]
\label{lemma:colnorm-tail-bound}
Suppose that $\matA$ is a matrix with $n$ columns and $n$ is a power of 2. Let $\matH \in \R^{n \times n}$ be a normalized Walsh--Hadamard matrix, and $\matD \in \R^{n \times n}$ a diagonal matrix of independent random signs. Then for every $t \geq 0,$
\[
\Probab{ \max\nolimits_{i=1,...,n} \TNorm{ \left(\matA \matD \matH\transp \right)^{(i)}} \leq \frac{1}{\sqrt{n} } \FNorm{\matA} + \frac{t}{\sqrt{n}} \TNorm{\matA} } \geq 1 - n \cdot \expe^{-t^2/8}.
\]
\end{lemma}
\begin{proof}
Our proof of Lemma~\ref{lemma:colnorm-tail-bound} is essentially that of Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices} in \cite{Tro11}, with attention paid to the fact that $\matA$ is no longer assumed to have orthonormal columns. In particular, the following concentration result for Lipschitz functions of Rademacher vectors is central to establishing the result.
Recall that a Rademacher vector is a random vector whose entries are independent and take the values $\pm 1$ with equal probability.
\begin{lemma}[Concentration of convex Lipschitz functions of Rademacher random variables {[Corollary 1.3 ff. in \cite{Ledoux96}]} ]
\label{prop:rademacher-concentration}
Suppose $f$ is a convex function on vectors that satisfies the Lipschitz bound
\[
|f(\x) - f(\y)| \leq L \TNorm{\x - \y} \quad \text{for all $\x, \y$.}
\]
Let $\vec{\varepsilon}$ be a Rademacher vector. For all $t \geq 0,$
\[
\Probab{f(\vec{\varepsilon}) \geq \Expect{f(\vec{\varepsilon})} + Lt} \leq \expe^{-t^2/8}.
\]
\end{lemma}
Lemma~\ref{lemma:colnorm-tail-bound} follows immediately from the observation that the norm of any one column of $\matA \matD \matH \transp$ is a convex Lipschitz function of a Rademacher vector.
Consider the norm of the $j$th column of $\matA \matD \matH \transp$ as a function of $\vec{\varepsilon},$ where $\matD = \diag{\vec{\varepsilon}}:$
\[
f_j(\mat{\varepsilon}) = \|\matA \matD \matH \transp \e_j\| = \TNorm{\matA \diag{\vec{\varepsilon}} \h_j} = \TNorm{\matA \diag{\h_j} \vec{\varepsilon}},
\]
where $\h_j$ denotes the $j$th column of $\matH \transp.$
Evidently $f_j$ is convex. Furthermore,
\[
|f_j(\x) - f_j(\y)| \leq \TNorm{\matA \diag{\h_j} (\x - \y)} \leq \TNorm{\matA} \TNorm{\diag{\h_j}} \TNorm{\x - \y} = \frac{1}{\sqrt{n}} \TNorm{\matA} \TNorm{\x - \y},
\]
where we used the triangle inequality and the fact that $\TNorm{\diag{\h_j}} = \INorm{\h_j} = \frac{1}{\sqrt{n}}.$ Thus $f_j$ is convex and Lipschitz with Lipschitz constant at most $\TNorm{\matA}/\sqrt{n}.$
We calculate
\begin{eqnarray*}
\Expect{f_j(\varepsilon)} \leq \Expect{ f_j(\varepsilon)^2}^{1/2}
&=& \left[ \Trace{\matA \diag{\h_j} \Expect{\vec{\varepsilon} \vec{\varepsilon}^\star} \diag{\h_j} \transp \matA \transp} \right]^{1/2}\\
&=& \left[\Trace{\frac{1}{n} \matA\matA \transp} \right]^{1/2} \\
&=& \frac{1}{\sqrt{n}} \FNorm{\matA}.
\end{eqnarray*}
It now follows from Lemma~\ref{prop:rademacher-concentration} that, for all $j=1,2,\ldots,n,$ the norm of the $j$th column of $\matA \matD \matH \transp$ satisfies the tail bound
\[
\Probab{ \TNorm{\matA \matD \matH \transp \e_j} \geq \frac{1}{\sqrt{n}} \FNorm{\matA} + \frac{t}{\sqrt{n}} \TNorm{\matA} } \leq \expe^{-t^2/8}.
\]
Taking a union bound over all columns of $\matA\matD\matH \transp,$ we conclude that
\[
\Probab{ \max\nolimits_{j=1,\ldots,n} \TNorm{(\matA \matD \matH \transp)^{(j)}} \geq \frac{1}{\sqrt{n}} \FNorm{\matA} + \frac{t}{\sqrt{n}} \TNorm{\matA} } \leq n \cdot \expe^{-t^2/8}.
\]
\end{proof}
As an interesting aside, we note that just as Lemma~\ref{lemma:SRHT-preserves-geometry}, which states that the SRHT essentially preserves the singular value of matrices with orthonormal rows and an aspect ratio of $k/n$, follows from Lemma~\ref{prop:SRHT-equalizes-columns-of-orthonormal-matrices}, Lemma~\ref{lemma:colnorm-tail-bound} implies that the SRHT essentially preserves the singular values of general rectangular matrices with the same aspect ratio. This can be shown using, e.g., the results on the effects of column sampling on the singular values of matrices from~\cite[Section 6]{TailBounds}.
\subsubsection{SRHT preserves the spectral norm}
The following lemma shows that even if the aspect ratio is larger than $k/n,$ the SRHT does not substantially increase the spectral norm of a matrix.
\begin{lemma}[SRHT-based subsampling in the spectral norm]
\label{lemma:spectral-SRHT-subsampling}
Let $\matA \in \R^{m \times n}$ have rank $\rho$ and $n$ be a power of 2. For some $r < n$, let $\matTh \in \R^{r \times n}$ be an SRHT matrix. Fix a failure probability $0 < \delta < 1.$ Then,
\[
\Probab{\TNormS{\matA \matTh \transp} \le 5 \TNormS{\matA}
+ \frac{\ln (\rho/\delta)}{r} \left( \FNorm{\matA} + \sqrt{8 \ln(n/\delta)} \TNorm{\matA} \right)^2 }
\geq 1-2\delta.
\]
\end{lemma}
To establish Lemma \ref{lemma:spectral-SRHT-subsampling}, we use the following Chernoff bound for sampling matrices without replacement.
\begin{lemma}[Matrix Chernoff bound, Theorem 2.2 in~\cite{Tro11}; see also Corollary in~\cite{Tropp-user-friendly}]
\label{prop:matrix-chernoff-bound}
Let $\mathcal{X}$ be a finite set of positive-semidefinite matrices with dimension $k,$ and suppose that
\[
\max_{\matX \in \mathcal{X}} \lambdamax{\matX} \leq B.
\]
Sample $\{\matX_1, \ldots, \matX_r\}$ uniformly at random from $\mathcal{X}$ without replacement. Compute
\[
\mu_{\mathrm{max}} = r \cdot \lambdamax{\Expect{\matX_1}}.
\]
Then
\[
\Probab{\lambdamax{\sum\nolimits_j \matX_j} \geq (1+\nu)\mu_{\mathrm{max}} } \leq k \cdot \bigg[ \frac{\expe^\nu}{(1+\nu)^{1+ \nu}} \bigg]^{\mu_{\mathrm{max}}/B} \quad \text{ for $\nu \geq 0.$}
\]
\end{lemma}
\begin{proof}[Proof of Lemma~\ref{lemma:spectral-SRHT-subsampling}]
Write the SVD of $\matA$ as $\matU \matSig \matV\transp$ where $\matSig \in \R^{\rho \times \rho}$ and observe that the spectral norm of $\mat{A}\matTh\transp$ is the same as that of $\matSig \matV\transp\matTh\transp.$
We control the norm of $\matSig \matV\transp \matTh\transp$ by considering the maximum singular value of its Gram matrix. Define $\matM = \matSig \matV \transp \matD \matH \transp$ and let $\matG$ be the Gram matrix of $\matM \matR \transp:$
\[
\matG = \matM \matR \transp (\matM \matR \transp) \transp.
\]
Evidently
\begin{equation}
\label{eqn:gram-identity}
\lambdamax{\matG} = \frac{r}{n} \TNormS{\matSig \matV \transp \matTh \transp}.
\end{equation}
Recall that $\matM^{(j)}$ denotes the $j$th column of $\matM.$ If we denote the random set of $r$ coordinates to which $\matR$ restricts by $T$, then
\[
\matG = \sum\nolimits_{j \in T} \matM^{(j)} \big(\matM^{(j)}\big) \transp.
\]
Thus $\matG$ is a sum of $r$ random matrices $\matX_1, \ldots, \matX_r$ sampled without replacement from the set $\mathcal{X} = \{ \matM^{(j)} \big(\matM^{(j)}\big) \transp \,:\, j=1,2,\ldots,n\}.$
There are two sources of randomness in $\matG$: $\matR$ and the Rademacher random variables on the diagonal of $\matD.$
Set
\[
B = \frac{1}{n} \left( \FNorm{\matSig} + \sqrt{8 \ln(n/\delta)} \TNorm{\matSig} \right)^2
\]
and let $E$ be the event
\[
\max\nolimits_{j=1,\ldots,n}\TNormS{\matM^{(j)}} \leq B.
\]
When $E$ holds, for all $j =1,2,\ldots,n,$
\[
\lambdamax{\matM^{(j)} \big(\matM^{(j)}\big) \transp} = \TNormS{\matM^{(j)}} \leq B,
\]
so $\matG$ is a sum of random positive-semidefinite matrices each of whose norms is bounded by $B.$
Note that whether or not $E$ holds is determined by $\matD$, and independent of $\matR.$
Conditioning on $E$, the randomness in $\matR$ allows us to use the matrix Chernoff bound of Lemma~\ref{prop:matrix-chernoff-bound} to control the maximum eigenvalue of $\matG.$
We observe that
\[
\mu_{\text{max}} = r \cdot \lambdamax{\Expect{\matX_1}} = \frac{r}{n} \lambdamax{\sum\nolimits_{j=1}^n \matM^{(j)} \big(\matM^{(j)}\big)\transp} = \frac{r}{n} \TNormS{\matSig}.
\]
Take the parameter $\nu$ in Lemma~\ref{prop:matrix-chernoff-bound} to be
\[
\nu = 4 + \frac{B}{\mu_{\text{max}}} \ln (\rho/\delta)
\]
to obtain the relation
\begin{align*}
\Probab{ \lambdamax{\matG} \geq 5 \mu_{\text{max}} + B \ln (\rho/\delta)\, \mid\, E } & \leq (\rho-k) \cdot \expe^{[\delta - (1+\nu) \ln (1 + \nu)] \frac{\mu_{\text{max}}}{B}} \\
& \leq \rho \cdot \expe^{\left(1-\tfrac{5}{4}\ln 5\right) \delta \frac{\mu_{\text{max}}}{B}} \\
& \leq \rho \cdot \expe^{-\left(\tfrac{5}{4} \ln 5 -1\right) \ln (\rho/\delta)} < \delta.
\end{align*}
The second inequality holds because $\nu \geq 4$ implies that $(1 + \nu) \ln(1+\nu) \geq \nu\cdot \tfrac{5}{4}\ln 5 .$
We have conditioned on $E,$ the event that the squared norms of the columns of $\matM$ are all smaller than $B.$ By Lemma~\ref{lemma:colnorm-tail-bound}, $E$ occurs with probability at least $1-\delta.$ Thus, substituting the values of $B$ and $\mu_{\text{max}},$ we find that
\[
\Probab{ \lambdamax{\matG} \geq \frac{r}{n} \left(5 \TNormS{\matSig} + \frac{\ln (\rho/\delta)}{r} \left( \FNorm{\matSig} + \sqrt{8 \ln(n/\delta)} \TNorm{\matSig} \right)^2 \right) }
\leq 2 \delta.
\]
Use equation~\eqref{eqn:gram-identity} to wrap up.
\end{proof}
\subsubsection{SRHT preserves the Frobenius norm}
Similarly, the SRHT is unlikely to substantially increase the Frobenius norm of a matrix.
\begin{lemma}[SRHT-based subsampling in the Frobenius norm]
\label{lemma:frobenius-SRHT-subsampling}
Let $\matA \in \R^{m \times n}$ ($n$ is a power of 2) and let $\matTh \in \R^{r \times n}$ be an SRHT matrix for some $r < n.$ Fix a failure probability $0 < \delta < 1.$ Then, for any $\eta \geq 0,$
\[
\Probab{\FNormS{\matA \matTh\transp} \leq (1 + \eta) \FNormS{\matA} } \geq 1- \left[ \frac{\expe^\eta}{(1+\eta)^{1+\eta}} \right]^{r/\big(1 + \sqrt{8 \ln(n/\delta)}\big)^2} - \delta.
\]
\end{lemma}
\begin{proof}
Let $c_j = \frac{n}{r} \TNormS{(\matA \matD \matH\transp)_j}$ denote the squared norm of the $j$th column of $\sqrt{n/r} \cdot \matA \matD \matH\transp$. Then, since right multiplication by $\matR\transp$ samples columns uniformly at random without replacement,
%
\begin{equation}
\label{eqn:frobenius-norm-upperbound}
\FNormS{\matA \matTh\transp} = \frac{n}{r} \FNormS{\matA \matD \matH\transp \matR\transp } = \sum\nolimits_{i=1}^r X_i
\end{equation}
%
where the random variables $X_i$ are chosen randomly without replacement from the set $\{c_j\}_{j=1}^n.$ There are two independent sources of randomness in this sum: the choice of summands, which is determined by $\matR$, and the magnitudes of the $\{c_j\}$, which is determined by $\matD.$
To bound this sum, we first condition on $\matD$ being such that each $c_j$ is bounded by a quantity $B.$ Call this event $E$, then
\[
\Probab{\sum\nolimits_{i=1}^r X_i \geq (1 + \eta) \sum\nolimits_{i=1}^r \E{X_i} } \leq \Probab{\sum\nolimits_{i=1}^r X_i \leq (1 + \eta) \sum\nolimits_{i=1}^r \E{X_i} \,\mid\, E} + \Probab{E^c}.
\]
To select $B,$ we observe that Lemma~\ref{lemma:colnorm-tail-bound} implies that with probability $1 - \delta,$ the entries of $\matD$ are such that
\[
\max\nolimits_j c_j \leq \frac{n}{r} \cdot \frac{1}{n} (\FNorm{\matA} + \sqrt{8 \ln(n/\delta)} \TNorm{\matA})^2 \leq \frac{1}{r} (1 + \sqrt{8 \ln(n/\delta)})^2 \FNormS{\matA}.
\]
Accordingly, we take
\[
B = \frac{1}{r}(1 + \sqrt{8 \ln(n/\delta)})^2 \FNormS{\matA},
\]
thereby arriving at the bound
\begin{equation}
\label{eqn:condfrobbound}
\Probab{\sum\nolimits_{i=1}^r X_i \geq (1 + \eta) \sum\nolimits_{i=1}^r \E{X_i} } \leq \Probab{\sum\nolimits_{i=1}^r X_i \leq (1 + \eta) \sum\nolimits_{i=1}^r \E{X_i} \,\mid\, E} + \delta.
\end{equation}
After conditioning on $\matD$, we observe that the randomness remaining on the righthandside of Eqn.~(\ref{eqn:condfrobbound}) is the choice of the summands $X_i,$ which is determined by $\matR.$ We address this randomness by applying a scalar Chernoff bound (Lemma~\ref{prop:matrix-chernoff-bound} with $k=1$). To do so, we need $\mu_{\text{max}},$ the expected value of the sum; this is an elementary calculation:
\[
\E{X_1} = n^{-1} \sum\nolimits_{j=1}^n c_j = \frac{1}{r} \FNormS{\matA},
\]
so $\mu_{\text{max}} = r \E{X_1} = \FNormS{\matA}.$
Applying Lemma~\ref{prop:matrix-chernoff-bound} conditioned on $E,$ we conclude that
\[
\Probab{\FNormS{\matA \matTh\transp} \geq (1 + \eta) \FNormS{\matA}\,\mid\, E } \leq \left[ \frac{\expe^\eta}{(1+\eta)^{1+\eta}} \right]^{r/(1 + \sqrt{8 \ln(n/\delta)})^2} + \delta
\]
for $\eta \geq 0.$
\end{proof}
\subsubsection{SRHT preserves matrix multiplication}
Finally, we prove a novel result on approximate matrix multiplication involving SRHT matrices.
\begin{lemma}[SRHT for approximate matrix multiplication]\label{lem:mm}
Let $\matA \in \R^{m \times n}$, $\matB \in \R^{n \times p}$, and $n$ be a power of 2.
For some $r < n$, let $\matTh \in \R^{r \times n}$ be an SRHT matrix. Fix a failure probability $0 < \delta < 1.$
Assume $\const{R}$ satisfies
$
0 \leq \const{R} \leq \frac{\sqrt{r}}{1+\sqrt{8\ln(n/\delta)}}.
$
Then,
\[
\Probab{ \FNorm{\matA \matTh\transp \matTh \matB - \matA \matB} \leq 2 (\const{R} + 1)
\frac{\FNorm{\matA}\FNorm{\matB} + \sqrt{8 \ln(n/\delta)}\FNorm{\matA}\TNorm{\matB}}{\sqrt{r}} } \geq 1 - \expe^{-\const{R}^2/4} - 2\delta.
\]
\end{lemma}
{\bf Remark.} Recall that the stable rank $\stablerank{\matA} = \FNormS{\matA}/\TNormS{\matA}$ reflects the decay of the spectrum of the matrix $\matA.$ Lemma~\ref{lem:mm} can be rewritten as a bound on the relative error of the approximation $\matA \matTh\transp \matTh \matB$ to the product $\matA \matB:$
\[
\frac{\FNorm{\matA \matTh\transp \matTh \matB - \matA \matB}}{\FNorm{\matA \matB}} \leq \frac{\FNorm{\matA}\FNorm{\matB}}{\FNorm{\matA\matB}} \cdot \frac{R+2}{\sqrt{r}} \cdot \left(1 + \frac{\sqrt{8 \ln(n/\delta)}}{\stablerank{\matB}} \right).
\]
In this form, we see that the relative error is controlled by the deterministic condition number for the matrix multiplication problem as well as the stable rank of $\mat{B}$ and the number of column samples $r.$ Since the roles of $\matA$ and $\matB$ in this bound can be interchanged, in fact we have the bound
\[
\frac{\FNorm{\matA \matTh\transp \matTh \matB - \matA \matB}}{\FNorm{\matA \matB}} \leq \frac{\FNorm{\matA}\FNorm{\matB}}{\FNorm{\matA\matB}} \cdot \frac{R+2}{\sqrt{r}} \cdot \left(1 + \frac{\sqrt{8 \ln(n/\delta)}}{\max(\stablerank{\matB}, \stablerank{\matA})} \right),
\]
\subsection*{Proof of Lemma~\ref{lem:mm}}
To prove the Lemma, we first develop a generic result for approximate matrix multiplication via uniform sampling (without replacement)
of the columns and the rows of the two matrices involved in the product (see Lemma~\ref{lemma:matrix-multiplication} below).
Lemma~\ref{lem:mm} is a simple instance of this generic result.
We mention that Lemma 3.2.8 in~\cite{Dri02} gives a
similar result for approximate matrix multiplication, which, however gives a bound for the expected value of the error term, while our Lemma~\ref{lem:mm}
gives a comparable bound which holds with high probability. To prove Lemma~\ref{lemma:matrix-multiplication},
we use the following vector Bernstein inequality for sampling without replacement in Banach spaces; this result follows directly from a similar inequality for sampling with replacement established by Gross in~\cite{Gross11}.
\begin{lemma}
\label{lemma:vector-bernstein}
Let $\mathcal{V}$ be a collection of $n$ vectors in a normed space with norm $\VTNorm{\cdot}.$ Choose $\vec{V}_1, \ldots, \vec{V}_r$ from $\mathcal{V}$ uniformly at random \emph{without} replacement. Also choose $\vec{V}_1^\prime, \ldots, \vec{V}_r^\prime$ from $\mathcal{V}$ uniformly at random \emph{with} replacement. Let
\[
\mu = \E{\VTNorm{\sum\nolimits_{i=1}^r (\vec{V}_i^\prime - \E{\vec{V}_i^\prime})}}
\]
and set
\[
\sigma^2 \geq 4r\E{\VTNormS{\vec{V}_1^\prime}} \quad \text{ and } \quad B \geq 2 \max_{\vec{V} \in \mathcal{V}} \VTNorm{\vec{V}}.
\]
If $ 0 \leq t \leq \sigma^2/B,$ then
\[
\Probab{\VTNorm{\sum\nolimits_{i=1}^r \vec{V}_i - r\E{\vec{V}_1}} \geq \mu+t} \leq \mathrm{exp}\left( -\frac{t^2}{4 \sigma^2} \right).
\]
\end{lemma}
\begin{proof}
We proceed by developing a bound on the moment generating function (mgf) of
\[
\VTNorm{\sum\nolimits_{i=1}^r \vec{V}_i - r\E{\vec{V}_1}} - \mu.
\]
This mgf is controlled by the mgf of a similar sum where the vectors are sampled with replacement. That is, for $\lambda \geq 0,$
\begin{equation}
\label{eqn:mgfineq}
\E{\mathrm{exp}\left(\lambda \cdot \VTNorm{\sum\nolimits_{i=1}^r \vec{V}_i - r\E{\vec{V}_1}} - \lambda \mu\right)} \leq
\E{\mathrm{exp}\left(\lambda \cdot \VTNorm{\sum\nolimits_{i=1}^r \vec{V}_i^\prime - r\E{\vec{V}_1}} - \lambda \mu\right)}.
\end{equation}
This follows from a classical observation due to Hoeffding \cite{Hoe63} (see also \cite{GN10} for a more modern exposition) that for any convex $\R$-valued function $g,$
\[
\E{g\left( \sum\nolimits_{i=1}^r \vec{V}_i \right)}\leq \E{g\left(\sum\nolimits_{i=1}^r \vec{V}_i^\prime \right)}.
\]
Specifically, take $g(\vec{V}) = \mathrm{exp}\left(\lambda\VTNorm{\vec{V} - r \E{\vec{V}_1}} - \lambda \mu\right)$ to obtain the asserted inequality of mgfs.
In the proof of Theorem 12 in \cite{Gross11}, Gross establishes that any random variable $Z$ whose mgf is less than the righthand side of Eqn.~(\ref{eqn:mgfineq}) satisfies a tail inequality of the form
\begin{equation}
\label{eqn:grosstail}
\Probab{ Z \geq \mu + t } \leq \mathrm{exp}\left( -\frac{t^2}{4s^2} \right)
\end{equation}
when $t \leq s^2/M,$ where
\[
s^2 \geq \sum_{i=1}^r \E{\VTNorm{\vec{V}_i^\prime - \E{\vec{V}_1^\prime} }^2}
\]
and $M$ almost surely bounds $\VTNorm{\vec{V}_i^\prime - \E{\vec{V}_1^\prime}}$ for all $i=1,\ldots,r.$
To apply this result, note that for all $i=1,\ldots,r,$
\[
\VTNorm{\vec{V}_i^\prime - \E{\vec{V}_1^\prime}} \leq 2 \max_{\vec{V} \in \mathcal{V}} \VTNorm{\vec{V}} = B.
\]
Also take $\vec{V}_1^{\prime\prime}$ to be an i.i.d. copy of $\vec{V}_1^\prime$ and observe that, by Jensen's inequality,
\begin{align*}
\sum_{i=1}^r \E{\VTNorm{\vec{V}_i^\prime - \E{\vec{V}_1^\prime} }^2} & = r \E{\VTNorm{\vec{V}_1^\prime - \E{\vec{V}_1^\prime} }^2} \\
& \leq r \E{\VTNormS{\vec{V}_1^\prime - \vec{V}_1^{\prime\prime}} } \leq r \E{ (\VTNorm{\vec{V}_1^\prime} + \VTNorm{\vec{V}_1^{\prime \prime}})^2} \\
& \leq 2 r \E{ \VTNormS{\vec{V}_1^\prime} + \VTNormS{\vec{V}_1^{\prime\prime}} } \\
& = 4 r \E{ \VTNormS{\vec{V}_1^\prime} } \leq \sigma^2.
\end{align*}
The bound given in the statement of Lemma~\ref{lemma:vector-bernstein} follows from taking $s^2 = \sigma^2$ and $M = B$ in Eqn.~(\ref{eqn:grosstail}).
\end{proof}
%% COMMENTED OUT BECAUSE INSTEAD OF GOING THROUGH A DOOB MARTINGALE ARGUMENT, APPEAL TO DAVID GROSS'S VECTOR BERNSTEIN INEQUALITY
% \begin{lemma}
% \label{lemma:vector-azuma-hoeffding}
% Let $\mathcal{V} = \{\vec{v}_i\}_{i=1}^n$ be a collection of vectors in a normed space with norm $\VTNorm{\cdot}.$ Choose $\vec{V}_1, \ldots, \vec{V}_r$ from $\mathcal{V}$ uniformly at random \emph{without} replacement. Also choose $\vec{V}_1^\prime, \ldots, \vec{V}_r^\prime$ from $\mathcal{V}$ uniformly at random \emph{with} replacement. Let
% \[
% \mu = \E{\VTNorm{\sum\nolimits_{i=1}^r (\vec{V}_i^\prime - \E{\vec{V}_i^\prime})}}
% \]
% and set
% \[
% \sigma^2 \geq 4r\E{\VTNormS{\vec{V}_1^\prime}} \quad \text{ and } \quad B \geq 4 \max_i \VTNorm{\vec{v}_i}.
% \]
% Then for $t \geq 0,$
% \[
% \Probab{\VTNorm{\sum\nolimits_{i=1}^r \vec{V}_i - r\E{\vec{V}_1}} \geq \mu+t} \leq
% \mathrm{exp}\left( -\frac{t^2}{\sigma^2} \left[1 - \frac{1}{2} \mathrm{exp}\left( \frac{B t}{\sigma^2} \right) \right] \right).
% \]
% In particular, if $ 0 \leq t \leq \sigma^2/(2B),$ then
% \[