arXiv:2610.25762cs.DSOct 2026

Manuscript Offprint

arXiv:2610.25762

Hadamard Transforms for Dimension Reduction

Mingxuan Sun, Zhiqiang Xu

MINGXUAN SUN AND ZHIQIANG XU

ABSTRACT. Using the Hadamard matrix for dimension reduction can accelerate the computation due to the fast Hadamard transform. However, the previous target dimension bounds in terms of the Gaussian width depend on the ambient dimension. In this paper, we obtain the following ambient dimension free bound using three Hadamard-diagonal blocks. Let H∈Rd×dH \in \mathbb{R}^{d \times d} be the normalized Walsh-Hadamard matrix, and let D1,D2,D3∈Rd×dD_1, D_2, D_3 \in \mathbb{R}^{d \times d} be independent Rademacher diagonal matrices. We prove that for any symmetric set T⊂Sd−1T \subset \mathbb{S}^{d-1},

P{sup⁡t∈T∣dm∥PΩHD3HD2HD1t∥22−1∣≤ε}≥1−δ\mathbb{P}\left\{\sup_{\boldsymbol{t}\in T}\left|\frac{d}{m}\|P_{\Omega}H D_{3}H D_{2}H D_{1}\boldsymbol{t}\|_{2}^{2}-1\right|\leq\varepsilon\right\}\geq1-\delta

whenever

m≳ε−2w(T)2log⁡2eδlog⁡4(e+w(T)εlog⁡eδ).m\gtrsim\varepsilon^{-2}w(T)^{2}\log^{2}\frac{e}{\delta}\log^{4}\left(e+\frac{w(T)}{\varepsilon}\log\frac{e}{\delta}\right).

Here w(T)w(T) is the Gaussian width of T, and Ω\Omega is a set of m distinct coordinates chosen uniformly. This is the first ambient dimension free bound on the target dimension using Hadamard transforms, for an arbitrary symmetric set in terms of its Gaussian width.

We also prove that it is impossible to obtain an ambient dimension free bound for an arbitrary set in terms of its Gaussian width using two Hadamard-diagonal blocks.

1. INTRODUCTION

1.1. Problem Setup. Dimension reduction has numerous applications in data science. A standard choice for dimension reduction is a normalized Gaussian matrix. The target dimension required for a Gaussian matrix is well understood. To state the theorem, we first introduce the Gaussian width, which provides a measure of the “complexity” or “size” of the set. For T⊂RdT \subset \mathbb{R}^d, the Gaussian width of TT is

w(T):=Esup⁡t∈T⟨g,t⟩,w(T):=\mathbb{E}\sup_{t\in T}\langle\boldsymbol{g},t\rangle,

where g∼N(0,Id)g \sim N(\mathbf{0}, I_d) is a standard Gaussian vector.

Theorem 1.1 ([9, Theorem 8.4]). Let ε,δ∈(0,1)\varepsilon, \delta \in (0,1) and T⊂Sd−1T \subset \mathbb{S}^{d-1}. Suppose A∈Rm×dA \in \mathbb{R}^{m \times d} is a random matrix with i.i.d. N(0,1/m)N(0,1/m) entries. Then,

P{sup⁡t∈T∣∥At∥2−1∣≤ε}≥1−δ,\mathbb{P}\left\{\sup_{t\in T}\left|\|A\boldsymbol{t}\|_{2}-1\right|\leq\varepsilon\right\}\geq1-\delta,

whenever m≥(2w(T)2+6log⁡(2e/δ))/ε2m \geq (2w(T)^2 + 6\log(2e/\delta))/\varepsilon^2.

However, multiplication by a dense Gaussian matrix can be computationally expensive in practice. This motivates the use of the Hadamard transform. Let d=2rd = 2^r, where rr is a positive integer. Denote the finite field of two elements by F2\mathbb{F}_2, and set G:=F2rG := \mathbb{F}_2^r, i.e. G:={0,1}rG := \{0,1\}^r. The normalized Walsh-Hadamard matrix H∈RG×GH \in \mathbb{R}^{G \times G} is defined as

