Assignment #4: Language Models for Retrieval, Mixture Models and the EM Algorithm
Notice: This assignment is due
Saturday, October 1st at
11:59pm Saturday, October 8th at 11:59pm.
Please submit your solutions via Compass. You should submit your assignment as a PDF.
1. KL-Divergence Retrieval Function [10 pts]
Show that the KL-divergence retrieval function covers the query likelihood retrieval function as a special case if we set the query language model to the empirical word distribution in the query (i.e., , where is the count of word in query , and is the length of the query).
2. Language Models for Boolean Queries [25 pts]
Intuitively, the semantic structure of a query should affect how we score a document. The two basic semantic structures are conjunctive (i.e., “AND”) and disjunctive (i.e., “OR”) expressions. For a conjunctive query such as , we would favor a document that matches both terms and much more to one that matches just one of them, while for a disjunctive query such as , we would not discriminate them so much, though matching both terms should still lead to a higher score than matching just one of them.
What is the implied query semantic structure in the basic multinomial query likelihood retrieval model? Is it disjunctive or conjunctive?
Now consider general Boolean queries (without negation) of the form of , where each is a disjunctive “subquery” . How can we extend the basic multinomial query likelihood retrieval model to score documents for such Boolean queries? Explain your ideas with formulas.
3. Mixture Models [30 pts]
Author and author are co-authoring a paper in the following way:
Each word is written independently.
When writing a word, they would first toss a coin to decide who will write the word. The coin is known to show up as “heads” 80% of the time. If the coin shows up as “heads”, then author would write the word, otherwise, author would write the word.
If it is author ’s turn to write, he would “write” the word by simply drawing a word according to word distribution . Similarly, if it is author ’s turn to write, he would “write” the word by drawing a word according to word distribution .
Suppose the two distributions and are defined as follows:
[5 pts] What is the probability that they would write “the” as the first word of the paper? Show your calculation.
[5 pts] What is the probability that they would write “the” as the second word of the paper? Show your calculation.
[10 pts] Suppose we observe that the first word they wrote is “data”, what is the probability that this word was written by author H? Show your calculation.
[5 pts] Imagine that we observe a very long paper written by them (e.g., with more than 10,000 words). Among the 5 words shown in the table above (i.e., “the”, “computer”, “data”, “baseball”, “game”), which one would you expect to occur least frequently in the paper? Briefly explain why.
[5 pts] Suppose we don’t know , but observed a paper known to be written solely by author . That is, the coin somehow always showed up as “heads” when they wrote the paper. Suppose “the computer data the computer game the computer data game” and we would like to use the maximum likelihood estimator to estimate . What would be the estimated probabilities of “computer” and “game”, respectively? Show your calculations.
4. EM Algorithm [35 pts]
The two-component mixture model we discussed for feedback can also be used to estimate the redundancy of one document with respect to another. Specifically, given two documents and , and a background language model , we can use the maximum likelihood estimator to estimate a unigram language model based on , which will be denoted by (i.e., . Now, we can assume that document is generated by sampling words from a two-component multinomial mixture model where one component is , and the other is . Let denote the probability that would be selected to generate a word in (thus, would be the probability of selecting the background model ). Let where is a word in our vocabulary set . We can then use the mixture model to fit and compute the maximum likelihood estimate of , which can then be used to measure the redundancy of with respect to . We can use the EM algorithm to compute the maximum likelihood estimate.
[5 pts] Write down the formula to compute the probability of generating a word in document from such a mixture model.
[5 pts] Write down the log-likelihood of the whole document , i.e., the probability of observing all the words in being generated from the mixture model.
[5 pts] How many binary hidden variables in total do we need for computing this maximum likelihood estimate using the EM algorithm? Why?
[20 pts] Write down the E-step and M-step updating formulas for estimating .