Gibbs Sampling and Online Learning Introduction

Transcription

1 Statistical Techniques in Robotics (16-831, F14) Lecture#10(Tuesday, September 30) Gibbs Sampling and Online Learning Introduction Lecturer: Drew Bagnell Scribes: {Shichao Yang} 1 1 Sampling Samples are valuable because they can be used to compute expected values of functions over a probability distribution. They can also be used to compute marginals by counting. Most sampling techniques use the ratios taught in last class to minimize computation time. This section discusses two techniques: importance sampling and Gibbs sampling. The latter (or more commonly some variant) is the more frequently used method. 1.1 Importance Sampling This technique has been discussed earlier in class: We want E p f(x), but we can t sample p, so we instead sample x i s from a different distribution q and weight each f(x i ) by p(x i) q(x i ). As far as possible, q should be similar to p in order to make the sampling more precise. What distribution should we draw from? We can draw from q = Πq i (x i ), but this usually does not work since in most cases, it is too far from the actual distribution p. It is easier to sample from chains and trees, so often if a non-tree graph is almost a tree, we can convert it to a tree by breaking some links, sample from the new tree-based distribution, and use importance sampling to compute the expectations for the non-tree graph. Importance sampling usually only works for graphs that are nearly trees: in most examples that are of interest, this is never the case. We then need the following Gibbs sampling. 1.2 Gibbs Sampling Consider the Gibbs field in Figure??. Gibbs sampling works as follows: 1. Start with some initial configuration (say [0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1] in the order x 1 to x 15 ). 2. Pick a node at random (say x 7 ). 3. Resample the node s probability conditioned on its Markov blanket: generate x + 7 p(x 7 N(x 7 )), i.e. flip a coin in proportion to the likelihood of getting a 0 or a 1 given the neighbors. 4. Repeat steps 3 and 4 for T time steps. For a large enough T, x t converges to a sample from p(x). To get the next sample, it is necessary to wait another T time steps, as updates too close to each other may be correlated. If you are 1 Contect adapted from previous scribes: Jiaji Zhou in F12, Sankalp Arora in F11. 1

2 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 Figure 1: Gibbs field with maximum clique size 2. computing the expectation of a function under p, it is more advantageous to do that directly over the updates, than to wait for samples: for large enough T, 1 T t f(x t) converges to E p f(x). Note that in generally x does not converge, it is the expection that converges. There might be some other tricks. For example, it is better not to include x t in beginning stages to compute 1 T t f(x t) as it is more randomly initially. We may also have many sequences of x t running parallel and finally compute their mean. 1.3 Doubts and Answers You may have the following doubts as I doubted before: How could the expection converge? Think of the problem in 2D case (x = [x 0, x 1 ]). Pick out all those steps that we perform resampling on x 0 while fixing x 1, look at all these x 0 and you will find out they will converge to as if sampled from the marginal probablity p(x 0 ), and so as x 1. It is not iid sampled, why does it work? For adjacent steps it is not iid sampled, but if you look at every K steps (generally K cannot be too small), it is approximately iid sampled. 1.4 Derivation To deeply understand why gibbs sampling could converge to the desired distribution, here we take a simple example. Think of robot in a chess board in Figure??. Robot starts from one random cell and then could jump to its neighbours in four directions but will bounce back when reaching boundary. After running it for long steps, what s the final distribution of the robot place in the board? Will there be an equilibrium distribution or multiple? If multiple, will it change periodically? For the equilibrium state, it means that belief of each cell bel(x i ) won t change. In more detail, the probability of robot in its surroundings N(x i ) and move to x i is the same as robot in x i and move to its surroundings N(x i ). It is similar to the stable fluid. Fluid coming to this cell is the same as fluid going out. 2

3 It is easy to design the gibbs field similar as the chess board. If x represents the state of all cells at specific time, x = x 1, x 2,...x i,...x 100, while x represents another state: x = x 1, x 2,... x i,...x 100. We want to know whether: p(x)p( x x) equals p( x)p(x x) if we draw samples from the field using gibbs sampling. Actually, p(x)p( x x) = p(x) p(x 1,..., x i = 1,...x n ) p(x)p( x) = p( x)p(x x) = p( x) p(x 1,..., x i = 0,...x n ) p( x)p(x) = So the two expressions are the same value. This means p(x) is actually the equilibrium state. Figure 2: Chess board problem. Robot starts at one cell, and could move in four directions but will bounce back when reaching the boundary.we want to find the final distribution of each cell after long enough steps. 2 Online Learning Introduction This section begins with a small discussion on logic and normative view of the world. Then we will question the nature of induction and its use as a tool for modeling and making decisions about the world. We will explore the limits of the inductive process, and in the process, prove how well different online induction algorithms(e.g - weighted majority, randomized weighted majority etc.) perform in relation to each other through the new concepts of loss and regret. 2.1 Normative View of the World Normative view is concerned with identifying the best decision to take or inference to make, assuming an ideal decision maker who is fully informed, is able to compute with perfect accuracy and is 3

