A Comparative Study on the Impact of Model Compression Techniques on Fairness in Language Models
Year: 2023

Abstract:
Compression techniques for deep learning have become increasingly popular, particularly in settings where latency and memory constraints are imposed. Several methods, such as pruning, distillation, and quantization, have been adopted for compressing models, each providing distinct advantages. However, existing literature demonstrates that compressing deep learning models could affect their fairness. Our analysis involves a comprehensive evaluation of pruned, distilled, and quantized language models, which we benchmark across a range of intrinsic and extrinsic metrics for measuring bias in text classification. We also investigate the impact of using multilingual models and evaluation measures. Our findings highlight the significance of considering both the pre-trained model and the chosen compression strategy in developing equitable language technologies. The results also indicate that compression strategies can have an adverse effect on fairness measures.

heading: 1 Introduction
text: Despite their increasing popularity, machine learning models have been known to exhibit biases in their outputs, present privacy risks, and have potentially negative environmental consequences from their training and deployment. (Bender et al., 2021; Talat et al., 2022). Language models suffer from biases that result in unequal resource distributions (allocational harms), in addition to the undesired tendency to reproduce biases and stereotypes in content that is reflective of hegemonic worldviews (representational harms). Although measures have been proposed in tasks such as text classification (Czarnowska et al., 2021) to investigate the disparate allocational treatment of different classes, much of the research on fairness in language models centers on addressing representational harms
*Equal contribution
(Blodgett et al., 2020). The potential of these models to further stigmatize marginalized communities is demonstrated in (Dressel and Farid, 2018), which illustrates how recidivism prediction systems are biased against black defendants, who have a higher baseline risk for repeat offences. Biases are also prevalent in computer vision applications such as facial recognition technologies. Within NLP, (Bolukbasi et al., 2016), one of the first forays that studied this phenomenon in language, noted that word embeddings contained stereotypical associations with respect to gender. Language models can exhibit biases toward different dialects for tasks like toxicity and hate speech detection (Garg et al., 2022; Sap et al., 2019), generate stereotypical representations and narratives (Lucy and Bamman, 2021), and are capable of the outright erasure of underrepresented identities (Dev et al., 2021). Compressed models that are biased may have detrimental consequences in the real world, as they are typically deployed on edge devices, which can further disadvantage communities without access to other forms of technology. Consequently, these issues have compelled a shift towards developing more inclusive systems.
Hooker et al. (2020) demonstrates how compression techniques, when applied to models that deal with tabular data, lead to the disparate treatment of less-represented classes. However, equivalent studies in NLP (Tal et al., 2022; Ahn et al., 2022; Silva et al., 2021) do not provide a conclusive observation as to whether compression methods are effective for reducing bias in NLP, and are centered mainly solely around model distillation being the compression technique of choice. This paper aims to resolve the following questions by benchmarking a wide range of metrics and datasets to study bias in text classification systems.
• How does model compression using pruning, quantization, or distillation impact bias in language models, and to what extent?
15762
• To what extent are these observations influenced by variables such as the utilization of different techniques within a specific compression method or a change in model architecture or size?
• How does multilinguality affect these observations in compressed models?

