5 ms·
>> Generalization in this context is usually a very specific technical term that means after training on a training set, the fitted model continues to perform w
by YeGoblynQueenne 8y ago
>> Generalization in this context is usually a very specific technical term that means after training on a training set, the fitted model continues to perform well when used on previously unseen examples (a test set) that came from the same distribution (data generating process) that Nature used to produce the training set.
To be more precise, that a dataset came from the "real" distribution of data in the real world is an assumption, and one that is impossible to verify, at that. In practice, all we can know for sure is the distribution of data in a dataset. There is such a thing as sampling error, after all, and it's a big pain in every field that uses sampling to collect evidence.
So -in practice, again- when we say that a model "generalises well" we mean that it performs well in cross-validation, where it's trained and tested on different partitions of the entire dataset, in successive steps. Unfortunately, that's a very poor measure of generalisation. More to the point- it's an estimate of the model's real-world generalisation. But how good an estimate it is, is very hard to know.
- mlthoughts2018 8y agoAlmost always the training and test set are taken from exactly the same Natural distribution, inclusive of any sampling errors, biases, censoring artifacts, data corruption or loss, etc. So while in some cases the distinction you point out does matter, it’s pretty rare, certainly rare enough that it doesn’t cause issues with generalization error analysis of the majority of experiments. For most domain applications like computer vision tasks, natural language tasks, etc., it would be pedantic and disingenuous to call test set generalization error a mere “estimate” of the real generalization error. Beyond that, in topics like PAC learning you can prove results about optimal algorithms, like SVMs as maximum margin classifiers, that can be proved over fully theoretical generalization error bounds. Overall, except for certain special case applications, I think the comments you’re indicating about generalization turn out not to matter much in practice.
- YeGoblynQueenne 8y agoWell, PAC learning assumes that your training and test datasets are drawn from the same distribution and offers no guarantees if that assumption cannot be made. Obviously, training and test data in cross-validation partitions have a common distribution- but that is the distribution associated to the sampling process, not that of whatever natural process (we assume) generates the data in the real world. So, my point is, once you move from the lab to the real world, any generalisation error (resp. accuracy) you calculated by cross-validation in the lab becomes a mere estimate- because you don't know the real-world distribution and you are not guaranteed anything by PAC learning, anymore. Look- your dataset is not the real world, your sampling method is not the natural process that generates the events you observe and the distribution of data in the real world is not the distribution of data in your data set. If it was- you wouldn't need machine learning, would you? You'd already have a model of the real world process you're interested in. I'm afraid the best you can ever hope to do with generalisation to real-world data is estimate it, and nothing more.
- mlthoughts2018 8y agoSeveral subfields of PAC learning also deal with quantifying error bounds under other assumptions about the KL divergence between your sampling distribution and the true distribution. Variational Bayesian methods also provide results on generalization in these cases. You seem to care a lot that these approaches rely on assumptions, but I find that silly. Further in _most_ specific applications of e.g. CNNs for computer vision tasks or RNNs for time series or sequential prediction tasks, you _do_ control the entire sampling distribution (e.g. user photos with exactly satisfied criteria), and you really can fully and unambiguously guarantee that the training and testing set come from the “true” distribution you care about. And in many other cases the degree to which that assumption fails is so minor that it makes no practical difference.
- sgt101 8y agoSome domains are chaotic, some are very large, some are dynamic. In some domains errors of some types matter much more than other errors. Minor assumption failures can suddenly matter alot. The distinction between a lab result and a field trial has been somewhat lost in ml, there will be hell to pay in the long term...
- srean 8y ago> Minor assumption failures can suddenly matter alot. Indeed. In fact this is nowadays painfully obvious in Fisher's maximum-likelihood based estimators -- they do not have nice 'continuity' properties that will give a graceful degradation. We figured out how to deal with this once the problem was recognized. However, we see the same problem raising its head in some of the deep neural net literature. Tiny variations often does not cause tiny distortions in the output -- thats cause for some legitimate concern.
- YeGoblynQueenne 8y ago>> You seem to care a lot that these approaches rely on assumptions, but I find that silly. Thanks, I'll keep that in mind. >> Further in _most_ specific applications of e.g. CNNs for computer vision tasks or RNNs for time series or sequential prediction tasks, you _do_ control the entire sampling distribution (e.g. user photos with exactly satisfied criteria), and you really can fully and unambiguously guarantee that the training and testing set come from the “true” distribution you care about. One of my pet peeves is the Deep Gaydar Paper from Stanford (https://osf.io/zn79k/ https://osf.io/zn79k/). The authors trained a CNN to identify sexuality (gay or straight) from images of faces. The images were self-submitted to a US dating site and the users also stated their sexuality. The dataset included different numbers of images for each user, but of the users that had at least one image in the dataset (i.e. all users) 50% had stated their sexuality as "gay" and 50% as "straight"- this, for both men and women. The research concluded that it was possible to train an image classifier, a CNN, to identify sexuality from facial features. The authors justified this with a theory about the relation between the hormonal environment in the womb. I hold this up as a perfect example of why this assumption, that you can control the distribution in the real world because you can choose the attributes of a dataset that you wish to work with, is very risky. And I don't mean for the social implications of that reprehensible publication. The researchers chose a uniform distribution for their gay and straight subjects. The paper itself cites a 7% estimate of the chance that a person is "gay"- so what, exactly, did their classifier learn to represent? That "gay features" and "straight features" are equally distributed? In any case, "fully and unambiguously guarantee" is not something that happens outside science fiction. Not in machine learning, not in physics or medicine, not in any subject of knowledge. Guarantees always come with assumptions. If assumptions are violated, or if they were bad assumptions to begin with, guarantees fly out the window in haste.