Image Complexity Guided Network Compression for Biomedical Image Segmentation

Suraj Mishra, Danny Z. Chen, X. Sharon Hu

TL;DR

This paper introduces a pre-training network compression framework for biomedical image segmentation that uses the inherent visual complexity of the training data to guide layer-wise pruning. By mapping dataset complexity to a network's predictable "degree of degradation," the method analytically determines the optimal compressed architecture for a given memory or accuracy constraint, eliminating the need for time-consuming trial-and-error training cycles.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) are the gold standard for biomedical image segmentation, but their massive size often makes them unsuitable for resource-constrained edge devices (e.g., handheld medical scanners, field equipment).

Traditionally, compressing these networks involves post-training pruning or uniform channel reduction, which requires tedious, iterative train-and-validate cycles to find an acceptable trade-off between model size and accuracy. Furthermore, applying a uniform compression multiplier across all layers is suboptimal because different layers extract features of varying complexity. The authors tackle this by asking: Can we look at the complexity of the biomedical images themselves to predict exactly how much we can shrink each layer of a CNN before training even begins?

Methods

The authors propose a pre-training compression framework driven by mathematical modeling rather than empirical guessing:

  1. Image Complexity Calculation: Instead of training a CNN to see how hard a dataset is, the authors use lightweight proxies. After evaluating several metrics (signal energy, edge info, visual clutter), they found that the JPEG compression ratio (specifically, the inverse of the ratio at 25% quality) and Foreground Density best correlate with a network's accuracy drop. They combine these into a single metric called 'JB'.
  2. Layer-wise Complexity: To mimic how CNNs pool and downsample feature maps, the authors calculate the JB complexity on progressively subsampled versions of the input images. This provides a target complexity for each depth stage of the network.
  3. Degree of Degradation: The authors observed that for a specific architecture (like U-Net), the drop in accuracy scales linearly with the log of the number of trainable weights. They parameterize this relationship using a slope ($\lambda$) and intercept ($\delta$).
  4. Constraint Solving: Using the dataset's layer-wise complexity and the network's $\lambda$ and $\delta$, the authors formulate a system of equations. Given a user constraint—either a strict memory budget or a minimum acceptable accuracy—the system analytically solves for the optimal non-uniform channel multipliers ($\alpha$) for every single layer. The resulting custom-shrunk network is then trained from scratch.

Datasets

The framework was evaluated on five diverse biomedical imaging datasets:

  • DRIVE: Retinal blood vessel segmentation (fundus images).
  • CHASE_DB1: Retinal blood vessel segmentation (fundus images).
  • ISIC 2017 Melanoma: Skin lesion segmentation (RGB images).
  • Lymph Node: Lymph node segmentation (ultrasound images).
  • Wing Disc: Fruit fly organ development (grayscale images).

Key Insights and Ideas

  • JPEG as a Proxy for CNN Capacity: It turns out that standard JPEG compression is an excellent indicator of how much "learnable" information is in an image. Images that compress well in JPEG also allow for highly compressed CNNs.
  • Early Layers are Fragile: The layer-wise complexity calculations mathematically proved what many practitioners observe empirically: early CNN layers (which process high-resolution, complex input) are highly sensitive to pruning. Deeper layers process lower-complexity, subsampled representations and can be pruned much more aggressively without hurting the final F1 score.
  • Predictable Degradation: The realization that a network's accuracy drop follows a predictable linear trend relative to the log of its parameter count is powerful. It shifts network compression from a heuristic search problem to an algebraic one.
  • Biomedical Images are "Stable": This approach works exceptionally well for medical imaging because the images are highly standardized (same modality, fixed object types, consistent framing), meaning a few training samples accurately represent the complexity of the entire dataset.

Key Results

  • Massive Weight Reduction: The framework generated compressed networks that retained $\approx 95\%$ of the full-sized network's accuracy while utilizing an average of 32x fewer trainable weights.
  • Complexity Dictates Compression: On simpler datasets (Wing disc), the method achieved a staggering ~247x weight reduction. On highly complex datasets (CHASE_DB1), it achieved a more modest ~4x reduction, proving the compression dynamically scales to the task's difficulty.
  • Layer-wise > Uniform: Non-uniform, layer-wise pruning consistently outperformed uniform pruning. For example, given a strict 1MB memory budget on the Lymph node dataset using U-Net, the layer-wise compressed model achieved an F1 score of 0.8165, compared to 0.7739 for the uniformly compressed model.
  • High Prediction Accuracy: The F1 scores predicted by the mathematical model closely matched the actual F1 scores achieved after training the compressed networks, validating the framework's reliability.

Limitations and Future Work

  • The Initialization Bottleneck: The primary limitation is that finding the "degree of degradation" ($\lambda$ and $\delta$) for a new network architecture requires a one-time upfront cost of training the network at a few different uniform compression levels to establish the trendline.
  • Future Work / Mitigation: The authors acknowledge this bottleneck but demonstrate that it can be heavily minimized. They showed that $\lambda$ and $\delta$ can be accurately approximated (with only a 2.4% error margin) by running just three compression levels on two datasets, making the one-time setup highly manageable.

Summary updated

BibTeX
@article{mishra2022image,
  author = {Suraj Mishra and Danny Z. Chen and X. Sharon Hu},
  title = {{Image Complexity Guided Network Compression for Biomedical Image Segmentation}},
  journal = {ACM J. Emerg. Technol. Comput. Syst.},
  year = {2022},
  doi = {10.1145/3471190},
}
Figure