heading: 2 Related Work
text: Compression techniques such as pruning, distillation, and quantization have proven effective at reducing the size of models while maintaining their performance. Pruning can be done in two ways, via structured and unstructured pruning. While structured pruning involves removing groups of neurons, unstructured pruning removes individual neurons by zeroing out their values. Structured pruning methods generally achieve faster inference speeds, along with a reduction in parameter size. Knowledge distillation techniques are another alternative that have been demonstrated to effectively transfer knowledge from a teacher model to a smaller student model, using a loss function designed to minimize the distance between the features or the outputs of the student and teacher models. We also incorporate a third form of model compression - quantization, where model weights and/or activations are represented using lower-bit precisions. There are two main approaches to quantization: post-training quantization, which is applied to a pre-trained model, and quantization-aware training (Zafrir et al., 2019a), which incorporates quantization into the training process in order to mitigate the loss of accuracy that can occur with post-training quantization. Although several techniques for pruning and quantization have been developed, we acknowledge that our work consists only of models compressed using post-training dynamic quantization and the pruning method proposed in Zafrir et al. (2021).
Whilst there has been research at the confluence of fairness and efficiency in natural language processing (NLP), the results from these studies can be inconclusive, limited in their research design, and at times, contradict the results from previous analyses. Talat et al. (2022); Orgad and Belinkov (2022); Field et al. (2021); Blodgett et al. (2020) provide critical insights into the current state of fairness in NLP and delve into the details of what research studies must consider when conducting work in this area. The discussion thus far concerning fair-
ness, in general, has mainly been Anglo-centric, but recent forays (Kaneko et al., 2022; Huang et al., 2020b; Gonen et al., 2019; Zhao et al., 2020) have explored bias in multilingual spaces and languages beyond English.
In the context of model compression, Tal et al. (2022) show that while larger models produce fewer gendered errors, they produce a greater proportion of gendered errors in coreference resolution whilst Xu and Hu (2022) suggest that distillation and pruning have a regularizing effect that mitigates bias in text classification. On the other hand Silva et al. (2021); Ahn et al. (2022); Hessenthaler et al. (2022) all demonstrate how distillation can have an adverse impact on model fairness.
Hessenthaler et al. (2022) strongly casts doubt on the results from Xu and Hu (2022) by showing that knowledge distillation decreases model fairness. Additionally, the findings from Mohammadshahi et al. (2022) point toward the fact that pruning can amplify bias in multilingual machine translation models. It must also be noted that with the exception of Hessenthaler et al. (2022); Tal et al. (2022); Xu and Hu (2022); Mohammadshahi et al. (2022), many of these studies do not validate the fairness of these models over downstream tasks. This is essential as bias measurements over a model’s pretrained representations cannot be used as a proxy to assess bias in its downstream outputs (GoldfarbTarrant et al., 2021). Lauscher et al. (2021); Gupta et al. (2022) explore the efficient debiasing of models via the use of adapters and an adapted form of distillation, respectively.
To our knowledge, our work is the first comprehensive study on fairness in NLP with respect to pruning, distillation and quantization, in addition to which it addresses both monolingual and multilingual models.

heading: 3 Methodology and Setup

heading: 3.1 Pruning, Quantization, Distillation
text: Our pruning approach uses the Prune Once For All (Prune OFA) (Zafrir et al., 2021) method on the base models. The Prune OFA method is a state-ofthe-art pruning strategy that prunes models during the pre-training phase, eliminating the need for additional pruning on downstream tasks.
We employ dynamic quantization (Zafrir et al., 2019b) as a post-training quantization method for fairness evaluation. This approach converts model weights to INT8 format post-training and dynami-
cally quantizes activations during runtime based on the range of data. This method has the advantage of minimal hyperparameter tuning and additional flexibility in the model, which minimizes any potential performance loss.
For knowledge distillation, we consider models compressed using the techniques employed in (Sanh et al., 2019; Wang et al., 2020a), with the primary difference in these methods being the type of feature representations that the student is encouraged to mimic. We utilize pre-trained distilled models that are publicly available12 for all of our experiments. The complete list of models we considered for these experiments is in the appendix (Table 9).

heading: 3.2 Fairness Evaluation in Language Models
text: To examine bias in LMs, we rely on a combination of intrinsic and extrinsic measures. Intrinsic measures primarily evaluate bias in the pre-trained representations of language models, such as in the static and contextualized embedding spaces. On the other hand, extrinsic measures estimate bias in the outputs produced by the LLM in the downstream task it is fine-tuned for. Extrinsic evaluation measures are capable of identifying both allocational and representational harms, while intrinsic measures only address the latter. The inconsistencies and lack of correlation between these two kinds of metrics (Goldfarb-Tarrant et al., 2021; Cao et al., 2022) has led to calls for better evaluation practices that prioritize extrinsic evaluation. We have included detailed explanations of the metrics and datasets in the next section and provided a broad overview and additional details in the appendix in Table 11.

heading: 4 Intrinsic measures
text: StereoSet (Nadeem et al., 2021) is an English dataset used for analyzing’s a model’s proclivity for stereotypical and anti-stereotypical data across the axes of gender, race, religion, and profession. We consider only the intrasentence samples from StereoSet and evaluate the test set split. The ICAT (Idealized Context Association Test) score combines both the language model score (LMS) and the stereotype score (SS) such that it is maximized when the model is unbiased and simultaneously
1https://huggingface.co 2https://github.com/microsoft/unilm/tree/master/minilm
proficient at language modeling as shown in Equation 1.
ICAT = LMS ∗ min(SS, 100− SS) 50
(1)
Similar to StereoSet, CrowS-Pairs (Nangia et al., 2020) is a crowdsourced dataset that allows us to observe bias along the dimensions of gender, race, and religion. The distance between the stereotype and anti-stereotype pairs is kept to a minimum, and the metric involves the pseudo-log likelihood scoring mechanism from Salazar et al. (2020). However, both StereoSet and CrowS-Pair have been subject to critique for the inconsistencies in their datasets (Blodgett et al., 2021).