4 fully rational. It assumes probability based inference and general decision making can and should only be defined by pure logic. The normative view suggests that any decision maker or inference engine that doesnt follow the aforementioned rules is wrong or invalid. Hence it does not state the amount of error induced in a system if approximation techniques(like finite number of particles in a particle filter) are used for the lack of adequate computation resources, time or knowledge. Succintly put the normative view considers known unknowns, not the unknown unknowns. And this fallacy makes the normative view of little use in real life. 2.2 Induction Our standard justification for the use of probability theory is that it seems like the reasonable thing to do. Logic is certainly reasonable, and probability naturally and uniquely extends our notion of logic to include degree-of-belief type statements. Thus, if one accepts logic, one must accept probability as a way of reasoning about the world. In all the probabilistic systems discussed so far (e.g. localization and mapping), we can momentarily discard our normative view by looking at their common elements. At the very core, something like mapping, for example, can be seen simply as an induction problem. We take in data about world, and using prior knowledge, we make inferences, and then predictions using the inferences. In fact, Bayes rule can be seen as the canonical way to do these operations. Induction is a method to predict the future based on observations in the past, and to make decisions from limited information. Thus, we can look generally at induction itself in order to arrive at answers to certain fundamental questions behind many robotic learning systems. Questions such as: Why does inductive reasoning work?, When does it fail?, and How good can it be? will tell us about the nature of learning and lead us to unique notions of optimality with regard to worst-case adversarial conditions Induction from a Chicken s Perspective We begin with an illustrative example of how inductive reasoning can fail. Imagine you are a chicken. Every day of your life, the farmer comes to you at a certain time in the day and feeds you. On the 1001 th day, the farmer walks up to you. What do you predict? What can you predict other than that he will feed you? Unfortunately for you, this day the farmer has decided to eat you. Thus, induction fails spectacularly. You may object to this example and say that the model of the world that the chicken was using was wrong, but this is precisely the point of the discussion: perhaps we can never have a model that perfectly aligns with the real world. Perhaps, you know vaguely of your impending doom, so you assign a low probability of being eaten everyday. You still will (probably) guess incorrectly on that 1001 th day because your guess of being fed will dominate your feeling of doom. Furthermore, for any model you bear, an adversarial or random farmer can always thwart it to force false inductive predictions about your fate each day Three views of induction: 1. The David Hume view. No matter what, your model will never capture enough of the world to be correct all the time. Furthermore, induction relies heavily on priors made from assumptions, and potentially small changes in a prior can completely change a future belief. If your model is as good as your assumptions or priors, and most assumptions are not likely to be 4

5 valid at all, then induction is fundamentally broken. We find this view, although true, is not very satisfying or particularily useful. 2. The Goldilocks/Panglossian/Einstein Position. It just so happens that our world is set up in a way such that induction works. It is the nature of the universe that events can be effectively modeled through induction to a degree that allows us to make consistently useful predictions about it. In other words, we re lucky. Once again, we do not find this view very satisfying or particularly useful. 3. The No Regret view. It is true that you cannot say that induction will work or work well for any given situation, but as far as strategies go, it s provably near-optimal. This view comes from the outgrowth of game theory, computer science, and machine learning. This thinking is uniquely late 20 th century. 5

The Basics of Graphical Models David M. Blei Columbia University October 3, 2015 Introduction These notes follow Chapter 2 of An Introduction to Probabilistic Graphical Models by Michael Jordan. Many figures

Markov chains and Markov Random Fields (MRFs) 1 Why Markov Models We discuss Markov models now. This is the simplest statistical model in which we don t assume that all variables are independent; we assume

Lecture 8 The Subjective Theory of Betting on Theories Patrick Maher Philosophy 517 Spring 2007 Introduction The subjective theory of probability holds that the laws of probability are laws that rational

Game Theory and Algorithms Lecture 0: Extensive Games: Critiques and Extensions March 3, 0 Summary: We discuss a game called the centipede game, a simple extensive game where the prediction made by backwards

Introduction to Discrete Probability Theory and Bayesian Networks Dr Michael Ashcroft September 15, 2011 This document remains the property of Inatas. Reproduction in whole or in part without the written

CSE341T 08/31/2015 Lecture 3 Cost Model: Work, Span and Parallelism In this lecture, we will look at how one analyze a parallel program written using Cilk Plus. When we analyze the cost of an algorithm

page 5 SOR() Chapter Markov Chains. Introduction and Definitions Consider a sequence of consecutive times ( or trials or stages): n =,,,... Suppose that at each time a probabilistic experiment is performed,

6.42/8.62J Mathematics for Computer Science Srini Devadas and Eric Lehman May 3, 25 Lecture otes Expected Value I The expectation or expected value of a random variable is a single number that tells you

Spring 2006 This exam contains 7 questions. You should attempt them all. Each question is divided into parts to help lead you through the material. You should attempt to complete as much of each problem

