IEEE Access (Jan 2024)

A Generalist Reinforcement Learning Agent for Compressing Multiple Convolutional Networks Using Singular Value Decomposition

  • Gabriel Gonzalez-Sahagun,
  • Santiago Enrique Conant-Pablos,
  • Jose Carlos Ortiz-Bayliss,
  • Jorge M. Cruz-Duarte

DOI
https://doi.org/10.1109/ACCESS.2024.3457863
Journal volume & issue
Vol. 12
pp. 136131 – 136147

Abstract

Read online

Deep learning models have gained popularity in the last decade for computer vision tasks. Although these models are widely used, they process data in cloud services due to requiring large amounts of memory unavailable on consumer devices. Multiple techniques have been proposed to reduce the memory needed for these models. Nonetheless, finding the best method to compress each model can be a time-consuming process as the parameters of these techniques significantly affect the results. We propose a methodology for training a reinforcement learning model that exploits similarities between models to select how to compress other models it has not seen before. By reusing the generalist agent and exploiting the similarities, searching for how to compress a new model can be avoided. The agent receives a set of feature maps and compresses a model by choosing the percentage of singular values to use in a low-rank factorization of the weights of each layer. We chose the feature maps by generating an embedding for all the images and selecting the most representative image of each class. Our agent trained to compress two models, the first trained using fashion MNIST, whereas the second, using Kuzushiji-MNIST, reduced a model trained on MNIST to 15% of its original size with minimal accuracy loss. Reusing the generalist agent permitted us to skip 4.6 days of searching for a solution for MNIST.

Keywords