C ROSS - VALIDATION STABILITY

(β , ϖ)-stability for cross-validation and
the choice of the number of folds
Ning Xu

N . XU @ SYDNEY. EDU . AU

School of Economics
University of Sydney

arXiv:1705.07349v5 [stat.ML] 6 Jul 2017

Jian Hong

JIAN . HONG @ SYDNEY. EDU . AU

School of Economics
University of Sydney

Timothy C.G. Fisher

TIM . FISHER @ SYDNEY. EDU . AU

School of Economics
University of Sydney

Editor:

Abstract
In this paper, we introduce a new concept of stability for cross-validation, called the (β , ϖ)-stability,
and use it as a new perspective to build the general theory for cross-validation. The (β , ϖ)-stability
mathematically connects the generalization ability and the stability of the cross-validated model via
the Rademacher complexity. Our result reveals mathematically the effect of cross-validation from
two sides: on one hand, cross-validation picks the model with the best empirical generalization ability
by validating all the alternatives on test sets; on the other hand, cross-validation may compromise
the stability of the model selection by causing subsampling error. Moreover, the difference between
training and test errors in qth round, sometimes referred to as the generalization error, might be
autocorrelated on q. Guided by the ideas above, the (β , ϖ)-stability help us derivd a new class of
Rademacher bounds, referred to as the one-round/convoluted Rademacher bounds, for the stability
of cross-validation in both the i.i.d. and non-i.i.d. cases. For both light-tail and heavy-tail losses, the
new bounds quantify the stability of the one-round/average test error of the cross-validated model in
terms of its one-round/average training error, the sample sizes n, number of folds K, the tail property
of the loss (encoded as Orlicz-Ψν norms) and the Rademacher complexity of the model class Λ. The
new class of bounds not only quantitatively reveals the stability of the generalziation ability of the
cross-validated model, it also shows empirically the optimal choice for number of folds K, at which
the upper bound of the one-round/average test error is lowest, or, to put it in another way, where the
test error is most stable.
Keywords: stability of cross-validation, one-round/convoluted Rademacher-bounds, Orlicz-Ψν
space, minimax-optimal choice of the number of folds, independent blocks.

1. Introduction
In many applications of statistical learning theory, overfitting arises as a common problem for learning
algorithms. To reduce overfitting and improve the generalization ability of the learning algorithm,
cross-validation (Stone, 1974, 1977) is widely applied to regularize the in-sample performance
of the algorithm. Decades of research has produced several variants of cross-validation, such as
K-fold, repeated K-fold (Kim, 2009), stratified (Kohavi, 1995), and Monte Carlo cross-validation (Xu
1

X U ET AL .

and Liang, 2001). Simulation studies have shown that the performance of various cross-validation
schemes differs according to the setting, leading to different results about the appropriate form of
cross-validation.1 At the heart of the matter lies the stability of cross-validation: when applied to
sparse modeling methods (such as Lasso), cross-validation often leads to models that are unstable
in high-dimensions, and consequently ill-suited for reliable interpretation (Lim and Yu, 2016). In
addition, while it is a widely-applied tool for model selection and model evaluation, the general
theoretical properties of cross-validation have yet to be fully worked out.
Generally speaking, as suggested by Bousquet and Elisseeff (2002), the more stable the predicted
model on different samples, the more ‘generalizable’ the in-sample learning result is to other samples
or to the population. Hence, model complexity, algorithmic stability and generalization ability are
deeply connected to one another. Guided by this instinct, our aim is to study the general theoretical
properties of cross-validation from the perspective of stability, defined as the (probabilistic) maximal
difference between the in-sample error (training error) and the out-of-sample error (the risk on a
random new-coming sample), given the model class Λ. In cross-validation, the random new-coming
sample(s) are referred to as the test sets in all K rounds. To formalize it mathematically, we define
the one-round and average (β , ϖ)-stability in definition 1:
Definition 1(One-round and average (β , ϖ)-stability in K-fold cross validation) Let’s denote Ytq , Xtq
and Ysq , Xsq as the training and test sets, repesctively, in the qth round of cross-validation. Let
 nt
and ns be the sizes of the training and test sets respectively. Rnt b,Ytq , Xtq and Rns b,Ysq , Xsq are
denoted as the training error and test error, respectively, for the qth round of cross-validation. Given
the model class Λ, ∀ (β , ϖ) ∈ R+ × (0, 1], the functions in Λ is one-round (β , ϖ)-stable in K-fold
cross-validation if



Pr sup Rnt b,Ytq , Xtq − Rns (b,Ysq , Xsq ) > β 6 ϖ.
(1)
b∈Λ

Likewise, the functions in Λ is average (β , ϖ)-stable in K-fold cross-validation if
(
)
1 K
1 K
q
q
q
q
Pr sup
∑ Rnt b,Yt , Xt − K ∑ Rns (b,Ys , Xs ) > β 6 ϖ.
b∈Λ K q=1
q=1

(2)

As we show in the proof, given the value of ϖ, the value of β for either one-round or average
stability may be approximated by the Rademacher complexity, nt , ns and the tail heaviness of the
risk distribution. Inspired by the algorithmic stability in Bousquet and Elisseeff (2002), the oneround or average (β , ϖ) stability help us to quantify the connection between the stability and the
generalization ability of cross-validation via model complexity. For both light-tail and heavy-tail
losses, we mathematically quantify the trade-off in cross-validation via Rademacher complexity. On
one hand, cross-validation improves the generalization ability of the algorithm via validating the
learning result on the new-coming samples; on the other hand, it also compromises the generalization
ability by making the learning result more instable: extra amount of subsampling error and extra
autocorrelation between each round of cross-validation, both considered as the noise as to the ‘true’
pattern, are injected into the learning result. As a result, given the total sample size n and functional
space Λ, to quantify the positive and negative effects of cross-validation on the learning result, we
1. See, for example, (Kohavi, 1995; Bengio and Grandvalet, 2004).

2



C ROSS - VALIDATION STABILITY

build a new class of bounds for the stability of cross validation. The new bounds in turn help us to
define the optimal choice for the number of folds in cross-validation from perspective of stability, at
which the upper bound for the average or one-round test error is lowest (or the average or one-round
test error is most stable).
1.1 Classical generalization bounds
The classical approach to deriving suitable generalization error bounds yielded the probably approximately correct bounds (PAC bounds), proposed in Valiant (1984) and developed by Vapnik,
Chevonenkis and others. Derived from the classical concentration inequalities, the distribution- and
model-free PAC-bounds characterize the relation between population risk and empirical in-sample
risk from the perspective of the complexity of a given model class. The PAC bounds are useful
for both model evaluation and model selection. Typically, the bounds take the form of a sum of
two terms: a sample-based estimate of the in-sample risk and a term penalizing model complexity.
One measure of complexity, Rademacher complexity (Bartlett and Mendelson, 2002), is defined as
follows.
Definition 2 (Rademacher complexity) Let P be a probability distribution on a set X and suppose
that X1 , . . . , Xl are independent samples selected on P. Let Λ be the model class in which all models
map from X to R. Define the random variables
"
#
l
2
c (Λ) = E sup ∑ σi g (Xi ) | X1 , . . . , Xl
RC
(3)
g∈Λ l i=1
{±1}-valued random variables. The Rademacher comwhere σ1 , . . . , σl are independent
uniform
h
i
c l (Λ) .
plexity of Λ is RCl (Λ) = E RC
The intuition for RCl is straightforward. It quantifies the extent to which some function in Λ is
correlated with a binomial noise process of length l.2 Intuitively, in finite samples, a complicated
model will fit the noise no worse than a less complicated model. The advantages of the Rademacher
complexity measure RCl are that: (1) the bounds are typically ‘sharper’ than the classical VC-bounds;
(2) the bounds may be generalized to non-i.i.d. data such as stationery β -mixing processes (McDonald
et al., 2011; Mohri and Rostamizadeh, 2009, 2010). By contrast, the VC dimension measure requires
an i.i.d. assumption on the predictors. Hence, the performance of any model in the given model class
can be measured and regularized by VC-bounds and Rademacher-bounds.
1.2 Summary of major ideas
By generalizing a pattern learned from a training sample to another finite sample, cross-validation
obtains the training error and test error for the model class. To put it in another way, through
out-of-sample validation, cross-validation captures the empirical stability of the model by finding the
difference between the training and test errors. On one hand, if both training and test samples are
random and identically distributed, we would expect the information encoded in both samples to be
similar, implying that training and test errors should be not very different; on the other hand, with
2. Another measure of complexity, Gaussian complexity, is closely related to Rademacher complexity. Bartlett and
Mendelson (2002) show that Gaussian complexity is bounded by RCl . Hence, we focus on Rademacher complexity.

