Genetic-Based Lottery Ticket Pruning for Transformers in Sentiment Classification: Realized Through Lottery Sample Selection
In the growing field of Natural Language Processing (NLP), transformers have become excessively large, pushing the boundaries of both training and inference compute. Given the size and widespread use of these models, there is now a strong emphasis on improving both training and inference efficiency. We propose an approach to reduce the computational requirements of transformers. We specifically tested this approach using BERT for sentiment classification. In particular, we reduced the number of attention heads in the model using the lottery ticket hypothesis and an adapted search strategy from a genetic-based lottery ticket pruning algorithm. This search process removes any need for full-sized model training and additionally reduces the training data by up to 95% through lottery sample selection. We achieve leading results in lossless head pruning with a 70% reduction in heads, and up to a 90% reduction with only a 1% F1 loss allocated. The search process was efficiently performed using 5% of training samples under random selection and was further shown to work with just 0.5% of samples by selecting a diverse set of sample embeddings. Inference time was also improved by up to 47.2%. We plan to generalize this work to Large Language Models (LLMs) and language generation tasks to improve both their training and inference requirements.
Authors
- Ryan Bluteau (ORCID: https://orcid.org/0000-0001-9777-0711)
- Robin Gras (ORCID: https://orcid.org/0000-0002-0563-0250)
- Gabriel Peralta
Institutions
- University of Windsor (CA)
Publication Details
- Journal
- Algorithms
- Published
- 2025-12-17
- DOI
- https://doi.org/10.3390/a18120798
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00