heading: 5 Extrinsic measures
text: For extrinsic measurement over downstream tasks, we have used multiple datasets with different fairness definitions (details in Table 11 in the appendix). The Jigsaw dataset is used to evaluate bias in toxicity detection systems across multiple demographic identities. We do this by assessing the difference in False Positive Rates (FPR) across subgroups to ensure that text from one group is not unfairly flagged as toxic. We report ROC-AUC as a metric on three specific subsets:
• Subgroup AUC : The test set is restricted to samples that mention the specific identity subgroup. A low value suggests that the model is ineffective at differentiating between toxic and non-toxic remarks that mention the identity.
• BPSN AUC (Background Positive, Subgroup Negative) : The test set is restricted to the non-toxic examples that mention the identity and the toxic examples that do not mention the identity. A low value suggests that the model predicts a higher toxicity score than it should for a non-toxic example mentioning the identity.
• BNSP AUC (Background Negative, Subgroup Positive) : The test set is restricted to the toxic examples that mention the identity and the non-toxic examples that do not mention the identity. A low value here indicates that the model predicts lower toxicity scores than it should for toxic examples mentioning the identity.
The other monolingual extrinsic measure includes the African American Vernacular English-Standard American English (AAVESAE) dataset (Groenwold et al., 2020a), which consists of intent-equivalent SAE and AAVE sentence pairs. Sap et al. (2019) has shown that AAVE language is more likely to be identified as hate speech compared to the standardized form of American English. A fair, unbiased model on this data would produce similar sentiment scores for both AAVE and SAE. We have also included the results for the Equity Evaluation Corpus (EEC), a templatebased dataset that evaluates the emotional intensity of sentiment classification systems over four categories of data- anger, fear, sadness, and joy, in the appendix (Section C.1).

heading: 5.1 Multilingual Datasets
text: To test if these observations are consistent with results across multilingual models, we use a binarized hate speech detection dataset, originally sourced from Huang et al. (2020a). It consists of online data accumulated from Twitter along with labels containing information pertinent to the user’s age, gender, country, and race/ethnicity, and the details regarding the distribution of data and labels across languages are provided in the Appendix in Table 17. The fairness evaluation objective for the hate speech detection task involves measuring the equality differences (ED) metric across each of the groups corresponding to the aforementioned demographic factors. The ED is defined as the difference between the true positive/negative and false positive/negative rates for each demographic factor. For instance, the ED for false positive rates (FPED) is defined below, where d is representative of each demographic group within a demographic factor D (for example, gender is a demographic factor, and male is a corresponding representative demographic group).
FPED = ∑
dϵD
∥FPRd − FPR∥ (2)
We also make use of reviews datasets sourced from Trustpilot, Yelp, and Amazon, with a rating (1-5) for each review (Hovy et al., 2015; Huang and Paul, 2019). The data includes user information, such as age, gender, and country (our analysis is constrained to gender). For this specific task, the dataset has been transformed into a binary sentiment analysis classification task, where reviews
with a rating above 3 are classified as positive, and those with a rating below 3 are classified as negative. Reviews with a rating of 3 are discarded. As with the hate speech dataset, the equality difference metric is used to evaluate group fairness over this task along a given dimension.

heading: 6 Analysis of Results

heading: 6.1 StereoSet
text: The findings of the StereoSet evaluation are presented in Table 1, wherein a higher ICAT score implies a lesser biased model 3. According to the results, the monolingual models’ distilled and pruned versions exhibit more bias than their original counterparts. However, this trend does not necessarily apply to the multilingual or quantized versions of these models (Table 13). There is also an indication that the extent of pruning is potentially proportional to the negative impact on fairness in these models for this metric. Additionally, the MiniLM models, which employ a different distillation technique than the one used for DistilBERT, show a significant decrease in the ICAT score. However, it is worth noting that they are relatively smaller (MiniLMv2 being approximately one-third the size of DistilBERT). Among the three techniques, quantization appears to be the rank the lowest in terms of bias according to the intrinsic StereoSet measure. That said, these results may not accurately predict the model’s performance in downstream tasks (Goldfarb-Tarrant et al., 2021). Based on the ICAT score measurement, the models distilled using MiniLMv2 exhibit the highest level of bias, while the quantized models demonstrate the best performance in this metric.
DistilBERT emerges as the least biased among the distilled models, while the quantized version of BERT-base shows the least bias among the quantized model sets. We highlight that while quantization results in a higher ICAT score for BERT, this is not the case for RoBERTa. Furthermore, although we have aggregated the scores for the dimensions of gender, race, and religion, these trends do not persist uniformly across individual dimensions. This observation is also reflected in our evaluation of the CrowS-Pair dataset.
3A green arrow indicates that the model is less biased in comparison to the parent model (in bold), while a red arrow indicates the opposite.

