                                    Scaling Probabilistic Circuits via Monarch Matrices

B.2. Additional results for text8

          Hidden Size           Monarch-2               Monarch-3              HMM                  Monarch-4
                               FLOPs       BPC      FLOPs         BPC        FLOPs        BPC      FLOPs    BPC
          212 = 4096          524288      2.041     196608      2.135     16777216        1.908    131072   2.188
          213 = 8192         1572864      1.926     524288      2.013     67108864        1.786    327680   2.065
          214 = 16384        4194304      1.824    1310720      1.895    268435456        1.726    786432   1.948
          215 = 32768       12582912      1.747    3145728      1.814   1073741824        1.687   1835008   1.853
          216 = 65536       33554432      1.690    8388608      1.741
          217 = 131072     100663296      1.637
          218 = 262144     268435456      1.609
          219 = 524288     805306368      1.578

Table 6: We report FLOPs and test set BPC of HMM and variying Monarch structures (Monarch-2, Monarch-3, and
Monarch-4) for hidden size ranging from 212 to 219 on dataset text8.


B.3. Additional experimental setup for image modeling
We use hidden Chow-Liu trees (HCLT) (Liu & Van den Broeck, 2021) to define the variable decomposition (vtree) of the
PC. We train all models using stochastic EM. In particular, we use a cosine learning rate decay scheduler over the course of
the entire training. The mini-batch size M = 20000 and number of epochs E = 20 used in all experiments were chosen
based on an initial hyperparameter search in the range M ∈ [1000, 5000, 20000, 60000] and E ∈ [5, 10, 20].

Color Transforms The original ImageNet data has three color channels R, G, B, each taking integer values in [0, 255].
We apply a lossless YCoCg-R transform (Malvar & Sullivan, 2003) to this data to obtain three transformed color channels
Y, Co, Cg, given as follows in integer arithmetic:
                                                   Co = R − B
                                                  tmp = B + ⌊Co/2⌋
                                                   Cg = G − tmp
                                                    Y = tmp + ⌊Cg/2⌋
where Y and Cg take integer values in [0, 255] and Co takes integer values in [−255, 255]. This transform is exactly
invertible (lossless) and as such likelihoods on this transformed data are comparable to likelihoods on the RGB dataset.
To compare against prior PC results, we also report results using a lossy YCoCg transform defined as follows. Firstly, the
data is normalized to take values in the range [0, 1]:
                                          r = R/255; g = G/255; b = B/255
Then, the following linear transformation is applied:
                                                   co = r − b
                                                  tmp = b + co/2
                                                   cg = g − tmp
                                                    y = tmp ∗ 2 + cg + 1
The variables y, co, cg now take values in [−1, 1]. To convert back to categorical data, we quantize the interval [−1, 1]
uniformly into 256 bins and convert y, co, cg into their quantized versions Y, Co, Cg which take integer values in [0, 255].
This transformation from R, G, B to Y, Co, Cg is not invertible and so likelihoods on this dataset cannot be compared to the
original RGB dataset.

Image Patches We train PCs with 192 variables, modeling 8 × 8 aligned image patches (with 3 color channels). This data
is obtained by splitting each image from the the ImageNet32 (resp. ImageNet64) dataset into 16 (resp. 64) of these patches.

                                                             15
