Sparse Matrix Multiplication Using Indexed Non-Zero Compression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing matrix multiplication methods, particularly for sparse matrices, suffer from low efficiency due to the involvement of a large number of zero elements, leading to inefficient use of computing resources and storage.

Innovation Solution

A sparse matrix operation method that involves compressing non-zero elements in sparse matrices in row and column directions, using index matrices to identify target elements for dot product operations, and performing operations only on these elements, thereby avoiding zero elements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional dense matrix multiplication is used for sparse matrices, then the computation is straightforward and easy to implement, but a large quantity of zero elements participate in the operation, resulting in low operation efficiency

Engineering Contradiction:
Improvematrix operation efficiencyVSAvoiddata structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The sparse matrix is segmented into two separate data structures: a data matrix containing only non-zero elements and an index matrix containing position information. This segmentation allows the computation to focus only on non-zero elements, eliminating wasted operations on zero elements and improving matrix operation efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Zero elements are extracted and removed from the computation entirely. The index matrix extracts and stores only the position information of non-zero elements, allowing the multiplication operation to skip over zero elements completely, thereby significantly improving operation efficiency.

Inventive Principle:
Principle #2Taking out (Extraction)

2Quantity of substance

If all elements including zero elements are stored in the matrix, then the matrix structure is simple and easy to access, but storage space is wasted due to the large quantity of zero elements

Engineering Contradiction:
Improvestorage space utilizationVSAvoiddata structure complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

Zero elements are extracted and removed from storage. Only non-zero elements are stored in the data matrix, and their positions are recorded in the index matrix. This extraction eliminates wasted storage space while maintaining efficient access through the index structure.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The single two-dimensional matrix structure is transformed into a combined structure of a data matrix and an index matrix. The index matrix adds a new dimension of position information, enabling efficient storage and access of sparse data without wasting space on zero elements.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Loss of time

If zero elements are included in the dot product operation, then the operation follows standard matrix multiplication rules, but the execution time increases due to unnecessary computations

Engineering Contradiction:
Improvecomputation timeVSAvoidoperation simplicity
Core Design Contradiction:
Loss of timeVSEase of operation

Solution Approach 1:

Zero elements are extracted and excluded from the dot product operation. The index matrices provide position information that allows the computation to directly access and multiply only non-zero elements, eliminating unnecessary computations and reducing execution time.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The positions of non-zero elements are preliminarily identified and stored in the index matrices before the multiplication operation. This preliminary action allows the dot product computation to directly access relevant elements without checking zero elements, significantly reducing computation time.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP4715635A1Sparse matrix operation method and apparatus, and computing device
Publication Date: 2026.03.25 HUAWEI TECH CO LTD
  • EP4715635A1 patent drawingFigure 1~2
  • EP4715635A1 patent drawingFigure 3
  • EP4715635A1 patent drawingFigure 4

AI summary

Embodiments disclosed in this application relate to the field of computing technologies, and in particular, to a sparse matrix operation method, a processor, and a computing device. The processor includes a sparse matrix processing unit and a sparse vector operation unit. The operation method performed by the processor includes: The sparse matrix processing unit obtains a first data matrix and a first index matrix that correspond to a first sparse matrix, and a second data matrix and a second index matrix that correspond to a second sparse matrix. The sparse vector operation unit determines, based on each row of elements in the first index matrix and each column of elements included in the second index matrix, target elements on which a dot product operation needs to be performed in each row of elements in the first data matrix and each column of elements in the second data matrix, and performs a dot product operation on the target elements, to obtain a first result matrix of performing a sparse multiplication operation on the first sparse matrix and the second sparse matrix. According to this application, a quantity of zero elements participating in sparse matrix multiplication can be reduced, and efficiency of performing sparse matrix multiplication can be improved.