Dirichlet Processes A gentle tutorial SELECT Lab Meeting October 14, 2008 Khalid El-Arini Motivation We are given a data set, and are told that it was generated from a mixture of Gaussian distributions.

1 epresentation of Games Kerschbamer: Commitment and Information in Games Game-Theoretic Description of Interactive Decision Situations This lecture deals with the process of translating an informal description

Game Theory 1. Introduction Dmitry Potapov CERN What is Game Theory? Game theory is about interactions among agents that are self-interested I ll use agent and player synonymously Self-interested: Each

Markov Chains Ben Langmead Department of Computer Science You are free to use these slides. If you do, please sign the guestbook (www.langmead-lab.org/teaching-materials), or email me (ben.langmead@gmail.com)

Homework #3 is due Friday by 5pm. Homework #4 will be posted to the class website later this week. It will be due Friday, March 7 th, at 5pm. Political Science 15 Lecture 12: Hypothesis Testing Sampling

10-701 Final Exam, Spring 2007 1. Personal info: Name: Andrew account: E-mail address: 2. There should be 16 numbered pages in this exam (including this cover sheet). 3. You can use any material you brought:

Copyright c 2009 by Karl Sigman Limiting distribution for a Markov chain In these Lecture Notes, we shall study the limiting behavior of Markov chains as time n In particular, under suitable easy-to-check

CCA WHITE PAPER - HOW TO PUT THE DNA OF CUSTOMER SERVICE INTO UK BOARDROOMS 13 Seeing the Value in Customer Service Dr Marco Busi Centre Manager, Centre for Business Process Outsourcing Glasgow, Scotland

25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational

Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

Lecture 11: Graphical Models for Inference So far we have seen two graphical models that are used for inference - the Bayesian network and the Join tree. These two both represent the same joint probability

Hypothesis Testing 1 Introduction This document is a simple tutorial on hypothesis testing. It presents the basic concepts and definitions as well as some frequently asked questions associated with hypothesis

Math 1d Instructor: Padraic Bartlett Lectures 5-: Taylor Series Weeks 5- Caltech 213 1 Taylor Polynomials and Series As we saw in week 4, power series are remarkably nice objects to work with. In particular,

Comparison of frequentist and Bayesian inference. Class 20, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom 1 Learning Goals 1. Be able to explain the difference between the p-value and a posterior

Lecture 1 :The Mean Value Theorem We know that constant functions have derivative zero. Is it possible for a more complicated function to have derivative zero? In this section we will answer this question

15-251: Great Theoretical Ideas in Computer Science Anupam Gupta Notes on Combinatorial Games (draft!!) January 29, 2012 1 A Take-Away Game Consider the following game: there are 21 chips on the table.

STATISTICS 8: CHAPTERS 7 TO 10, SAMPLE MULTIPLE CHOICE QUESTIONS 1. If two events (both with probability greater than 0) are mutually exclusive, then: A. They also must be independent. B. They also could

238 CHAPTER 3. DISCRETE DYNAMICAL SYSTEMS WITH MANY VARIABLES 3.2 Roulette and Markov Chains In this section we will be discussing an application of systems of recursion equations called Markov Chains.

Chapter 16 Multiple Choice Questions (The answers are provided after the last question.) 1. Which of the following symbols represents a population parameter? a. SD b. σ c. r d. 0 2. If you drew all possible

Computational complexity theory Goal: A general theory of the resources needed to solve computational problems What types of resources? Time What types of computational problems? decision problem Decision

The result of the bayesian analysis is the probability distribution of every possible hypothesis H, given one real data set D. This prestatistical approach to our problem was the standard approach of Laplace

Pascal s wager So far we have discussed a number of arguments for or against the existence of God. In the reading for today, Pascal asks not Does God exist? but Should we believe in God? What is distinctive

191 The probability distribution on a single variable must sum to 1 It is also true that any joint probability distribution on any set of variables must sum to 1 Recall that any proposition a is equivalent

Graphical Models CS 343: Artificial Intelligence Bayesian Networks Raymond J. Mooney University of Texas at Austin 1 If no assumption of independence is made, then an exponential number of parameters must

Interpreting Kullback-Leibler Divergence with the Neyman-Pearson Lemma Shinto Eguchi a, and John Copas b a Institute of Statistical Mathematics and Graduate University of Advanced Studies, Minami-azabu

Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

MACHINE LEARNING IN HIGH ENERGY PHYSICS LECTURE #1 Alex Rogozhnikov, 2015 INTRO NOTES 4 days two lectures, two practice seminars every day this is introductory track to machine learning kaggle competition!

6.825 Techniques in Artificial Intelligence Decision Making under Uncertainty How to make one decision in the face of uncertainty Lecture 19 1 In the next two lectures, we ll look at the question of how

How to Gamble If You Must Kyle Siegrist Department of Mathematical Sciences University of Alabama in Huntsville Abstract In red and black, a player bets, at even stakes, on a sequence of independent games