PHYSICAL PDF PAGE 4 / 20

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



Remark 3.1 (DGDMs versus IDMs). In DGDMs, both the                     Activation (𝑿) and Weight (𝑾)                      Kurtosis (𝜿) of 𝑿 and 𝑾

                                                                        in one layer (Layer Index=3)                       across different layers

noise process and the recursive denoising process model                                                                        𝜅 ↑ heavier tails

                                                                       0.1% outliers         0.1% outliers                     𝜅 ↓ flatter shape

the node attributes and graph structures through discrete

sampling from categorical distributions. In contrast, IDMs









                                                                                                             𝑿 Kurtosis

                                                                       Count

rely on Gaussian noise and denoising processes, where each

step is represented as continuous values. This difference

renders many IDM-oriented quantization methods, such as                                                                                              …

                                                                                        𝑿                                          Layer Index

Gaussian noise correction (He et al., 2024b; Li et al., 2023),          0.5% outliers        0.5% outliers



difficult to apply to DGDMs.









                                                                                                             𝑾 Kurtosis

                                                                       Count

3.2. Quantization

Quantization is an effective approach to reduce model size

                                                                                                                                                     …

and accelerate computations. Given a tensor X, the quanti-                              𝑾                                          Layer Index

zation process is defined as:                                         Figure 2. The left panels illustrate the numerical distributions of

                        

                        X                                             activations and weights for the layer with index 3. On the right, the

            XQ = clamp(    + zX , 0, 2B − 1),              (4)        top and bottom panels show how removing the largest and smallest

                        sX

                                                                      0.1% and 0.5% of outliers significantly reduces the kurtosis of the

where XQ is the low-bit representations of X,                         numerical distributions. A lower kurtosis corresponds to a flatter

                                           j sX =  m

max(X)−min(X)                                                         distribution, which facilitates quantization.

    2B −1

              is the scaling factor, zX = − min(X)

                                              sX

is the zero point, and 2B − 1 denotes the maximum quan-               and weights in one layer of DGDMs, along with the top and

tized value with respect to the bit width b. The dequantized          bottom 0.1% and 0.5% quantiles marked as outliers. It is ev-

tensor is formulated as:                                              ident that these outliers substantially increase the magnitude.

                                                                      In the right of Fig. 2, kurtosis (κ) is employed  as a statistical

           X̂ = Q−1 (Q(X)) = sX · (XQ − zX ).              (5)                                                   n n (x −x̄)4

                                                                                                                   P

                                                                      measure, defined as κ ({xi }ni=1 ) =  Pn i=1 i 2 2  . A

                                                                                                                ( i=1 (xi −x̄) )

Due to the high computational costs of diffusion model train-         higher kurtosis value indicates heavier tails, while a lower

ing, we focus on post-training quantizing the parameters              kurtosis corresponds to a smoother distribution (Westfall,

of well-trained discrete graph diffusion models, i.e., θ in           2014). Removing a small number of the most significant

Eqn. (3), to reduce memory requirements and enhance the               outliers is shown to significantly reduce kurtosis, thereby

efficiency of graph generation, e.s.p.molecule synthesis (Wu          improving quantization precision.

et al., 2018) and protein folding (Ingraham et al., 2019).

                                                                      4.2. Sparse-Dense Activation Quantization

4. Bit-DGDM: Outlier-Aware PTQ for DGDM                               The analysis of DGDMs in Sec. 4.1 indicates a significant

In this section, we first discuss the impact of outliers in the       presence of outliers in the activations. Additionally, we

quantization of DGDMs in Sec. 4.1. Then we introduce                  observe that the volume of activations is substantially larger

the our post-training quantization framework Bit-DGDM                 than that of the weights (e.g., 105 versus 103 for a single

comprising sparse-dense activation quantization and ill-              layer, as shown in Fig. 2), highlighting the computational

conditioned low-rank weight decomposition, detailed in                intensity of DGDMs. Therefore, it is imperative to propose

Sec. 4.2 and Sec. 4.3, respectively. At last, we introduce            an efficient quantization method for activations that not

our kernel implementation for efficiently inference on the            only ensures quantization precision but also mitigates the

quantized DGDMs in Sec. 4.4. The overall architecture and             impact of outliers. With this in mind, we introduce a method

algorithm of our framework are shown in Fig. 3 and Alg. 1.            to filter out outliers and quantize the activations. We first

                                                                      perform a simple yet effective decomposition of activation

4.1. Outlier Analysis of DGDMs                                        X ∈ Rb×m into a sparse matrix SX containing the outliers

                                                                      and a remaining dense matrix DX :

The quantization process based on Eqn. (4) and (5) reveals

                                                                                             X = DX + SX .                        (6)

that the presence of outliers significantly amplifies the scale

factor by increasing the maximum value and decreasing the             DX can be effectively quantized into low-bit representa-

minimum value. Since adjacent ranges of the scale factor are          tion D̂X due to its significant reduced value ranges. The

quantized into neighboring integers, a larger scale factor im-        outliers contained in sparse SX are filtered from X via

plies that a wider range of floating-point numbers is mapped          SX = X[x > τmax |x < τmin ], where the thresholds τmax/min

to the same integer, leading to greater quantization errors           are selected based on the percentile of the value distribution.

and ultimately degrading quantization precision. In the left          Data-free Adaptive Threshold Selection. The selection

panels of Fig. 2, we visualize the distributions of activations       of thresholds τmax/min typically requires a substantial num-



                                                                  4