Hi,j=1d(−1)⟨i,j⟩,i,j∈G,H_{i,j}=\sqrt{\frac{1}{d}}(-1)^{\langle i,j\rangle},\qquad i,j\in G,

where ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle denotes the standard inner product over F2\mathbb{F}_2. For a Hadamard transform of order d=2rd = 2^r, the fast Hadamard transform requires O(dlog⁡d)O(d\log d) arithmetic operations per vector. Therefore, the Walsh-Hadamard matrix is widely used in fast randomized dimension reduction [2, 6, 9, 11, 12, 18]. Since multiplication by a diagonal matrix is cost-free, a common choice is using a Rademacher

MINGXUAN SUN AND ZHIQIANG XU

diagonal sign matrix D∈Rd×dD \in \mathbb{R}^{d \times d} followed by the normalized Hadamard matrix HH, where the diagonal entries Dii∈{1,−1}D_{ii} \in \{1, -1\} are independent Rademacher random variables. We call the combination HDHD a Hadamard-diagonal block. Compared with adding a code matrix or random sparse matrix in the embedding, using only Hadamard matrices and random diagonal matrices is easy to implement in practice and strictly preserves the computational advantage afforded by the fast Hadamard transform. Hadamard-diagonal blocks are also of theoretical interest because of their connection to random walks on the orthogonal group [3, 7].

Naturally, two fundamental questions arise concerning the Hadamard transform.

Question I: Can embeddings based on Walsh-Hadamard matrices achieve the Gaussian target dimension bound O(w(T)2ε−2)O(w(T)^{2}\varepsilon^{-2}) for an arbitrary symmetric T⊂Sd−1T \subset \mathbb{S}^{d-1}?

Question II: What is the minimum number of Hadamard-diagonal blocks needed to embed an arbitrary symmetric T⊂Sd−1T \subset \mathbb{S}^{d-1} with ambient dimension independent target dimension, in terms of its Gaussian width?

Although several prior works have focused on this direction, both questions remain open. For Hadamard-based embeddings of general sets, previously known target dimension bounds in terms of the Gaussian width depend on the ambient dimension. We investigate both problems in this paper. For Question I, our construction with three Hadamard-diagonal blocks achieves the Gaussian target dimension bound up to logarithmic factors in ε\varepsilon, w(T)w(T), and the failure probability. For Question II, we show that the answer is three, and the third Hadamard-diagonal block in our construction is essential.

1.2. Related Work. The earliest work in this direction is due to Pilanci and Wainwright [11]. Let HD∈Rd×dHD \in \mathbb{R}^{d \times d} be a Hadamard-diagonal block. Suppose Ω∈[d]m\Omega \in [d]^m are mm coordinates chosen uniformly with replacement, independent of DD, and denote the projection matrix onto Ω\Omega by QΩ∈Rm×dQ_{\Omega} \in \mathbb{R}^{m \times d}. For ε∈(0,1)\varepsilon \in (0,1), δ=1/3\delta = 1/3, and an arbitrary symmetric T⊂Sd−1T \subset \mathbb{S}^{d-1}, they established a sufficient condition on mm under which

P{sup⁡t∈T∣dm∥QΩHDt∥2−1∣≤ε}≥1−δ.\mathbb{P}\left\{\sup_{t\in T}\left|\frac{d}{m}\|Q_{\Omega}H D\boldsymbol{t}\|_{2}-1\right|\leq \varepsilon\right\}\geq 1-\delta.

Later works [10, 17, 8] improve the bound on mm in [11] with new arguments. The following table summarizes these bounds. Throughout this table, we use PΩP_{\Omega} to denote choosing rows uniformly without replacement, and use QΩQ_{\Omega} to denote choosing rows uniformly with replacement.

