Evaluating representations by the complexity of learning low-loss predictors

1 INTRODUCTION . One of the first steps in building a machine learning system is selecting a representation of data . Whereas classical machine learning pipelines often begin with feature engineering , the advent of deep learning has led many to argue for pure end-to-end learning where the deep network constructs the features ( LeCun et al. , 2015 ) . However , huge strides in unsupervised learning ( Hénaff et al. , 2019 ; Chen et al. , 2020 ; He et al. , 2019 ; van den Oord et al. , 2018 ; Bachman et al. , 2019 ; Devlin et al. , 2019 ; Liu et al. , 2019 ; Raffel et al. , 2019 ; Brown et al. , 2020 ) have led to a reversal of this trend in the past two years , with common wisdom now recommending that the design of most systems start from a pretrained representation . With this boom in representation learning techniques , practitioners and representation researchers alike have the question : Which representation is best for my task ? This question exists as the middle step of the representation learning pipeline . The first step is representation learning , which consists of training a representation function on a training set using an objective which may be supervised or unsupervised . The second step , which this paper considers , is representation evaluation . In this step , one uses a measure of representation quality and a labeled evaluation dataset to see how well the representation performs . The final step is deployment , in which the practitioner or researcher puts the learned representation to use . Deployment could involve using the representation on a stream of user-provided data to solve a variety of end tasks ( LeCun , 2015 ) , or simply releasing the trained weights of the representation function for general use . In the same way that BERT ( Devlin et al. , 2019 ) representations have been applied to a whole host of problems , the task or amount of data available in deployment might differ from the evaluation phase . We take the position that the best representation is the one which allows for the most efficient learning of a predictor to solve the task . We will measure efficiency in terms of either number of samples or information about the optimal predictor contained in the samples . This position is motivated by practical concerns ; the more labels that are needed to solve a task in the deployment phase , the more expensive to use and the less widely applicable a representation will be . We build on a substantial and growing body of literature that attempts to answer the question of which representation is best . Simple , traditional means of evaluating representations , such as the validation accuracy of linear probes ( Ettinger et al. , 2016 ; Shi et al. , 2016 ; Alain & Bengio , 2016 ) , have been widely criticized ( Hénaff et al. , 2019 ; Resnick et al. , 2019 ) . Instead , researchers have taken up a variety of alternatives such as the validation accuracy ( VA ) of nonlinear probes ( Conneau et al. , 2018 ; Hénaff et al. , 2019 ) , mutual information ( MI ) between representations and labels ( Bachman et al. , 2019 ; Pimentel et al. , 2020 ) , and minimum description length ( MDL ) of the labels conditioned on the representations ( Blier & Ollivier , 2018 ; Yogatama et al. , 2019 ; Voita & Titov , 2020 ) . We find that these methods all have clear limitations . As can be seen in Figure 1 , VA and MDL are liable to choose different representations for the same task when given evaluation datasets of different sizes . Instead we want an evaluation measure which depends on the data distribution , not a particular dataset or dataset size . Furthermore , VA and MDL lack a predefined notion of success in solving a task . In combination with small evaluation datasets , these measures may lead to premature evaluation by producing a judgement even when there is not enough data to solve the task or meaningfully distinguish one representation from another . Meanwhile , MI measures the lowest loss achievable by any predictor irrespective of the complexity of learning it . We note that while these methods do not correspond to our notion of best representation , they may be correct for different notions of “ best ” . To eliminate these issues , we propose two measures . In both of our measures , the user must specify a tolerance ε so that a population loss of less than ε qualifies as solving the task . The first measure is the surplus description length ( SDL ) which modifies the MDL to measure the complexity of learning an ε-loss predictor rather than the complexity of the labels in the evaluation dataset . The second is the ε-sample complexity ( εSC ) which measures the sample complexity of learning an ε-loss predictor . To facilitate our analysis , we also propose a framework called the loss-data framework , illustrated in Figure 1 , that plots the validation loss against the evaluation dataset size ( Talmor et al. , 2019 ; Yogatama et al. , 2019 ; Voita & Titov , 2020 ) . This framework simplifies comparisons between measures . Prior work measures integrals ( MDL ) and slices ( VA and MI ) along the data-axis . Our work proposes instead measuring integrals ( SDL ) and slices ( εSC ) along the loss-axis . This illustrates how prior work makes tacit choices about the function to learn based on the choice of dataset size . Our work instead makes an explicit , interpretable choice of threshold ε and measures the complexity of solving the task to ε error . We experimentally investigate the behavior of these methods , illustrating the sensitivity of VA and MDL , and the robustness of SDL and εSC , to dataset size . Efficient implementation . To enable reproducible and efficient representation evaluation for representation researchers , we have developed a highly optimized open source Python package ( see supplementary materials ) . This package enables construction of loss-data curves with arbitrary representations and datasets and is library-agnostic , supporting representations and learning algorithms implemented in any Python ML library . By leveraging the JAX library ( Bradbury et al. , 2018 ) to parallelize the training of probes on a single accelerator , our package constructs loss-data curves in around two minutes on one GPU . 2 THE LOSS-DATA FRAMEWORK FOR REPRESENTATION EVALUATION . In this section we formally present the representation evaluation problem , define our loss-data framework , and show how prior work fits into the framework . Notation . We use bold letters to denote random variables . A supervised learning problem is defined by a joint distribution D over observations and labels ( X , Y ) in the sample space X × Y with density denoted by p. Let the random variable Dn be a sample of n i.i.d . ( X , Y ) pairs , realized by Dn = ( Xn , Y n ) = { ( xi , yi ) } ni=1 . Let R denote a representation space and φ : X → R a representation function . The methods we consider all use parametric probes , which are neural networks p̂θ : R → P ( Y ) parameterized by θ ∈ Rd that are trained onDn to estimate the conditional distribution p ( y | x ) . We often abstract away the details of learning the probe by simply referring to an algorithm A which returns a predictor : p̂ = A ( φ ( Dn ) ) . Abusing notation , we denote the composition of A with φ by Aφ . Define the population loss and the expected population loss for p̂ = Aφ ( Dn ) , respectively as L ( Aφ , Dn ) = E ( X , Y ) − log p̂ ( Y | X ) , L ( Aφ , n ) = E Dn L ( Aφ , Dn ) . ( 1 ) In this section we will focus on population quantities , but note that any algorithmic implementation must replace these by their empirical counterparts . The representation evaluation problem . The representation evaluation problem asks us to define a real-valued measurement of the quality of a representation φ for solving solving the task defined by ( X , Y ) . Explicitly , each method defines a real-valued function m ( φ , D , A , Ψ ) of a representation φ , data distribution D , probing algorithm A , and some method-specific set of hyperparameters Ψ . By convention , smaller values of the measure m correspond to better representations . Defining such a measurement allows us to compare different representations . 2.1 DEFINING THE LOSS-DATA FRAMEWORK .. The loss-data framework is a lens through which we contrast different measures of representation quality . The key idea , demonstrated in Figure 1 , is to plot the loss L ( Aφ , n ) against the dataset size n. Explicitly , at each n , we train a probing algorithmA using a representation φ to produce a predictor p̂ , and then plot the loss of p̂ against n. Similar analysis has appeared in Voita & Titov ( 2020 ) ; Yogatama et al . ( 2019 ) ; Talmor et al . ( 2019 ) . We can represent each of the prior measures as points on the curve at fixed x ( VA , MI ) or integrals of the curve along the x-axis ( MDL ) . Our measures correspond to evaluating points at fixed y ( εSC ) and integrals along the y-axis ( SDL ) . 2.2 EXISTING METHODS IN THE LOSS-DATA FRAMEWORK . Nonlinear probes with limited data . A simple strategy for evaluating representations is to choose a probe architecture and train it on a limited amount of data from the task and representation of interest ( Hénaff et al. , 2019 ; Zhang & Bowman , 2018 ) . On the loss-data curve , this corresponds to evaluation at x = n , so that mVA ( φ , D , A , n ) = L ( Aφ , n ) . ( 2 ) Mutual information . Mutual information ( MI ) between a representation φ ( X ) and targets Y is another often-proposed metric for learning and evaluating representations ( Pimentel et al. , 2020 ; Bachman et al. , 2019 ) . In terms of entropy , mutual information is equivalent to the information gain about Y from knowing φ ( X ) : I ( φ ( X ) ; Y ) = H ( Y ) −H ( Y | φ ( X ) ) . ( 3 ) In general mutual information is intractable to estimate for high-dimensional or continuous-valued variables ( McAllester & Stratos , 2020 ) , and a common approach is to use a very expressive model for p̂ and maximize a variational lower bound : I ( φ ( X ) ; Y ) ≥ H ( Y ) + E ( X , Y ) log p̂ ( Y | φ ( X ) ) . ( 4 ) Since H ( Y ) is not a function of the parameters , maximizing the lower bound is equivalent to minimizing the negative log-likelihood . Moreover , if we assume that p̂ is expressive enough to represent p and take n→∞ , this inequality becomes tight . As such , MI estimation can be seen a special case of nonlinear probes as described above , where instead of choosing some particular setting of n we push it to infinity . We formally define the mutual information measure of a representation as mMI ( φ , D , A ) = lim n→∞ L ( Aφ , n ) . ( 5 ) A decrease in this measure reflects an increase in the mutual information . On the loss-data curve , this corresponds to evaluation at x =∞ . Minimum description length . Recent studies ( Yogatama et al. , 2019 ; Voita & Titov , 2020 ) propose using the Minimum Description Length ( MDL ) principle ( Rissanen , 1978 ; Grünwald , 2004 ) to evaluate representations . These works use an online or prequential code ( Blier & Ollivier , 2018 ) to encode the labels given the representations . The codelength ` of Y n given φ ( Xn ) is then defined as ` ( Y n | φ ( Xn ) ) = − n∑ i=1 log p̂i ( yi | φ ( xi ) ) , ( 6 ) where p̂i is the output of running a pre-specified algorithm A on the dataset up to element i : p̂i = Aφ ( Xn1 : i , Y n1 : i ) . Taking an expectation over the sampled datasets for each i , we define a population variant of the MDL measure ( Voita & Titov , 2020 ) as mMDL ( φ , D , A , n ) = E [ ` ( Yn | φ ( Xn ) ) ] = n∑ i=1 L ( A , i ) . ( 7 ) Thus , mMDL measures the area under the loss-data curve on the interval x ∈ [ 0 , n ] .

Summary: The submission addresses the problem of representation evaluation from the perspective of efficient learning of downstream predictors. Leveraging the introduced loss-data curve framework, the paper studies and demonstrates the limitations of the existing methods in terms of their implicit dependency on evaluation dataset size. Motivated by practicality and interpretability of the measures for choosing the best representations, the paper introduces two novel methods, $\epsilon$ sample complexity ($\epsilon$SC) and surplus description length (SDL), which are well-motivated and supported both theoretically and empirically. The paper also delivers efficient implementation.