Docsity

Learning Under Uniform Distribution, Lecture Slide - Computer Science, Slides of Computer Architecture and Organization

Toggle sidebar
bg1
Analysis of Boolean Functions (CMU 18-859S, Spring 2007)
Lecture 8: Learning under the uniform distribution
Feb. 8, 2005
Lecturer: Ryan O’Donnell Scribe: Moritz Hardt
1 The Learning Model
A learning problem is identified with a (concept) class Cof functions f:{−1,1}n→ {−1,1}.
A learning algorithm Ais a (usually randomized) algorithm with 2inputs
> 0accuracy parameter
δ > 0confidence parameter
and access to some target function f:
Either: Random Examples Or: (Membership) Queries
Acan ask for an example and gets a pair (x, f (x)) Acan ask for f’s value
where xis drawn from the uniform distribution. on any string xit wants.
Finally, Aoutputs a hypothesis h:{−1,1}n→ {−1,1}in the form of a circuit.
•We say, Alearns Cif for all , δ and for all f∈ C when Ais run, the output hsatisfies that
it is -close to fwith probability at least 1−δ.
•Ais efficient if it runs in time poly(n, 1/, 1/δ).
Remark 1.1 The PAC (“Probably Approximately Correct”) Learning model is due to Valiant: A
theory of the learnable. C.ACM 1984.
We will only consider the case of PAC-learning under the uniform distribution. This manifests
itself in two places:
•accuracy of the hypothesis: Prxunif. on {−1,1}n[h(x)6=f(x)]
•distribution of random examples: (x, f (x)) where xis drawn uniformly at random.
General PAC-learning insists that one algorithm works simultaneously for all distributions.
In fact, the machine learning community interested in real-world applications finds the uniform
setting questionable: “They’ll punch you in the nose if you try to tell them about algorithms in this
framework.” –Ryan. But, in a more general framework, no one can really prove anything.
We think of uniform distribution learning as a part of complexity theory and cryptography
rather than as part of real-world Machine Learning.
Remark 1.2 The random examples model is the traditional access model. The membership queries
model can be appropriate though, e.g., in attacking crypto systems.
1
pf3
pf4
pf5

Partial preview of the text

Download Learning Under Uniform Distribution, Lecture Slide - Computer Science and more Slides Computer Architecture and Organization in PDF only on Docsity!

Analysis of Boolean Functions (CMU 18-859S, Spring 2007)

Lecture 8: Learning under the uniform distribution

Feb. 8, 2005 Lecturer: Ryan O’Donnell Scribe: Moritz Hardt

1 The Learning Model

A learning problem is identified with a (concept) class C of functions f : {− 1 , 1 }n^ → {− 1 , 1 }. A learning algorithm A is a (usually randomized) algorithm with 2 inputs

 > 0 accuracy parameter

δ > 0 confidence parameter

and access to some target function f :

Either: Random Examples Or: (Membership) Queries A can ask for an example and gets a pair (x, f (x)) A can ask for f ’s value where x is drawn from the uniform distribution. on any string x it wants.

Finally, A outputs a hypothesis h : {− 1 , 1 }n^ → {− 1 , 1 } in the form of a circuit.

  • We say, A learns C if for all , δ and for all f ∈ C when A is run, the output h satisfies that it is -close to f with probability at least 1 − δ.
  • A is efficient if it runs in time poly(n, 1 /, 1 /δ).

Remark 1.1 The PAC (“Probably Approximately Correct”) Learning model is due to Valiant: A theory of the learnable_. C.ACM 1984._

We will only consider the case of PAC-learning under the uniform distribution. This manifests itself in two places:

  • accuracy of the hypothesis: Prx unif. on {− 1 , 1 }n [h(x) 6 = f (x)]
  • distribution of random examples: (x, f (x)) where x is drawn uniformly at random. General PAC-learning insists that one algorithm works simultaneously for all distributions. In fact, the machine learning community interested in real-world applications finds the uniform setting questionable: “They’ll punch you in the nose if you try to tell them about algorithms in this framework.” –Ryan. But, in a more general framework, no one can really prove anything. We think of uniform distribution learning as a part of complexity theory and cryptography rather than as part of real-world Machine Learning.

Remark 1.2 The random examples model is the traditional access model. The membership queries model can be appropriate though, e.g., in attacking crypto systems.

2 Run time

The trivial run time is O(n 2 n). Even with just random examples, you will see the output of the target function on every input with high probability so that you can learn with  = 0. What we want instead is a run time polynomial in n and 1 /. We don’t care much about n^2 vs. n^3 or n^4. As it turns out, the parameter δ is never interesting. Inevitably, any algorithm runs T (n, 1 /) many steps. Some steps interact with the examples (usually estimating something about f ) and can “fail”, but the failure probability can be decreased to δ′^ at the cost of O(log 1/δ′) repetitions. So, set δ′^ = δ/T (n, 1 /). Then, except with probability δ, no steps fail (union bound). The total running time overhead is multiplicative log(T (n, 1 /)) + log(1/δ). Also, algorithms can test their

own hypotheses. So, any running time dependence on δ (like 22 1 /δ ) can be reduced to log(1/δ). We will henceforth ignore δ! Although we want poly(n, 1 /) run time, a lot of the classes we’re interested in are “pretty hard”. So, sometimes we will settle for:

  • Poly-time assuming  is “constant”, e.g., nO(1/).
  • Quasipolynomial time: (n/)log(n/).

