lagrangian relaxa on for map inference
play

Lagrangian Relaxa,on for MAP Inference SPFLODD October - PowerPoint PPT Presentation

Lagrangian Relaxa,on for MAP Inference SPFLODD October 8, 2013 Outline An elegant example of a relaxa,on to TSP A common problem in NLP:


  1. Lagrangian ¡Relaxa,on ¡ ¡ for ¡MAP ¡Inference ¡ SPFLODD ¡ October ¡8, ¡2013 ¡

  2. Outline ¡ • An ¡elegant ¡example ¡of ¡a ¡relaxa,on ¡to ¡TSP ¡ • A ¡common ¡problem ¡in ¡NLP: ¡ ¡finding ¡consensus ¡ • Basic ¡Lagrangian ¡relaxa,on ¡ • Solving ¡the ¡problem ¡with ¡subgradient ¡ • AD 3 : ¡ ¡an ¡alterna,ve ¡approach ¡to ¡ decomposi,on ¡and ¡op,miza,on ¡using ¡the ¡ augmented ¡Lagrangian ¡

  3. Traveling ¡Salesman ¡Problem ¡ • Given: ¡ ¡a ¡graph ¡(V, ¡E) ¡with ¡edge ¡weight ¡ func,on ¡θ ¡ • Tour: ¡ ¡a ¡subset ¡of ¡E ¡corresponding ¡to ¡a ¡path ¡ that ¡starts ¡and ¡ends ¡in ¡the ¡same ¡place, ¡and ¡ visits ¡every ¡other ¡node ¡exactly ¡once. ¡ • TSP: ¡ ¡Find ¡the ¡maximum-­‑scoring ¡tour. ¡ – NP-­‑hard ¡ X y e θ e max y ∈ Y tour e ∈ E

  4. Another ¡Problem ¡ • 1-­‑tree: ¡ ¡a ¡tree ¡on ¡edges ¡for ¡{2, ¡..., ¡|V|}, ¡plus ¡ two ¡edges ¡from ¡E ¡that ¡link ¡the ¡tree ¡to ¡vertex ¡ 1. ¡ – All ¡tours ¡are ¡1-­‑trees. ¡ – All ¡1-­‑trees ¡where ¡every ¡vertex ¡has ¡degree ¡2 ¡are ¡ tours. ¡ – Easy ¡to ¡solve. ¡

  5. Held ¡and ¡Karp ¡(1971) ¡ ( ) X Y tour = y : y ∈ Y 1-tree ∧ ∀ i ∈ { 1 , . . . , | V |} , y e = 2 e : i ∈ e X y e θ e max y ∈ Y tour transforming ¡the ¡constraints ¡ e ∈ E X X y e θ e s.t. ∀ i, max y e = 2 y ∈ Y 1-tree e : i ∈ e e ∈ E Lagrangian ¡dual ¡ | V | X ! X X L ( u ) = max y e θ e + y e − 2 u i y ∈ Y 1-tree e ∈ E i =1 e : i ∈ e

  6. LR ¡Algorithm ¡for ¡TSP ¡ 1. Ini,alize ¡u (0) ¡= ¡0 ¡ 2. Repeat ¡for ¡k ¡= ¡1, ¡2, ¡...: ¡ | V | X ! u ( k − 1) X X y ( k ) ← arg y e θ e + max y e − 2 i y ∈ Y 1-tree i =1 e : i ∈ e e ∈ E X ! ∀ i, u ( k ) ← u ( k − 1) − δ k y e − 2 i i e : i ∈ e If ¡this ¡converges ¡to ¡a ¡solu,on ¡that ¡sa,sfies ¡the ¡ constraints, ¡it ¡is ¡a ¡solu,on ¡to ¡the ¡TSP. ¡

  7. Lagrangian ¡Relaxa,on, ¡More ¡Generally ¡ • Assume ¡a ¡linear ¡scoring ¡func,on ¡that ¡is ¡“hard” ¡ to ¡maximize. ¡ y 2 Y θ > y max • Rewrite ¡the ¡problem ¡as ¡something ¡easier, ¡ with ¡linear ¡constraints ¡(relaxa,on): ¡ y 2 Y 0 θ > y max Y = { y ∈ Y 0 : A y = b } ¡ s.t. A y = b • Tackle ¡the ¡dual ¡problem: ¡ y 2 Y 0 θ > y + u > ( A y − b ) min u max

  8. Theory ¡ • The ¡dual ¡func,on ¡(of ¡ u ) ¡upper ¡bounds ¡the ¡ MAP ¡problem. ¡ • A ¡subgradient ¡algorithm ¡can ¡be ¡applied ¡to ¡ minimize ¡the ¡dual; ¡it ¡will ¡converge ¡in ¡the ¡limit. ¡ • If ¡the ¡solu,on ¡to ¡the ¡dual ¡problem ¡sa,sfies ¡ the ¡constraints, ¡it ¡is ¡also ¡a ¡solu,on ¡to ¡the ¡ primal ¡(relaxed) ¡problem ¡( Y ’). ¡ – If ¡the ¡relaxa,on ¡is ¡ !ght , ¡we ¡also ¡have ¡a ¡solu,on ¡to ¡ the ¡original ¡primal ¡problem ¡( Y ). ¡

  9. Dual ¡Decomposi,on ¡ ¡ (A ¡Special ¡Case ¡of ¡LR) ¡ • Assume ¡the ¡objec,ve ¡ decomposes ¡into ¡two ¡parts, ¡ coupled ¡only ¡through ¡the ¡ y 2 Y , z 2 Z θ > y + ψ > z max linear ¡constraints: ¡ s.t. A y + C z = b • The ¡relaxa,on: ¡ ✓ ◆ y 2 Y , z 2 Z θ > y + ψ > z ≡ y 2 Y θ > y , max z 2 Z ψ > z max max

  10. Dual ¡Decomposi,on ¡ y 2 Y , z 2 Z θ > y + ψ > z + u > ( A y + C z − b ) min max u 1. Ini,alize ¡ u (0) ¡= ¡0 ¡ 2. Repeat ¡for ¡k ¡= ¡1, ¡2, ¡...: ¡ y ( k ) ← max y 2 Y θ > y + u ( k � 1) > A y z ( k ) ← max z 2 Z ψ > z + u ( k � 1) > C z ⇣ ⌘ A y ( k ) + C z ( k ) − b u ( k ) ← u ( k � 1) − δ k

  11. Consensus ¡Problems ¡in ¡NLP ¡ • Key ¡example: ¡ – Find ¡the ¡jointly-­‑best ¡parse ¡(under ¡a ¡WCFG) ¡and ¡ sequence ¡labeling ¡(under ¡an ¡HMM); ¡see ¡Rush ¡et ¡ al. ¡(2010) ¡ • Other ¡examples: ¡ – Finding ¡a ¡lexicalized ¡phrase ¡structure ¡parse ¡that ¡is ¡ jointly-­‑best ¡under ¡a ¡WCFG ¡and ¡a ¡dependency ¡ model ¡(Rush ¡et ¡al., ¡2010) ¡ – Decoding ¡in ¡phrase-­‑based ¡transla,on ¡(Chang ¡and ¡ Collins, ¡2011). ¡

  12. Example ¡Run ¡(k ¡= ¡1) ¡ ∀ i ∈ { 1 , . . . , n } , ∀ N ∈ N , y [ N, i, i ] = z [ N, i ] u [A , 1] = − 1 u [N , 2] = − 1 u [V , 5] = − 1 u [ N, i ] (1) = u [ N, i ] (0) − δ k ⇣ y [ N, i, i ] (1) − z [ N, i ] (1) ⌘ u [N , 1] = 1 u [V , 2] = 1 u [N , 5] = 1

  13. Example ¡Run ¡(k ¡= ¡2) ¡ ∀ i ∈ { 1 , . . . , n } , ∀ N ∈ N , y [ N, i, i ] = z [ N, i ] ↓ u [N , 1] ↓ u [V , 1] u [ N, i ] (2) = u [ N, i ] (1) − δ k ⇣ y [ N, i, i ] (2) − z [ N, i ] (2) ⌘ ↑ u [A , 1] ↑ u [N , 1]

  14. Example ¡Run ¡(k ¡= ¡3) ¡ ∀ i ∈ { 1 , . . . , n } , ∀ N ∈ N , y [ N, i, i ] = z [ N, i ]

  15. “Cer,ficate” ¡ • Proof ¡that ¡we ¡have ¡solved ¡the ¡original ¡ problem: ¡ ¡constraints ¡hold. ¡ – This ¡is ¡easy ¡to ¡check ¡given ¡ y ¡and ¡ z . ¡ • In ¡published ¡NLP ¡papers ¡so ¡far, ¡this ¡happens ¡ most ¡of ¡the ¡,me ¡(beher ¡than ¡98%). ¡

  16. What ¡can ¡go ¡wrong? ¡ • It ¡can ¡take ¡many ¡itera,ons ¡to ¡converge. ¡ • Oscilla,on ¡between ¡different ¡solu,ons; ¡failure ¡ to ¡agree. ¡ – Suggested ¡solu,on: ¡ ¡add ¡more ¡variables ¡for ¡ “bigger ¡parts” ¡and ¡enforce ¡agreement ¡among ¡ them ¡with ¡more ¡constraints. ¡

  17. What ¡does ¡this ¡have ¡to ¡do ¡with ¡ILP? ¡ • The ¡linear ¡constraints ¡are ¡expressed ¡in ¡terms ¡ of ¡an ¡integer-­‑vector ¡representa,on ¡of ¡the ¡ output ¡space. ¡ – Just ¡like ¡when ¡we ¡treated ¡decoding ¡as ¡an ¡ILP. ¡ • The ¡subproblems ¡ could ¡be ¡expressed ¡as ¡ILPs, ¡ though ¡we’d ¡prefer ¡to ¡use ¡poly-­‑,me ¡ combinatorial ¡algorithms ¡to ¡solve ¡them ¡if ¡we ¡ can. ¡

  18. Consensus ¡Problems, ¡Revisited ¡ • What ¡if ¡we ¡just ¡have ¡a ¡hard ¡combinatorial ¡ op,miza,on ¡problem? ¡ – There ¡isn’t ¡always ¡a ¡straighmorward ¡decomposi,on. ¡ • Mar,ns ¡et ¡al. ¡(2011): ¡ ¡shaher ¡a ¡decoding ¡problem ¡ into ¡ many ¡“small” ¡subproblems ¡(instead ¡of ¡two ¡ “big” ¡ones). ¡ – Instead ¡of ¡dynamic ¡programming ¡as ¡a ¡subrou,ne, ¡LP ¡ relaxa,ons ¡of ¡“small” ¡subproblems. ¡ – Extra ¡LP ¡relaxa,on ¡step. ¡

  19. Mar,ns’ ¡Alterna,ve ¡Formula,on ¡ S X θ > • Original ¡problem: ¡ max s y s y 1 2 Y 1 ,..., y S 2 Y S , w 2 R D s =1 ¡ s.t. ∀ s, A s w = y s • Convex ¡relaxa,on: ¡ S X θ > max s y s y 1 2 conv( Y 1 ) ,..., y S 2 conv( Y S ) , w 2 R D s =1 s.t. ∀ s, A s w = y s • Dual: ¡ S X X θ > u > min max s y s + s ( y s − A s w ) u 1 ,..., u S y 1 2 conv( Y 1 ) ,..., y S 2 conv( Y S ) , w 2 R D s =1 s

  20. Augmented ¡Lagrangian ¡ (Hestenes, ¡1969; ¡Powell, ¡1969) ¡ S s ( y s � A s w ) + ρ k y s � A s w k 2 X X X θ > u > min max s y s + 2 2 u 1 ,..., u S y 1 2 conv( Y 1 ) ,..., y S 2 conv( Y S ) , w 2 R D s =1 s s S X X θ > u > min max s y s + s ( y s − A s w ) u 1 ,..., u S y 1 2 conv( Y 1 ) ,..., y S 2 conv( Y S ) , w 2 R D s =1 s

  21. Alterna,ng ¡Direc,ons ¡Method ¡of ¡Mul,pliers ¡ ¡ (Gabay ¡and ¡Mercier, ¡1976; ¡Glowinski ¡and ¡Marroco, ¡1975) ¡ Dual ¡Decomposi,on ¡(AD 3 ) ¡ • Alternate ¡between ¡upda,ng ¡ y ¡and ¡ w : ¡ s y s + ρ y s 2 conv( Y s ) θ > 2 k y s � A s w k 2 s y s + u > 8 s, y s arg max 2 s A s w + ρ k y s � A s w k 2 X X u > w arg max ¡ 2 2 w s s • Subgradient ¡step ¡for ¡dual ¡variables ¡ u ¡is ¡similar ¡ to ¡before: ¡ ∀ s, u ( k ) ← u ( k − 1) − δ k ( y s − A s w ) s s

  22. Massive ¡Decomposi,on ¡ • Most ¡extreme: ¡ ¡every ¡factor ¡(MN) ¡or ¡“part” ¡is ¡ a ¡separate ¡subproblem. ¡ s y s + ρ y s 2 conv( Y s ) θ > 2 k y s � A s w k 2 s y s + u > 8 s, y s arg max 2 s A s w + ρ k y s � A s w k 2 X X • Some ¡kinds ¡of ¡MN ¡factors ¡can ¡be ¡solved ¡very ¡ u > w arg max 2 2 w efficiently ¡... ¡ s s

  23. XOR, ¡OR, ¡OR-­‑with-­‑Output ¡ ¡ Solvable ¡in ¡O(K ¡log ¡K) ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend