MLRG/fall08
From ResearchWiki
(→3 Oct: Mean-field and structured mean-field (Jagadeesh and Stephen)) |
m (→26 Sept: Exponential Families and Convex Analysis (Amit and Piyush)) |
||
| Line 280: | Line 280: | ||
It turns out that a wide variety of message-passing algorithms (some of which we have already seen, and others we will be seeing in the coming weeks) can also be understood as solving exact or approximate variational problems. Exponential families (and tools from convex analysis) provide a unified framework to develop these variational principles. | It turns out that a wide variety of message-passing algorithms (some of which we have already seen, and others we will be seeing in the coming weeks) can also be understood as solving exact or approximate variational problems. Exponential families (and tools from convex analysis) provide a unified framework to develop these variational principles. | ||
| - | '''Exponential Families:''' An exponential family defines a parametrized collection of (probability) density functions: <math>p(x;\theta) =exp\{ | + | '''Exponential Families:''' An exponential family defines a parametrized collection of (probability) density functions: <math>p(x;\theta) =exp\{\langle\theta,\phi(x)\rangle-A(\theta)\}</math>. The quantity <math>A</math> acts as a normalization constant and is commonly known as the ''log partition function'': <math>A(\theta)=log \int_{X^n} exp \langle\theta,\phi(x)\rangle dx</math>. <math>\phi_\alpha : X^n \rightarrow R </math> are functions known as ''sufficient statistics''. <math>\phi = \{\phi_\alpha : \alpha \in I \} </math> is a vector of sufficient statistics. It is easy to see that <math>p(x;\theta)</math> depends on x only through <math>\phi(x)</math> (and hence the name ''sufficient'' statistics). Another way to think of <math>\phi</math> is that it is sufficient to describe the family. <math>\theta = \{\theta_\alpha : \alpha \in I \} </math> is a vector which is called ''exponential'' or ''canonical parameter'', and is used to identify members of the family associated with <math>\phi</math>. <math>\Theta := \{\theta\ \in R^d | A(\theta) < \infty \} </math> is the set <math>\theta</math> comes from. We will show that <math>A</math> is a convex function of <math>\theta </math> which in turn implies that <math> \Theta </math> is a convex set. |
We will see some examples of distributions (Bernoulli, Gaussian, and another distribution defined as a graphical model -- the Ising model) and show that each of these can be represented as exponential families. | We will see some examples of distributions (Bernoulli, Gaussian, and another distribution defined as a graphical model -- the Ising model) and show that each of these can be represented as exponential families. | ||
| Line 286: | Line 286: | ||
'''Representations:''' An exponential family admits either of the following two representations: | '''Representations:''' An exponential family admits either of the following two representations: | ||
| - | * '''Minimal:''' We define exponential family with collection of functions <math>\phi = \{\phi_\alpha\}</math> such that there exists no linear combination <math> | + | * '''Minimal:''' We define exponential family with collection of functions <math>\phi = \{\phi_\alpha\}</math> such that there exists no linear combination <math>\langle a,\phi(x)\rangle=\sum_{\alpha \in I}a_\alpha \phi_\alpha(x) </math> equal to a constant. This condition leads to a minimal representation, in which there is a unique parameter vector <math>\theta </math> with each distribution. |
* '''Overcomplete:''' Rather than using a minimal representation we can use an overcomplete representation. Here there exists an entire affine subset of parameters vector <math>\theta </math> each associated with the same distribution. | * '''Overcomplete:''' Rather than using a minimal representation we can use an overcomplete representation. Here there exists an entire affine subset of parameters vector <math>\theta </math> each associated with the same distribution. | ||
| Line 318: | Line 318: | ||
Following the duality between <math>\theta</math> and <math>\mu</math>, we define the Legendre-Fenchel dual of the log partition function <math>A(\theta)</math> as: | Following the duality between <math>\theta</math> and <math>\mu</math>, we define the Legendre-Fenchel dual of the log partition function <math>A(\theta)</math> as: | ||
| - | <math>A^*(\mu) := \sup_{\theta \in \Theta}\{ | + | <math>A^*(\mu) := \sup_{\theta \in \Theta}\{\langle\mu,\theta\rangle - A(\theta)\}</math> |
It turns out that the dual function <math>A^*(\mu)</math> is actually the negative entropy of <math>p(x;\theta(\mu))</math> where <math>\theta(\mu)</math> is an element of the inverse image <math>\Lambda^{-1}(\mu)</math>, for <math>\mu \in \mathcal{M}</math>. In terms of this dual, we can define the log partition function in a variational representation: | It turns out that the dual function <math>A^*(\mu)</math> is actually the negative entropy of <math>p(x;\theta(\mu))</math> where <math>\theta(\mu)</math> is an element of the inverse image <math>\Lambda^{-1}(\mu)</math>, for <math>\mu \in \mathcal{M}</math>. In terms of this dual, we can define the log partition function in a variational representation: | ||
| - | <math>A(\theta) = \sup_{\mu \in \mathcal{M}}\{ | + | <math>A(\theta) = \sup_{\mu \in \mathcal{M}}\{\langle\theta,\mu\rangle - A^*(\mu)\}</math> |
So it turns out that the variational representation of <math>A(\theta)</math> just reduces to an optimization problem over the domain <math>\mathcal{M}</math>. | So it turns out that the variational representation of <math>A(\theta)</math> just reduces to an optimization problem over the domain <math>\mathcal{M}</math>. | ||
Revision as of 19:05, 3 October 2008
CS7941: Inference in Graphical Models
Time: Fri 2:00-3:20pm (see schedule for each week)
Location: MEB 3105
Abstract
Graphical models (both Bayesian networks and Markov random fields) are a convenient method for encoding and reasoning about probability distributions. This seminar will focus initially on representational issues and then move to computational methods for inference in graphical models. Our interest will primarily be on approximate inference, since exact inference in most models is intractable. The focus will be on non-Bayesian approaches, though many things we discuss are applicable to Bayesian problems as well.
Students with a working knowledge of probability are well suited for this seminar. Each student should expect to present at least one week during the semester.
The rough plan is to begin with classical approaches to graphical models, including exact inference via the junction tree algorithm. We will quickly move on to approximate methods, focusing mostly on message passing and linear programming approaches.
The structure of the semester will be roughly as follows:
- Introduction to Bayes' nets and graphical models: semantics, variable elimination, sum/max product algorithm, and factor graphs
- Computational complexity: junction trees, triangulations and tree-width, belief propagation
- Exponential families: maximum entropy principle, cumulant generating functions, conjugate duality
- Variational inference: exact inference on trees, mean-field and structured mean-field, inner bounds of the marginal polytope
- Statistical physics: Bethe free energy, log-determinant relaxation and outer bounds of the marginal polytope
- Linear programming methods: tree-reweighted message passing, more outer bounds
This is a lot of material. Things will be dropped or skimmed depending on time and interest levels. Students should only come if they are prepared to do the required reading before the seminar.
Expected Student Involvement
Presentations will be given by pairs of students. The logistics of this will depend somewhat on the make-up of the participants, but the goal would be to pair CS students with non-CS students in most cases. Sign-ups will happen quickly, so please take care to make sure you're signed up for at least one week, though probably two. The expectations, with timing, are:
- At least 3 days before a presentation, the presenters should meet with Hal for one hour to discuss the material and decide what to present.
- By class time, everyone should have submitted at least 2 questions to the Wiki for discussion. (Click on the "discussion" tab along the top of the wiki to enter your questions.)
- Everyone should actively participate in the discussions.
If you're interested in participating in the programming parts, please visit the programming subpage.
Participants
- Hal Daumé III, Assistant Professor, School of Computing
- Piyush Rai, PhD Student, School of Computing
- Nathan Gilbert, PhD Student, School of Computing
- Suresh Venkatasubramanian, Assistant Professor, School of Computing
- Siddharth Patwardhan, PhD Student, School of Computing
- Ruihong Huang, PhD Student, School of Computing
- John Moeller, Non-Matriculated Student, School of Computing
- Zhan Wang, PhD Student, School of Computing
- Amit Goyal, PhD Student, School of Computing
- Zheng Cai, PhD Student, Department of Biomedical Informatics
- Stephen Piccolo, PhD Student, Department of Biomedical Informatics
- Avishek Saha, PhD Student, School of Computing
- Jiarong Jiang, PhD Student, School of Computing
- Arvind Agarwal, PhD Student, School of Computing
- Jagadeesh J, PhD Student, School of Computing
- Anthony Wong, PhD Student, Department of Biomedical Informatics
- Seth Juarez, PhD Student, School of Computing
- Shuying Shen, PhD Student, Department of Biomedical Informatics
- Jeffrey Ferraro, PhD Student, Department of Biomedical Informatics
- Samuel Gerber, PhD Student, School of Computing
- Scott Alfeld, MS Student, School of Computing
- Senthil Nachimuthu, PhD Student, Department of Biomedical Informatics
- Lorena Carlo, Staff, Department of Biomedical Informatics
Schedule and Readings
Most of our initial readings will be from the technical report Graphical models, exponential families, and variational inference by Martin Wainwright and Mike Jordan. I know this tome is a bit daunting, but it's not as bad as it looks at first glance! We refer to this in the readings as WJ.
When videos are listed, they are stored in Theora video format; viewers are available for pretty much every platform. Please please please don't distribute these or give away the password (which was sent to the ml@cs mailing list).
| Date | Papers | Presenters |
|---|---|---|
| Introduction to Bayes' nets and graphical models | ||
| F 29 Aug | Introduction, semantics and applications (WJ, 1-2.4) | Hal |
| F 5 Sep | Factor graphs, sum-product and max-product (KFL01, section 1,2, example 6 from section 3 B, section 4 A, appendix A and B; Optional reading for some more foundational stuff: WJ, 2.5-2.5.1) | Piyush (CS), Zheng(BI) |
| F 19 Sep | Junction tree algorithm and triangulations (WJ, 2.5.2; HD96, 4) | Nathan (CS), Seth (CS) |
| Variational Inference | ||
| F 26 Sep | Math camp: exponential families and conjugate duality (WJ, 3) | Amit (CS), Piyush (CS) |
| T 30 Sep, 5:15pm | Variational principle, exact inference on trees (WJ, 4) | Arvind (CS), Senthil (BMI) |
| F 3 Oct | Mean-field and structured mean-field (WJ, 5) | Jagadeesh (CS), Stephen (BMI) |
| Statistical Physics | ||
| F 10 Oct | Bethe free energy and sum-product (WJ, 6) | Anthony (BMI), Jiarong (CS) |
| F 24 Oct | Kikuchi free energy and generalized sum-project (WJ 7) | Seth (CS) |
| Convex Relaxations | ||
| F 31 Oct | Convex relaxations (WJ 8) | Avishek (CS) |
| F 7 Nov | Semi-definite relaxations (WJ 9) | John M. (CS) |
| F 14 Nov | Mode computations (WJ 10) | Zhan Wang (CS) |
| F 21 Nov | Exact max-product and outer bounds (GJ07) | Ruihong(CS) |
| F 5 Dec | Outer bounds on the marginal polytope (SJ07 and SMGJW08) | |
Additional Readings
These readings are listed just for reference if people are interested.
- Cooled and Relaxed Survey Propagation for MRFs, Hai Leong Chieu, Wee Sun Lee and Yee Whye Teh. NIPS 2007.
- Residual belief propagation: Informed scheduling for asynchronous message passing, G. Elidan, I. McGraw, and D. Koller. UAI 2006.
- Expectation Propagation for approximate Bayesian inference, Tom Minka. UAI 2001.
- Variational Message Passing, John Winn and Chris Bishop. JMLR 2005.
- A Variational Approximation for Bayesian Networks with Discrete and Continuous Latent Variables, Kevin Murphy, UAI 1999.
- Graphical Models for Structured Classification, with an Application to Interpreting Images of Protein Subcellular Location Patterns, Shann-Ching Chen, Geoff Gordon and Robert Murphy. JMLR 2008.
- Linear Programming Relaxations and Belief Propagation – An Empirical Study, Chen Yanover, Talya Meltzer and Yair Weiss. JMLR 2006.
- Approximate Bayesian Inference in Continuous/Hybrid Systems, Workshop at NIPS 2007 (organized by Seeger, Barber, Lawrence and Zoeter)
Reading Summaries
29 Aug: Introduction, semantics and applications (Hal)
High-level summary: graphical models = graph theory + probability theory.
Applications:
- Hierarchical Bayesian Models. Almost all hierarchical Bayesian models can be (and often are!) represented by directed graphs, with nodes as r.v.s and edges denoting conditional dependence. The standard problems in Bayesian modeling (computing marginal likelihoods, computing expectations, etc.) are graphical model inference problems. (Cautionary note: most hierarchical Bayesian models involve rvs with continuous density; the stuff we'll talk about this semester doesn't really address this. Our focus is basically entirely on discrete rvs, only.)
- Bioinformatics and Language: Biology problems and language problems can often be seen as inference problems over relatively simple structures (like sequences or trees). These are naturally encoded as, say, HMMs or PCFGs, which are amenable to graphical model analysis.
- Image Processing: A standard image representation is as a 2D lattice (undirected!) model, with the nodes representing pixels.
- Error-correcting Coding: We won't talk about this, but if you're interested, see David MacKay's Information Theory, Inference and Learning Algorithms book.
Background:
In most of the applications listed above, the underlying graph structures are relatively "dense." This is not promising, because non-probabilistic algorithms on graphs typically have trouble with dense graphs. It turns out (as we shall see soon) that the same is true in graphical model inference. The denser the graph, the harder (computationally!) the inference problem. For most real world problems, we're talking NP-hard.
Since these problems are NP-hard (and usually the really bad variety of NP-hard), we're going to go for approximations. One standard approximation method is to construct an MCMC algorithm. We won't discuss MCMC here (perhaps some other semester, or perhaps take one of the Stochastics classes in the Math department.
The approach we take instead is variational: that is, we attempt to convert the inference problems into optimization problems, and solve the optimization problems. The optimization problem will, of course, also be computationally intractable. However, by relaxing the optimization problem, we will obtain an (efficient) approximate solution, which will lead to an (efficient) approximate solution to the inference problem.
Graphical Models:
Let G = (V,E) be a graph. We will associate each vertex
with a random variable
. The graphical model consists of a collection of probability distributions over the random variables defined by the vertices of the graph that factorizes according to the edges. (Notation: if
, define
. There are two types of graphical models, just as there are two types of graphs:
- Directed graphical models: here, let π(s) be the set of parents of a node and then we have
- Undirected graphical models: here, the distribution factorizes according to functions defined on the cliques of the graph (aka fully-connected subsets of V). For every clique C, let ψC be some function that maps the values of the random variables in C (i.e., xC) to a positive real value. Then,
.
Inference Problems:
Given a probability distribution
defined by a graphical model, we might want to:
- compute the likelihood of some observed data (observed data = fixed values of a subset of the rvs)
- compute the marginal distribution p(xA) for some fixed
(test question: why not
?)
- compute the conditional distribution p(xA | xB) for disjoint A,B with
(same question!)
- compute the mode of the density; i.e., solve
Note that the first three are essentially the same: they involve one or more marginalizations. The last one is fundamentally different.
05 Sept: Factor Graphs and the Sum-Product Algorithm (Piyush and Zheng)
The Problem:
Given a function g(x1,...,xn) over a collection of random variables, compute the marginals
. Here, a marginal gi(xi) means we are summing the function g(x1,...,xn) over all possible values (i.e. all 'configurations') of all random variables except xi. We assume each xi belongs to some domain (or alphabet) Ai. The global function g(x1,...,xn) is assumed to factorize into a product of local functions:
, where J is some discrete index set. The precise nature of this factorization depends on the kind of graphical model we have (for example, Bayes nets and MRF, we saw last week).
The Technique:
It turns out that we can visualize such factorization using a bipartite graph called a factor graph and use message-passing algorithms to do inference on probability distributions associated with these graphs. In particular, we shall consider the problem of finding marginals for such distributions and see how a message-passing technique called the sum-product algorithm helps us do this efficiently. The sum-product algorithm operates on factor graphs. To apply it for other graphical models (such as Bayes net or MRF), we first need to convert them into an equivalent factor graph.
Note that our focus will be on tree-structured factor graphs (a majority of applications deal with such graphs only) for which the sum-product algorithm gives exact results but it's also applicable to factor graphs with cycles (for which the results will be approximate).
Factor Graphs:
A factor graph is a bipartite graph that consists of a set of factor nodes fj (one for each local function) and a set of variable nodes xis. There is an edge between fj and xi only if xi is an argument of fj. It turns out that various marginalization algorithms can be described as consisting of a set of message passing operations in a factor graph.
- A incoming message at node xi is a vector of length | Ai | where | Ai | is the cardinality of the domain Ai of xi.
We can think of each vertex in a factor graph as a processor and edges representing channels using which the processors can communicate (i.e. pass messages). Using message passing operations, factor graphs provide us a way to efficiently compute the marginals. The versatility of factor graphs lies in the fact that they provide a way to represent various types of graphical models (e.g., Bayes nets, MRF) into a common framework under which inference in such models can be efficiently carried out. We shall see examples on how to come up with such representations.
The Sum-Product Algorithm:
Repeatedly invoking the simple message passing for each node would give us marginals for each individual node. However, it neglects to share the intermediate terms arising in the individual computations. The sum-product algorithm is a dynamic algorithm that effectively shares the intermediate terms in the computations and computes all the marginals simultaneously and in parallel.
Message passing starts on the leave nodes in the factor graphs. Each node v waits to receive messages on all but one of the incident edges on v, at completion of which it uses these messages to compute a message to be sent on the remaining edge. The algorithm terminates once two messages have been passed along both directions on each edge in the factor graph. Thus, on a factor graph with n edges, 2n messages must be passed before the sum-product algorithm terminates. On termination, the marginal function gi(xi) is simply the product of all incoming messages destined to xi. The message passing operations involve computing various sums and products and hence the procedure is called the sum-product algorithm.
Since there are two type of nodes in a factor graph, two type of messages are passed in the sum-product algorithm:
- variable node x to factor node f:
- factor node f to variable node x:
In all of the above, n(v) denotes the set of neighbors for node v. f(X) = n(f) is the set of arguments of the function f. Important: Notice that the expression for the message from a variable node to a factor node looks significantly simpler than the case of a message from factor node to variable node. This is because a) at the message origin, there is no local function involved in the former case, and b) summary operator is not required since the final message is destined to a factor node.
Special Instances of the Sum-Product Algorithm:
The sum-product algorithm is quite general and it subsumes a wide variety of practical algorithms such as the forward/backward algorithm, the Viterbi algorithm, and the Belief Propagation algorithm in Bayes nets. In particular, we shall see examples of the forward/backward algorithm used for inference in HMMs, and the Belief Propagation in Bayes nets, and see how they turn out to be special instances of a sum-product algorithm operating on a factor graph.
19 Sept: Junction Tree Algorithm and Triangulations (Nathan and Seth)
Motivation
D-Separation of Graphs: In order to get a better understanding of the method used to convert DAGS to undirected trees, it will be useful to understand d-separation. There seems to be some disagreement over what the 'd' stands for in d-separation, with one camp claiming directional and another claiming dependence. Both conventions have value in understanding what the separation entails.
If two variables, X and Y are d-separated relative to a variable Z in a directed graph, then they are independent w.r.t Z in all probability distributions that this graph can represent. X and Y are independent conditional on Z if observing X gives you no extra information about Y once you have observed Z, i.e. once you know Z, X adds no information to what you know about Y.
Consider all directed graphs of three variables, A,B,C, where C is observed:
- A -> C -> B - The path from A to B is blocked by conditioning on C. A and B are d-separated in this case.
- A <- C <- B - The path from B to A is blocked by conditioning on C. A and B are d-separated in this case.
- A <- C -> B - Here we are conditioning on a common cause, the effects are independent. A and B are d-separated in this case.
- A -> C <- B - In this orientation, C is a called a collider. A and B are not conditionally independent in this case, thus A and B are d-connected. (Note: If C is not observed, then it is possible for this case to be blocking as well.)
In short, the rules for blocking and thus d-separation are:
- the arrows on the path meet head-to-tail or tail-to-tail at a node, whether observed or not.
- the arrows meet head-to-head at a node that is not observed.
If these two conditions hold for ALL paths between the nodes, A and B, then A is d-separated from B by C (A and B are then also conditonally independent.)
Converting DAGS to Undirected Trees
- Moralization:
- Triangulation:
- Construct Junction Tree:
The Junction Tree Algorithm:
Essentially, this algorithm is very similar to the sum-product message passing algorithm from last meeting. There are some neat properties, notably the running intersection property which asserts inference about variables will be consistent across the graph, i.e. that local consistency ensures global consistency. This property is a consequence of the triangulation step above and states that if a variable is contained in two cliques, then it must also be contained in every clique on the path that connects them.
26 Sept: Exponential Families and Convex Analysis (Amit and Piyush)
It turns out that a wide variety of message-passing algorithms (some of which we have already seen, and others we will be seeing in the coming weeks) can also be understood as solving exact or approximate variational problems. Exponential families (and tools from convex analysis) provide a unified framework to develop these variational principles.
Exponential Families: An exponential family defines a parametrized collection of (probability) density functions:
. The quantity A acts as a normalization constant and is commonly known as the log partition function:
.
are functions known as sufficient statistics.
is a vector of sufficient statistics. It is easy to see that p(x;θ) depends on x only through φ(x) (and hence the name sufficient statistics). Another way to think of φ is that it is sufficient to describe the family.
is a vector which is called exponential or canonical parameter, and is used to identify members of the family associated with φ.
is the set θ comes from. We will show that A is a convex function of θ which in turn implies that Θ is a convex set.
We will see some examples of distributions (Bernoulli, Gaussian, and another distribution defined as a graphical model -- the Ising model) and show that each of these can be represented as exponential families.
Representations: An exponential family admits either of the following two representations:
- Minimal: We define exponential family with collection of functions φ = {φα} such that there exists no linear combination
equal to a constant. This condition leads to a minimal representation, in which there is a unique parameter vector θ with each distribution.
- Overcomplete: Rather than using a minimal representation we can use an overcomplete representation. Here there exists an entire affine subset of parameters vector θ each associated with the same distribution.
Properties of the log partition function: The log partition function A(θ) is both smooth and convex in θ. It can also be seen as the cumulant generating function of the random vector φ(x). In particular, it is easy to see that the first cumulant gives us the mean of φ(x):
Higher cumulants can be similarly defined.
Mean (expectation) parameters: Let's consider the set of vectors defined by taking expectation of φ(x) w.r.t. an arbitrary distribution:
Now let's take an arbitrary member of an exponential family p(x;θ) defined by φ(x) and define a mapping:
The mapping Λ associates to each θ a vector of mean parameters μ: = Λ(θ) belonging to the set
. It can also be seen easily that
.
The mapping Λ between the set Θ of exponential parameters θ and the set
of mean parameters μ is interesting and worth remembering. In particular, the following conditions hold:
- The mapping Λ is one-to-one if and only if the exponential representation is minimal.
- The mapping Λ is onto the relative interior of
(i.e.,
).
For minimal or overcomplete representations, we say that the pair (θ,μ) is dually coupled if μ = Λ(θ) and hence
.
Some conjugate duality
Following the duality between θ and μ, we define the Legendre-Fenchel dual of the log partition function A(θ) as:
It turns out that the dual function A * (μ) is actually the negative entropy of p(x;θ(μ)) where θ(μ) is an element of the inverse image Λ − 1(μ), for
. In terms of this dual, we can define the log partition function in a variational representation:
So it turns out that the variational representation of A(θ) just reduces to an optimization problem over the domain
.
The duality between A(θ) and A * (μ) in also very important. For example, this duality gives us several alternative ways to compute the KL divergence between two exponential family members.
The take-home message: It's important to keep in mind the properties of the log partition function A(θ) and the mean parameters μ = Eθ[φ(x)]. As we will see in the subsequent weeks, in the variational framework for doing inference (in particular, the problems of computing marginals), it's essentially these quantities that we need to deal with.
30 Sept: Variational principles, exact inferences on trees (Arvind and Senthil)
Given a graphical model, we are interested in finding some probability distribution p(x;θ) where x is the vector of random variables and θ is the set of parameters associated with the graph. Note that the size of x is equal to the number of nodes in the graph while size of θ could be anything, it depends on the graph structure.
As stated in the last meeting, we will deal only with the special classes of probability distributions called exponential families. Exponential families possess special properties which not only make them nice and easy to handle but they also represent most of the real world models Despite of having many convenient properties, it may not always be possible to do the exact inference unless graph possesses some special structure e.g. tree. In order to do the inference for the complicated graphs, we resort to approximate methods. One of these approximate methods is known as variational methods.
Recall, problem of doing the inference for the exponential family boils down to computing the log partition function A(θ) and the mean parameters μ = Eθ[φ(x)] for a given distribution p(x;θ). We can compute log partition function and mean parameters using the Fenchel-Legendre theorem. Theorem states:
Above theorem is important in two senses. First, it converts the problem of computing the mean parameters into an optimization problem and gives a way to compute these mean parameters. Second, it provides the log partition function A(θ) as solution to the above optimization problem.
Having stated the above theorem, it is tempting to assume that that problem of computing mean parameters and log partition function is now solved since it is now reduced to a convex optimization problem. This is true for some exponential families for which above equation can be written in an explicit form but not for general exponential families. Above problem has two main challenges which makes this optimization problem hard to solve for general exponential families.
- In many cases, the constraint set
of realizable mean parameters is extremely difficult to characterize in an explicit manner.
- the negative entropy function A * is defined indirectly so that it too lacks an explicit form.
Both of these issues will be handled by doing some kind of approximation to the set of mean parameters and dual function A * . As we will see in the coming meetings, different algorithms exist to do the approximate inference using variational method depending on the kind of approximation we do.
Set of realizable mean parameters
We show two important classes of exponential families for which
is straightforward to characterize namely, arbitrary Gaussian distribution and multinomial distribution on junction trees. In multinomial example,
is given by a convex polytope whose boundaries are formed by the constraints on the marginals. We will see the construction of this polytope for two representations of the tree, minimal representation and overcomplete representation.
Nature of the dual function A* (from last lecture)
Fenchel-Legendre Conjugate of the log partition function A, denoted by A* is defined as:
This guarantees that A* is convex. But, A* lacks a closed form expression which makes the solution computationally challenging. However, exact characterizations can be provided for Gaussian and Tree-structured problems.
- General properties of A *
As given in Table 2 of WaiJor (page 24), closed form expressions for A * are an exception rather than the rule. So, it follows that A * is usually defined implicitly via the composition of two functions:
- First, compute the exponential parameter θ(μ) in the inverse image of Λ − 1
- Then calculate the negative entropy of the distribution p(x;θ(μ))
This approach follows from:
Even though A * is not in a closed form, various properties can be inferred from its variational definition.
Properties of A *
- A * is always convex and lower semi-continuous.
Other properties depend on the nature of its exponential family.
In a minimal representation,
- A * is differentiable on intM, and
- A * is strictly convex
Despite these desirable properties, A * still poses substantial computational challenges. Both operations in the decomposition of A * are challenging:
- The inverse image Λ − 1 of the mean parameter mapping does not have a closed form expression though it is well defined mathematically. Iterative methods are typically necessary to computer this mapping. However, the iterative algorithms presuppose that it is possible to do exact inference, which is the original problem that we are trying to solve.
- Even if we are able to compute the inverse image of the mean parameter mapping, it is generally not possible to compute the entropy for a large problem.
As with M, there are two important cases where A * can be characterized in closed form: Gaussian distributions and Tree-structured problems. Only Tree-structured problems are discussed below.
Tree structured problems
A consequence of the junction tree representation is that A * always has a closed form representation. Let us consider the simple tree T = (V,E(T)) to illustrate this. Consider the canonical representation of the overcomplete tree-structured multinomial distribution discussed above under M. The mean parameters μ = {μs,μst} correspond to local marginals associate with single nodes and single edges. In particular, we will use the local marginal functions μs(xs) and μst(xs,xt).
By a special case of junction tree decomposition, a tree-structured distribution factorizes in terms of local marginal distributions as:
We substitute the above value of p(x) in the following integration
and then integrate it. We get:
where Hs is the single node entropy and Is is the mutual information terms.
Combining this with the expression for our characterization of the marginal polytope MARG(T), we obtain the following:
This has a simple structure, and is convex. The constraint set MARG(T) is a polytope defined by a small O(n) number of constraints. Thus, we find that A * has a closed form representation for tree-structured problems.
3 Oct: Mean-field and structured mean-field (Jagadeesh and Stephen)
In the previous class, we saw how to do exact inference on trees using variational principle. Given an arbitrary graph this can be converted into its junction tree representation and thus inferencing can be done. But, as noted at the end of the previous class, the junction tree representation can result in graphs with large clique size (treewidth). Hence the computation of a marginal probability of a individual node includes marginalizing over a significant set of variables and hence may be very expensive. Instead of transforming into junction tree, in this class we will see a technique to perform approximate inference on the original graph itself.
The two main difficulties associated with variational principle are: the nature of the the constraint set
and the lack of tractable form for the dual function A * . Mean field theory relaxes some of the constraints in the original graph resulting in a subset of distributions (tractable distributions) for which A * is relatively easy to characterize.
Tractable families
A tractable subgraph is subgraph H of G over which it is feasible to perform exact calculations. If
denote the subset of indices associated with cliques in H, then the set of exponential parameters corresponding to distributions structured according to H is given by:
Example: The subgraph
is the simplest subgraph with parameters being
, where θst refers to the parameters associated with the edge (s,t). And the associated distributions are the product of probabilities of the nodes (s)
.
Instead of dropping all the edges, a more structured approximation can be considering a subgraph which forms the minimal spanning tree of the oringial graph. Accordingly the subspace of distributions is given by
For a given subgraph H, the set of all possible mean parameters that are realizable by tractable distributions :
for some
. Since any μ that arises from this tractable distribution is certainly a valid mean parameter,
holds.
Optimization and Lower bounds
From the variational principle
, it is clear that any valid mean parameter specifies a lower bound on the log partition function, i.e.
. Since the dual function A * lacks an explicit form, it is not always possible to compute the lower bound. The mean field approach overcomes this difficulty by the choice of μ to a tractable subset
for which the dual function has an explicit form
. Moreover, mean field method chooses the best approximation to the mean parameters μMF measured interms of the tightness of the bound. So the mean field approximation is the solution of
Relation to KL-divergence
The mean field theory aims to find the approximate probability distribution contrained by the subgraph by minimizing the KL-divergence with respect to the probability distribution represented by the original graph.
The KL-divergence between different probability distributions governed by parameters
is
. For the dually coupled pair (θ1,μ1), the Fenchel's inequality will become equality, yeilding
When the mean field theory is trying to find the solution which maximizes
, it aims to find the best probability approximation (under the subgraph) to the original probability distribution by minimizing the KL-divergence between them.
Naive mean field updates
The naive mean field approach corresponds to the trivial subgraph with out any edges and hence the joint probability fully factorizes over the node probability distributions.
Example
With the fully disconnected graph, the tractable set
and
.
The naive mean field problem becomes
. By replacing μst = μsμt we will get
.
By computing the derivative and equating it to 0 we can find the iterative updates for each
.
Structured mean field
Instead of considering a fully disconnected graph, we can consider a arbitrary subgraph H of the original graph G. Let
be the subset of indices corresponding to the sufficient statistics associated with H, and let
be the associated set of mean parameters, then:
1) the sub vector μ(H) can be an arbitrary member of
, the set of realizable mean parameters defined by the subgraph H
2) the dual function A * H actually depends on μ(H) and not on the mean parameters μβ for indices β in the compliment
The mean parameters μβ occur in the dot product and are constrained in a nonlinear choices of μβ = gβ(μ(H)). So the final optimization problem can be rewritten in the form:
=
Again taking its derivative and setting it to 0 will result in mean parameter updates
where γβ(H) is the exponential parameter associated with μβ(H)
Geometric view of mean field
The variational problem may be non-convex, so that there may be local minima and the mean field updates can have multiple solutions. One way to understand this non-convexity is in terms of the set of tractable mean parameters. It can be shown that the the set
. A practical consequence of this non-convexity is that the mean field updates are often sensitive to the initial conditions.
Parameter Estimation and Variation EM
If we view the variational problem in the EM setting, the E-step (computing the expectation of the hidden variables) corresponds to the estimation of the mean parameters. While the M step ensures that the likelihood of the data increases with each iteration.