Suvarna Garge (Editor)

Rademacher complexity

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In computational learning theory (machine learning and theory of computation), Rademacher complexity, named after Hans Rademacher, measures richness of a class of real-valued functions with respect to a probability distribution.

Contents

Rademacher complexity of a set

Given a set A R m , the Rademacher complexity of A is defined as follows:

Rad ( A ) := 1 m E σ [ sup a A i = 1 m σ i a i ]

where σ 1 , σ 2 , , σ m are independent random variables drawn from the Rademacher distribution i.e. Pr ( σ i = + 1 ) = Pr ( σ i = 1 ) = 1 / 2 for i = 1 , 2 , , m .

Rademacher complexity of a function class

Given a sample S = ( z 1 , z 2 , , z m ) Z m , and a class F of real-valued functions defined on a domain space Z , the empirical Rademacher complexity of F given S is defined as:

Rad S ( F ) = 1 m E σ [ sup f F | i = 1 m σ i f ( z i ) | ]

This can also be written using the previous definition:

Rad S ( F ) = Rad ( F S )

where F S denotes function composition, i.e:

F S := { ( f ( z 1 ) , , f ( z m ) ) | f F }

Let P be a probability distribution over Z . The Rademacher complexity of the function class F with respect to P for sample size m is:

Rad P , m ( F ) := E S P m [ Rad S ( F ) ]

where the above expectation is taken over an identically independently distributed (i.i.d.) sample S = ( z 1 , z 2 , , z m ) generated according to P .

Examples

1. A contains a single vector, e.g, A = { ( a , b ) } R 2 . Then:

Rad ( A ) = 1 2 ( 1 4 ( a + b ) + 1 4 ( a b ) + 1 4 ( a + b ) + 1 4 ( a b ) ) = 0

The same is true for every singleton hypothesis class.

2. A contains two vectors, e.g, A = { ( 1 , 1 ) , ( 1 , 2 ) } R 2 . Then:

Rad ( A ) = 1 2 ( 1 4 max ( 1 + 1 , 1 + 2 ) + 1 4 max ( 1 1 , 1 2 ) + 1 4 max ( 1 + 1 , 1 + 2 ) + 1 4 max ( 1 1 , 1 2 ) ) = 1 8 ( 3 + 0 + 1 2 ) = 1 4

Using the Rademacher complexity

The Rademacher complexity can be used to derive data-dependent upper-bounds on the learnability of function classes. Intuitively, a function-class with smaller Rademacher complexity is easier to learn.

Bounding the representativeness

In machine learning, it is desired to have a training set that represents the true distribution of samples. This can be quantified using the notion of representativeness. Denote by P the probability distribution from which the samples are drawn. Denote by H the set of hypotheses (potential classifiers) and denote by F the corresponding set of error functions, i.e, for every h H , there is a function f h F , that maps each training sample (features,label) to the error of the classifier h on that sample (for example, if we do binary classification and the error function is the simple 0-1 loss, then f h is a function that returns 1 for each training sample on which h is correct and 0 for each training sample on which h is wrong). Define:

L P ( f ) := E z P [ f ( z ) ] - the expected error on the real distribution; L S ( f ) := 1 m i = 1 m f ( z i ) - the estimated error on the sample.

The representativeness of the sample S , with respect to P and F , is defined as:

R e p P ( F , S ) := sup f F ( L P ( f ) L S ( f ) )

Smaller representativeness is better, since it means that the empirical error of a classifier on the training set is not much higher than its true error.

The expected representativeness of a sample can be bounded by the expected Rademacher complexity of the function class:

Bounding the generalization error

When the Rademacher complexity is small, it is possible to learn the hypothesis class H using empirical risk minimization.

For example (with binary error function), for every δ > 0 , with probability at least 1 δ , for every hypothesis h H :

L P ( h ) L S ( h ) 2 Rad ( F S ) + 4 2 ln ( 4 / δ ) m

Bounding the Rademacher complexity

Since smaller Rademacher complexity is better, it is useful to have upper bounds on the Rademacher complexity of various function sets. The following rules can be used to upper-bound the Rademacher complexity of a set A R m .

1. If all vectors in A are translated by a constant vector a 0 R m , then Rad(A) does not change.

2. If all vectors in A are multiplied by a scalar c R , then Rad(A) is multiplied by | c | .

3. Rad(A+B) = Rad(A) + Rad(B).

4. (Kakade&Tewari Lemma) If all vectors in A are operated by a Lipschitz function, then Rad(A) is (at most) multiplied by the Lipschitz constant of the function. In particular, if all vectors in A are operated by a contraction mapping, then Rad(A) strictly decreases.

5. The Rademacher complexity of the convex hull of A equals Rad(A).

6. (Massart Lemma) The Rademacher complexity of a finite set grows logarithmically with the set size. Formally, let A be a set of N vectors in R m , and let a ¯ be the mean of the vectors in A . Then:

Rad ( A ) max a A | | a a ¯ | | 2 log N m

In particular, if A is a set of binary vectors, the norm is at most m , so:

Rad ( A ) 2 log N m

Let H be a set family whose VC dimension is d . It is known that the growth function of H is bounded as:

for all m > d + 1 : G r o w t h ( H , m ) ( e m / d ) d

This means that, for every set h with at most m elements, | H h | ( e m / d ) d . The set-family H h can be considered as a set of binary vectors over R m . Substituting this in Massart's lemma gives:

Rad ( H h ) 2 d log ( e m / d ) m

With more advanced techniques (Dudley's entropy bound and Haussler's upper bound) one can show, for example, that there exists a constant C , such that any class of { 0 , 1 } -indicator functions with Vapnik-Chervonenkis dimension d has Rademacher complexity upper-bounded by C d m .

The following bounds are related to linear operations on S - a constant set of m vectors in R n .

1. Define A 2 = { ( w x 1 , , w x m ) | | | w | | 2 1 } = the set of dot-products of the vectors in S with vectors in the unit ball. Then:

Rad ( A 2 ) max i | | x i | | 2 m

2. Define A 1 = { ( w x 1 , , w x m ) | | | w | | 1 1 } = the set of dot-products of the vectors in S with vectors in the unit ball of the 1-norm. Then:

Rad ( A 1 ) max i | | x i | | 2 log ( 2 n ) m

The following bound relates the Rademacher complexity of a set A to its external covering number - the number of balls of a given radius r whose union contains A . The bound is attributed to Dudley.

Suppose A R m is a set of vectors whose length (norm) is at most c . Then, for every integer M > 0 :

Rad ( A ) c 2 M m + 6 c m i = 1 M 2 i log ( N c 2 i ext ( A ) )

In particular, if A lies in a d-dimensional subspace of R m , then:

r > 0 : N r ext ( A ) ( 2 c d / r ) d

Substituting this in the previous bound gives the following bound on the Rademacher complexity:

Rad ( A ) 6 c m ( d log ( 2 d ) + 2 d ) = O ( c d log ( d ) m )

Gaussian complexity

Gaussian complexity is a similar complexity with similar physical meanings, and can be obtained from the Rademacher complexity using the random variables g i instead of σ i , where g i are Gaussian i.i.d. random variables with zero-mean and variance 1, i.e. g i N ( 0 , 1 ) .

References

Rademacher complexity Wikipedia