PHYSICAL PDF PAGE 6 / 20

                       Outlier-Aware Post-Training Quantization for Discrete Graph Diffusion Models



ator Tα (·) for any matrix M ∈ Rm×n :                               Assumption 4.3 (α-Sparsity of Outliers). Let SW ∈ Rm×n

                                                (αn)               be an α-sparsity matrix representing the outliers. Specif-

                   [M] , if |[M]i,j | ≥ |[M]i,: |

                                                                   ically, we impose the condition α . O(1/(µr3/2 κ)) to

                         i,j                       (αm)

   [Tα (M)]i,j =              and |[M]i,j | ≥ |[M]:,j |,            ensure guaranteed recovery.

                   

                   

                     0,       otherwise,                            Remark 4.4. Our assumption aligns with the most com-

                                                         (10)       mon RPCA models, which address ill-conditioned low-rank

          (a)        (a)

where [·]i,: and [·]:,j denote the entry with a-th largest          compositions under a sparsity assumption. Notably, this

magnitude in the i-th row and j-th column, respectively. In         assumption is based on the observation that the number of

the (k + 1)-th optimization iteration, the sparse matrix SW         outliers in the weights is inherently limited, whereas their

is updated as:                                                      magnitude has a more significant impact on quantization.

               SW,k+1 = Tα (W − Lk R>

                                    k ).                (11)        Based on the rank-sparsity uncertainty principle, a ma-

                                                                    trix cannot simultaneously exhibit incoherence and spar-

After updating SW,k+1 , the gradients w.r.p Lk and Rk can

                                                                    sity (Chandrasekaran et al., 2011). The two assumptions

be exactly computed as:

                                                                    outlined above ensure the uniqueness of our weight decom-

         ∇Lk Lk = Lk R>

                                             

                          k + SW,k+1 − W Rk ,                       position solution. We now present our main theorem:

                                                     (12)

        ∇Rk Lk = Lk R>                                              Theorem 4.5 (Guaranteed Recovery). Let D?W be a rank-

                                             

                          k + SW,k+1 − W Lk .

                                                                    r matrix with µ-incoherence, and let S?W be an α-sparsity

However, the vanilla gradient descent optimization suffers

                                                                    matrix with α . O(1/(µr3/2 κ)). The iterative optimization

from the ill-conditioned matrix, and thus we incorporate the

                       −1             −1                          at step k satisfies

scaled terms R>  k Rk      and L> k Lk       to overcome the

impacts of outliers following (Tong et al., 2021). We update                |Lk R>    ?                    k     ?

                                                                                 k − DW |F ≤ 0.03(1 − 0.6η) σr (DW ),

the low-rank components:                       −1                      dist(Lk , Rk ; L? , R? ) ≤ 0.02(1 − 0.6η)k σr (D?W ),

      Lk+1 = Lk − ηk+1 ∇Lk Lk · R>      k Rk        ,

                                                 −1

                                                        (13)

      Rk+1 = Rk − ηk+1 ∇Rk Lk · L>                                  where the step size η ∈ [0.1, 2/3].

                                               

                                         k Lk       ,

where ηk+1 denote the step size at the (k + 1)-th iteration.        Proof. The proof is detailed in Appendix B.

                                                                    4.4. Quantization and Kernel Implementation

Initialization. We introduce an initialization of low-rank

components L0 and R0 as well as the sparse matrix SW,0              To efficiently handle matrix multiplication between activa-

for reducing the effects of outliers in the weight decompo-         tions and weights in the presence of outliers, two conditions

sition. We first assign the sparse matrix SW,0 = Tα (W) to          must be satisfied: (1) outliers should be computed with

remove the obvious outliers with largest magnitude. Then            high precision, and (2) the quantized matrices should be

                          1               1                         computed using the same bit-widths. With these consider-

we initialize L0 = U0 Σ02 , R0 = V0> Σ02 , where U0 Σ0 V0

                                                                    ations, we proceed as follows: (i) We first decompose the

is the best rank-r approximation of W − SW,0 .

                                                                    activations and weights using Eqn. (6) and (8). (ii) We then

                                                                    perform quantization on the dense components DX and

Theoretical Guarantee. We present the recovery guar-

                                                                    DW to the same bit-width, ensuring the removal of outliers.

antee of our proposed ill-conditioned low-rank weight de-

                                                                    For the multiplication involving activation outliers SX , we

composition method here. We start with the µ-incoherence

                                                                    decompose DW into a low-rank approximation LR> to

assumption of D?W following RPCA works (Candès et al.,

                                                                    maintain precision and efficiency. (iii) Finally, we compute

2011; Chen, 2015):

                                                                    the product of the sparse weight outliers SW with the raw

Assumption 4.2 (µ-incoherence). D?W ∈ Rm×n is a rank-r              activation X. This process is formulated as:

matrix with µ-incoherence, i.e.,

                    r                       r                          XW = (DX + SX )(DW + SW )                             (14)

                       µr                      µr

       kU? k2,∞ ≤          and kV? k2,∞ ≤                                    (i)

                                                                             = DX DW + SX DW + DX SW + SX SW

                       m                       n

                                                                             (ii)

for 1 ≤ µ ≤ max(m, n), where U? Σ? V?> is the compact                         ≈ D̂X D̂W + SX LR> + DX SW + SX SW

                                           1

SVD of D?W , and kMk2,∞ = maxi ( j M2i,j ) 2 .

                                P

                                                                             (iii)

                                                                              = D̂X D̂W + SX LR> + XSW .

                 m×r                n×r

                                                                                | {z } |       {z     }

Herein, U? ∈ R         and V? ∈ R         are composed of r                          low-bit   Sparse-Dense Multiplication

left and right singular vectors, respectively. Σ? ∈ Rr×r is

a diagonal matrix consisting of r singular values of D?W            Equidistributed and Adaptive Sparse-Dense Kernel.

organized in a non-increasing order, i.e., σ1 (D?W ) ≥ ... ≥        To optimize the computational efficiency of step (iii) in

σr (D?W ) > 0. And we define κ := σ1 (D?W )/σr (D?W ).              Eqn. (14), the sparse-dense matrix multiplication plays a



                                                                6

