Investigating Ensemble Methods for Model Robustness Improvement of Text Classifiers (2022)

Abstract: Large pre-trained language models have shown remarkable performance over the past few years. These models, however, sometimes learn superficial features from the dataset and cannot generalize to the distributions that are dissimilar to the training scenario. There have been several approaches proposed to reduce model’s reliance on these bias features which can improve model robustness in the out-of-distribution setting. However, existing methods usually use a fixed low-capacity model to deal with various bias features, which ignore the learnability of those features. In this paper, we analyze a set of existing bias features and demonstrate there is no single model that works best for all the cases. We further show that by choosing an appropriate bias model, we can obtain a better robustness result than baselines with a more sophisticated model design.

## introduction advances in pre-trained language models have shown great performance in natural language processing (nlp) benchmarks. however, these models often learn dataset-specific patterns and cannot generalize well to out-of-distribution data @xcite @xcite . these patterns are referred to as bias features, which have strong indications of instance labels but do not necessarily generalize to out-of-distribution data @xcite . for example, in mnli @xcite , the appearance of a negation word in an example has a strong correlation with label "contradiction" @xcite . a model leveraging such bias features can exhibit good performance on indomain data but will break when evaluated on an out-of-distribution test set where the correlation between the patterns and labels no longer holds. given prior knowledge of possible bias features in the dataset, several approaches have been proposed to reduce models' overreliance on the bias features @xcite @xcite . the underlying idea is to discourage the model to learn from "easy" examples that can be predicted correctly solely based on bias features. these works first train a bias model to capture bias patterns. they then train a main model and ensemble it with the bias model in a way that the predictions of the main model are adjusted by not leveraging the strategy captured by the bias model. product-of-experts @xcite and self-distillation approaches have been widely adopted for the ensemble @xcite @xcite @xcite . although these methods improve model robustness on some benchmark datasets, none of them study how to choose the bias model and only assume that a weak classifier (e.g., logistic regression) can explicitly capture the bias patterns. we argue that it is very important to choose the appropriate bias model. on one hand, different bias features may not be captured by one model with a fixed model size (capacity). for example, in mnli, a model capturing the "negation word occurrence" does not necessarily capture the token overlap pattern at the same time. on the other hand, we do not expect an over-capacity bias model as it may capture non-bias features which will also be factored out during the ensemble, thus worsening the overall model performance. to do this, we train bias models with different capacities leveraging the product-of-experts method and compare with current state-of-the-art methods. we empirically show the different learnability of the bias patterns requires models with diverse capacities to better capture them. for example, a bert-mini model can learn a token-overlap style bias pattern better in the mnli dataset compared with the logistic regression used by existing literature. in this work, we conduct a deep analysis of the existing literature on ensemble-based methods for model robustness improvement where most of them follow the hypothesis of adopting one simple model to learn bias patterns. instead, we study different bias models and demonstrate their ability to capture the bias patterns varies. we propose an approach to selecting the "best" bias model by splitting the development set into "easy" and "challenge" subsets. by utilizing the best bias models for different bias features, we show that we can make the models more robust compared to existing baselines, on both natural language inference and fact-verification tasks. ## bias model selection to understand to what extent our models can conquer the biases, for each bias, we create a bias training dataset only consisting of examples with this bias feature to reduce the impact of other biases. to evaluate model's ability to overcome the bias, we create a corresponding challenge test set which is composed of examples with that specific bias feature and not following the distribution in the training set. examples of such sets are in sec. 3.3. to obtain the best bias model for each bias feature, we first train various bias models with different capacities on the bias training set and ensemble them with the main model. we then evaluate the main model on the corresponding challenge set and choose the one exhibiting the best robustness result. our model pipeline is shown in figure 1 . in this work, following @xcite , we leverage product-of-experts (poe), a commonly used method for model robustness improvement, as an example to illustrate our argument. 1 given a dataset @xmath0, y i )} @xmath1,n] , where ## experiment in this section, we use two tasks (in english) to study the effects of different bias models. we analyze the best bias model for various bias features. ## related work recent nlp models show great performance when evaluating on the in-distribution test set. however, such results might not hold when the test set is outof-distribution. for example, @xcite discover that a fact verification model may make a prediction by looking at the occurrence of certain phrases in the input example. similar scenarios have been observed in other applications such as in visual question answering @xcite , and paraphrase identification @xcite . several ensemble-based methods have shown improvement in model robustness when dealing with dataset biases @xcite @xcite . such methods usually contain two components for the ensemble and focus on different ensemble strategies. in contrast, we analyze the components for the ensemble. our work fills in the gap of a deeper understanding of the bias patterns in the dataset and provide a pipeline to choose the best component for the ensemble so that we can improve model robustness. ## discussion how to improve the model robustness has been an important research topic, and several approaches have been proposed for such a goal, ranging from dataset augmentation @xcite to model architecture design @xcite . although several ensemble-based methods have shown great improvement, they treat all the dataset artifacts exactly the same way. in this work, we revisit such methods, and demonstrate that, not all the dataset artifacts are the same and they require different capacity models to deal with. contrary to the common beliefs in the existing literature that a smaller-capacity model captures the bias features, our paper is the first that investigates the effect of the bias model size and shows that better robustness needs to be achieved by bias models with different capacities. we also show that by better leveraging the information learned from the dataset artifacts, a simple ensemble method can achieve a better or the same level of model robustness.