The Geometry of the fast Walsh Hadamard transform
The geometry of the Fast Walsh–Hadamard Transform (FWHT), why it’s a change of basis, and some related insights.
1. The Walsh–Hadamard transform as a matrix
2. The Walsh basis: geometry and interpretation
Each row (or column) of is one Walsh function:
-
Values: Each function takes only values.
-
Ordering: Rows can be ordered by sequency — the number of sign changes per unit time.
-
Orthogonality: The Walsh functions form a set of mutually orthogonal vectors spanning .
In geometric terms:
-
The Walsh basis vectors are vertices of a hypercube, but arranged so that they are orthogonal in the Euclidean sense.
-
The FWHT changes coordinates from the standard “axis-aligned” basis to this set of “±1 pattern” basis vectors.
3. Fast computation: butterfly geometry
The FWHT algorithm exploits the recursive block structure of to compute the transform in time.
Geometric view of the butterfly steps:
-
At each stage, we pair up coordinates, compute their sum and difference.
-
This is like a rotation/reflection in a 2D subspace spanned by each pair of coordinates.
-
Successive stages mix larger and larger groups of coordinates — building the global change of basis from a sequence of local 2D transforms.
This is analogous to the FFT’s geometric interpretation (progressive twiddle rotations), but here all coefficients are so there are no true “rotations” — just orthogonal flips.
4. Comparison to Fourier
-
Fourier basis: sinusoidal functions with varying frequency.
-
Walsh basis: square-wave functions with varying sequency (sign-flip rate).
-
Both are orthonormal changes of basis; the difference is in the shape of the basis vectors.
-
Walsh basis vectors are much simpler (±1 values), making the transform integer-friendly and extremely fast.
5. Other relevant properties
-
Applications:
-
Efficient convolution with ±1 patterns
-
Spreading sequences in communications (CDMA)
-
Compressive sensing with binary sensing matrices
-
Fast random projections (structured random features)
-
-
Random features link: If you multiply by a diagonal random ±1 matrix before/after the FWHT, you get a JL-type random projection with
Comments
Post a Comment