Skip to main content
QUICK REVIEW

[Paper Review] SPIN: A Fast and Scalable Matrix Inversion Method in Apache Spark

Chandan Misra, Sourangshu Bhattacharya|arXiv (Cornell University)|Jan 15, 2018
Parallel Computing and Optimization TechniquesComputer Science4 citations
TL;DR

This paper proposes SPIN, a fast and scalable matrix inversion method in Apache Spark based on Strassen's algorithm, which reduces the number of matrix multiplications per recursion level from 12 (in LU-based methods) to 6. Experimental results show SPIN outperforms state-of-the-art LU decomposition methods across all matrix and block sizes, with strong theoretical-experimental alignment and near-ideal scalability.

ABSTRACT

The growth of big data in domains such as Earth Sciences, Social Networks, Physical Sciences, etc. has lead to an immense need for efficient and scalable linear algebra operations, e.g. Matrix inversion. Existing methods for efficient and distributed matrix inversion using big data platforms rely on LU decomposition based block-recursive algorithms. However, these algorithms are complex and require a lot of side calculations, e.g. matrix multiplication, at various levels of recursion. In this paper, we propose a different scheme based on Strassen's matrix inversion algorithm (mentioned in Strassen's original paper in 1969), which uses far fewer operations at each level of recursion. We implement the proposed algorithm, and through extensive experimentation, show that it is more efficient than the state of the art methods. Furthermore, we provide a detailed theoretical analysis of the proposed algorithm, and derive theoretical running times which match closely with the empirically observed wall clock running times, thus explaining the U-shaped behaviour w.r.t. block-sizes.

Motivation & Objective

  • To address the growing need for efficient, scalable matrix inversion in big data workloads across domains like Earth Sciences and Social Networks.
  • To overcome the high computational cost and complexity of existing LU decomposition-based distributed matrix inversion methods in Spark.
  • To implement and evaluate a novel matrix inversion approach based on Strassen’s original algorithm, which reduces recursive operations.
  • To provide a theoretical cost model that closely matches empirical wall clock times, explaining the U-shaped performance curve w.r.t. block size.
  • To demonstrate superior performance and scalability of the proposed method compared to state-of-the-art LU-based approaches.

Proposed method

  • The method employs Strassen’s matrix inversion algorithm, which uses a block-recursive structure with only six matrix multiplications per recursion level, unlike the 12 required in LU decomposition.
  • The algorithm is implemented in Apache Spark using resilient distributed datasets (RDDs), enabling fault-tolerant, in-memory distributed processing.
  • The approach avoids additional matrix multiplications at the leaf level of recursion, reducing computational overhead.
  • A theoretical cost model is derived based on the recurrence relation of Strassen’s algorithm, estimating wall clock time as a function of matrix size and block size.
  • The implementation uses a pipeline of Spark tasks to manage recursion, with optimized handling of matrix partitioning, multiplication, and combination steps.
  • The method includes a detailed analysis of execution time components (e.g., leaf node inversion, matrix multiplication, subtraction) to isolate performance bottlenecks.

Experimental results

Research questions

  • RQ1Does Strassen’s matrix inversion algorithm, when adapted to a distributed Spark environment, outperform existing LU decomposition-based methods in terms of wall clock time and scalability?
  • RQ2Why does the wall clock time of the proposed method exhibit a U-shaped curve with respect to block size, and can this behavior be theoretically explained?
  • RQ3To what extent does the theoretical cost model of SPIN match the empirically observed execution times across varying matrix and block sizes?
  • RQ4How does SPIN scale with increasing numbers of executors and matrix sizes compared to ideal scaling and existing methods?
  • RQ5Can the reduced number of matrix multiplications in Strassen’s method lead to measurable performance gains in distributed matrix inversion?

Key findings

  • SPIN outperforms LU decomposition-based methods across all tested matrix sizes (4096×4096, 8192×8192, 16384×16384) and block sizes, with the performance gap widening as matrix size increases.
  • The theoretical wall clock time model for SPIN closely matches empirical measurements, validating the accuracy of the cost analysis and explaining the U-shaped performance curve with respect to block size.
  • For a 4096×4096 matrix, SPIN reduced execution time by up to 47% compared to the LU-based baseline, with the leaf node cost dominating at small block sizes (e.g., b=2) and matrix multiplication cost dominating at larger block sizes (e.g., b=16).
  • SPIN demonstrated near-ideal scalability, with only minor deviations from ideal scaling across all matrix sizes when increasing the number of Spark executors.
  • The method reduced the number of required matrix multiplications per recursion level from 12 (in LU) to 6 (in SPIN), directly contributing to lower computational overhead and faster execution.
  • The analysis revealed that the U-shaped curve in execution time arises from the trade-off between leaf node inversion cost (decreasing with larger block size) and growing matrix multiplication cost (increasing with deeper recursion).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.