# High-Fold 3D Gaussian Splitting Model Pruning Method Assisted by Opacity
## 3 Methods
### Gaussian Quantity Compression
#### 3.1.2 Proportional Contribution Pruning with Learnable Masks  
Redundant Gaussians can be mainly classified into two categories: a. Noisy Gaussian points that negatively impact scene reconstruction; and b. Gaussian points with minimal opacity or scale, and have little effect on the scene reconstruction. Although the pruning strategy of the original 3 DGS model can control the number of Gaussian points to a certain extent, experiments have shown that this approach is incomplete, and the redundant Gaussian points still take up a large proportion of the model. If it can be achieved that only Gaussian points that are favorable for reconstruction are retained, the model storage space can be drastically reduced. Therefore, if a learnable mask can be trained to mask the redundant Gaussians, it will help the pruning greatly. Common masking efforts tend to be binary number masks, and directly training a binary mask results in a gradient of 0 almost everywhere, making it impossible to train via a gradient descent algorithm. However, there have been a large number of studies on the gradient of binary networks [40; 41; 42; 43] inspired by these approaches. We design a proportional contribution pruning with learnable masks to reduce the number of Gaussian points. This mask primarily serves to filter out redundant Gaussians, allowing for their removal at the end of the process. Quantizing the contribution of Gaussian points helps to retain the effective Gaussian points. To further reduce their number, we sort the quantization results and proportionally prune Gaussian points with lower contributions, achieving a reduction in the number of points while minimizing the impact on reconstruction quality. The flowchart of the combination of learnable mask and opacity update strategy is shown in the right figure of Figure 2. In the process of training iteration, opacity, and mask parameters are trained together, which has a coupling effect on Gaussian pruning. When quantizing the contribution of Gaussian points, the updated opacity participates in the calculation, so it also benefits from the opacity update strategy. Initially, the Gaussian mask is stored in each Gaussian point, along with all other Gaussian parameters, and is initialized to a tensor of zeros. During the training process, as densification and pruning occur, the Gaussian mask is copied when new Gaussian points are generated and removed when old points are pruned. Since binary masks cannot compute gradients during training, we employ a straight-through estimator, as suggested in previous work [20], to obtain gradients. The core idea behind the straight-through estimator is that while the model's output can be computed normally during forward propagation, the gradient can be computed in a customized manner during backpropagation in order to bypass certain non-differentiable operations. The learnable Gaussian mask formula is as follows:  
\[M_{n}=sg[1(m_{n}>\varphi)-m_{n}]+m_{n} \tag{7}\]  
\[\hat{s}_{n}=M_{n}s_{n},\;\hat{s}_{n}\Rightarrow s_{n} \tag{8}\]  
\[\hat{o}_{n}=M_{n}o_{n},\;\hat{o}_{n}\Rightarrow o_{n} \tag{9}\]  
where the subscript \(n\) represents the number of Gaussian points. \(M_{n}\) denotes the binary mask of the \(n\) Gaussian point and \(sg[\cdot]\) is the function used to stop calculating the gradient. The mask parameter within the Gaussian points, represented by \(m_{n}\), is processed through a sigmoid function and constrained to a range between 0 and 1. \(\varphi\) is the Gaussian mask threshold, which was empirically determined at 0.01 for Mip-NeRF360 and Tanks & Temples. The indicator function \(1(\cdot)\) is employed such that when \(m_{n}\) exceeds \(\varphi\), \(M_{n}\) is set to 1; otherwise, \(M_{n}\) is set to 0. Due to the presence of the \(sg[\cdot]\) function, the training process only computes the gradient of \(m_{n}\). The mask \(M_{n}\) is applied to the scale \(s_{n}\) and opacity \(o_{n}\), effectively preventing the masked Gaussian points from participating in the rendering computation while minimizing the amount of calculation.