heading: 6.2 CrowS-Pair
text: In Table 2, the results for CrowS-Pair have been presented for gender, race, and religion, along with the deviation from the ideal baseline score of 50. According to this metric, a higher magnitude of deviation indicates more bias in the model. Our findings reveal inconsistent disparities in the scores across different compression methods and their base and large counterparts. For example, while the results suggest that DistilBERT is less biased than BERT-base in terms of gender and race, this does not hold true for religion. While this may also be in due part to the relatively smaller sample size of the data for each dimension (Meade et al., 2022), it would be essential to understand if a model demonstrating lower bias in one dimension generalizes to other dimensions or data that incorporates intersectional identities. However, it is important to acknowledge that intrinsic and extrinsic measures do not necessarily correlate with each other. Additionally, Aribandi et al. (2021) highlights the substantial variance in likelihoodbased and representation-based diagnostics during empirical evaluations, emphasizing the need for caution when interpreting findings from intrinsic measures.

heading: 6.3 Jigsaw
text: To evaluate the potential harm caused by these models, it is essential to assess bias in the context of downstream tasks. We fine-tuned the models on the Jigsaw dataset and examined how well they
performed on various forms of protected identity mentions. Table 3 presents the aggregated scores for all subgroups across the metrics discussed in Section 5.4
The overall trend suggests that compression methods can have a negative impact on fairness. Distilled models generally appear to demonstrate a higher level of bias compared to their pruned and quantized counterparts. In contrast to the findings from intrinsic measurements, quantization does lead to a decrease in performance in these models, and this drop is also observed in the multilingual models. However, the pruned and quantized models generally exhibit a lower magnitude of bias compared to the distilled models.
Among all the compressed models evaluated, the base form of DistilBERT exhibits the highest degree of bias. These findings may vary at different training stages, and they warrant further probing to see if training the models further to improve the performance of these compressed models could also significantly contribute to reducing bias.

heading: 6.4 AAVE-SAE
text: Given the proclivity of hate speech detection systems to flag AAVE language as hate speech (Sap et al., 2019; Groenwold et al., 2020b), we aimed to assess whether SST-2 fine-tuned models also tend to classify AAVE language as negative. The underlying fairness objective in this context is to evaluate the robustness of sentiment analysis models to data from diverse dialects. We make use
4Results for the pruned version of BERT-large excluded due to low performance on Jigsaw and AAVE-SAE.
of well-optimized, pre-trained models that were fine-tuned on the Stanford Sentiment Bank (SST2) dataset (Socher et al., 2013), and we fine-tuned the pruned pre-trained models over SST-2. Additionally, we applied quantization techniques to the existing models and compared the outcomes of dynamically quantized models with other compressed variations. We examined the change in predictions when considering the AAVE intentequivalent counterpart of the SAE language. We term the contradictory predictions of the classifier on AAVE-SAE sentence pairs as non-concurrent predictions, and our results are presented in Table 4.
A consistent pattern is observed where distilled models demonstrate a significantly higher degree of bias in this particular task than their base models. While the BERT-base pruned models also show a decline in performance, the 90% pruned version appears to be more robust than the 85% pruned version. Across all cases, except for the dynamically quantized form of RoBERTA-base, the quantized models show an increase in these non-concurrent predictions. Another interesting point of note is that several of these models seem to record positive to negative non-concurrent predictions when considering AAVE language instead of its SAE intent-equivalent counterpart.

heading: 7 Multilingual Datasets
text: To investigate whether the observed trends in a monolingual setting extend to a multilingual scenario, we conducted experiments using a separate set of models, with information about their size
provided in Table 10 in the appendix. For these experiments, we employed the same techniques of pruning, distillation, and quantization as used in the monolingual experiments.

heading: 7.1 Hate Speech Detection
text: The hate speech dataset evaluation results are presented in Table 5 and Table 7. In contrast to the trends observed in the monolingual evaluations conducted for English, the impact on fairness, as measured by the equality differences (ED) metric, is not as consistently evident among the compressed models in the multilingual setup. In the quantized and distilled models, the trends with respect to English remain consistently negative.
The training for all these models was constrained to 5 epochs, and the F1 and AUC scores for the base models are lower than their compressed counterparts. The compressed models demonstrate greater performance gains within the same training duration as compared to their base forms, and this observed improvement in performance could contribute to enhanced fairness outcomes as well.
Furthermore, it is worth considering that in previous monolingual tasks and even in the multilingual evaluation of Trustpilot reviews (Table 8), the compressed models were more likely to experience a drop in the ED metric. However, it is essential to highlight that the magnitude of this drop observed in the current results is considerably less pronounced. Additionally, the F1 and AUC performance of these models over these datasets is significantly higher.
Across nearly all the experiments conducted and languages documented in Tables 5, 7, and 8,
the MiniLM model distilled from XLM-R Large demonstrates higher levels of bias compared to the base model. These results also exhibit variations across languages and dimensions under consideration. A model may produce fairer outcomes for data in one language but not necessarily generalize to another language or dimension. Additionally, the trends observed in the ED values for pruning the multilingual BERT-base model are not consistently monotonic. We have included the results for the most significant decrease in magnitude across each dimension and language for these experiments in Table 6. Our benchmarking of these compressed models indicates that various elements in the experimental setup, such as the selection of techniques within a given compression method or the choice of pre-trained model architecture, are likely to have consequences in the measurements we observe.