This is, for instance, relevant for cryptography where even quasipolynomial time adversaries should not be successful.

3 Interesting Classes

Mainly, we fix a representation format (for boolean functions f : {− 1 , 1 }n^ → {− 1 , 1 }) and then set the concept class C to be the class of functions with poly(n) size in that format. Let us briefly recall the definition of two particularly interesting representations.

Definition 3.1 A DNF formula is a disjunction φ = T 1 ∨ T 2 ∨... Ts where the terms T are a conjunction of literals , e.g., x 1 ∧ x¯ 3 ∧ x 2_._

  • The size of a DNF is the number of terms.
  • The width is the maximum number of literals in any term.

Definition 3.2 Decision trees are rooted trees where every inner vertex is labeled with a variable name xi and has two outgoing edges labeled with − 1 or 1_. Every leaf is labeled with an output value_ − 1 or 1_. An assignment to the variables defines a path in the decision tree from the root to an output value in the obvious way. We assume no variable appears twice on any path._

  • The depth of a decision tree is the maximum number of variables on any path in the tree.
  • Its size is the number of leaves in the tree.

5 Learning via spectral concentration

As we will see, we can get learning algorithms for several classes of boolean functions by analyzing the concentration of the fourier spectrum of those functions.

Definition 5.1 Given a collection S of subsets of [n] , we say f has -concentration on S , if

∑

S 6 ∈S

f^ ˆ (S)^2 ≤ .

Proposition 5.2 In this case, g : {− 1 , 1 }n^ → R defined by g =

S∈S fˆ (S)χS satisfies

‖f − g‖^22 ≤ .

Proof: ‖f − g‖^22 = E x [((f − g)(x))^2 ] =

S⊆[n]

f̂ − g(S)^2 =

S 6 ∈S

f^ ˆ (S)^2 ≤ 

Proposition 5.3 Let f : {− 1 , 1 }n^ → {− 1 , 1 } and g : {− 1 , 1 }n^ → {− 1 , 1 } satisfy ‖f − g‖^22 ≤ . Then, for h : {− 1 , 1 }n^ → {− 1 , 1 } defined by h(x) = sgn(g(x)) , f and h are  -close.

Proof: Suppose that for more than an  fraction of the x’s, we have h(x) 6 = f (x). For such x, (f (x) − g(x))^2 ≥ 1. But then, E x [((f − g)(x))^2 ] > .

2

Theorem 5.4 Suppose an algorithm A can “somehow” find a collection S on which f is / 2 - concentrated. Then, in further time poly(|S|, 1 /, n) log(1/δ) , using only random examples, A can output a hypothesis h such that with probability at least 1 − δ the functions h and f are  -close.

Proof: The algorithm proceeds as follows:

  1. For each S ∈ S, it estimates fˆ (S) to within ±

|S|) in time poly(|S|, 1 /, n).

Call the estimate ˜fˆ (S).

  1. The algorithm constructs ˜g(x) =

S∈S f^ ˜ˆ (S)x S and outputs^ h^ = sgn(˜g).

For the purpose of analysis, let g =

S∈S fˆ^ (S)χS^. We know^ ‖f^ −^ g‖ 2 2 ≤^ /^2. And,

‖g − ˜g‖ =

S

ĝ − ˜g(S)^2

S∈S

(ˆg(S) − ˆ˜g(S))^2

S∈S

f^ ˆ (S) − ˜fˆ (S)

≤ |S|

16 |S|

By the triangle inequality,

‖f − ˜g‖ ≤ ‖f − g‖ 2 + ‖g − ˜g‖ 2 ≤

Therefore, ‖f − ˜g‖^22 ≤ , that is, h is -close to f. 2

Corollary 5.5 1. If you can prove for all f ∈ C , f is / 2 -concentrated on S = {S ⊆ [n] : |S| ≤ d(/2)} , then C can be learned in time poly(|S|, 1 /) ≤ nO(d)^ · poly(1/eps) using random examples only.

2. If you can prove for all f ∈ C , f is / 4 -concentrated on some collection of cardinality at most M , then C can be learned in time poly(M, 1 /) using membership queries.

Proof: (2) Let T be the collection of size M of sets S with the largest fˆ 2. Then, f is -concentrated on T. Using the Goldreich-Levin algorithm, find a collection L containing all S such that fˆ (S)^2 ≥ / 4 M in time poly(M, 1 /). We are done, if can prove f is / 2 -concentrated on L. ∑

S 6 ∈L

f^ ˆ (S)^2 =

S 6 ∈L,S∈T

f^ ˆ (S)^2 +

S 6 ∈L,S6∈T

f^ ˆ (S)^2 ≤ M ·  4 M

Exercise: If ‖f − g‖^22 ≤  and g is -concentrated on S, then f is O()-concentrated on S.

Proposition 5.6 Suppose f : {− 1 , 1 }n^ → {− 1 , 1 } with I(f ) ≤ d_. Then,_

∑

|S|>d/

f^ ˆ (S)^2 ≤ .

Proof: Remember, I(f ) =

S |S|^

fˆ (S)^2. So, if ∑ |S|>d/ fˆ (S)^2 > , then I(f ) > d. 2