Abstract
Deploying Convolutional Neural Networks (CNNs) on resource-constrained hardware requires balancing accuracy, computational cost, and model size. This paper proposes a multi-objective pruning framework using a Genetic Algorithm (GA) to automate this trade-off. By employing a scalarized fitness function, the approach allows users to prioritize specific metrics like FLOPs or sparsity. Results on the LeNet/MNIST benchmark demonstrate significant parameter reduction (up to ~95%) and speedups with minimal accuracy loss.
Introduction
Real-world vision applications often face diverse hardware constraints. While mobile applications might prioritize storage (sparsity), real-time systems often require low latency (reduced FLOPs). Traditional pruning methods frequently focus on a single metric, which may not translate to actual hardware acceleration. This work frames network pruning as a multi-objective optimization problem, providing a flexible framework to tailor compressed models to specific needs.
Methodology
The proposed framework utilizes a two-step pruning process driven by a Genetic Algorithm.
Genetic Encoding and Fitness Function
A pre-trained CNN's weights are encoded as a genome. The optimization is guided by a scalarized fitness function: $$f = \min(\lambda_1 e + \lambda_2 c + \lambda_3(1 - s))$$ where $e$ is the error rate, $c$ is the remaining computation (FLOPs), and $s$ is the sparsity. The coefficients $\lambda_1, \lambda_2, \lambda_3$ are user-defined weights that determine the optimization priority.
Evolutionary Strategy
The GA employs selection, microbial crossover, and mutation. In microbial crossover, a "winner" genome has a chance to overwrite genes in a "loser" genome, preserving elite traits. Periodically, the best-performing "elite" genome is retrained to recover accuracy, and the population is reinitialized around this model.
Pruning Granularity
To ensure hardware-friendly acceleration, the authors apply different pruning granularities across layers:
- Coarse-grained pruning: Filter and channel-wise pruning for Convolutional (CONV) layers.
- Fine-grained pruning: Connection-wise pruning for Fully Connected (FC) layers.
Experimental Results
The method was evaluated using the LeNet architecture on the MNIST dataset. The flexibility of the fitness function allows for various optimization profiles by adjusting the $\lambda$ coefficients:
- Balanced Optimization ($\lambda_1=0.3, \lambda_2=0.4, \lambda_3=0.3$): Reduced computation to 6.22% and achieved 94.30% sparsity with only a 0.13% accuracy drop.
- Storage Optimization ($\lambda_3=0.5$): Achieved 95.42% sparsity with a 0.09% accuracy drop.
- Speed Optimization ($\lambda_2=0.5$): Reduced computation to 6.10% of the original, outperforming several baseline methods in FLOP reduction.
Discussion and Key Insights
A critical insight from this research is that high sparsity does not always equate to high speed. By enforcing coarse-grained pruning on CONV layers, the GA ensures that sparsity translates into actual FLOP reduction. Furthermore, the microbial crossover mechanism protects elite pruning strategies from being lost during evolution, ensuring that the best-performing models propagate through generations.
Conclusion and Future Work
This GA-based approach provides a robust and customizable framework for CNN compression. While currently demonstrated on the MNIST/LeNet benchmark, future work will focus on scaling this method to modern, deeper architectures like ResNet on larger datasets such as ImageNet. The computational overhead of tuning GA hyperparameters also remains an area for further optimization.
Summary updated