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

Butterfly Factorization

Yingzhou Li, Haizhao Yang, Eileen R. Martin, Kenneth L. Ho, Lexing Ying

Abstract

Butterfly Factorization provides a novel framework for decomposing dense matrices that satisfy a complementary low-rank property into a product of $O(\log N)$ sparse matrices. This decomposition enables matrix-vector multiplications to be performed in $O(N \log N)$ time, significantly reducing the computational burden for large-scale scientific problems. Unlike traditional methods that require deep analytic knowledge of the underlying kernel, this approach offers a robust, data-driven mechanism to automate the construction of fast algorithms for complex operators like Fourier integral operators.

Introduction

In scientific computing, many fundamental operations involve multiplying a large vector by a dense $N \times N$ matrix. Direct computation of such products requires $O(N^2)$ operations, a cost that becomes prohibitive as dataset sizes grow. While specialized algorithms like the Fast Fourier Transform (FFT) and Hierarchical (H-) matrices address specific classes of matrices, many important operators in wave physics and integral transforms fall into a middle ground. These matrices are not globally low-rank but possess a structural property that can be exploited for acceleration. This paper introduces Butterfly Factorization, a method to automatically discover and utilize this structure.

The Complementary Low-Rank Property

The effectiveness of Butterfly Factorization hinges on the complementary low-rank property. This property is defined through two hierarchical trees: a row tree (partitioning the index set $X$) and a column tree (partitioning the index set $\Omega$). A matrix satisfies this property if sub-blocks formed by a node at level $\ell$ in the row tree and a node at level $L-\ell$ in the column tree are numerically low-rank.

Hierarchical decomposition of a matrix showing the sub-blocks that satisfy the complementary low-rank property across different scales.

As illustrated in the figure above, this property manifests as a sequence of low-rank "rectangles" of varying aspect ratios across different levels of the hierarchy. At the extremes, the blocks are either thin vertical or thin horizontal strips, while at the middle levels, they form more balanced grids.

Methodology

The authors propose a two-stage construction process to achieve the factorization:

  1. Middle Level Factorization: The process begins by splitting the matrix at a "middle" level (e.g., level $L/2$). At this stage, the matrix is partitioned into a grid of sub-blocks. Randomized Singular Value Decomposition (SVD) is employed to identify the low-rank structure of these blocks. This can be performed by sampling individual matrix entries or by observing the matrix's action on random vectors, allowing for a "black-box" recovery of the operator.
A balanced grid partitioning at the middle level of the hierarchy, where sub-blocks are factorized using randomized SVD.
  1. Recursive Factorization: Following the middle-level split, the resulting components are recursively factorized into a sequence of sparse matrices. This recursion continues until the leaves of the trees are reached.

The final output is a product of $O(\log N)$ sparse matrices. Applying this chain to a vector is mathematically equivalent to the original dense multiplication but requires only $O(N \log N)$ operations.

Experimental Evaluation

The method was evaluated on several challenging benchmarks:

  • One-dimensional Fourier Integral Operators (FIO): Essential for wave-related simulations.
  • Special Function Transforms: Evaluating sums of Hankel functions, common in acoustics and electromagnetics.
  • Composition of FIOs: A test of the "black-box" capability where the explicit kernel of the combined operator is unknown.

Key Results

The experimental results demonstrate the efficiency and robustness of the approach. For an FIO with $N = 262,144$, the Butterfly Factorization achieved a 704-fold speedup over direct matrix-vector multiplication. Furthermore, the accuracy of the factorization is easily controlled via a "truncation rank." Increasing this rank allows users to achieve high precision (e.g., $10^{-11}$ relative error) that remains stable as the problem size $N$ increases. The construction cost scales as $O(N^{3/2})$, which is a significant improvement over the $O(N^2)$ cost of traditional precomputation.

Conclusion

Butterfly Factorization represents a significant advancement in fast algorithms. By "freezing" the data flow of the butterfly algorithm into a matrix factorization, the authors have created a tool that is easy to store, share, and apply. Its ability to recover fast structures from black-box operators without analytic kernel knowledge makes it highly versatile. Future work will focus on extending the method to higher dimensions and applying it to matrix inversion and more complex transforms.

Summary updated

BibTeX
@article{li2015butterfly,
  author = {Yingzhou Li and Haizhao Yang and Eileen R. Martin and Kenneth L. Ho and Lexing Ying},
  title = {{Butterfly Factorization}},
  journal = {Multiscale Model. Simul.},
  year = {2015},
  doi = {10.1137/15m1007173},
}
Figure