NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Butterfly factorization by algorithmic identification of rank-one blocks

Léon Zheng, Gilles Puy, Elisa Riccietti, Patrick Pérez, Rémi GribonvalarXiv 2023 · DOI

Introduction

Many fundamental operations in signal processing and machine learning, such as the Discrete Fourier Transform (DFT) or Hadamard Transform, rely on "fast" algorithms. These algorithms are possible because the underlying matrices can be factorized into a product of sparse "butterfly" factors, reducing computational complexity from $O(N^2)$ to $O(N \log N)$.

However, this efficiency is fragile. It depends on a precise ordering of rows and columns. If a matrix is permuted, its butterfly structure is obscured, and the fast algorithm is lost. Finding the correct permutations to reveal this structure is a daunting combinatorial problem with $N! \times N!$ possibilities. This work addresses the "blind" case: identifying the butterfly structure from matrix entries alone without prior knowledge of the analytical form.

Methods: Identifying Sparse Structure via Rank-One Blocks

The proposed method is based on the complementary low-rank property. A butterfly matrix can be partitioned into blocks that, when correctly permuted, have a rank of at most one. The authors use this property to find the sparse supports of the factors.

Sparse butterfly factors illustrating the hierarchical structure of the factorization.

The core algorithm uses Alternating Spectral Clustering:

  1. Level-by-Level Identification: The factorization consists of $L = \log_2 N$ levels, which are solved independently.
  2. Similarity Graphs: For a fixed column partition, a similarity graph for rows is constructed. Weights are determined by the "correlation" between rows within those columns—specifically, how close they are to forming a rank-1 block.
  3. Spectral Clustering: The graph Laplacian is used to group rows into equal-sized clusters.
  4. Alternation: The process alternates between optimizing row and column partitions until convergence.
  5. Hierarchical Assembly: Valid partitions are assembled into "cluster trees" to extract the final sparse factors.

Key Insights: The Needle in a Haystack

A critical observation of this work is the extreme sparsity of the solution space. For even small matrices (e.g., $8 \times 8$), only one specific pair of permutations out of billions yields a zero-error butterfly approximation.

Histogram of relative approximation errors for random permutations, showing the 'needle in a haystack' nature of finding the correct structure.

This "needle in a haystack" visualization explains why local search or random initialization is insufficient and justifies the need for a more structured heuristic like spectral clustering. Furthermore, the authors discovered that levels of the butterfly hierarchy can be identified independently, significantly simplifying the optimization.

Results and Evaluation

The algorithm was tested on synthetic benchmarks, including random orthogonal butterfly matrices and the DFT matrix.

  • Perfect Recovery: For random matrices up to $N=128$, the algorithm achieved a 100% success rate in identifying correct permutations, even with up to 10% relative Gaussian noise.
  • DFT Performance: The structure of the DFT matrix was successfully recovered. While performance slightly decreased at high noise levels for $N=128$, it remained highly reliable under typical conditions.
  • Precision: Without noise, the recovered factorization reaches machine precision, effectively "re-discovering" fast transform algorithms from scratch.

Limitations and Future Directions

The current implementation has a complexity of $O(N^3)$, primarily due to spectral clustering, which limits its application to medium-sized matrices. Future work will focus on scaling the heuristic for the massive matrices used in deep learning and large-scale scientific computing. Additionally, exploring joint optimization across all levels simultaneously may improve robustness against noise.

Summary updated

BibTeX
@misc{zheng2023butterfly,
  author = {Léon Zheng and Gilles Puy and Elisa Riccietti and Patrick Pérez and Rémi Gribonval},
  title = {{Butterfly factorization by algorithmic identification of rank-one blocks}},
  year = {2023},
  eprint = {2307.00820},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.00820},
}
Figure