TL;DR
This paper applies universal learning principles to linear regression, providing analytical solutions and insights into generalization capabilities, especially in over-parameterized settings where the number of features exceeds the training samples.
Contribution
It introduces an analytical pNML solution for universal learning in linear regression, including cases with more parameters than data points, and explores conditions for successful generalization.
Findings
Learnability depends on the test vector’s subspace alignment.
Linear regression can generalize in over-parameterized models under certain conditions.
Simulation demonstrates polynomial fitting with high-degree models.
Abstract
Linear regression is a classical paradigm in statistics. A new look at it is provided via the lens of universal learning. In applying universal learning to linear regression the hypotheses class represents the label as a linear combination of the feature vector where , within a Gaussian error. The Predictive Normalized Maximum Likelihood (pNML) solution for universal learning of individual data can be expressed analytically in this case, as well as its associated learnability measure. Interestingly, the situation where the number of parameters may even be larger than the number of training samples can be examined. As expected, in this case learnability cannot be attained in every situation; nevertheless, if the test vector resides mostly in a subspace spanned by the eigenvectors associated with the large eigenvalues of the empirical…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
MethodsLinear Regression
A New Look at an Old Problem: A Universal Learning Approach to Linear Regression
Koby Bibas
School of Electrical Engineering
Tel Aviv University
Email: [email protected]
Yaniv Fogel
School of Electrical Engineering
Tel Aviv University
Email: [email protected]
Meir Feder
School of Electrical Engineering
Tel Aviv University
Email: [email protected]
Abstract
Linear regression is a classical paradigm in statistics. A new look at it is provided via the lens of universal learning. In applying universal learning to linear regression the hypotheses class represents the label as a linear combination of the feature vector where , within a Gaussian error. The Predictive Normalized Maximum Likelihood (pNML) solution for universal learning of individual data can be expressed analytically in this case, as well as its associated learnability measure. Interestingly, the situation where the number of parameters may even be larger than the number of training samples can be examined. As expected, in this case learnability cannot be attained in every situation; nevertheless, if the test vector resides mostly in a subspace spanned by the eigenvectors associated with the large eigenvalues of the empirical correlation matrix of the training data, linear regression can generalize despite the fact that it uses an “over-parametrized” model. We demonstrate the results with a simulation of fitting a polynomial to data with a possibly large polynomial degree.
I Introduction
Linear regression, using least squares, is probably one of the most standard techniques in statistics, [1]. This work provides a new view of this problem based on recent results in universal learning. In particular, the common assumption in linear regression is that the number of training samples needs to be higher than the number of features in order to be able to generalize [2]. Recently, the success of Deep Neural Networks (DNNs) in which the number of learnable parameters may be greater by several orders of magnitudes than the size of the feature space, requires rethinking that assumption. The new view we provide will show that sometimes generalization can be attained even in the “over-parameterized” regime.
Before diving into this analysis, a short introduction to universal learning is provided. In the common situation of supervised machine learning, a training set is given consisting of pairs , where is the data or the features and is the label. Then, a new is given and the task is to predict its corresponding label . In the information theoretic framework considered in a variety of works, e.g., [3] and more recently [4], prediction is done by assigning a probability distribution to the unknown label, and the prediction loss is the log-loss:
[TABLE]
Clearly a reasonable goal is to find the predictor with the minimal loss for the test sample. However, this problem is ill-posed unless additional assumptions are made.
First, a “model” class, or ‘hypotheses” class must be defined. This class is a set of conditional probability distributions
[TABLE]
where is a general index set. This is equivalent to saying that there is a set of stochastic functions used to explain the relation between and .
Next, assumptions must be made on how the features and the labels are generated. In the stochastic setting, it is assumed that there is a true probabilistic relation between and given by an (unknown) model from the class . A more general setting, used in the variety of works in machine learning, is the Probably Approximately Correct (PAC) established in [5]. In PAC and are assumed to be generated by some source , but unlike the standard stochastic setting is not necessarily a member of the hypothesis class. In both the stochastic and PAC settings the goal is to perform as well as a learner that knows the true probability.
The most general setting, however, and the one used in this paper is the individual setting, where the features and the labels of both the training and test are specific, individual values. In this setting the goal can no longer be to perform as well as a learner that knows the true probability. Instead, following [3], the goal is to seek a learner that can compete with a “genie” or a reference learner that knows the desired label value, but is restricted to use a model from the given hypotheses class . In addition, as discussed in [4], the reference does not know which of the samples is the test. Thus, the reference chooses
[TABLE]
The log-loss difference between a universal learner and the reference is the regret:
[TABLE]
As advocated in [4], the chosen universal learner solves:
[TABLE]
Following [6] this learner, called the Predictive Normalized Maximum Likelihood (pNML), is given by
[TABLE]
Note that this pNML probability assignment was essentially proposed earlier, see [7, 8], with a different motivation as one of the possible variations of the Normalized Maximum Likelihood (NML) method of [6] for universal prediction.
In order to obtain the pNML the following procedure is executed: assuming the label of the test data is known, find the best model that fits it with the training samples, and predict the assumed label by this model. Repeat the process for all possible labels. Then, normalize to get a valid probability distribution which is the pNML learner. The regret of the pNML, is the logarithm of its normalization factor
[TABLE]
In considering linear regression, is the scalar label, is the feature vector (sometimes the first component of is set to to formulate affine linear relation), and the model class is the set:
[TABLE]
That is, the label is a linear combination of the components of , within a Gaussian noise. As shown below, in this case the pNML and its learnability measure can be evaluated explicitly.
The pNML approach deviates from the standard Empirical Risk Minimization (ERM) [9] approach. In ERM, given a training set and hypothesis class , a learner that minimizes the loss over the training set is chosen:
[TABLE]
In the linear regression model (8), one chooses the least squares solution over the training set for the linear coefficients. This, however, may lead to large log-loss generalization error.
The paper has two main contributions. First, it provides an explicit analytical solution for the pNML learner and its “learnability” measure (which is the minmax regret (7)) for the linear regression hypothesis class. This includes also the regularized case where the norm of the coefficients vector is constrained. Second, based on the analysis of the learnability measure, it is shown that even in the over-parameterized case where the number of parameters may be larger than the training size , if the test data comes from a “learnable space” successful generalization occurs. This phenomenon may explain why other over-parameterized models such as deep neural networks are successful for “learnable” data.
The paper outline is as follows. Section II presents some related work. Section III provides the formal problem definition, while the pNML evaluation for the regression problem is given in sections IV and V. In-depth analysis of the learnable space is given in section VI. Simulation of the pNML and its regret for the problem of fitting a polynomial to data is described in section VII and the conclusions are in section VIII.
II Related Works
In this section, we briefly mention related works on model generalization, least squares regression and the confidence of the least squares predictions.
Model Generalization. Understating the model generalization capabilities is considered a fundamental problem in machine learning [10]. As noted, most of the theoretical work in learning use the PAC setting. In that setting, a common measure is the VC Dimension that can be used to upper bound on the test generalization error. For DNNs, the VC dimension is linear with the number of parameters [11], yet the empirical evidence demonstrates that DNNs have state of the art generalization performance. This makes the VC dimension irrelevant for assessing the generalization error of DNNs.
Least Squares. The least squares algorithm is widely used in linear regression due to its robust performance and simplicity of implementation. In addition to the explicit formula for its solution, it can be solved sequentially, via the Recursive Least Squares (RLS) algorithm, which is an efficient online method for finding the linear predictor that minimizes the squared error over the training data [12]. This paper provides a new look at the classical least squares method, the individual setting using the pNML approach.
Outliers Detection and Confidence. In order to evaluate a pointwise confidence measure for linear regression, several methods were proposed. Leverage values are employed to identify outliers with respect to their feature values [13]. A leverage value is a measure of the distance between an observation and the center of the data111Whenever a matrix is inverted it is assumed that the matrix is invertible. If needed, with small is added to assure invertibility
[TABLE]
where is the (unnormalized) correlation matrix of the training set and is the feature value which is examined. If the leverage value of observation is large, the observation is considered as an outlier. Using the pNML, in section IV we get a confidence measure for the prediction of the next label which is similar to the leverage measure.
Another approach for finding the reliability of the prediction is to compose confidence intervals [14]. Confidence intervals are a pointwise measure that is sensitive to the variability of the features and sample size. Denote as the predicted value of and as the empirical error of the prediction, under the assumption of stochastic i.i.d data and existence of white noise, a confidence interval convergences in distribution to
[TABLE]
III Linear Regression: Formal Problem Definition
Given N pairs of data and labels where are deterministic, the model takes the form:
[TABLE]
where are the learnable parameters and the are zero mean, Gaussian, independent with variance of . The goal is to predict based on a new data sample . Under the assumptions , conditioned on , has a normal distribution that depends on the learnable parameters
[TABLE]
The unknown parameter vector belongs to a set , which in the general case is the entire . In the regularized version (leading to Ridge regression [15]), is the sphere . In the next section, the pNML will be evaluated for this hypotheses class. Recall that the pNML learner of given the the test sample and the training set is given by:
[TABLE]
where in the linear regression case
[TABLE]
and where is the the normalization factor:
[TABLE]
The goal is to find an analytic expression for (14) and for the learnability measure , the minmax regret value.
IV pNML Evaluation
The following notation is used. is the matrix which contains all the training data along with the test sample and is the vector which contains all the labels including the test label, i.e.,
[TABLE]
Assuming that the test label is given, the optimal solution under least squares:
[TABLE]
By the Recursive Least Squares (RLS) formulation [12]:
[TABLE]
where is the ERM prediction based on the training samples and222When , is not invertible, so with small is added
[TABLE]
Note that in RLS, is also calculated recursively from , but this is not needed at this point. Now,
[TABLE]
To get the pNML normalization factor (16), we integrate over all possible labels
[TABLE]
Thus, the pNML distribution of given is:
[TABLE]
and its associate learnability measure or regret:
[TABLE]
V pNML with Regularization
Next, we shall assume that the model class is constrained to the sphere , for some . Using a Lagrange multiplier we get the Tikhonov regularization (or Ridge regression), where the expression to minimize is now:
[TABLE]
With the test data, the “regularized” least square solution is:
[TABLE]
Here too the RLS formula holds:
[TABLE]
However, now
[TABLE]
The rest of the evaulation is similar to IV, yielding the following pNML learner:
[TABLE]
and the associated regret or the log-normalization factor:
[TABLE]
Note that regularization can help in the case where , the unnormalized correlation matrix of the data is ill conditioned. In the next section we find the “learnable space” for the linear regression problem and observe situations where this regularization is needed.
VI Learnable Space
In order to understand for which test sample the trained model generalizes well we need to look at the regret expression (24). High regret means that the pNML learner is very far from the genie and therefore we may not trust its predictions. Low regret, on the other hand, means the model is as good as a genie who knows the true test label, and so it is trusted.
Consider the matrix , composed of the training data, and apply the singular value decomposition (SVD) on it, i.e., with , is a rectangular diagonal matrix of the singular values and . The expression can be rewritten as:
[TABLE]
Denote by the empirical correlation matrix of the training:
[TABLE]
where H is a diagonal matrix with , the eigenvalues of . By the matrix inversion lemma, see [16], we have:
[TABLE]
Denote . We can simplify the expression:
[TABLE]
Plugging in the regret formula (24):
[TABLE]
Let be the eigenvectors of the empirical correlation matrix of the training data. Expressing by , the projections of on :
[TABLE]
The final regret expression is thus:
[TABLE]
If the test sample lies mostly in the subspace spanned by the eigenvectors with large eigenvalues, then the model can generalize well even if .
VII Simulation
In this section we present some simulations that demonstrate the results above. We chose the problem of fitting a polynomial to data, which is a special case of linear regression. The simulations show prediction and generalization capabilities in a variety of regularization factors and polynomial degrees.
In the first experiment we generated 3 random points, , uniformly in the interval . These points are the training set and are shown in Figure 1 (top) as red dots. The relation between and is given by a polynomial of degree two. Thus, the X matrix of section III is given by:
[TABLE]
Based on the training we predict a probability for all t values in the interval [-1,1] using (29) with a regularization factor of [math], and . It is shown in Figure 1 (top) that without regularization (), the blue curve fits the data exactly. As increases the fitted curve becomes less steep but tends to fit less to the training data.
Figure 1 (bottom) shows the regret, given by (24), for the polynomial model from (38) for all where the training ’s are marked in red on the x axis. We can see that around the training data the regret is very low in comparison to areas where there are no training data. In addition, models with larger regularization term have lower regret for every point in the interval . For all regularization terms, the regret increases as moving away from the training data.
Next, we simulate the case of fitting polynomials with different degrees. Again, we generated 10 random points in the interval . The matrix is now:
[TABLE]
Figure 2 (top) shows the predicted label for every value in for the different polynomial degrees. To avoid singularities we used the regularized version with . The training set is shown by red dots in the figure. Note that for a polynomial of degree ten, the number of parameters is greater than the size of the training set. Nevertheless, the prediction accuracy near the training samples is similar to that of a degree three polynomial. Figure 2 (bottom) shows the regret (or learnability) of the three pNML learners corresponding to model classes of polynomials with the various degrees. All the learners have regret values that are small near the training samples and large as drifts away from these samples.
VIII Conclusions
In this paper, we provided an explicit analytical solution of the pNML universal learning scheme and its learnability measure for the linear regression hypothesis class. Interestingly, the predicted universal pNML assignment is Gaussian with a mean that is equal to that of the ERM, but with a variance that increases by a factor whose logarithm is the learnability measure . Analyzing we can observe the “learnability space” for this problem. Specifically, if a test sample mostly lies in the subspace spanned by the eigenvectors associated with large eigenvalues of the empirical correlation matrix then the learner can generalize well, even in an over-parameterized case where the regression dimension is larger than the number of training samples. Finally, we provided a simulation of the pNML least squares prediction for polynomial interpolation.
This work suggests a number of potential directions for future work, some are already explored in an accompanying paper [17]. We conjecture that as in linear regression other “over-parameterized” model classes are learnable at least locally, that can be inferred from the pNML solution. This notion is indeed corroborated by the findings in [17].
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] C. L. Lawson and R. J. Hanson, Solving least squares problems . Siam, 1995, vol. 15.
- 2[2] G. James, D. Witten, T. Hastie, and R. Tibshirani, An introduction to statistical learning . Springer, 2013, vol. 112.
- 3[3] N. Merhav and M. Feder, “Universal prediction,” IEEE Transactions on Information Theory , vol. 44, no. 6, pp. 2124–2147, 1998.
- 4[4] Y. Fogel and M. Feder, “Universal supervised learning for individual data,” ar Xiv preprint ar Xiv:1812.09520 , 2018.
- 5[5] L. G. Valiant, “A theory of the learnable,” Communications of the ACM , vol. 27, no. 11, pp. 1134–1142, 1984.
- 6[6] Y. M. Shtar’kov, “Universal sequential coding of single messages,” Problemy Peredachi Informatsii , vol. 23, no. 3, pp. 3–17, 1987.
- 7[7] T. Roos and J. Rissanen, “On sequentially normalized maximum likelihood models,” 2008.
- 8[8] T. Roos, T. Silander, P. Kontkanen, and P. Myllymaki, “Bayesian network structure learning using factorized nml universal models,” in Information Theory and Applications Workshop, 2008 . IEEE, 2008, pp. 272–276.
