Table of Contents
Fetching ...

A Heuristic for Direct Product Graph Decomposition

Luca Calderoni, Luciano Margara, Moreno Marzolla

TL;DR

The paper tackles the problem of decomposing a directed unweighted graph into a direct product $G = G_1 \otimes G_2$, a task known to be hard in general. It introduces a gradient-descent local-search heuristic that searches for a node permutation $P$ making the adjacency matrix $A$ closely approximable as a Kronecker product $B \otimes C$ with binary $B$ and $C$, using the metric $\phi(A)$ to quantify the fit. The approach combines multiple subroutines (kronGrouping, outsiders, onionSearch) and two scoring metrics (var, frob) to navigate local minima and promote a Kronecker structure, with extensive experimental validation in MATLAB showing factoring of matrices up to $300 \times 300$ in seconds on average. This work provides a practical tool for analyzing complex networks and lays groundwork for extending to weighted and approximate Kronecker decompositions, broadening applicability in network science and related fields.

Abstract

In this paper we describe a heuristic for decomposing a directed graph into factors according to the direct product (also known as Kronecker, cardinal or tensor product). Given a directed, unweighted graph~$G$ with adjacency matrix Adj($G$), our heuristic searches for a pair of graphs~$G_1$ and~$G_2$ such that $G = G_1 \otimes G_2$, where $G_1 \otimes G_2$ is the direct product of~$G_1$ and~$G_2$. For undirected, connected graphs it has been shown that graph decomposition is "at least as difficult" as graph isomorphism; therefore, polynomial-time algorithms for decomposing a general directed graph into factors are unlikely to exist. Although graph factorization is a problem that has been extensively investigated, the heuristic proposed in this paper represents -- to the best of our knowledge -- the first computational approach for general directed, unweighted graphs. We have implemented our algorithm using the MATLAB environment; we report on a set of experiments that show that the proposed heuristic solves reasonably-sized instances in a few seconds on general-purpose hardware.

A Heuristic for Direct Product Graph Decomposition

TL;DR

The paper tackles the problem of decomposing a directed unweighted graph into a direct product , a task known to be hard in general. It introduces a gradient-descent local-search heuristic that searches for a node permutation making the adjacency matrix closely approximable as a Kronecker product with binary and , using the metric to quantify the fit. The approach combines multiple subroutines (kronGrouping, outsiders, onionSearch) and two scoring metrics (var, frob) to navigate local minima and promote a Kronecker structure, with extensive experimental validation in MATLAB showing factoring of matrices up to in seconds on average. This work provides a practical tool for analyzing complex networks and lays groundwork for extending to weighted and approximate Kronecker decompositions, broadening applicability in network science and related fields.

Abstract

In this paper we describe a heuristic for decomposing a directed graph into factors according to the direct product (also known as Kronecker, cardinal or tensor product). Given a directed, unweighted graph~ with adjacency matrix Adj(), our heuristic searches for a pair of graphs~ and~ such that , where is the direct product of~ and~. For undirected, connected graphs it has been shown that graph decomposition is "at least as difficult" as graph isomorphism; therefore, polynomial-time algorithms for decomposing a general directed graph into factors are unlikely to exist. Although graph factorization is a problem that has been extensively investigated, the heuristic proposed in this paper represents -- to the best of our knowledge -- the first computational approach for general directed, unweighted graphs. We have implemented our algorithm using the MATLAB environment; we report on a set of experiments that show that the proposed heuristic solves reasonably-sized instances in a few seconds on general-purpose hardware.

Paper Structure

This paper contains 8 sections, 1 theorem, 9 equations, 7 figures, 2 tables, 5 algorithms.

Key Result

Lemma 3

Given two directed, unweighted graphs $G_1$ and $G_2$, then where $\mathbf{P}$ is a suitable permutation matrix.

Figures (7)

  • Figure 1: Direct product $G = G_1 \mathop{\mathrm{\times}}\nolimits G_2$
  • Figure 2: kronGrouping procedure. (a) and (b): The current pivot (yellow) is compared with each other row and column of the matrix. (c) The $\mathit{dimC} - 1$ rows and columns that are most similar to the pivot (green) are selected as pivot neighbours in the current permutation.
  • Figure 3: outsiders procedure.. The procedure detects those blocks that should gain or lose 1s. In (a) blocks that are going to acquire 1s are highlighted. In (b) we show the best swap is among rows/columns $2$ and $24$. The main loop will use this swap as first, resulting in an improvement with respect to the current metric. As such, the swap is effectively performed (c). The function outsiders is called again at the next iteration and it selects $(15,16)$ as best swap (e). The swap is then applied; the matrix is now divided in blocks (f).
  • Figure 4: OnionSearch procedure, part 1.. The binary block matrix EF (a) is permuted to maximize the dot product performed against the weight matrix W (b). When the local search reaches $75\%$ of the optimum, the block matrix is deemed to be sufficiently rearranged in a top-left fashion and the procedure terminates (c). As evident from (b), weights are set up to push the maximum number of filled blocks in those layers of the onion that are processed first.
  • Figure 5: OnionSearch procedure, part 2.. An example of the onionSearch procedure. The block matrix is factorized layer-by-layer. The first layer, composed by a single block $\mathbf{B}_{11}$, is implicitly factorized as $\mathbf{B}_{11} = \mathbf{I}_1 \mathop{\mathrm{\otimes}}\nolimits \mathbf{B}_{11}$ (a). It is thus used as template during the local search performed on the $2 \times 2$ blocks submatrix, composed of four blocks (b). As rows and columns swaps may only range in the second layer, the sole feasible solution is the one that permutes each block in accordance to the one serving as template. The procedure steps forward through the third (c), fourth (d) and fifth layer (e). As the local search on the last layer succeeds, the problem is globally solved. The solved factors are shown in (f).
  • ...and 2 more figures

Theorems & Definitions (2)

  • Lemma 3: CALDERONI202172
  • Definition 4