3

X U ET AL .

different values of n, K and different random splitting schemes, the difference between the training
and test errors may vary due to the sampling and sub-sampling error. Moreover, since Tq , the absolute
difference between the training and test errors in qth round of validation, may be autocorrelated as
a result of the sample splitting scheme, it may cause the problem that the empirical generalization
ability, more importantly the order of generalization abilities among model classes, might not be
very generalizable to other new-coming data sets. Thus, given the model class Λ, n and tail property
of the loss, to study the ‘real’ stability of cross-validation with the presence of the autocorrelation
and sampling/subsampling error, one method is to numerically approximate its (β , ϖ)-stability, for
which the empirical average test error is not sufficient.
Guided by these ideas, we analyze the stability of a cross-validated model and build the connection between stability and generalization ability of the cross-validated model via the Rademacher
complexity. The major probability tool we use is ‘blocking’. For the i.i.d. case, we approximate
the performance of the cross-validated model via its performance on all blocks (folds); for the
non-i.i.d. case, we use independent blocks to reduce the disruption of the cross-correlation in data
generating process. To make sure the connection between stability and generalization ability is valid
via Rademacher complexity for different kinds of losses, we encode the tail property of the loss into
the Orlicz-Ψν norm (ν ∈ [1, 2]) and show that the result in our paper covers both sub-exponential
and sub-gaussian cases.3 With (β , ϖ)-stability, blocking, convolution and Orlicz-Ψν norms, we
derive a class of bounds, referred to as one-round/convoluted Rademacher bounds. The convoluted
Rademacher bounds quantify the stability (specifically the upper bound) of the average test error via
K, n, the Orlicz-Ψν norm of the loss and ϖ. As a result, given other parameters fixed, the optimal
choice of (K ∗ , b∗ ) ∈ {[0, n] , Λ} is obtained at the minimum point of the convoluted Rademacher
bound, at which the upper bound of the average test error is minimal. To put it in another way, the
average test error is most stable at (K ∗ , b∗ ).
The paper is organized as follows. In section 2, based on the one-round/average (β , ϖ)-stability,
we list our assumptions and proceed to derive the one-round and convoluted Rademacher-bounds
for cross-validation under traditional i.i.d. settings. In section 3, using the independent blocks, we
construct the one-round and convoluted Rademacher bounds for cross-validation under the β -mixing
scenario.

2. Convoluted Rademacher-bounds for the cross-validated test error in i.i.d data
2.1 Notation and assumptions
Our notation is defined as follows.
Definition 3 (Subsamples, training error, and test error)
1. Let (y, x) denote a sample point from F(y, x), where F(y, x) is the joint distribution of (y, x).
Given a sample (Y, X), the training set is denoted as (Yt , Xt ) ∈ Rnt ×p and the test set as
(Ys , Xs ) ∈ Rns ×p . Let ne = min{ns , nt }.
2. Let Λ denote a model class. The loss function for
a model b ∈ Λ is Q (b, yi , xi ) , i = 1, . . . , n.
R
The population risk for b ∈ Λ is R (b,Y, X) = Q (b, y, x) dF (y, x). The empirical risk is
Rn (b,Y, X) = 1n ∑ni=1 Q (b, yi , xi ).
3. the Orlicz-Ψν norm is actually a quasi-norm when ν ∈ (0, 1). However, different concertration inequalities may also
be derived with ν ∈ (0, 1). See Adamczak et al. (2008); Lederer et al. (2014) for example.

4

C ROSS - VALIDATION STABILITY

3. The training error, for any b ∈ Λ, is Rnt (b,Yt , Xt ). The test error, for any b ∈ Λ, is Rns (b,Ys , Xs ).
The population risk for b is R (b,Y, X).
4. For K-fold cross-validation, denote the training set and test set in the qth round, respectively,
as (Xtq ,Ytq ) and (Xsq ,Ysq ). Asa result, the training / test error on the qth training / test set is
Rnt Xtq ,Ytq and Rns Xsq ,Ysq , respectively
5. We define the Orlicz-Ψν norm for an empirical process Z as


 ν 

|Z|
kZkΨν := inf u E exp
<2 .
u>0
uν
We also define the empirical process, ∀b ∈ Λ, ∀q ∈ [1, K],
Uq := sup Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq



b∈Λ

Tq := Uq − E [Uq ] .
Our main assumptions are listed as follows.
Assumptions
A1. In the probability space (Ω, F , P) for the loss function, we assume F -measurability of the
loss Q(b, y, x), the population error R(b,Y, X), and the empirical error Rn (b,Y, X), for any
b ∈ Λ and any sample point (y, x). Specifically, we assume that the Orlicz-Ψν norm of all the
loss processes are always well-defined for ν > 1.
A2. All points in each fold for cross-validation are randomly partitioned. The data points of (Y, X)
are independently sampled from the population.
A3. (Vapnik, 1998) We assume that, in the model class Λ, there exists a countable number of
sub-classes,4 denoted as {Ci | i = 1, . . . , I}, such that ∪i Ci 
= Λ. We assume the existence of
an admissible structure: a linear order exists within the set RCn/K (Ci ) | i = 1, . . . , I .
A4. For all the empirical processes in this paper, the VC entropy in model class Λ, H Λ (ε, n),
satisfies limn→∞ H Λ (ε, n) /n = 0, ∀ε > 0
A5. ((Yan, 1985) interchangability of sup [·] and E [·]) Let’s denote Wn (b) = (Rn (b, X,Y ) − R (b, X,Y ))2 .
Assume supb∈Λ E [Wn (b)] 6 ∞. ∀ε > 0 and α, δ ∈ Λ, ∃υ ∈ Λ such that


E (Wn (υ) −Wn (α) ∨Wn (δ ))− 6 ε.
Several remarks apply to the assumptions. Assumption A1 on the loss distribution formalizes
the analysis of test errors. The Orlicz-Ψν norm encodes the tail property of the loss distribution. If
ν = 2, the distribution is in the subgaussian family and large losses do not occur very often; if ν = 1,
the distribution is in the subexponential family and the tails are ‘heavier’ than for the subgaussians.
A2 needs to be clarified specifically. In this section, we focus on the independence case; we relax
4. The subclasses are equivalence classes w.r.t. the RCn/K .

5

X U ET AL .

the independence restriction in the next section to allow for mixing processes. The admissible
structure in assumption A3 originates in the work of Vapnik in 1960s and rules out the scenario in
which the complexity of models cannot be compared pairwise. The VC entropy assumption A4
ensures the empirical risk of any model in the model class is consistent (see Vapnik (1998)). Lastly,
assumptions A5 are known to be the most general condition for interchangability of sup [·] and
E [·], which are well-known and frequently used in stochastic optimization, backwards stochastic
differential equations and other financial math researches.5 Another method to partially solve the
interchangability is inspired by Vapnik (1998))6 :
A50 . Given the model class Λ,
h
i 

 E sup (Rn (b, X,Y ) − R (b, X,Y ))2 
n h
io 6 ζ ∈ R+ .
sup

b∈Λ  sup E (Rn (b, X,Y ) − R (b, X,Y ))2

(4)

Either A5 or A50 could help us interchange the order of sup [·] and E [·]. In this paper, for the
mathematical elegance, we derive the theoretical results under A5; however, a set of very similar
results could also be derived under A50 , which is skipped here.
2.2 Convoluted Rademacher-bounds for the test errors
Firstly, we show in Theorem 4 that, in each round of cross-validation, the one-round test error
is bounded by a Rademacher-bound, which depends on n, RC and ϖ. To do that, we use the
concentration inequality in Orlicz-Ψν norms. The reasons we use that specific inequality is because:
(1) it is an exponential concentration inequality, which means we can build a tighter bound than the
non-exponential inequalities; (2) the Orlicz-Ψν norm reveals the tail-behavior or concentration of
the subexponential variables (and the heavy/flat/long-tail variables) in a more straightforward way
than the Lebesgue-p norm. It also applies to case where the L2 norm of the random variable does not
exist.
Theorem 4 (Rademacher-bound of the one-round test error in cross-validation) In the qth round
of validation, under A1 to A5, the following upper bound for the test error holds with probability at
least 1 − ϖ ∈ (0, 1], ∀b ∈ Λ.

