Matrix Product Quantization With Variance-Aware Cluster Reconstruction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional product quantization techniques for compressing embedding matrices in natural language processing fail to account for non-uniform token distributions, leading to suboptimal performance-to-compression ratios due to loss of information about individual elements within clusters.

Innovation Solution

A stochastic approach that stores centroid and variance information for each cluster, allowing for weighted K-means clustering based on the relative importance of elements, such as frequency or Euclidean norm, to preserve variance and importance during compression, and reconstructs clusters using a multivariate Gaussian distribution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If conventional product quantization is used to compress embedding matrices, then compression ratio is improved, but information about individual elements within clusters is lost

Engineering Contradiction:
Improvedata bitsVSAvoidinformation about individual elements
Core Design Contradiction:
Quantity of substanceVSLoss of information

Solution Approach 1:

The patent changes the parameters stored for each cluster from only centroid coordinates to include additional parameters such as variance or covariance information. This allows the compressed representation to capture more statistical properties of the original data distribution, thereby reducing information loss while maintaining compression benefits

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent creates a composite compressed representation that combines multiple types of information (centroid, variance, covariance, and potentially other statistical moments) into a unified cluster description. This composite approach preserves more information about individual elements while still achieving compression by representing many elements through a single cluster description

Inventive Principle:
Principle #40Composite materials

2Device complexity

If uniform product quantization is applied to all clusters, then device complexity is reduced, but performance-to-compression ratio deteriorates due to non-uniform token distribution

Engineering Contradiction:
Improvequantization processVSAvoidperformance-to-compression ratio
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent applies different quantization strategies or parameters to different clusters based on their local characteristics. For example, clusters containing frequently occurring tokens may use finer quantization, while less important clusters use coarser quantization. This local adaptation improves the performance-to-compression ratio by allocating resources according to actual data distribution needs

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent introduces dynamic or adaptive quantization parameters that can be adjusted based on the specific characteristics of each cluster or the overall data distribution. This allows the system to optimize the balance between compression ratio and reconstruction quality dynamically, rather than using fixed uniform parameters throughout

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11914670B2Methods and systems for product quantization-based compression of a matrix
Publication Date: 2024.02.27 HUAWEI TECH CO LTD
  • US11914670B2 patent drawing
  • US11914670B2 patent drawing
  • US11914670B2 patent drawing

AI summary

Methods and systems for compressing a matrix are described. The matrix, having a plurality of rows formed by a respective plurality of vectors, is partitioned into a plurality of submatrices, each submatrix containing sub-vectors from a respective group of one or more contiguous columns of the matrix. For each given submatrix, the sub-vectors are clustered into a plurality of clusters. For each given cluster, a centroid and a variance are computed and stored, based on the sub-vectors belonging to the given cluster. A mapping relating each vector to a respective cluster in each submatrix is stored. The stored centroids, stored variances and stored mapping form a set of compressed data for reconstruction of the matrix.