heading: 7.2 Trustpilot Reviews Dataset
text: We also fine-tuned these models using a dataset comprising Trustpilot reviews from four different languages. The results for the equality difference (ED) for gender are presented in Table 8. Although the compressed models generally exhibit poorer performance in terms of their overall equality difference, the magnitude of the difference in ED between the compressed models and their base
forms is considerably smaller compared to the values observed in the previous task. However, it is worth noting that the results for the English reviews dataset (Table 12 in the appendix) contradict this pattern. In that case, the compressed versions of BERT demonstrate less bias, whereas the opposite is true for XLM-R Large.

heading: 8 How Does Model Compression Affect Fairness?

heading: 8.1 Distillation, Pruning and Quantization
text: The claim that distillation tends to amplify biases in models aligns with our findings in monolingual evaluation experiments. However, the impact on fairness metrics can vary, and this pattern does not necessarily hold true in multilingual settings, as evidenced by our evaluation of multilingual fairness datasets. Similar observations can be made regarding pruned models, although further investigation is warranted to understand how different pruning strategies and levels of pruning may influence these effects.
In contrast, our approach of post-training quantization has yielded more diverse outcomes. While its impact on fairness may be relatively less pronounced, it can sometimes lead to impractical models for downstream tasks due to their low perfor-
mance. Therefore, careful consideration is required when employing post-training quantization to strike a balance between fairness and task effectiveness.

heading: 8.2 Multilingual vs Monolingual Models
text: While monolingual evaluation generally negatively impacts fairness, the same cannot be said for multilingual evaluation, which varies across languages and dimensions. It would be valuable to investigate the underlying causes for the decrease in fairness during compression and explore its relationship with the multilingual and monolingual aspects of the model. It also remains to be seen whether welloptimized models for a specific task are more prone to demonstrating increased bias in their compressed versions, thereby possibly relying on unfair associations to make predictions.

heading: 8.3 Additional Considerations
text: There are still lingering questions regarding the influence of various elements, such as model size, architecture choices, different variants of compression techniques, and their impact on our evaluations. While our results seem to indicate otherwise for some of these parameters (such as size), it is essential to explore whether these observations translate across different tasks. As evinced by Tal et al. (2022), the size of a model does not necessarily correlate with reduced biases, a notion that
is further supported by our own findings. It would be worthwhile to extensively examine how these models are affected when different compression methods are combined or constrained to the same parameter count.

heading: 9 Conclusion
text: In this work, we conduct a comprehensive evaluation of fairness in compressed language models, covering multiple base models, compression techniques, and various fairness metrics. While prior studies have evaluated the fairness of compressed models, the results have not always been conclusive. In contrast, our extensive benchmarking provides evidence that challenges recent research suggesting that model compression can effectively reduce bias through regularization, and we demonstrate that this is the case for both multilingual and monolingual models across different datasets.
The compression of language models through distillation, quantization, and pruning is crucial for the practical use of language technologies in various real-world applications. While it is essential to preserve performance during compression, it is equally imperative that the compressed versions of language models maintain or even enhance fairness measures to avoid potential harm.

heading: 10 Ethics Statement
text: Our results indicate that compression does harm fairness, particularly in the monolingual setting. The potential harm that the system may cause and the application it will be used for should be considered when selecting a model compression technique, in addition to factors like accuracy, latency, and size. Although we have not observed absolute trends across models, datasets, and compression techniques, it is especially crucial to evaluate compressed models for fairness and accuracy before deployment and, on a broader note, to understand why compressed models might exhibit issues with respect to fairness.
In our paper, we conducted evaluations of multilingual language models using fairness metrics for various languages, including English. We observed varying trends regarding their performance on fairness metrics across different languages. However, it is vital to consider the potential influence of the lack of well-optimized models for these specific tasks, which may mitigate some of these issues. Additionally, evaluation datasets are scarce for assessing bias in languages other than English and for different fairness definitions. We also acknowledge that fairness trends identified in English evaluations may not necessarily be true for all languages.
While our benchmarking encompassed multiple intrinsic and extrinsic metrics, it is important to acknowledge their limitations in capturing all dimensions of fairness. Further research is needed to develop comprehensive extrinsic metrics across diverse tasks. Although our work has been centered around fairness in allocation-based (classification) applications, addressing fairness concerns in other types of language models, such as natural language generation models, is necessary. In generative tasks, the measurement of unfair outcomes would be distinct from the methods we have used. Another area of potential future work could involve benchmarking debiasing methods for compressed models and developing new compression-aware methods.