Rns (b,Ysq , Xsq ) 6 Rnt b,Ytq , Xtq + 2 · RCn/K (Λ) + ς ,

(5)


n/K
where ρ j = supb∈Λ ∑i=1 Q b, y j,i , x j,i /(n/K) − R (b,Y, X) , σ 2 is the variance proxy of ρ j if ρ j
is subgaussian, ξ 2 := σ 2 /var [ρ j ], c is an absolute constant in the exponential inequality by Lecue
5. This condition is proved by Striebel (1975) and generalized by Yan (1985). See Elliott (1982, p250) for detail.
Generally speaking, in mathematics E [supb∈Λ [·]] may not be measurable. As a result, Yan (1985) use the operator
ess-sup [·] instead. However, if it is measurable, the ess-sup and sup are identical. For the application of this condition,
see Peng (2004) as an example.
6. this method is originally used by Vapnik (for the proof of the VC bounds for the heavy-tail loss) to control the ratio
between L1 norm and L p norm of the random variables with heavy tails, where 2 > p > 1.

6

C ROSS - VALIDATION STABILITY

(2009) 7 , and

q
log(1/ϖ)

,
2
·
M
·



qn/K


 2 · ξ · σ̃ · log(1/ϖ)
n/K
p
ς=
c

·
log
ρ
(2/ϖ),
j Ψ1




 21

p

c
 ρj
·
2
·
log
(2/ϖ)
,
Ψ
1

if supb∈Λ (Q) 6 M
if ρ j is subgaussian
if ρ j is subexponential and 2 exp {−2c} > ϖ > 0
if ρ j is subexponential and 2 exp {−2c} 6 ϖ 6 1

Proof
To prove Theorem 4, we start from quantifying the following probability,


q
q
q
q
Pr sup Rns (b,Ys , Xs ) − Rnt b,Yt , Xt > ε , for given ε ∈ R+ .

(6)

b∈Λ

This probability may be simplified as follows,


q
q
q
q
Pr sup Rns (b,Ys , Xs ) − Rnt b,Yt , Xt > ε
b∈Λ


q
q
q
q
= Pr sup Rns (b,Ys , Xs ) − R (b,Y, X) + R (b,Y, X) − Rnt b,Yt , Xt > ε .

(7)

b∈Λ

Due to the convexity of the norm, eq. (7) implies that



Pr sup Rns (b,Ysq , Xsq ) − R (b,Y, X) + R (b,Y, X) − Rnt b,Ytq , Xtq > ε
b∈Λ


q
q
q
q
6 Pr sup |Rns (b,Ys , Xs ) − R (b,Y, X)| + sup R (b,Y, X) − Rnt b,Yt , Xt > ε .
b∈Λ

(8)

b∈Λ

If we further define

Φnt := sup R (b,Y, X) − Rnt b,Ytq , Xtq ,

(9)

b∈Λ

Φns := sup |Rns (b,Ysq , Xsq ) − R (b,Y, X)| ,

(10)

b∈Λ

the union bound implies that for eq. (8) the following derivation holds


q
q
q
q
Pr sup |Rns (b,Ys , Xs ) − R (b,Y, X)| + sup R (b,Y, X) − Rnt b,Yt , Xt > ε
b∈Λ

b∈Λ

= Pr [Φns + Φnt > ε]

(11)

1. supb∈Λ Q (b) is bounded by M
7. The absolute constant c is from Theorem 0.4 in Lecue (2009), which is slightly modified from Talagrand (1994).
Different papers have investigated the value of the absolute constant in the Talagrand’s concerntration inequality, for
example see Tao (2009); Massart (2000).

7

X U ET AL .

If we define the performance of the model class in each fold as
ρ j = sup
b∈Λ


1 n/K
Q b, y j,i , x j,i − R (b,Y, X) ,
∑
n/K i=1

the following relation between Φnt and ρ j holds,
Φnt 6
=


1 K−1
1 n/K
sup
Q b, y j,i , x j,i − R (b,Y, X)
∑
∑
K − 1 j=1 b∈Λ n/K i=1

(12)

1 K−1
∑ ρj .
K − 1 q=1

(13)

If supb∈Λ Q (b) 6 M, ρ j is also bounded by M, implying that ρ j is a subgaussian with variance proxy
σ . Define ε = ε − 2 · E (ρ j ) and the fold used as the test data as ρK . We also denote the vector
w = [1/ (K − 1) , . . . , 1/ (K − 1) , 1] as the weight and k·k2 as the L2 norm. As a result, the Chernoff
bounds imply that
"
#
1 K−1
Pr [Φnt + Φns > ε] 6 Pr
∑ ρ j + ρK > ε
K − 1 j=1
"
#
1 K−1
= Pr
(14)
∑ ρ j + ρK − 2 · E (ρ j ) > ε − 2 · E (ρ j )
K − 1 j=1
(
)
ε2
6 exp −
(15)
2 · kwk22 · σ 2
 2

