Table of Contents
Fetching ...

Fast and simple multiplication of bounded twin-width matrices

László Kozma, Michal Opler

TL;DR

It is shown that a binary matrix of twin-width $n \times n$ 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.

Abstract

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.

Fast and simple multiplication of bounded twin-width matrices

TL;DR

It is shown that a binary matrix of twin-width can be preprocessed in time, so that its product with any vector can be computed in time.

Abstract

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 matrix of twin-width can be preprocessed in time, so that its product with any vector can be computed in 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 -twin-ordered, then the runtime of preprocessing and matrix-vector products can be further reduced to and . Consequently, we can multiply two matrices in 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 -twin-ordered.
Paper Structure (14 sections, 17 theorems, 5 equations, 1 figure)

This paper contains 14 sections, 17 theorems, 5 equations, 1 figure.

Key Result

Lemma 1.1

Let $M \in \{0,1\}^{n \times n}$ be a $d$-twin-ordered matrix. Then $M$ admits a rectangle-decomposition $\mathscr{R}$ with $|\mathscr{R}| \leq d(2n-2)+1 \in \mathcal{O}(dn)$.

Figures (1)

  • Figure 1: Computing matrix-vector product with rectangle-decomposition.

Theorems & Definitions (21)

  • Lemma 1.1: bonnet2024twin3
  • Lemma 1.1
  • Lemma 1.1
  • Theorem 1.2
  • Theorem 1.3
  • Lemma 1.4: BjorklundLingasGasieniecLingas
  • Theorem 1.5
  • Theorem 1.6
  • Lemma 1.6
  • Lemma 1.6
  • ...and 11 more