1 / 63

An Introduction to Structural SVMs and its Application to Information Retrieval

An Introduction to Structural SVMs and its Application to Information Retrieval. Yisong Yue Carnegie Mellon University. x. y. 7.3. x. x. y. y. 1. -1.

cruz
Download Presentation

An Introduction to Structural SVMs and its Application to Information Retrieval

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to Structural SVMs and its Application to Information Retrieval Yisong Yue Carnegie Mellon University

  2. x y 7.3 x x y y 1 -1 Microsoft announced today that they acquired Apple for the amount equal to the gross national product of Switzerland. Microsoft officials stated that they first wanted to buy Switzerland, but eventually were turned off by the mountains and the snowy winters… GATACAACCTATCCCCGTATATATATTCTATGGGTATAGTATTAAATCAATACAACCTATCCCCGTATATATATTCTATGGGTATAGTATTAAATCAATACAACCTATCCCCGTATATATATTCTATGGGTATAGTATTAAATCAGATACAACCTATCCCCGTATATATATTCTATGGGTATAGTATTAAATCACATTTA Supervised Learning • Find function from input space X to output space Y such that the prediction error is low.

  3. x The rain wet the cat y Det V Det N N Examples of Complex Output Spaces • Part-of-Speech Tagging • Given a sequence of words x, predict sequence of tags y. • Dependencies from tag-tag transitions in Markov model. •  Similarly for other sequence labeling problems, e.g., RNA Intron/Exon Tagging.

  4. x The dog chased the cat y S NP VP NP Det N V Det N Examples of Complex Output Spaces • Natural Language Parsing • Given a sequence of words x, predict the parse tree y. • Dependencies from structural constraints, since y has to be a tree.

  5. Examples of Complex Output Spaces • Information Retrieval • Given a query x, predict a ranking y. • Dependencies between results (e.g. avoid redundant hits) • Loss function over rankings (e.g. Average Precision) y x • Kernel-Machines • SVM-Light • Learning with Kernels • SV Meppen Fan Club • Service Master & Co. • School of Volunteer Management • SV Mattersburg Online • … SVM

  6. Examples of Complex Output Spaces • Multi-label Prediction • Protein Sequence Alignment • Noun Phrase Co-reference Clustering • Rankings in Information Retrieval • Inference in Graphical Models • …and many more.

  7. 1st Order Sequence Labeling • Given: • scoring function S(x, y1, y2) • input example x = (x1,…,xn) • Finds sequence y = (y1,…,yn) to maximize • Solved with dynamic programming (Viterbi) “Hypothesis Function”

  8. Some Formulation Restrictions • Assume S is parameterized linearly by some weight vector w in RD. • This means that “Hypothesis Function”

  9. Joint Feature Map • From last slide: • Joint feature map: • Our hypothesis function: “Linear Discriminant Function”

  10. Structured Prediction Learning Problem • Efficient Inference/Prediction • Viterbi in sequence labeling • CKY Parser for parse trees • Belief Propagation for Markov random fields • Sorting for ranking • Efficient Learning/Training • Learn parameters w from training data {xi,yi}i=1..N • Solution: use Structural SVM framework • Can also use Perceptrons, CRFs, MEMMs, M3Ns etc.

  11. Conventional SVMs Input: x (high dimensional point) Target: y (either +1 or -1) Prediction: sign(wTx) Training: subject to: The sum of slacks upper bounds the 0/1 loss!

  12. Structural SVM Let x denote a structured input (sentence) Let y denote a structured output (POS tags) Standard objective function: Constraints are defined for each incorrect labeling y’ over each x. Score(y(i)) Score(y’) Loss(y’) Slack [Tsochantaridis et al., 2005]

  13. Interpreting Constraints Suppose for incorrect y’: Then: Score(y(i)) Score(y’) Loss(y’) Slack [Tsochantaridis et al., 2005]

  14. Adapting to Sequence Labeling • Minimize subject to where and • Sum of slacks upper bound loss. Too many constraints!

  15. Structural SVM Training • The trick is to not enumerate all constraints. • Suppose we only solve the SVM objective over a small subset of constraints (working set). • This is efficient • Equivalent to solving standard SVM. • But some constraints from global set might be violated.

  16. Structural SVM Training • STEP 1: Solve the SVM objective function using only working set of constraints W. • STEP 2: Using the model learned in STEP 1, find the most violated constraint from the global set of constraints. • STEP 3: If the constraint returned in STEP 2 is violated by more than ε, add it to W. • Repeat STEP 1-3 until no additional constraints are added. Return the most recent model that was trained in STEP 1. STEP 1-3 is guaranteed to loop for at most O(1/epsilon) iterations. [Joachims et al., 2009] *This is known as a “cutting plane” method.

  17. Original SVM Problem Exponential constraints Most are dominated by a small set of “important” constraints Structural SVM Approach Repeatedly finds the next most violated constraint… …until set of constraints is a good approximation. Illustrative Example *This is known as a “cutting plane” method.

  18. Original SVM Problem Exponential constraints Most are dominated by a small set of “important” constraints Structural SVM Approach Repeatedly finds the next most violated constraint… …until set of constraints is a good approximation. Illustrative Example *This is known as a “cutting plane” method.

  19. Original SVM Problem Exponential constraints Most are dominated by a small set of “important” constraints Structural SVM Approach Repeatedly finds the next most violated constraint… …until set of constraints is a good approximation. Illustrative Example *This is known as a “cutting plane” method.

  20. Original SVM Problem Exponential constraints Most are dominated by a small set of “important” constraints Structural SVM Approach Repeatedly finds the next most violated constraint… …until set of constraints is a good approximation. Illustrative Example *This is known as a “cutting plane” method.

  21. Finding Most Violated Constraint • A constraint is violated when • Finding most violated constraint reduces to • Highly related to inference: “Loss augmented inference”

  22. Sequence Labeling Revisited • Finding most violated constraint… … can be solved using Viterbi!

  23. Structural SVM Recipe • Joint feature map • Inference method • Loss function • Loss-augmented (most violated constraint)

  24. Structural SVMs for Rankings • Predicting rankings important in IR • Must provide the four ingredients: • How to represent joint feature map Ψ? • How to perform inference? • What loss function to optimize for? • How to find most violated constraint?

  25. Joint Feature Map for Ranking • Let x = (x1,…xn) denote candidate documents • Let yjk = {+1, -1} encode pairwise rank orders • Feature map is pairwise feature difference of documents. • Inference made by sorting on document scores wTxi

  26. Multivariate Loss Functions • Information Retrieval focused on ranking-centric performance measures • Normalized Discounted Cumulative Gain • Precision @ K • Mean Average Precision • Expected Reciprocal Rank • These measures all depend on the entire ranking

  27. Multivariate Loss Functions • Information Retrieval focused on ranking-centric performance measures • Normalized Discounted Cumulative Gain • Precision @ K • Mean Average Precision • Expected Reciprocal Rank • These measures all depend on the entire ranking

  28. Mean Average Precision Consider rank position of each relevant doc K1, K2, … KR Compute Precision@K for each K1, K2, … KR Average precision = average of P@K Ex: has AvgPrec of MAP is Average Precision across multiple queries/rankings

  29. [Yue & Burges, 2007]

  30. Structural SVM for MAP Minimize subject to where ( yjk= {-1, +1} ) and Sum of slacks is smooth upper bound on MAP loss. [Yue et al., SIGIR 2007]

  31. Too Many Constraints! For Average Precision, the true labeling is a ranking where the relevant documents are all ranked in the front, e.g., An incorrect labeling would be any other ranking, e.g., This ranking has Average Precision of about 0.8 with (y’) ≈ 0.2 Intractable number of rankings, thus an intractable number of constraints!

  32. Finding Most Violated Constraint Observations MAP is invariant on the order of documents within a relevance class Swapping two relevant or non-relevant documents does not change MAP. Joint SVM score is optimized by sorting by document score,wTxj Reduces to finding an interleaving between two sorted lists of documents [Yue et al., SIGIR 2007]

  33. Finding Most Violated Constraint Start with perfect ranking Consider swapping adjacent relevant/non-relevant documents ► [Yue et al., SIGIR 2007]

  34. Finding Most Violated Constraint Start with perfect ranking Consider swapping adjacent relevant/non-relevant documents Find the best feasible ranking of the non-relevant document ► [Yue et al., SIGIR 2007]

  35. Finding Most Violated Constraint Start with perfect ranking Consider swapping adjacent relevant/non-relevant documents Find the best feasible ranking of the non-relevant document Repeat for next non-relevant document ► [Yue et al., SIGIR 2007]

  36. Finding Most Violated Constraint Start with perfect ranking Consider swapping adjacent relevant/non-relevant documents Find the best feasible ranking of the non-relevant document Repeat for next non-relevant document Never want to swap past previous non-relevant document ► [Yue et al., SIGIR 2007]

  37. Finding Most Violated Constraint Start with perfect ranking Consider swapping adjacent relevant/non-relevant documents Find the best feasible ranking of the non-relevant document Repeat for next non-relevant document Never want to swap past previous non-relevant document Repeat until all non-relevant documents have been considered ► [Yue et al., SIGIR 2007]

  38. Need for Diversity (in IR) Ambiguous Queries Different information needs using same query “Jaguar” At least one relevant result for each information need Learning Queries User interested in “a specific detail or entire breadth of knowledge available” [Swaminathan et al., 2008] Results with high information diversity

  39. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  40. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  41. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  42. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  43. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  44. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  45. Choose top 3 documents • Individual Relevance: D3 D4 D1 • Greedy Coverage Solution: D3 D1 D5

  46. Example Document Word Counts Marginal Benefit

  47. Example Document Word Counts Marginal Benefit

  48. Prior Work • Essential Pages [Swaminathan et al., 2008] • Uses fixed function of word benefit • Depends on word frequency in candidate set • - Local version of TF-IDF • - Frequent words low weight • (not important for diversity) • - Rare words low weight • (not representative)

  49. Joint Feature Map • x = (x1,x2,…,xn) - candidate documents • y – subset of x • V(y) – union of words from documents in y. • Joint feature map: • (v,x) – frequency features (e.g., >10%, >20%, etc). • Benefit of covering word v is thenwT(v,x) [Yue & Joachims, ICML 2008]

More Related