ε · (K − 1)
= exp −
(16)
2·σ2 ·K
Since K ∈ [2, n],
)
(


2


(ε
−
2
·
E
[ρ
])
·
(K
−
1)
j
Pr sup Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq > ε 6 exp −
2·σ2 ·K
b∈Λ
(
)
(ε − 2 · E [ρ j ])2
6 exp −
4·σ2

(17)
(18)

n
o
If we set ϖ = exp − (ε − 2 · E [ρ j ])2 / 4 · σ 2 ,
s




1
ε = 2 · E [ρ j ] + 2 · σ · log
ϖ
s  
1
6 2 · RCn/K (Λ) + 2 · σ · log
ϖ

(19)

(20)

where RCn/K (Λ) is the Rademacher complexity on each fold. Hence, ∀b ∈ Λ, the following inequality
holds with probability at least 1 − ϖ ∈ (0, 1],
8

C ROSS - VALIDATION STABILITY

s
Rns (b,Ysq , Xsq )

6 Rnt

q

b,Ytq , Xt


1
log
.
ϖ

+ 2 · RCn/K (Λ) + 2 · σ ·



(21)

Denote σ 2 /var [ρ j ] = ξ 2 . Based on assumption A5,8 the supremum operator and expectation operator
may be interchanged. Hence, the definition of ρi implies that
#2


1 n/K 
j,i j,i
σ 6 ξ · E sup
∑ Q b, y , x − R (b,Y, X)
b∈Λ n/K i=1

!2 
n/K 


1

Q b, y j,i , x j,i − R (b,Y, X)
= ξ 2 · E sup
∑
n/K
b∈Λ
i=1
 "
#2 
n/K 


1
= ξ 2 · sup E
Q b, y j,i , x j,i − R (b,Y, X) 
∑
n/K
b∈Λ
i=1
"

2

2

= ξ2 ·
6



 
1
· sup var Q b, y j,i , x j,i − R (b,Y, X)
n/K b∈Λ

(22)

(23)

(24)
(25)

M2
.
n/K

(26)

As a result, given the probability 1 − ϖ,
s
q

Rns (b,Ysq , Xsq ) 6 Rnt b,Ytq , Xt + 2 · RCn/K (Λ) + 2 · M ·

log (1/ϖ)
.
n/K

(27)

The RHS and LHS will be identical if limn→∞ K/n = 0.
2. ρ j

Ψ2

is finite

If the
2 norm
 Orlicz-Ψ

 of ρ j is finite,
 ρ j is subgaussian. By defining the variance proxy of
supb∈Λ var Q b, y j,i , x j,i − R (b,Y, X) as σ̃ 2 , eq. (25) implies that
s
q

Rns (b,Ysq , Xsq ) 6 Rnt b,Ytq , Xt + 2 · RCn/K (Λ) + 2 · ξ · σ̃ ·

log (1/ϖ)
,
n/K

∀1 − ϖ ∈ [0, 1)

3. ρ j

Ψ1

(28)

is finite

8. If we use assumption A50 , an extra ζ ∈ R+ will occur besides M. We rely on A5 in this paper, but similar results could
be derived under A50 , which is straightforward and will not be specified here.

9

X U ET AL .

If ρ j

is finite, ρ j is subexopential. As a result, a Bernstein-type inequality holds as follows
"
#
1 K−1
Pr [Φnt + Φns > ε] 6 Pr
(29)
∑ ρ j + ρK > ε
K − 1 j=1
"
#
1 K−1
= Pr
(30)
∑ ρ j + ρK − 2 · E (ρ j ) > ε − 2 · E (ρ j )
K − 1 j=1





2
ε
ε

,
(31)
6 2 · exp −c · min 
2

ρ j Ψ · kwk22 ρ j Ψ1 · kwk∞ 
1



2

(ε − 2 · E [ρ j ]) ε − 2 · E [ρ j ] 

(32)
6 2 · exp −c · min
,
2


ρj Ψ
2· ρj

Ψ1

1

Ψ1


If we set (ε − 2 · E [ρ j ]) / 2 · ρ j


Ψ1

= τ,


(ε − 2 · E [ρ j ]) ε − 2 · E [ρ j ]   (ε − 2 · E [ρ j ]) / ρ j Ψ1 ,
√
min 
,
=
2
 (ε − 2 · E [ρ j ])2 /
ρj Ψ
2· ρj
2· ρj
1




2

if τ > 1
2
Ψ1

Ψ1

, if τ 6 1

(33)

Hence,



ε−2·E[ρ j ]


,
if τ > 1

 
 2 exp −c · kρ j kΨ
1
(
)
q q
q q
Pr sup |Rns (b, Xs ,Ys ) − Rnt (b, Xs ,Ys )| > ε 6
2

(ε−2·E[ρ j ])
b∈Λ

, if τ 6 1
 2 exp −c ·
2

2·kρ j kΨ
1
If we set ϖ as the RHS of eq. (34), i.e.



ε−2·E[ρ j ]


,
if ε − 2 · E [ρ j ] > 2 · ρ j Ψ > 0

 2 exp −c · kρ j kΨ
1
1
)
(
ϖ=
2

(ε−2·E[ρ j ])

, if 0 < ε − 2 · E [ρ j ] 6 2 · ρ j Ψ
 2 exp −c ·
2

1
2·kρ j kΨ
1

(35)

ε may be expressed as a function of ϖ,

p
2E [ρ j ] + ρ j Ψ · log c (2/ϖ),
if ε − 2 · E [ρ j ] > 2 · ρ j Ψ > 0
1
1
 21

ε=
p
c
2E [ρ j ] + ρ j
· 2 · log (2/ϖ) , if 0 < ε − 2 · E [ρ j ] 6 2 · ρ j Ψ
Ψ
1

(34)

(36)

1

Hence, ∀b ∈ Λ, the following inequality holds with probability at least 1 − ϖ ∈ (0, 1]
p

Rns (b,Ysq , Xsq ) 6 Rnt b,Ytq , Xtq + 2 · RCn/K (Λ) + ρ j Ψ · log c (2/ϖ),
1

Rns (b,Ysq , Xsq ) 6 Rnt

if 2 exp {−2c} > ϖ > 0

 12
p

b,Ytq , Xtq + 2 · RCn/K (Λ) + ρ j Ψ · 2 · log c (2/ϖ) ,

(37)

if 2 exp {−2c} 6 ϖ 6 1

(38)

1

10

C ROSS - VALIDATION STABILITY

Based on Rademacher complexity, eq. (5) establishes the upper bound of the one-round test error
based on the one-round training error for risks with different tails. The upper bound of the one-round
test error is directly derived by finding the upper bound for ϖ of the one-round (β , ϖ)-stability.
Hence, the one-round upper bound measures the probabilistic stability of the one-round test error.
Due to the Olicz norm, eq. (5) will also work when Lebesgue-2 norm of the loss does not exist.
As shown in eq. (5), the stability of the one-round test error is determined by n, K, and the k·kΨν
norm, where ν ∈ [1, 2]. The smaller ν, the heavier the tails of the loss, and the more volatile the
one-round test error. Furthermore, in one-round validation, the values of n and K directly influence
how similar are the test and training sets, or the parity between test and training sets. Leave-one-out
cross-validation, for example, uses one point to validate the result learned from the other n − 1 points.
Given the value of n, leave-one-out cross-validation does not maintain the parity very well, and hence
it results in unnecessary instability in one-round validation: RC1 and the last term of eq. (5) would
be extremely high, even though Rnt may be close to its population value.9 Hence, it is beneficial to
balance the sample sizes of the training and test sets. It is also worth nothing that since the one-round
stability is defined using the supremum norm, a similar lower bound may be derived as well. Due to
the similarity of the techniques, we skip the derivation of the lower bound.
The next step is to convolute the test error and training error in each round and establish the
convoluted Rademacher-bounds for cross-validation. If the empirical processes Rnt and Rns in
all rounds of cross-validation are independent, we can directly apply concentration inequalities,
such as the Hoeffding or Bernstein inequalities, and approximate the probability of the convoluted
Rademacher-bounds. However, with large K, it is well-known that {Rnt − Rns } may be an empirical process with a strong and persistent autocovariance, implying that the straightforward i.i.d.
concentration paradigm cannot be applied here. In order to establish the convoluted PAC-bound
for cross-validation based on one-round bounds, we first generalize the Chebyshev inequality to
dependent processes in the following lemma.
Lemma 5 Assume {Xi }ni=1 is sampled from a stationery and mean-square ergodic process and that
the autocovariance function cov (Xi+l , Xi ) := γl < ∞, ∀l ∈ R. The following inequality holds for any
ϖ ∈ [0, 1),

γ0
Pr X − E (X) 6 ε > 1 − 2 · (1 + 2Vn [X]) .
ε n

(39)

2
where Vn [X] := ∑n−1
l=1 |γl | and ϖ = γ0 /(n · ε ) · (1 + 2Vn [X]).

For the completeness, the proof of the last lemma is included in the appendix. A few comments
apply to Lemma 5. In eq. (39), limn→∞ Vn [X] is the autocovariance time for the process {Xi } in
the population. As long as limn→∞ Vn [X] /n 6 ∞, eq. (39) holds for the process {Xi }. As the final
preparation for bounds of cross-validation, let’s first define the one-round Rademacher complexity
for the cross validation.
Definition 6 (One-round Rademacher complexity for cross-validation) Given the sample size n
and the number of folds K, the test size ns = n/K and the training size nt = 1 − ns . Let’s denote
9. Eq. (5) is not restricted to K-fold cross-validation. It may also be used to measure one-round stability of the test error
in Monte Carlo cross-validation, stratified cross-validation, and repeated K-fold cross-validation.

11

X U ET AL .



Ytq , Xtq as the training set in qth round and Ysq , Xsq as the test set in qth round. We denote the
one-round Rademacher complexity of the model class Λ, RC (Λ, n, K) as
1
1
RC (Λ, n, K) = RCns (Λ) + RCnt (Λ)
2
2

A short comment need to address for definition 6. As shown in the researches of learning theory, the
Rademacher complexity is expected to bound the maximal deviation between the sample risk and
population risk. Likwise, on average the one-round Rademacher complexity bounds the maximal
difference between two sample risks, which is quite handy in the proof of the convoluted bounds for
cross-validation in both i.i.d and non-i.i.d cases. Definition 6 completes the underpinnings to the
proof of the convoluted PAC-bounds. Based on definition 6, lemma 5 and theorem 7, a convoluted
Rademacher-bound may be established for the average test error in K-fold cross-validation.10
Theorem 7 (Convoluted Rademacher-bounds for the average test error in cross-validation) Assume
A1 - A5 are satisfied. Furthermore, assume Lemma 5 and Theorem 4 hold.
1. The ρ j Ψ 6 ∞ case. If
2
probability at least (1 − κ)+ ,

ρj

Ψ2

6 ∞, ∀b ∈ Λ, the following upper bound holds with


1 K
1 K
q
q
R
Rnt b,Ytq , Xtq + 2 · RC (Λ, n, K) + ς
(b,Y
,
X
)
6
ns
∑
∑
s
s
K q=1
K q=1

(40)

where
κ=

1 + 2VK [Tq ]
,
2 · ξ 2 · K · log (1/ϖ)

ξ and ς are parameters inherited from Theorem 4
2. The ρ j Ψ 6 ∞ case If ρ j Ψ 6 ∞ and Tq still has a finite variance, the following upper bound
1
1
holds with probability at least (1 − κ)+ ,

1 K
1 K
q
q
R
(b,Y
,
X
)
6
Rnt b,Ytq , Xtq + 2 · RC (Λ, n, K) + ς
ns
∑
∑
s
s
K q=1
K q=1

(41)

where

κ=









6·(1+2VK [Tq ])

√

,

K·log c 2/ϖ
12·(1+2VK [Tq ])
 √
2 ,
K· log c 2/ϖ

if ϖ ∈ [2 exp {−2c} , 1] .
if ϖ ∈ (0, 2 exp {−2c}) .

ς is defined in the previous equation.
10. Because it is simply a repetition of ordinary K-fold cross-validation, Theorem 7 may also be used to measure the
performance of repeated K-fold cross-validation.

12

C ROSS - VALIDATION STABILITY

Proof
1. The ρ j

Ψ2

6 ∞ case. Since we have already defined
Tq = Uq − E [Uq ]

= sup Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq
b∈Λ


q
q
q
q
− E sup Rns (b,Ys , Xs ) − Rnt b,Yt , Xt
,

(42)
(43)

b∈Λ

Lemma 5 implies that
(

)
γ0 [Tq ]
1 K
(44)
Pr
Tq > ς 6 2 · (1 + 2VK [Tq ])
∑
K q=1
ς K
q
Based on Theorem 4, we let ς = 2 · ξ · σ̃ · log(1/ϖ)
when ρ j Ψ is well defined. Since we can
n/K
2
interchange sup {·} and E [·], the definition of γ0 implies that
γ0 [Tq ] = E [Uq − E [Uq ]]2


 2
6 E sup Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq
b∈Λ

n
o
q
q  2
q
q
= E sup
Rns (b,Ys , Xs ) − Rnt b,Yt , Xt
b∈Λ
n 
 2 o
= sup E Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq
b∈Λ
 

= sup var Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq
.

(45)
(46)
(47)
(48)

b∈Λ

Since


var Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq


= var Rns (b,Ysq , Xsq ) − R (b,Y, X) + R (b,Y, X) − Rnt b,Ytq , Xtq


= var [Rns (b,Ysq , Xsq ) − R (b,Y, X)] + var R (b,Y, X) − Rnt b,Ytq , Xtq ,

(49)
(50)

we can show that
γ0 [Tq ] 6 sup {2 · var [Rns (b,Ysq , Xsq ) − R (b,Y, X)]}

(51)

b∈Λ

=

 


2
· sup var Q b, yi, j , xi, j − R (b,Y, X)
n/K b∈Λ

(52)

Based on the definition of ς ,
γ0 [Tq ]
· (1 + 2VK [Tq ])
ς 2K
 


2/ (n/K) · supb∈Λ var Q b, yi, j , xi, j − R (b,Y, X) · (1 + 2VK [Tq ])
6
(4 · ξ 2 · K) / (n/K) · supb∈Λ {var [Q (b, yi, j , xi, j ) − R (b,Y, X)]} · log (1/ϖ)
1 + 2VK [Tq ]
=
.
2 · ξ 2 · K · log (1/ϖ)
13

(53)
(54)

X U ET AL .




Since E [Uq ] = E supb∈Λ Rns b,Ysq , Xsq − Rnt b,Ytq , Xtq 6 2·RC (Λ, n, K), ∀b ∈ Λ the following
equations hold,
(
)
1 K
Pr
∑ Tq 6 ς
K q=1
(
)
1 K
1 K
q
q
q
q
=Pr
(55)
∑ Rns (b,Ys , Xs ) 6 K ∑ Rnt b,Yt , Xt + E [Uq ] + ς
K q=1
q=1
(
)
1 K
1 K
q
q
q
q
=Pr
(56)
∑ Rns (b,Ys , Xs ) 6 K ∑ Rnt b,Yt , Xt + 2 · RC (Λ, n, K) + ς
K q=1
q=1

+
1 + 2VK [Tq ]
.
(57)
> 1−
2 · ξ 2 · K · log (1/ϖ)
This completes the proof.11
2. The ρ j Ψ 6 ∞ case
1
We assume ρ j Ψ and var [Tq ] are well defined. If ϖ ∈ [2 exp {−2c} , 1], based on the definition
1
of ς and the fact that
γ0 [Tq ]
γ0 [Tq ]
1 + 2VK [Tq ]
p
·
· (1 + 2VK [Tq ]) =
2
c
ς K
K · 2 · log 2/ϖ ρ j 2
Ψ

(58)

1

Since γ0 [Tq ] / ρ j

2
Ψ1

6 8 + 4/(K − 1), 12


γ0 [Tq ]
1 + 2VK [Tq ]
4
p
· (1 + 2VK [Tq ]) 6
· 8+
ς 2K
K −1
K · 2 · log c 2/ϖ
6 · (1 + 2VK [Tq ])
p
6
.
K · log c 2/ϖ

(59)
(60)

Likewise, if ϖ ∈ (0, 2 exp {−2c}),
γ0 [Tq ]
12 · (1 + 2VK [Tq ])
· (1 + 2VK [Tq ]) 6
 p
2 .
ς 2K
K · log c 2/ϖ

(61)

As a result, if we set

κ=









6·(1+2VK [Tq ])

√

,

K·log c 2/ϖ
12·(1+2VK [Tq ])
 √
2 ,
K· log c 2/ϖ

if ϖ ∈ [2 exp {−2c} , 1] .
if ϖ ∈ (0, 2 exp {−2c}) .

(62)

 

11. Specifically, to make sure 1 − 1 + 2VK Tq / 2 · ξ 2 · K · log (1/ϖ) is between 0 and 1, we need
 


 

1 + 2VK Tq / 2 · ξ 2 · K · log (1/ϖ) 6 1, which implies that 0 6 ϖ 6 exp − 1 + 2VK Tq / 2 · ξ 2 · K .
12. See lemma 11 for detail

14

C ROSS - VALIDATION STABILITY

(
Pr


1 K
1 K
q
q
R
(b,Y
,
X
)
6
Rnt b,Ytq , Xtq + 2 · RC (Λ) + ς
n
∑
∑
s
s
s
K q=1
K q=1

)

> (1 − κ)+ ,

(63)

Similar to Theorem 4, the convoluted Rademacher-bounds in Theorem 7 measure the stability
for the average test error in K rounds of cross-validation. In a similar vein to Theorem 4, Theorem 7
reveals the encoded influence of n, K and the tail heaviness of the loss distribution on the stability of
the average test error. The new problem cross-validation brings, which does not occur with one-round
validation, is that the training errors in each round are correlated at a constant level; moreover, the
correlation gets larger as K gets larger. This symptom occurs due to the overlapping of training
sets for different rounds, which ultimately stems from the splitting scheme employed on the data.
The autocorrelation among training errors from different rounds further weakens the stability of
the evaluation result for cross-validation: the optimal model that cross-validation selects, which is
ultimately trained with nt points, might behave very different in a new-coming sample of size ns , if
K is unnecessarily large. The large magnitude of autocorrelation, brought up by a large K, will also
make 1 − κ, the probability approximation for eq. (40) and (41), less than or equal to zero, which
makes the probabilistic approximation in Theorem 7 more difficult in finite samples. As a result,
cross-validation is more complicated and 1 − κ depends on the correlation as well as on K. Hence, for
given values of n and the Orlicz-Ψν norm of the loss, the sampling variation and correlation among
training errors from different rounds makes the average test error very volatile. Thus, minimizing the
average test error (the cross-sample mean) via tuning K is difficult and potentially unfruitful.
Alternatively, from the perspective of minimax, the performance of cross-validation may be
tuned by finding the minimum point on the convoluted Rademacher bounds parametrized by K and
b. Since the convoluted Rademacher bounds stand for the stability of the cross-validation under
different values of K and different b ∈ Λ, the best stability is acquired at the minimax-optimal pair of
(K, b), denoted as (K ∗ , b∗ ). Thus, minimizing the convoluted Rademacher bounds guarantees the
model selected by cross-validation at K = K ∗ is the most stable across different samples sized ns .

3. Convoluted Rademacher-bounds for cross-validated test errors in the non-i.i.d.
case
In this section, we show that the results on constructing the i.i.d. convoluted Rademacher-bounds
may be generalized to the non i.i.d. case. As an illustration, we consider β -mixing stationery
processes. To ensure that the stability results for cross-validation are generalizable to other samples
then, roughly speaking, the test and training sets must be independent and drawn from the sample
population. However, if the data-generating process is dependent across time or space and the sample
is a time series or spatially correlated, independence between the test set and training set will fail,
potentially compromising the stability of the model evaluation results in cross-validation. As a result,
the techniques in section 2 do not directly generalize to non-i.i.d. data. To solve the problem of
dependence between training and test sets and construct convoluted Rademacher-bounds for non-i.i.d.
data, we introduce the technique of ‘independent blocks’ (Bernstein, 1927; Yu, 1994).
As shown in Figure 1, the essence of the independent blocks technique is approximation. Precisely
speaking, the technique consists of first splitting a sequence of training data, for example ST , into
15

X U ET AL .

Training set

Test set

time
8"$

8"#

(a) original data
Blocks on training set
"#

"#

"#

"#

Blocks on test set
"$

"$

"$

"$

%&'

%('

%)'

%*'

%&+

%(+

%)+

%*+

"#

"#

"#

"#

"$

"$

"$

"$

time

(b) blocking on original data
Independent blocks
for test set

Independent blocks
for training set
"#

"#

"#

"$

"$

"$

%,&'

%,('

%,)'

%,*'

%,&+

%,(+

%,)+

%,*+

"#

"#

"#

"#

"$

"$

"$

"$

time

(c) independent blocks

Figure 1: illustration of independent blocks techinique where µ = 4
two subsequences S0T and S1T , each made of µ blocks of at consecutive points. Likewise, the test data
SS is also split into S0S and S1S , each made of µ blocks of as consecutive points. Given a sequence
ST = zT1 , zT2 , . . . , znt with nt = 2at µ and SS = zS1 , zS2 , . . . , zns with ns = 2as µ. S0T and S0S are defined
as follows



S0T = Z1T , Z2T , . . . , ZµT , where ZiT = zT(2i−1)+1 , . . . , zT(2i−1)+a
(64)



S0S =
Z1S , Z2S , . . . , ZµS , where ZiS = zS(2i−1)+1 , . . . , zS(2i−1)+a
(65)
If {zi } is β -mixing and the mixing coefficient decays rapidly (exponentially or algebraically), large
at and as make each block in S0T or S0S ‘almost’ independent from each other while each block is still
drawn from the
as {z
Next, we create two new sequences of
 same distribution

i } in the population.

T
T
T
S
S
S
e
e
e
e
e
e
blocks: S = Z1 , . . . , Zµ and S = Z1 , . . . , Zµ . The key feature of SeT is that, unlike in S0T , ZeiT
and ZeTj are, for any i, j, strictly independent. Also, ZeiT is still identically distributed as ZiT for any i.
Hence, the technique creates a sequence of independent, equally-sized blocks, to which standard
i.i.d. techniques may be applied. Likewise, all blocks in SeS are independent and ZeiS is identically
distributed as ZiS for any i. Also, ZeiT is independent with ZeSj , for any i and j. This ensures the
independent blocks for the training data and test data are mutually independent. Since the original
blocks, S0T and S0S , are ‘very similar’ to their independent blocks, Se0T and Se0S , we can approximate

the performance of cross-validation on ST , SS by its performance on SeT , SeS . The following
0

0

0

0

theorem by Yu (1994) illustrates that the independent blocks and original blocks are similar.
16

C ROSS - VALIDATION STABILITY

Theorem 8 (Yu (1994))
 Let µ > 1 and suppose that Λ is a model class bounded by M > 0, defined
on the blocks S0T , S0S . Assume that h is real-valued and measurable in the product probability
µ
µ
space Πi=1 Ωi , Πi=1 Fi . Then, for any S0T and S0S drawn from a stationery β -mixing process,
ES0T [h] − ESeT [h]

6 (µ − 1) Mβat

(66)

ESS [h] − ESeS [h]

6 (µ − 1) Mβas

(67)

0

where ES0T and ESS is the expectation w.r.t. S0T and S0S ; ESeT and ESeS is the expectation w.r.t. SeT and
0
SeS .
Theorem 8 is the key result that allows us to approximate the performance of cross-validation
with independent blocks. Based on Theorem 8 and the McDiarmid inequality, we may derive the
Rademacher bound for the one-round test error in cross-validation as follows.
Theorem 9 Assume that the test and training data are both sampled from a stationery β -mixing
process. Assume also that the loss
 function Q is measurable in space (Ω, F ), space (Ωi , Fi ) , ∀i, and
µ
µ
product space Πi=1 Ωi , Πi=1 Fi . Denote ϖ 0 = ϖ − (µ − 1) [βat + βas ]. If (µ − 1) [βat + βas ] < 1, the
following Rademacher bound holds with probability at least 1 − ϖ, ∀ϖ ∈ ( (µ − 1) [βat + βas ] , 1 ],
s
log (4/ϖ 0 )
Rns (b, Xs ,Ys ) 6 Rnt (b, Xt ,Yt ) + M ·
(68)
+ 2 · RCSeS (Λ)
0
2µ
where RCSeS (Λ) is the Rademacher bound of the model class Λ on the block Se0S .
0

Proof In this theorem we quantify the probability of


Pr sup |Rnt (b, Xt ,Yt ) − Rns (b, Xs ,Ys )| > ε .
b∈Λ

Based on the independent blocks,


Pr sup |Rnt (b, Xt ,Yt ) − Rns (b, Xs ,Ys )| > ε
b∈Λ



 1 


1
T
T
S
S
R b, S0 + R b, S1 − R b, S0 + R b, S1 > ε
= Pr sup
2
b∈Λ 2




 


T
S
T
S
= Pr sup R b, S0 − R b, S0 + R b, S1 − R b, S1 > 2ε
b∈Λ






T
S
T
S
6 Pr sup R b, S0 − R b, S0 + sup R b, S1 − R b, S1 > 2ε
b∈Λ
b∈Λ








T
S
T
S
6 Pr sup R b, S0 − R b, S0 > ε + Pr sup R b, S1 − R b, S1 > ε .

(72)



Since S0S , S0T and S1S , S1T are identically distributed due to stationarity,








Pr sup R b, S0T − R b, S0S > ε = Pr sup R b, S1T − R b, S1S > ε .

(73)

b∈Λ

(69)
(70)
(71)

b∈Λ

b∈Λ

b∈Λ

17

X U ET AL .

This implies, alongside eq. (72), that






T
S
Pr sup |Rnt (b, Xt ,Yt ) − Rns (b, Xs ,Ys )| > ε 6 2 · Pr sup R b, S0 − R b, S0 > ε
b∈Λ

(74)

b∈Λ

Denote


Φ S0S = sup R (b X, Y ) − Rns b, S0S ,
b∈Λ


T
Φ S0 = sup R (b X, Y ) − Rnt b, S0T .
b∈Λ

As a result, ∀ε > 0,







T
S
Pr sup Rnt b, S0 − Rns b, S0 > ε 6 Pr Φ S0T + Φ S0S > ε

(75)

b∈Λ

h  i



To approximate the probability of Pr Φ S0T + Φ S0S > ε , we define ε1 = ε/2 − E Φ Se0T
h  i
 h  i h  i
and ε2 = ε/2 − E Φ Se0S . Hence, ∀ε/2 > max E Φ Se0T , E Φ Se0S
,







Pr Φ S0T + Φ S0S > ε 6 Pr Φ S0T > ε/2 + Pr Φ S0S > ε/2

h  i


= Pr Φ S0T − E Φ Se0T > ε1

h  i


+ Pr Φ S0S − E Φ Se0S > ε2 .

(76)

Since the probability may be considered to be the expectation of some indicator function, we can
apply Theorem 8. Thus,

h  i

  
h  i


Pr Φ S0T − E Φ Se0T > ε1 6 Pr Φ Se0T − E Φ Se0T > ε1
+ (µ − 1) βat ,

h  i

  
h  i


Pr Φ S0S − E Φ Se0S > ε2 6 Pr Φ Se0S − E Φ Se0S > ε2
+ (µ − 1) βas .

(77)

(78)

By applying the McDiarmid inequality to the RHS of eqs. (77) and (78), we get the exponential
inequalities for the LHS of eqs. (77) and (78), which yields
!
2

h  i


2µ
(ε
)
1
T
T
Pr Φ S0 − E Φ Se0 > ε1 6 exp −
+ (µ − 1) βat ,
(79)
M2
!
2

h  i


2µ
(ε
)
2
Pr Φ S0S − E Φ Se0S > ε2 6 exp −
+ (µ − 1) βas .
(80)
M2
 h  i h  i
,
By denoting e
ε = min (ε1 , ε2 ) = ε/2 − max E Φ Se0S , E Φ Se0T
!


2
2µ (e
ε)
Pr sup |Rnt (b, Xt ,Yt ) − Rns (b, Xs ,Ys )| > ε 6 4 exp −
+ 2 (µ − 1) [βat + βas ] , (81)
M2
b∈Λ
18

C ROSS - VALIDATION STABILITY

which yields
"
!
#


2
2µ (e
ε)
+ 2 (µ − 1) [βat + βas ] .
Pr sup |Rnt (b, Xt ,Yt ) − Rns (b, Xs ,Ys )| 6 ε > 1 − 4 exp −
M2
b∈Λ
(82)

2
e
ε)
If we set ϖ = 4 exp − 2µ(
+ 2 (µ − 1) [βat + βas ], ϖ 0 = ϖ − (µ − 1) [βat + βas ] and assume
M2
ϖ 0 > 0,
s
ε =M·
s
6M·
s
=M·

 h  i h  i
log (4/ϖ 0 )
+ 2 · max E Φ Se0T , E Φ Se0S
2µ

(83)



log (4/ϖ 0 )
+ 2 · max RCSeT (Λ) , RCSeS (Λ)
0
0
2µ

(84)

log (4/ϖ 0 )
+ 2 · RCSeS (Λ) .
0
2µ

(85)

As a result, eq. (82) may be respecified as, ∀b ∈ Λ,
s
Pr Rns (b, Xs ,Ys ) 6 Rnt (b, Xt ,Yt ) + M ·

!
log (4/ϖ 0 )
+ 2 · RCSeS (Λ) > 1 − ϖ
0
2µ

(86)

As shown in Theorem 9, a Rademacher bound for the one-round test error is constructed to
quantify the variation of one-round test error, similar to Theorem 4. The larger the probability the i.i.d.
bound for the one-round test error holds, the higher the bound. However, the probability the non-i.i.d.
bound for one-round test error holds is constrained by the magnitude of the β -mixing coefficient.
In a similar vein, based on Lemma 5, we may construct the convoluted Rademacher-bound for
cross-validation in the non-i.i.d. case.
2(1+2Vk [Tq ])
Theorem 10 Assume Lemma 5 and Theorem 9 hold. With probability at least 1 − log(4/ϖ 0 )K/µ , the
following bound holds
s
K

1 K
1
log (4/ϖ 0 )
q
q
Rns (b, Xsq ,Ysq ) 6 ∑ Rnt b, Xt ,Yt + 2 · RCSeS (Λ) + M ·
(87)
∑
0
K q=1
K q=1
2µ

where



2 (1 + 2VK [Tq ])
ϖ ∈ 0, 4 exp −
K/µ
0

2(1+2Vk [Tq ])
to make sure 1 − log(4/ϖ 0 )K/µ ∈ (0, 1].

19

(88)

X U ET AL .

Proof Since we have already defined

Tq = sup Rns (b,Ysq , Xsq ) − Rnt b,Ytq , Xtq
b∈Λ


q
q
q
q
− E sup Rns (b,Ys , Xs ) − Rnt b,Yt , Xt
,

(89)

b∈Λ

Lemma 5 implies that
(
Pr

1 K
∑ Tq > ς
K q=1

Based on Theorem 9, we let ς = M ·

q

)
6

log(4/ϖ 0 )
,
2µ

γ0 [Tq ]
· (1 + 2VK [Tq ])
ς 2K

(90)

which implies that

γ0 [Tq ]
· (1 + 2VK [Tq ])
ς 2K
γ0 [Tq ]
= 2
· (1 + 2VK [Tq ])
M · K · log (4/ϖ 0 ) / (2µ)
2 (1 + 2VK [Tq ])
6
.
log (4/ϖ 0 ) · K/µ

(91)
(92)

As a result,
s
(
)
K

1 K
log (4/ϖ 0 )
1
q q
q q
Pr
∑ Rns (b, Xs ,Ys ) 6 K ∑ Rnt b, Xt ,Yt + 2 · RCSe0S (Λ) + M ·
K q=1
2µ
q=1
> 1−

2 (1 + 2VK [Tq ])
log (4/ϖ 0 ) · K/µ

(93)

To make sure 1 − 2 (1 + 2VK [Tq ]) / (log (4/ϖ 0 ) · K/µ) is between 0 and 1, we need
2 (1 + 2VK [Tq ])
6 1,
log (4/ϖ 0 ) · K/µ

(94)




2 (1 + 2VK [Tq ])
.
ϖ ∈ 0, 4 exp −
K/µ

(95)

which implies that
0

4. Conclusion
In this paper, we construct the general theory for cross-validation from the perspective of the stability
of the model evaluation/selection result. We propose the first class of upper bounds, referred to as
the convoluted Rademacher-bounds, to quantify the stability of cross-validation in both i.i.d. and
20

C ROSS - VALIDATION STABILITY

non-i.i.d. cases. Given the fact that learning tasks involving subsampling or resampling (like crossvalidation, bootstrap or jackknife) may result in substantial variation due to the sampling scheme, we
consider the hyperparameter tuning scheme (optimizating the performance of hyperparameter) from
the perspective of stability. This approach reveals insights around model selection from a stability
perspective and enlightens the learning theory for regularizing complicated and hierarchical learning
algorithms.
The practical difficulty in formally translating these idea is straightforward. Our goal is to
establish (probablistic) uniform bounds for the learning algorithm in some given functional space.
As a result, the techniques have to deal with maximal deviation, or supb∈Λ |·|, similar to the work of
Vapnik. However, Rademacher learning theory carries an advantage in terms of conciseness, tightness
and utilization, which can be exploited with data. These advantages distinguish Rademacher theory
from VC theory, necessitating a different path to Vapnik’s work. The key is utilizing Orlicz-Ψν
space, imported from functional analysis and harmonic analysis.
Due to the distinctions between Orlicz-Young theory and the classical integration theory of
Lebesgue-Darboux-Jordan, a caveat of our approach is also worth mentioning. In one-round
Rademacher bounds, the concentration inequality based on the Orlicz-Ψν norms shows its power by
quantifying the exponential concentration tendency without requiring the Lebesgue p-norm. However, due to the fact that the classical techniques of studying time series typically need a well-defined
Lebesgue 2-norm, we have to assume Tq has a finite Lebesgue 2-norm, which weakens the power of
Orlicz-Ψ space. Besides, the independent blocks require a well-defined envelope function for the
random variable of interest, which makes the power independent blocks confined temporarily on the
bounded variables
Our next task is to quantify, in the non-i.i.d. case, the exponential concentration tendency in
Orlicz-Ψν space, which does not require a finite Lebesgue 2-norm for random variables. We are also
working on the methodology of studying the LLN and CLT paradigm for time series without a finite
Lebesgue 2-norm. These two methods can ultimately free the power of the Orlicz-Ψν space, and it
will also generalize the properties of cross-validation studied in this paper to the flat/long/heavy-tailed
distributions, in both i.i.d. and non-i.i.d. cases.

Acknowledgments
We would like to thank Prof. Pierre Del Moral, Prof. Peter Hall, Prof. Mike Bain and Yi-Lung Chen
for valuable comments on earlier drafts. He also would like to acknowledge seminar participants
at NICTA, UNSW and Uni Melbourne for useful questions and comments. Fisher would like to
acknowledge the financial support of the Australian Research Council grant DP0663477.

Appendix A. Supplementary materials for mathematical proof
Lemma 11 Let’s denote γ0 [·] as the variance operator for some random variable, we also denote
k·kΨ1 as the Orlicz-Ψ1 norm for some random variable. The following statement holds.
γ0 [Tq ]
2
ρj Ψ
1

6 8+

21

4
K −1

(96)

X U ET AL .

Proof Based on the definition,
γ0 [Tq ]
2
ρj Ψ
1

=

var [supb∈Λ |Rnt − Rns |]
ρj

6

E [supb∈Λ |Rnt − Rns |]2
ρj

(97)

2
Ψ1
2
Ψ1

.

(98)

Since the norm is convex,
E [supb∈Λ |Rnt − Rns |]2
ρj

2
Ψ1

6

E [supb∈Λ |Rnt − R| + supb∈Λ |Rns − R|]2
ρj

=

(99)

2
Ψ1

h
i
h
i
E supb∈Λ (Rns − R)2 + E supb∈Λ (Rnt − R)2
ρj

+

2
Ψ1

2E [supb∈Λ (Rns − R)] · E [supb∈Λ (Rnt − R)]
ρj

2
Ψ1

Since the sup [·] and E [·] are interchangable, eq. (100) implies that
io
n h
io
n h
supb∈Λ E (Rns − R)2 + supb∈Λ E (Rnt − R)2
eq. (100) =
2
ρj Ψ

.

(100)

(101)

1

+

2 supb∈Λ {E [(Rns − R)]} · supb∈Λ {E [(Rnt − R)]}
ρj

6

2 supb∈Λ {var [Rns − R]} + supb∈Λ {var [Rnt − R]}
ρj

=

2
Ψ1
2
Ψ1


1
· supb∈Λ {var [Q − R]}
2 + K−1
ρj

2
Ψ1

· (n/K)

(102)
(103)

(104)

Based on the result that Lebesgue-p norm is less or equal to the Orlicz-Ψ1 norm multiplied by p!,13

1
2 + K−1
· supb∈Λ {var [Q − R]}
eq. (104) 6 4 ·
(105)
2
ρ j 2 · (n/K)

1
2 + K−1
· supb∈Λ {var [Q − R]}
i
= 4· h
(106)
E supb∈Λ (Rns − R)2 · (n/K)

1
2 + K−1
· supb∈Λ {var [Q − R]}
6 4·
(107)
supb∈Λ {var [Q − R]}
4
6 8+
(108)
K −1
13. This result is pretty popular in probability and can be found in different lecture notes and books, see Van der Vaart and
Wellner (1996) as an example.

22

C ROSS - VALIDATION STABILITY

Lemma 12 Assume {Xi }ni=1 is sampled from a stationery and mean-square ergodic process and that
the autocovariance function cov (Xi+l , Xi ) := γl < ∞, ∀l ∈ R. The following inequality holds for any
ϖ ∈ [0, 1),

γ0
Pr X − E (X) 6 ε > 1 − 2 · (1 + 2Vn [X]) .
ε n

(109)

2
where Vn [X] := ∑n−1
l=1 |γl | and ϖ = γ0 /(n · ε ) · (1 + 2Vn [X]).

Proof The Chebyshev inequality shows that

var X
Pr |X − E (X) | 6 ε > 1 −
.
ε2


The variance of X over time may be expressed as
 

2
2
var X = E X − E X

!2 
1  n
=
E
∑ Xi  − E (X)2
n2
i=1
=

1
n2

n

(110)

(111)
(112)

n

∑ ∑ E [Xi · X j ] − E (X)2 .

(113)

j=1 i=1

If we define the covariance γi− j := cov (Xi , X j ) and the variance as γ0 := var (X), this may be
expressed as
1
n2

n

n

∑ ∑ E [Xi · X j ] − E (X)2 =

1
n2

=

1
n2

j=1 i=1

n

n

∑ ∑ γi− j + E (X)2 − E (X)2

(114)

j=1 i=1
n

n− j

∑ ∑

γl

(115)

j=1 l=1− j

=

γ0
2 n−1 n− j
+ 2 ∑ ∑ γl
n n j=1 l=1

(116)

6

γ0
2 n−1 n− j
+ 2 ∑ ∑ |γl | .
n n j=1 l=1

(117)

Define γ0 ·Vn [X] := ∑n−1
l=1 |γl |, then
2
γ0
+ 2
n n

n n− j

∑ ∑ |γl |

6

j=1 l=1

6

γ0 2Vn [X] · (n − 1) · γ0
+
n
n2
γ0
· (1 + 2Vn [X]) .
n
23

(118)
(119)

X U ET AL .

Hence the Chebyshev inequality may be generalized to a mean-square ergodic and stationery time
series as

γ0
Pr X − E (X) 6 ε > 1 − 2 · (1 + 2Vn [X]) .
(120)
ε n
If Vn [X] /n → 0 and γ0 < ∞, the
 RHS of eq. (120) approaches 1 asymptotically. If we denote
ϖ := 1 − (1 + 2Vn [X]) γ0 / ε 2 n , (120) may be rearranged as, ∀ϖ ∈ [0, 1),
s
!
γ0 · (1 + 2Vn [X])
> ϖ.
(121)
Pr |X − E (X) | 6
n (1 − ϖ)

References
Radoslaw Adamczak et al. A tail inequality for suprema of unbounded empirical processes with
applications to markov chains. Electronic Journal of Probability, 13:1000–1034, 2008.
Peter L Bartlett and Shahar Mendelson. Rademacher and gaussian complexities: Risk bounds and
structural results. Journal of Machine Learning Research, 3(Nov):463–482, 2002.
Yoshua Bengio and Yves Grandvalet. No unbiased estimator of the variance of k-fold cross-validation.
Journal of machine learning research, 5(Sep):1089–1105, 2004.
Serge Bernstein. Sur l’extension du théorème limite du calcul des probabilités aux sommes de
quantités dépendantes. Mathematische Annalen, 97(1):1–59, 1927.
Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of Machine Learning
Research, 2(Mar):499–526, 2002.
Robert James Elliott. Stochastic calculus and applications, volume 18. Springer-Verlag, 1982.
Ji-Hyun Kim. Estimating classification error rate: Repeated cross-validation, repeated hold-out and
bootstrap. Computational Statistics & Data Analysis, 53(11):3735–3745, 2009.
Ron Kohavi. A study of cross-validation and bootstrap for accuracy estimation and model selection.
In Proceedings of the 14th international joint conference on Artificial intelligence, volume 2, pages
1137–1145, 1995.
Guillaume Lecue. Basic tools from empirical processes theory applied to the compress sensing problem.
http://perso-math.univ-mlv.fr/users/banach/Fallschool2009/
notes/L2009BasicToolsEmpiricalProcessesTheoryAppliedCompressSensing.
concentration.pdf, 2009.
Johannes Lederer, Sara Van De Geer, et al. New concentration inequalities for suprema of empirical
processes. Bernoulli, 20(4):2020–2038, 2014.
Chinghway Lim and Bin Yu. Estimation stability with cross-validation (escv). Journal of Computational and Graphical Statistics, 25(2):464–492, 2016.
24

C ROSS - VALIDATION STABILITY

Pascal Massart. About the constants in talagrand’s concentration inequalities for empirical processes.
Annals of Probability, pages 863–884, 2000.
Daniel J McDonald, Cosma Rohilla Shalizi, and Mark Schervish. Generalization error bounds for
stationary autoregressive models. arXiv e-print 1103.0942, 2011.
Mehryar Mohri and Afshin Rostamizadeh. Rademacher complexity bounds for non-i.i.d. processes.
In Daphne Koller, Dale Schuurmans, Yoshua Bengio, and Leon Bottou, editors, Advances in
Neural Information Processing Systems 21, pages 1097–1104. Curran Associates, Inc., 2009.
Mehryar Mohri and Afshin Rostamizadeh. Stability bounds for stationary ϕ-mixing and β -mixing
processes. Journal of Machine Learning Research, 11(Feb):789–814, 2010.
Shige Peng. Filtration consistent nonlinear expectations and evaluations of contingent claims. Acta
Mathematicae Applicatae Sinica (English Series), 20(2):191–214, 2004.
M. Stone. Cross-validatory choice and assessment of statistical predictions. Journal of the Royal
Statistical Society, Series B (Methodological), 36(2):111–147, 1974.
M. Stone. An asymptotic equivalence of choice of model by cross-validation and Akaike’s criterion.
Journal of the Royal Statistical Society, Series B (Methodological), 39(1):44–47, 1977.
Charlotte Striebel. Optimal control of discrete time stochastic systems, volume 110. Springer, 1975.
Michel Talagrand. The supremum of some canonical processes. American Journal of Mathematics,
116(2):283–325, 1994.
Terence Tao. Talagrand’s concentration inequalities. https://terrytao.wordpress.com/2009/
06/09/talagrands-concentration-inequality/, 2009.
Leslie G Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984.
AW Van der Vaart and JA Wellner. Weak Convergence and Empirical Processes. Springer, New
York, 1996.
Vladimir Naumovich Vapnik. Statistical learning theory, volume 1. Wiley New York, 1998.
Qing-Song Xu and Yi-Zeng Liang. Monte carlo cross validation. Chemometrics and Intelligent
Laboratory Systems, 56(1):1–11, 2001.
Jia-An Yan. On the commutability of essential infimum and conditional expectation operations.
Science Bulletin, 8:004, 1985.
Bin Yu. Rates of convergence for empirical processes of stationary mixing sequences. The Annals of
Probability, pages 94–116, 1994.

25

