Auto-Compressing Subset Pruning for Semantic Image Segmentation

Konstantin Ditschuneit, Johannes Otterbach

Abstract

State-of-the-art semantic segmentation models are characterized by high parameter counts and slow inference times, making them unsuitable for deployment in resource-constrained environments. To address this challenge, we propose Auto-Compressing Subset Pruning (ACoSP) as a new online compression method. The core of ACoSP consists of learning a channel selection mechanism for individual channels of each convolution in the segmentation model based on an effective temperature annealing schedule. We show a crucial interplay between providing a high-capacity model at the beginning of training and the compression pressure forcing the model to compress concepts into retained channels. We apply ACoSP to SegNet and PSPNet architectures and show its success when trained on the CamVid, Cityscapes, PASCAL VOC, and ADE20K datasets. The results are competitive with existing baselines for compression of segmentation models at low compression ratios and outperform them significantly at high compression ratios, yielding acceptable results even when removing more than 93% of the parameters. In addition, ACoSP is conceptually simple, easy to implement, and can readily be generalized to other data modalities, tasks, and architectures.

Introduction

Semantic segmentation—the task of assigning a category to every pixel in an image—is computationally intensive. Modern architectures like PSPNet often contain tens of millions of parameters, rendering them impractical for real-time deployment on "edge" devices such as autonomous vehicle sensors or mobile phones.

Traditional pruning techniques generally fall into two categories: unstructured pruning, which deletes individual weights but creates sparse matrices that are inefficient on standard hardware, and structured pruning, which removes entire channels. While structured pruning produces hardware-friendly "thin" models, it often causes a significant drop in accuracy due to the sudden removal of information. ACoSP addresses this by introducing an "online" structured pruning method that thins the model during the training process itself.

Methodology: Online Subset Selection

The core innovation of ACoSP is its learnable channel-selection mechanism combined with a temperature annealing schedule. Instead of post-training compression, ACoSP prunes the model while it learns.

ACoSP mechanism: Learnable gating weights are passed through a sigmoid function with a dynamic offset to select exactly K channels. Temperature annealing gradually transitions the selection from soft to hard.

The process involves three key components:

  1. Learnable Gating: Every convolutional channel is assigned a learnable weight that determines its scaling factor.
  2. Differentiable Selection: To allow for gradient-based learning, a Sigmoid function is used. A dynamic "offset" based on weight quantiles ensures that exactly $K$ channels are targeted for retention.
  3. Temperature Annealing: At the start of training, a high "temperature" allows for "soft" selection, enabling the model to utilize its full capacity. As training progresses, the temperature cools, forcing the selection into a hard binary state (100% "on" or "off"). This gradual transition allows the model to "migrate" critical information from channels slated for deletion into those that will remain.

Experimental Results

ACoSP was evaluated on major benchmarks including Cityscapes, PASCAL VOC 2012, and ADE20K using SegNet and PSPNet-50 architectures.

Performance comparison: ACoSP maintains higher mIoU than the CAP baseline as the compression ratio increases, particularly at 8x and 16x ratios.

The results demonstrate that ACoSP shines at high compression ratios where other methods typically fail. On the Cityscapes dataset, ACoSP successfully removed 93.6% of parameters from a PSPNet-50 while maintaining a usable mean Intersection-over-Union (mIoU) of approximately 60%. While competitive with state-of-the-art methods like CAP at low compression (e.g., 2x), ACoSP significantly outperforms them at 8x or 16x compression.

Qualitatively, the pruned models retain the ability to identify major objects like cars and pedestrians clearly. Performance degradation is primarily observed as reduced boundary precision or the loss of very thin, distant objects.

Discussion and Conclusion

A key insight from this work is the importance of initial model capacity. Allowing the model to identify important features early in training before "squeezing" them into a smaller space is vital for maintaining performance. Furthermore, control experiments revealed that the specific choice of filters is less critical than the gradual annealing process itself; given enough time to adapt, the model can learn to utilize whichever channels remain.

Future work could explore the application of ACoSP to modern Vision Transformers (ViTs) and the use of specialized loss functions to improve boundary precision at extreme compression levels. ACoSP offers a conceptually simple yet powerful framework for creating efficient, densely connected models ready for real-world deployment.

Summary updated

BibTeX
@inproceedings{ditschuneit2022auto,
  author = {Konstantin Ditschuneit and Johannes Otterbach},
  title = {{Auto-Compressing Subset Pruning for Semantic Image Segmentation}},
  booktitle = {Gcpr},
  year = {2022},
}
Figure