I’ve made the mistake of working on too many posts/ideas at one time. Each has ballooned into more of a time-sink than I had anticipated. In particular, a conceptually simple question about support vector machines has taken me down a rabbit-hole of interesting but somewhat esoteric concepts. In particular, near the turn of the century, the drive for better error bounds (and deeper understanding of how to characterize or describe concept classes) led to the development of PAC Bayesian analysis, and its more pure counterpart Luckiness functions.

While both concepts don’t appear mainstream today (not even referenced on Wikipedia that I can see), there are some interesting bits to both. Most fruitful for review, I found, is the framework of luckiness functions, which rely implicitly on fat-shattering and level fat-shattering dimensions. With the advent of manifold methods (a.k.a. manifold machine learning), it’s likely to see a resurgence in luckiness/unluckiness functions as a way of ordering or partitioning the hypothesis space. In particular, I would expect to see the luckiness framework used to introduce manifold curvature into the error bounds of well-known algorithms (e.g. manifold random forests).

In the spirit of “lemmas are more useful than theorems,” I provide the proof of a seminal PAC-Bayesian lemma, and state a related theorem on loss functions. I’ll move on to Luckiness functions in an upcoming post.

**The Quantifier Reversal Lemma**

This lemma enables one to adapt a PAC statement about a formula (e.g. ) into a more general relation between the input spaces. Specifically, for random variables and , , let be a formula such that for some . If

then for any and we have

Thus the quantifiers are reversed. What this means intuitively depends on , and in that sense the lemma is general. The specific use here is to help quantify, among those competing hypotheses which agree on a test set, what proportion fall into a high-error category. For instance, if the error then (this follows from the union bound). This statement can be written as

to which the above lemma can be applied (letting of the lemma refer to here, and of the lemma refer to here). The proof of the lemma is straightforward: let if is empty, and otherwise. Because and is monotone decreasing for , we can write

This, combined with the Markov inequality, yields:

The result follows by plugging back in for .

**Average loss among indistinguishable hypotheses**

The Quantifier Reversal lemma can be used to prove a relation on the average loss for a collection of hypotheses from the same class which each agree on the sample/training data. For instance, the collection of hyperplanes in the margin for an SVM, or the collection of correctly-classifying weights for a neural network of fixed architecture. Given some distribution over the hypothesis space (e.g. a prior — this is PAC-Bayesian, after all), and a loss function (so the loss of some trained hypothesis evaluated on ), then with probability at least ,

where . Thus we can relate the expected loss on a sample (given a prior over concepts) to the total expected loss using that same prior. This relation can be used to establish the average risk of hypothesis that are indistinguishable given the sample .

**A preview of luckiness**

PAC-Bayesian theorems rely on some probability distribution over a measurable set of hypotheses. Given the strength of such an assumption, they’re a bit easier to handle. Luckiness, however, is a more heuristical (I’m inventing this word) alternative, where you measure the “luckiness” of a hypothesis-sample pair. For instance, the luckiness of any general sample might be the dimension of the subspace it spans. The luckiness of an SVM might be the number of support vectors it has, or the minimum or maximum margin. Basically, luckiness is a some encoding of a heuristic about your sample and hypothesis space that measures how lucky (or unlucky) you were to achieve a large or low value for that heuristic.

In other words, because lower bounds in full generality are established by PAC theorems, better bounds can only come because of a “lucky” matching between the probability distribution underlying the data, and the hypothesis space used for classification. Luckiness functions provide a means of measuring such a match, and quantifying the degree of assurance that the luckiness of the sample will generalize.

## Leave a Reply