heading: Limitations
text: The primary motivation behind this paper was to provide a comprehensive benchmarking study that explores the impact of model compression techniques on bias in large language models. While our work is among the first efforts to address fairness in compressed language models across multiple com-
pression methods, including exploring multilingual settings, we are aware of the inherent limitations associated with our benchmarking study. Some of the limitations and potential directions for future work that builds on our study include the following:
• Our study primarily focused on benchmarking pre-trained models and evaluating their performance in the downstream text classification task. Expanding our investigation to encompass other tasks, particularly those involving generative models or large language models (LLMs), would be a valuable contribution to the research community. Examining the impact of model compression techniques on fairness in these domains would provide further insights and contribute to a more comprehensive understanding of bias in different types of language models.
• While our work includes a multilingual evaluation component, we acknowledge that there is room for further improvement and comprehensiveness in our benchmarking study, particularly with regard to quantization and pruning techniques. Apart from this, we did not provide a comparative analysis of monolingual and multilingual models using the same extrinsic data, which could provide valuable insights into the disparate impact of compression on the bias across languages. These are potential areas for future research that could contribute to a more thorough understanding of bias in compressed language models.
• Despite showing results for state-of-the-art pruning methods, further benchmarking is necessary to observe how bias varies across different pruning techniques. Similarly, whilst our method serves as a proxy to estimate bias trends in quantized models, a thorough quantization-specific study is needed.
• Different compression strategies yield varied benefits in terms of latency, memory, and so forth. Investigating the tradeoffs between these elements and fairness and accuracy would yield valuable insights for obtaining realistic estimations in real-world scenarios. Additionally, conducting case-study analyses would give practitioners in the field a deeper understanding of the potential harm these methods may introduce.

heading: A Appendix

heading: A.1 Methodology and Setup

heading: A.1.1 Pruning
text: We adopt the Prune Once For All or Prune OFA method (Zafrir et al., 2021) as our central pruning strategy. Prune OFA has demonstrated state-ofthe-art performance in terms of compression-toaccuracy ratio for BERT-based models, and it also eliminates the need to conduct task-specific pruning, as the sparse pre-trained language model can be directly fine-tuned on the target task. This simplifies our comparisons, as the same pruned model can be fine-tuned on different datasets.

heading: A.1.2 Distillation
text: We use the pre-trained distilled variants of base models such as BERT (Devlin et al., 2018), RoBERTa (Liu et al., 2019), and XLM-R (Conneau et al., 2019), namely DistilBERT (Sanh et al.,
2019), DistilRoBERTa, and multilingual MiniLM (Wang et al., 2020a), which are publicly available through the HuggingFace API (Wolf et al., 2020) for our experiments. DistilBERT selects one layer from each pair of alternate layers in the teacher architecture (BERT-base), lowering the number of layers in the distilled model by half. MiniLM is distilled from the final attention layer of the teacher model, thus making this knowledge distillation method task-independent. In addition to evaluating bias in these pre-trained models using intrinsic metrics, we fine-tuned some distilled models on the SAE-AAVE, Jigsaw, and Equity Evaluation Corpus (EEC) datasets for evaluation using extrinsic metrics.

heading: A.1.3 Quantization
text: Dynamic quantization is particularly effective when the time required to execute a model is dominated by loading weights from memory rather than computing matrix multiplications, as with transformer models. Therefore, we adopt dynamic quantization in all of our experiments. With this approach, model parameters are converted to INT-8 format post-training, and the scale factor for activations is dynamically determined based on the range of the data observed at runtime, which helps to maintain flexibility in the model and minimize any loss in performance. Additionally, dynamic quantization requires minimal hyperparameter tuning and is easy to deploy in production.

heading: A.2 Further Details on Pruning, Quantization and Distillation

