Sparse Matrix Multiplication Using Bitmap-Based Compression
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Standard matrix multiplication techniques are inefficient when dealing with sparse matrices due to the large number of zero-value operands, leading to significant processor cycles and power consumption, especially in applications like convolutional neural networks (CNNs) executing on CPUs.
Innovation Solution
The system generates bitmaps for each matrix to identify non-zero elements, compresses the matrices based on these bitmaps, and then multiplies the compressed matrices using a computer-based method, reducing unnecessary multiplications by only multiplying non-zero elements, thereby reducing processor load and power consumption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If standard matrix multiplication techniques are used on sparse matrices, then the computation is simple and straightforward, but the processing efficiency deteriorates due to the large number of zero-value operands
Solution Approach 1:
The patent segments the matrix multiplication process into multiple stages: (1) generating bitmaps to identify non-zero elements, (2) compressing matrices based on bitmap information, (3) performing multiplication only on compressed non-zero elements, and (4) expanding the result back to full matrix form. This segmentation allows the system to avoid multiplying by zero while maintaining correctness, thereby resolving the contradiction between processing efficiency and system complexity.
Solution Approach 2:
The patent applies preliminary action by generating bitmaps and compressing matrices before performing the multiplication operation. The bitmap generation and matrix compression steps are executed in advance to identify and isolate non-zero elements, so that the actual multiplication only processes relevant data. This preliminary preparation eliminates wasted computations on zero-value operands, significantly improving processing efficiency for sparse matrices.
2Use of energy by moving object
If standard matrix multiplication techniques are used on sparse matrices, then the implementation is straightforward, but the power consumption increases due to unnecessary multiplications by zero
Solution Approach 1:
The patent extracts and separates the non-zero elements from the sparse matrices using bitmap-based compression. By taking out only the relevant non-zero elements and their positions, the system performs multiplication exclusively on these extracted elements, eliminating all power-consuming operations that would multiply by zero. This extraction approach directly reduces power consumption while the added complexity is confined to the bitmap generation and compression stages.
3Productivity
If matrix compression is applied based on bitmaps, then the number of multiply operations is reduced, but the preprocessing complexity increases
Solution Approach 1:
The patent introduces bitmaps as an intermediary data structure that mediates between the original sparse matrices and the compression process. The bitmaps serve as a compact representation of non-zero element positions, enabling the system to quickly identify which elements require multiplication without examining every element. This intermediary approach reduces the number of multiply operations while the preprocessing complexity is managed through efficient bitmap generation and adjustment algorithms.
Data Source
AI summary
The present disclosure advantageously provides a system method for efficiently multiplying matrices with elements that have a value of 0. A bitmap is generated for each matrix. Each bitmap includes a bit position for each matrix element. The value of each bit is set to 0 when the value of the corresponding matrix element is 0, and to 1 when the value of the corresponding matrix element is not 0. Each matrix is compressed into a compressed matrix, which will have fewer elements with a value of 0 than the original matrix. Each bitmap is then adjusted based on the corresponding compressed matrix. The compressed matrices are then multiplied to generate an output matrix. For each element i,j in the output matrix, a dot product of the ith row of the first compressed matrix and the jth column of the second compressed matrix is calculated based on the bitmaps.


