Matrix multiplication is a fundamental task in almost all computational fields, including machine learning and optimization, computer graphics, signal processing, and graph algorithms (static and dynamic). Twin-width is a natural complexity measure of matrices (and more general structures) that has recently emerged as a unifying concept with important algorithmic applications. While the twin-width of a matrix is invariant to re-ordering rows and columns, most of its algorithmic applications to date assume that the input is given in a certain canonical ordering that yields a bounded twin-width contraction sequence. In general, efficiently finding such a sequence -- even for an approximate twin-width value -- remains a central and elusive open question. In this paper we show that a binary $n \times n$ matrix of twin-width $d$ can be preprocessed in $\widetilde{\mathcal{O}}_d(n^2)$ time, so that its product with any vector can be computed in $\widetilde{\mathcal{O}}_d(n)$ time. Notably, the twin-width of the input matrix need not be known and no particular ordering of its rows and columns is assumed. If a canonical ordering is available, i.e., if the input matrix is $d$-twin-ordered, then the runtime of preprocessing and matrix-vector products can be further reduced to $\mathcal{O}(n^2+dn)$ and $\mathcal{O}(dn)$. Consequently, we can multiply two $n \times n$ matrices in $\widetilde{\mathcal{O}}(n^2)$ time, when at least one of the matrices consists of 0/1 entries and has bounded twin-width. The results also extend to the case of bounded twin-width matrices with adversarial corruption. Our algorithms are significantly faster and simpler than earlier methods that involved first-order model checking and required both input matrices to be $d$-twin-ordered.
翻译:矩阵乘法是几乎所有计算领域(包括机器学习与优化、计算机图形学、信号处理以及图算法(静态与动态))的一项基础任务。孪宽是矩阵(及更一般结构)的一种自然复杂度度量,近年来作为一个具有重要算法应用价值的统一概念而兴起。虽然矩阵的孪宽在行与列重排下保持不变,但迄今为止其大多数算法应用均假设输入按特定规范序给出,该序能产生有界孪宽收缩序列。一般而言,高效寻找此类序列——即使对于近似孪宽值——仍是一个核心且难以解决的开问题。本文证明,一个孪宽为 $d$ 的二元 $n \times n$ 矩阵可在 $\widetilde{\mathcal{O}}_d(n^2)$ 时间内完成预处理,使得其与任意向量的乘积可在 $\widetilde{\mathcal{O}}_d(n)$ 时间内计算。值得注意的是,输入矩阵的孪宽无需已知,且不假设其行与列具有特定排列顺序。若规范序可用,即输入矩阵是 $d$-孪序的,则预处理与矩阵-向量乘积的运行时间可进一步降至 $\mathcal{O}(n^2+dn)$ 与 $\mathcal{O}(dn)$。因此,当两个 $n \times n$ 矩阵中至少一个由 0/1 元素构成且具有有界孪宽时,我们可在 $\widetilde{\mathcal{O}}(n^2)$ 时间内完成矩阵乘法。该结果还可推广至具有对抗性损坏的有界孪宽矩阵情形。我们的算法相较于早期涉及一阶模型检测且要求两个输入矩阵均为 $d$-孪序的方法,显著更快速且更简洁。