ReferenceMatrixBound on the target dimension
[11, Proposition 2]d/mQΩHD\sqrt{d/m}Q_{\Omega}HDm≥Cε−2w(T)4log⁡4(ed),δ=1/3m \geq C\varepsilon^{-2}w(T)^{4}\log^{4}(ed),\quad \delta = 1/3
[10, Theorem 3.3]d/mQΩHD\sqrt{d/m}Q_{\Omega}HDm≥Cε−2w(T)2log⁡4(ed)log⁡2(2/δ)m \geq C\varepsilon^{-2}w(T)^{2}\log^{4}(ed)\log^{2}(2/\delta)
[17, Proposition 3.4]d/mPΩHD\sqrt{d/m}P_{\Omega}HDm≥Cε−2w(T)2log⁡4(ed)log⁡2(2/δ)m \geq C\varepsilon^{-2}w(T)^{2}\log^{4}(ed)\log^{2}(2/\delta)
[8, Theorems 2.4-2.5]d/mQΩHD\sqrt{d/m}Q_{\Omega}HDm≥Cε−2w(T)2log⁡(2/δ)log⁡(2ed/δ)log⁡2(Cε−2w(T)2log⁡(2/δ))m \geq C\varepsilon^{-2}w(T)^{2}\log(2/\delta)\log(2ed/\delta)\log^{2}(C\varepsilon^{-2}w(T)^{2}\log(2/\delta))

More recently, Boahen, Boedihardjo, Chiclana, and Iwen [5] study embeddings of the form BD2HD1∈Rm×dBD_{2}HD_{1} \in \mathbb{R}^{m \times d}, where B∈Rm×dB \in \mathbb{R}^{m \times d} is a normalized four-wise independent code matrix. For an arbitrary set T⊂Sd−1T \subset \mathbb{S}^{d-1} and δ≤1/2\delta \leq 1/2, they obtained the following sufficient condition on the target dimension

m≥Cε−4((log⁡1δ)3/4+∑j=0∞2−j(log⁡N(T,∥⋅∥2,2−j))3/4)2.m \geq C \varepsilon^ {- 4} \left(\left(\log \frac {1}{\delta}\right) ^ {3 / 4} + \sum_ {j = 0} ^ {\infty} 2 ^ {- j} \left(\log N (T, \| \cdot \| _ {2}, 2 ^ {- j})\right) ^ {3 / 4}\right) ^ {2}.

Here N(T,∥⋅∥2,η)N(T, \| \cdot \|_2, \eta) denotes the Euclidean covering number of TT at radius η\eta, and CC is a universal constant. This estimate has no explicit dependence on dd, but retains an ε−4\varepsilon^{-4} dependence on the distortion and measures the complexity of TT through the displayed entropy sum. Note that we can control the Gaussian width by the displayed entropy sum, while the entropy sum can be arbitrarily worse than Gaussian width. Hence, it remains open whether a target dimension bound independent of the ambient dimension can be obtained in terms of Gaussian width.

1.3. Notations. Throughout this paper, we denote the entries of a vector x\boldsymbol{x} by xix_i. For a vector x\boldsymbol{x}, we denote the diagonal matrix whose diagonal entries are xix_i by diag(x)\text{diag}(\boldsymbol{x}). For a positive integer dd, we write [d]:={1,…,d}[d] := \{1, \ldots, d\}. For I⊂[d]I \subset [d], we define the projection matrix PI∈Rd×dP_I \in \mathbb{R}^{d \times d} as (PI)i,j=1(P_I)_{i,j} = 1 if i=ji = j and i∈Ii \in I, (PI)i,j=0(P_I)_{i,j} = 0 otherwise. For a function f(x,y)f(x, y) of random variables x,yx, y, we use Exf(x,y)\mathbb{E}_x f(x, y) to denote taking expectation over xx, conditional on the other random inputs. We will explicitly specify the random variables being integrated like this in every conditional expectation. For a random variable xx, we use ∥x∥Lp\|x\|_{L^p} to denote (E∣x∣p)1/p(\mathbb{E}|x|^p)^{1/p}. For a random matrix XX, we use ∥X∥2,Lp\|X\|_{2,L^p} to denote (E∥X∥2p)1/p(\mathbb{E}\|X\|_2^p)^{1/p}. For random variables XX and YY, we write X=dYX \stackrel{d}{=} Y if they have the same distribution.

1.4. Our Contribution. In the following theorem, we show that using three Hadamard-diagonal blocks can provide embeddings with ambient dimension independent target dimension.