heading: A.2.1 Pruning
text: Neural architecture pruning aims at eliminating redundant parts of neural networks while maintaining model performance. Unstructured pruning removes individual neurons by setting the value of these parameters to zero, whereas structured pruning removes groups of neurons such as layers, attention heads, and so forth. (Sanh et al., 2020) presents a form of unstructured weight pruning in which individual weights can be eliminated to create a sparse network. Although massive reductions in the parameter count are observed, the inference speeds show no such improvement. On the other hand, structured pruning methods (Wang et al., 2020b) achieve faster inference speeds along with a reduction in parameter size. (Lagunas et al., 2021) extend the work of movement pruning to the structured and semi-structured domains. Re-
cently, (Zafrir et al., 2021) showed that integrating pruning during the pre-training of language models gives high-performing sparse pre-trained models, thus removing the burden of pruning for a specific downstream task.

heading: A.2.2 Distillation
text: Knowledge distillation (KD) (Hinton et al., 2015) has been shown to effectively transfer knowledge from a teacher model to a smaller student model, with a loss function designed to minimize the distance between the features or the outputs of the student and teacher models. Numerous alterations can be made to the KD setup, such as choosing intermediate layers of the teacher model for initializing the student architecture (Sanh et al., 2019), distilling the final attention layer of the teacher transformer architecture (Wang et al., 2020a), introducing bottlenecks for distillation (Sun et al., 2020). However, biases in the teacher model could potentially propagate into the distilled models making it more biased compared to the original teacher model (Silva et al., 2021).

heading: A.2.3 Quantization
text: Quantization compresses models by representing model weights and/or activations with lower bit precisions. It can also make it possible to carry out inference using integer-only operations, as demonstrated by Kim et al. (2021). There are two main approaches to quantization: post-training quantization, which is applied to a pre-trained model, and quantization-aware training (Zafrir et al., 2019a), which incorporates quantization into the training process in order to mitigate the loss of accuracy that can occur with post-training quantization.

heading: B Additional Results
text: We have included the results and a brief description for certain monolingual and multilingual measures below. Our decision to include the Equity Evaluation Corpus (EEC) and Log Probability Bias Score (LPBS) metric measures in the appendix is motivated by the fact that both these metrics consist of template-based data lacking concrete fairness objectives, and are therefore not a reflection of harms that can be caused in real-world applications. Recent research (Alnegheimish et al., 2022) has effectively highlighted the sensitivity of templatebased evaluations to the selection and design of templates, which can bias the results. Furthermore, the LPBS is an intrinsic measure, and Aribandi et al. (2021) addresses the instability of likelihood and representation-based model diagnostic measures. Therefore, we advise readers to exercise caution when drawing conclusions from these results.

heading: B.1 Multilingual Datasets
text: The findings of our multilingual evaluation on the English reviews dataset, comprising reviews obtained from platforms such as Amazon and Yelp, have been presented in Table 12. Additionally, we have included the results of the evaluation of multilingual models on the English version of StereoSet in Table 13, as well as the evaluation of these models for the Crows-Pair dataset for English in Table 14. Ideally, we intended to study the performance of models on datasets with comparable fairness notions or objectives in both monolingual and multilingual contexts. Unfortunately, we encountered limitations in sourcing such datasets, and therefore, we leave this as an avenue for future research.

heading: C Fine-tuning Setup
text: For the extrinsic measures, the models are finetuned over a specific training dataset before the fairness evaluation is carried out over the test set. Most of our fine-tuning setups have been derived from previous work (Huang et al., 2020a; Huang, 2022; Câmara et al., 2022). The intrinsic measures do not require a hyperparameter search, as they are evaluated over pre-trained model representations. For the extrinsic measures, we relied on pre-trained SST-2 fine-tuned models available on HuggingFace. We performed fine-tuning solely for all the models trained on the Jigsaw Toxicity Classification dataset, the final details of which are as follows:
• Batch Size : 16
• Learning Rate : 1e-4
• Weight decay: 0.01
• Warmup Ratio: 0.06
• Epochs: 5
• Optimizer: AdamW

heading: C.1 Equity Evaluation Corpus
text: The Equity Evaluation Corpus (Kiritchenko and Mohammad, 2018) is a template-based corpus for evaluating sentiment analysis systems for emotional intensity across four categories (joy, sadness, anger and joy). In this particular task, we measure the Pearson Correlation Coefficient (PCC) of the predictions of these models against the gold label. the It must be noted that previous research (Alnegheimish et al., 2022) indicates that bias evaluation is sensitive to design choices in templatebased data, and that evaluating our models over natural sentence-based datasets would be a better alternative to gauge the impact these models can have. The fairness objective here looks to address the disparity in terms of the PCC across all the models across the different categories of template data. The results have been reported in Table 15.

