Work

Genetic Algorithm for Pruning Transformers

Year: 2024
Type: dissertation
Abstract: This thesis introduces a genetic algorithm based pruning approach for Transformer neural networks.Large Transformer neural networks, consisting of billions of parameters, have achieved state-of-the-art results in many machine learning tasks, especially in the domain of natural language processing.The size of these models and of deep learning models in general, sets high computational demands for inference which can form a significant hurdle for wider adoption.Pruning provides a way of reducing the parameter count of the model, making the model more sparse and inference less demanding.The goal of this thesis is to explore a genetic algorithm based method for pruning and determine whether it is a viable method for pruning Transformers.The genetic algorithm based pruning framework consists of a genetic algorithm, which searches for optimal parameters to remove from a neural network optimized for a specific learning task.Mask variables are constructed for each parameter matrix of the model which are then flattened to form a binary chromosome.A population of such chromosomes is developed by the genetic algorithm to find an optimal chromosome, which is then transformed back to mask variables.The removal of parameters by the genetic algorithm and further training of the model are iterated until a specified level of sparsity is reached.An experimental case study on BERT, a Transformer-based language model, is presented to test the approach for two widely used text classification benchmark datasets.The proposed approach achieved a significant sparsity level with a small decrease in accuracy, outperforming a baseline pruning method by a large margin.The results are comparable to state-of-the-art pruning methods for Transformers.Despite the promising results, more thorough and diverse computational experiments are required to assess the performance of the approach completely.
Language: English
Open Access status: green
OpenAlex ID: W7132979768
Cites: 52
Cited by: 1
Related to: 10