Theorem 1.2. Let H∈Rd×dH \in \mathbb{R}^{d \times d} be the Hadamard transform, and let D1,D2,D3∈Rd×dD_1, D_2, D_3 \in \mathbb{R}^{d \times d} be independent Rademacher diagonal matrices. Set A3:=HD3HD2HD1A_3 := HD_3HD_2HD_1. Suppose Ω⊂[d]\Omega \subset [d] is a set of mm distinct coordinates chosen uniformly from [d][d], independently of D1,D2,D3D_1, D_2, D_3. Then for any symmetric set T⊂Sd−1,ε,δ∈(0,1)T \subset \mathbb{S}^{d-1}, \varepsilon, \delta \in (0,1), we have

P{sup⁡t∈T∣dm∥PΩA3t∥22−1∣≤ε}≥1−δ(1.1)\mathbb{P}\left\{\sup_{\boldsymbol{t}\in T}\left|\frac{d}{m}\|P_{\Omega}A_{3}\boldsymbol{t}\|_{2}^{2}-1\right|\leq\varepsilon\right\}\geq1-\delta \tag{1.1}

whenever

m≥C1ε−2w(T)2log⁡2eδlog⁡4(e+w(T)εlog⁡eδ).(1.2)m\geq C_{1}\varepsilon^{-2}w(T)^{2}\log^{2}\frac{e}{\delta}\log^{4}\left(e+\frac{w(T)}{\varepsilon}\log\frac{e}{\delta}\right). \tag{1.2}

Here C1C_{1} is a universal constant.

The target dimension bound in Theorem 1.2 matches the bound in Theorem 1.1 up to logarithmic factors in ε\varepsilon, w(T)w(T), δ\delta. Hence, we prove that Hadamard transforms can provide comparable embeddings to the Gaussian matrix.

In the next theorem, we construct a counterexample for two Hadamard-diagonal blocks.

Theorem 1.3. Suppose D1,D2∈Rd×dD_1, D_2 \in \mathbb{R}^{d \times d} are independent Rademacher diagonal matrices. For every fixed integer m≥1m \geq 1, there exists a symmetric set Tm,r⊂Sd−1T_{m,r} \subset \mathbb{S}^{d-1} defined for all sufficiently large rr with w(Tm,r)<21w(T_{m,r}) < 21 and

lim⁡r→∞sup⁡Ω⊂G,∣Ω∣=mP{sup⁡t∈Tm,r∣dm∥PΩHD2HD1t∥22−1∣≤1}=0.(1.3)\lim_{r\to\infty}\sup_{\Omega\subset G,|\Omega|=m}\mathbb{P}\left\{\sup_{\boldsymbol{t}\in T_{m,r}}\left|\frac{d}{m}\|P_{\Omega}H D_{2}H D_{1}\boldsymbol{t}\|_{2}^{2}-1\right|\leq1\right\}=0. \tag{1.3}

Since the m in Theorem 1.3 is arbitrary, Theorem 1.3 implies that for embeddings constructed from two Hadamard-diagonal blocks, any target dimension bound in terms of its Gaussian width must depend on the ambient dimension. Therefore, Theorem 1.3 shows the third Hadamard-diagonal block in Theorem 1.2 plays an important role in the embedding. Combining Theorem 1.3 and Theorem 1.2, we prove the answer to Question II is three.

Remark 1.1. In practical applications, T is often a finite set. If T⊂Sd−1T \subset \mathbb{S}^{d-1} is a set of N points, then w(T)≤2log⁡Nw(T) \leq \sqrt{2 \log N}. Such target dimension bounds in terms of log⁡N\log N are covered by the literature. However, data encountered in practice often has additional algebraic or geometric structures. Gaussian width can capture such structures well, leading to a much smaller quantity than the rough 2log⁡N\sqrt{2 \log N} estimate. Hence, a target dimension bound in terms of the Gaussian width overcomes the limitation that previous results missed the intrinsic structure of T. Therefore, Theorem 1.3 and Theorem 1.2 not only have theoretical significance but also provide practical guidance for algorithm design.

MINGXUAN SUN AND ZHIQIANG XU