heading: C.2 Log Probability Bias Score
text: The Log Probability Bias Score (LPBS) (Kurita et al., 2019) was proposed as a modification to the DisCo metric (Webster et al., 2020). LPBS operates similarly to WEAT, using template sentences (e.g., ‘[TGT] likes to [ATT]’) in which TGT represents a list of target words and ATT represents a list of attributes for which we aim to measure biased associations. The test also accounts for the prior probability of the target attribute, allowing us to evaluate bias solely based on the attributes without being influenced by the prior probability of the target token. The attribute categories that we have taken into consideration are a list of professions, positive words, and negative words (Bartl et al., 2020) (Kurita et al., 2019). The results have been reported in Table 16.

heading: Model Name Parameter # Jigsaw EEC AAVE-SAE StereoSet CrowS-Pair LPBS

heading: Metric Type of Metric Downstream Task Template-Based Fairness Objective Dimensions Monolingual
text: Jigsaw Toxicity Unintended Bias Extrinsic Toxicity Detection
No Increased likelihood of being classifying comment as toxic based on identity group mentions Multiple [Gender, Religion, Race/Ethnicity, Sexual Orientation, Disability, etc]
AAVE-SAE Extrinsic Sentiment Classification
No Increased likelihood of being classifying comment as negative based on dialect used Dialect
EEC Extrinsic Sentiment Classification
Yes Difference in emotion categories for emotional intensity prediction
Emotional Intensity
StereoSet Intrinsic N/A No Evaluation of model preference for stereotypical sentences
Gender, Race/Ethnicity, Religion, Profession
CrowS-Pair Intrinsic N/A No Evaluation of model preference for stereotypical sentences
Gender, Race/Ethnicity, Religion
LPBS Intrinsic N/A Yes Evaluation of model preference for stereotypical associations
Gender

heading: Multilingual
text: Hate Speech Extrinsic Hate Speech Detection
No Measuring performance across data based on the demographic groups they are sourced from Age, Gender, Country, Race/Ethnicity
Reviews Dataset Extrinsic Sentiment Classification
No Measuring performance across data based on the demographic groups they are sourced from Gender
Table 11: List of all the details pertaining to the fairness metrics used.

heading: Model F1-W Avg AUC-W Avg Total ED
text: ACL 2023 Responsible NLP Checklist

heading: A For every submission:

heading: 3 A1. Did you describe the limitations of your work?
text: Yes, in the final section of the paper.
7 A2. Did you discuss any potential risks of your work? No, as our work deals with pointing out the potential risks of certain strategies used to optimize for efficiency that could inadvertently cause models to make more biased decision. We have extensively discussed the limitations and other potential implications of our findings, however.

heading: 3 A3. Do the abstract and introduction summarize the paper’s main claims?
text: Yes, Section 1. Section 8 does this as well.

heading: 3 A4. Have you used AI writing assistants when working on this paper?
text: Yes, Grammarly, for ensuring that the content was grammatically correct and coherent.
B 7 Did you use or create scientific artifacts?

heading: Left blank.

heading: 3 B1. Did you cite the creators of artifacts you used?
text: Yes, we cited the relevant papers/authors that developed these datasets in whichever sections they were brought up.
7 B2. Did you discuss the license or terms for use and / or distribution of any artifacts? The datasets we used are open access and not proprietary.

heading: 3 B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided
text: that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? We use the datasets for their intended use i.e to evaluate models.
B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? Not applicable. Left blank.

heading: 3 B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and
text: linguistic phenomena, demographic groups represented, etc.? The details for the datasets are listed in tables in the Appendix.
7 B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. Left blank.
The Responsible NLP Checklist used at ACL 2023 is adopted from NAACL 2022, with the addition of a question on AI writing assistance.
C 3 Did you run computational experiments? Section 6 onwards
C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? No response.

heading: 3 C2. Did you discuss the experimental setup, including hyperparameter search and best-found
text: hyperparameter values? Yes, Section 4 onward. We utilized hyperparameters that have been used in previous related research and did not specifically perform a hyperparameter search to find the most optimized model, due to the computational expense required given the extent of our benchmarking. The point of this paper was to evaluate and benchmark fairness across a series of compression methods to provide a conclusive answer as to how compression may affect fairness, and to what extent.
7 C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? No, our experiments are based on fairness evaluation and do not require multiple reruns.

heading: 3 C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did
text: you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? We have referenced previous research that proposes evaluation metrics using which we have carried out these evaluations.
D 7 Did you use human annotators (e.g., crowdworkers) or research with human participants?

heading: Left blank.
text: D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? No response.
D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants’ demographic (e.g., country of residence)? No response.
D3. Did you discuss whether and how consent was obtained from people whose data you’re using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? No response.
D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? No response.
D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? No response.

heading: Future Work
text: Unfortunately, we encountered limitations in sourcing such datasets, and therefore, we leave this as an avenue for future research