Learning a Non-Redundant Collection of Classifiers

1 INTRODUCTION . The Empirical Risk Minimization ( ERM ) principle ( Vapnik , 2013 ) , which underpins many machine learning models , is built on the assumption that training and testing samples are drawn i.i.d . from some hypothetical distribution . It has been demonstrated that certain violations of this assumption ( in conjunction with potential misalignments between the formulation of the learning objectives and the underlying task of interest ) lead to models that exploit spurious or brittle correlations in the training data . Examples include learning to exploit image backgrounds instead of objects in the foreground due to data biases ( such as using grassy backgrounds to predict the presence of cows ( Beery et al. , 2018 ) ) , using textural as opposed to shape information to classify objects ( Geirhos et al. , 2018 ) , and using signals not robust to small adversarial perturbations ( Ilyas et al. , 2019 ) . Implicit in work that attempts to address these phenomena is the assumption that more robust predictive signals are indeed present in the training data , even if for various reasons current models do not have the tendency to leverage them . In this work , drawing inspiration from Quality-Diversity algorithms ( Pugh et al. , 2016 ) – which seek to construct a collection of high-performing , diverse solutions to a task – we aim to learn a collection of models , each incentivized to find a distinct , high-performing solution to a given supervised learning problem from a fixed training set . Informally , our motivation is that a sufficiently large collection of such distinct models would exploit robust signals present in the training data in addition to the brittle signals that current models tend to exploit . Thus , given the representations computed by such a collection , it may be possible to rapidly adapt to test-time shifts in distribution that destroy the predictive power of brittle features . Addressing this problem hinges on defining and enforcing an appropriate measure of model diversity . To this end , we make the following contributions : • We propose and motivate a novel measure of model diversity based on conditional total correlation ( across models ) of final layer representations given the label . Informally , this incentivizes models to each learn a non-redundant ( in an information-theoretic sense ) way to solve the given task . • We estimate this measure using a proxy variational estimator computed using samples from the conditional joint and marginal distributions of final layer representations across models . We train a collection of models to be accordingly diverse , alternating between training a variational critic to maximize the variational estimator and minimizing a weighted sum of the classification losses across models and the variational estimator . • We empirically validate this framework by training on datasets with synthetically injected spurious correlations . We demonstrate that our framework is able to learn a collection of representations which , under a linear fine-tuning protocol , are competitive with baselines in being able to rapidly adapt to a shift in distribution which destroys the spurious correlations . We show that our framework performs favourably relative to baselines in being able to isolate distinct predictive signals in different models in the collection , as a result being able to make accurate test-time predictions without fine-tuning . We also compare our approach to the Invariant Risk Minimization ( Arjovsky et al. , 2019 ) framework which leverages information from multiple training environments to identify signals robust to variations across environments . We show that our approach is able to exploit the robust signals without requiring the metadata needed by IRM to discriminate between spurious and robust signals . 2 TOTAL CORRELATION . Total correlation ( Watanabe , 1960 ) is a multivariate extension of mutual information . The total correlation for n random variables X1 , ... , Xn is given by ( where KL denotes the Kullback-Leibler divergence ) : TC ( X1 , ... , Xn ) : = KL [ p ( X1 , ... , Xn ) ‖ n∏ i=1 p ( Xi ) ] ( 1 ) For n = 2 this is equivalent to mutual information . We can interpret this as a measure of the amount of redundancy across the Xi ’ s . A total correlation of zero corresponds to the Xi ’ s being mutually independent . Given a classification problem predicting label Y from X , we consider the conditional total correlation of a collection of vector-valued representations h1 ( X ) , ... , hn ( X ) given Y for differentiable functions hi , defined as : TC ( h1 ( X ) , ... , hn ( X ) |Y ) : = EY [ KL [ p ( h1 ( X ) , ... , hn ( X ) |Y ) ‖ n∏ i=1 p ( hi ( X ) |Y ) ] ] ( 2 ) where X is drawn from the conditional distribution given Y . 3 METHOD . Consider a collection of differentiable representation function and linear classifier pairs { ( hi , ci ) } i∈ { 1 , ... , n } where we denote the vector of parameters of all these functions as θ ∈ Rm , such that for a classification problem predicting Y from X , we compute logits ci ◦ hi ( X ) . That is , the hi computes a vector-valued representation of the input X , and ci transforms this into a scalar classification prediction . We target the following optimization problem : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] subject to TC ( h1 ( X ) , ... , hn ( X ) |Y ) < ( 3 ) for some > 0 , where l is some loss function . That is , we seek to minimize the risk for each model while keeping the conditional total correlation of final layer representations given the label below some threshold . We justify the choice of conditional total correlation in place of the unconditional version by appealing to the following argument : if we consider the case where the collection consists of just two models , total correlation is equivalent to mutual information . Minimizing mutual information between the two representations is equivalent to enforcing independence . However , it is not possible for the representations to be independent while requiring that both are sufficient to accurately predict the label . On the other hand , provided that the representations are not dependent due to some common cause , they will be conditionally independent given the label . Thus , minimizing the conditional total correlation should provide a more useful learning signal . In practice , we attempt to solve the following unconstrained problem in place of ( 3 ) : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βTC ( h1 ( X ) , ... , hn ( X ) |Y ) ( 4 ) where β > 0 is a hyperparameter and we estimate the risk using the empirical risk ( i.e . sample mean ) . 3.1 TOTAL CORRELATION ESTIMATION . In initial experiments with the two-model case ( i.e . where total correlation is equivalent to mutual information ) , the InfoNCE objective of Oord et al . ( 2018 ) , shown to compute a lower bound of the mutual information ( Poole et al. , 2019 ) , proved effective in computing useful gradient estimates for the latter term in ( 4 ) . Consequently , we choose to construct a proxy estimator for the total correlation based on InfoNCE . The InfoNCE objective for random variables U and V is given by : INCE : = 1 K K∑ i=1 log ef ( ui , vi ) 1 K ∑K j=1 e f ( ui , vj ) ( 5 ) where ( ui , vi ) are sampled from the joint distribution of U and V , K is the batch size , and f is a differentiable , scalar-valued function , commonly referred to as a ‘ critic ’ ( Poole et al. , 2019 ) . The parameters of f are optimized to maximize INCE . By analogy , our proposed estimator T̂C ( X1 , ... , XN ) is given by : T̂C ( X1 , ... , XN ) : = 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ( 6 ) where ( xi1 , ... , xin ) are sampled from the joint distribution of X1 , ... , Xn , K is the batch size , πk , j ∼ Uniform ( { 1 , ... K } ) is a random index of the batch dimension , M is a hyperparameter , and f is a critic . The permuted πk , j indices are intended to yield ( xπ1 , j1 , ... , xπn , jn ) samples drawn approximately from the marginals , derived from the observations in the batch . Similarly we optimize the parameters of f to maximize T̂C ( X1 , ... , XN ) . We interpret ( 6 ) as a ratio of scores between samples from the joint distribution of the Xi ’ s and samples approximately drawn from the marginals , such that a solution to the variational objective resulting in a large ratio corresponds to being able to easily discriminate between samples from the joint and marginals ( i.e . a proxy for large total correlation ) and conversely when the ratio is small . We compute the conditional case as follows : T̂C ( X1 , ... , XN |Y ) : = EY [ 1 K K∑ i=1 log ef ( xi1 , ... , xin ) 1 M ∑M j=1 e f ( xπ1 , j1 , ... , xπn , jn ) ] ( 7 ) where ( xi1 , ... , xin ) are sampled from the conditional joint distribution of X1 , ... , Xn given Y . We perform the conditioning step by splitting a batch by label , separately computing the estimator for each group , and finally computing a weighted average . The weights are estimated using the frequencies of each label in the batch . 3.2 MINIMAX TRAINING OBJECTIVE . We replace the latter term in ( 4 ) with our variational estimator to obtain : min θ n∑ i=1 EX , Y [ l ( ci ◦ hi ( X ) , Y ) ] + βmax φ T̂C ( h1 ( X ) , ... , hn ( X ) |Y ) ( 8 ) where φ are the parameters of the variational critic f , and β > 0 is a hyperparameter . In practice , we use gradient-based methods to approximately optimize ( 8 ) by alternating between optimizing φ to maximize the variational estimator ( giving us a local total correlation estimate ) , and optimizing θ to minimize the sum of all terms ( for fixed φ ) . 4 EXPERIMENTS . The main hypothesis that we wish to test is that our method yields a collection of models that exploit and isolate distinct predictive signals in the training data . Our strategy for testing this hypothesis is to consider a training distribution with synthetically injected spurious correlations as well as a test distribution in which the spurious correlation has been destroyed . We then measure our collection of models ’ s ability to rapidly adapt to the new distribution given small amounts of data , relative to a number of baselines . The spurious correlations are constructed such that they are easier to exploit than the robust signals . The central challenge in testing our main hypothesis is in constructing a reliable method for measuring the extent to which distinct predictive signals have been extracted and isolated in the outputs of trained models . Our evaluation protocol which requires access to a small amount of data from a shifted distribution to construct a model selection strategy emerges from a lack of alternatives . It precludes the use of various real-world benchmarks known or hypothesized to exhibit a variety of predictive signals , spurious or otherwise : we simply do not currently have access to appropriate test sets . Looking to the related problem of domain generalization for alternate evaluation protocols / model selection strategies , we find approaches either similarly based on oracle test sets or using held-out training domains ( Gulrajani & Lopez-Paz , 2020 ) . Here , we deliberately consider a problem setting which does not assume access to training data from multiple distinct but related domains , so we can not use model selection strategies based on the latter . Indeed , the underlying motivation for the problem setting we consider is that perhaps we can get away with very little additional information in order to isolate distinct predictive signals in a training set . A central priority for future work is to explore the possibility of model selection strategies that do not require access to data from a shifted evaluation distribution . In this paper , we focus on empirical evaluation of our approach relative to baselines under our proposed fast adaptation evaluation protocols . We consider variations on the Colored MNIST ( C-MNIST ) task of Arjovsky et al . ( 2019 ) . This task consists of classifying MNIST digits into one of two classes ( 0-4 or 5-9 ) . However , the true label is flipped with probability 0.25 and an additional binary signal ( colour ) is constructed from this corrupted label such that it is more strongly correlated with the corrupted label than the digit . As demonstrated in Arjovsky et al . ( 2019 ) , a model trained with ERM will overwhelmingly tend to exploit the colour information . In Arjovsky et al . ( 2019 ) , the goal was to demonstrate an ability to learn to exploit the digit information given the task of identifying a stable signal across environments with varying colour-label correlation . To test our framework , we assume no such access to multiple environments , and collapse the two training environments in the C-MNIST benchmark task of Arjovsky et al . ( 2019 ) into one training set.1 The results for this task are collected in Table 1 . We also consider a modified dataset which introduces an obstacle to extracting mutually exclusive representations of digit and colour . Specifically , we use functions of a new binary ‘ common cause ’ variable to both rotate the digits and perturb the colour signal , such that minimizing total correlation will depend on an ability to discard the common information . This is to test our framework ’ s ability to still extract the predictive signals in the presence of such an obstacle to minimizing conditional total correlation . We refer to this dataset as Rotated Colored MNIST ( RC-MNIST ) . The results for this task are collected in Table 2 . We consider a third variation in which more than two predictive signals are present in the training data . Specifically , we construct another binary ‘ colour ’ signal from the corrupted label and add it to the input such that new signal can be exploited on the training set for a maximal accuracy of 0.75 . We refer to this dataset as Two-Colored MNIST ( TC-MNIST ) . The results for this task are collected in Table 3 . We similarly construct the same three benchmarks using the Fashion-MNIST dataset ( Xiao et al. , 2017 ) . We consider the following baselines : • Single ERM classifier • Single ERM classifier with DeCov ( Cogswell et al. , 2015 ) regularization . We use this to penalize large non-diagonal entries of the covariance matrix of the output of the representation function • Single ERM classifier with Mutual Angles ( MA ) ( Xie et al. , 2015 ) regularization . We use this to penalize the mean angle between weight vectors corresponding to the output units of the representation function , minus the variance of the angles • Single ERM classifier with a Uniform Eigenvalue Regularizer ( UER ) ( Xie et al. , 2017 ) . We use this to encourage the weight matrix computing the output of the representation function to have uniform eigenvalues • Ensemble of ERM classifiers • Collection of ERM classifiers trained to maximize pairwise cosine distances between final layer representations ( for a given input ) , adapted from Yu et al . ( 2011 ) 1The two environments are constructed such that the colour signal is computed by flipping the corrupted label with probability 0.1 and 0.2 respectively . Thus , collapsing the two environments into one means that we can at best achieve an accuracy of 0.85 on the training set by exploiting the colour signal , versus the maximal accuracy of 0.75 by exploiting the digit . We also include results for the following methods for reference ( these methods require access to information that the baselines do not require ) : • Importance-weighted ERM , with optimal weights ( requires knowledge of the test distribution ; optimal importance weights derived in Appendix B ) • IRM ( needs access to additional environment metadata ) Implementation details can be found in Appendix A .

Summary: This paper proposes an approach of training an ensemble of DNN classifiers while also minimizing the total correlation (TC) between the last layers (learned feature representations) of the classifiers to increase robustness to spurious correlations.  To compute gradients for this new TC regularization term, they use the InfoNCE objective as a proxy, and minimize this, and then use alternating minimization to learn the parameters. The authors then test this on a variation of the Colored MNIST task, showing gains over baseline approaches.