Forest Rescoring
Faster Decoding with
Integrated Language Models
Liang Huang David Chiang
ACL 2007, Praha, Česká republika
Forest Rescoring Faster Decoding with Integrated Language Models - - PowerPoint PPT Presentation
Forest Rescoring Faster Decoding with Integrated Language Models Liang Huang David Chiang ACL 2007, Praha, esk republika Statistical Machine Translation Spanish/English English Bilingual Text Text Statistical Analysis Statistical
Liang Huang David Chiang
ACL 2007, Praha, Česká republika
Huang and Chiang Forest Rescoring
2
(Knight and Koehn, 2003)
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis Que hambre tengo yo What hunger have I Hungry I am so Have I that hunger I am so hungry How hunger have I ... I am so hungry
Huang and Chiang Forest Rescoring
2
(Knight and Koehn, 2003)
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis Que hambre tengo yo What hunger have I Hungry I am so Have I that hunger I am so hungry How hunger have I ... I am so hungry
n-best rescoring
Huang and Chiang Forest Rescoring
3
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
Huang and Chiang Forest Rescoring
3
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
computationally challenging! ☹
Que hambre tengo yo I am so hungry
decoder (LM-integrated)
integrated decoder
Huang and Chiang Forest Rescoring
3
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
phrase-based TM syntax-based
n-gram LM
computationally challenging! ☹
Que hambre tengo yo I am so hungry
decoder (LM-integrated)
integrated decoder
Huang and Chiang Forest Rescoring
4
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
phrase-based TM syntax-based
n-gram LM
Que hambre tengo yo I am so hungry
decoder (LM-integrated)
integrated decoder packed forest
computationally challenging! ☹
Huang and Chiang Forest Rescoring
4
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
phrase-based TM syntax-based
n-gram LM
Que hambre tengo yo I am so hungry
decoder (LM-integrated)
integrated decoder packed forest
computationally challenging! ☹
Huang and Chiang Forest Rescoring
4
translation model (TM) competency language model (LM) fluency
Spanish Broken English English Spanish/English Bilingual Text English Text Statistical Analysis Statistical Analysis
phrase-based TM syntax-based
n-gram LM
significant speed-up: 10~30 times faster! ☺
Que hambre tengo yo I am so hungry
decoder (LM-integrated)
integrated decoder packed forest forest rescorer
Huang and Chiang Forest Rescoring
6
yu Shalong juxing le huitan
与 沙龙 举行 了 会谈
held a talk with Sharon
_ _●
held a talk with Sharon
_ _ _ _ _
... ... ...
_ _●
source-side: coverage vector target-side: grow hypotheses strictly left-to-right
Huang and Chiang Forest Rescoring
7
VP PP yu Shalong VP juxing le huitan VP VP held a meeting PP with Sharon
VP → PP(1) VP(2), VP(2) PP(1) VP → juxing le huitan, held a meeting PP → yu Shalong, with Sharon
Huang and Chiang Forest Rescoring
8
PP1, 3 VP3, 6 VP1, 6
yu Shalong juxing le huitan
VP → PP(1) VP(2), VP(2) PP(1) VP → juxing le huitan, held a meeting PP → yu Shalong, with Sharon
Huang and Chiang Forest Rescoring
8
PP1, 3 VP3, 6 VP1, 6
yu Shalong juxing le huitan
VP → PP(1) VP(2), VP(2) PP(1) VP → juxing le huitan, held a meeting PP → yu Shalong, with Sharon
Huang and Chiang Forest Rescoring
8
PP1, 3 VP3, 6 VP1, 6
yu Shalong juxing le huitan
with Sharon held a talk held a talk with Sharon
VP → PP(1) VP(2), VP(2) PP(1) VP → juxing le huitan, held a meeting PP → yu Shalong, with Sharon
Huang and Chiang Forest Rescoring
9
_ _●
VP3, 6 VP1, 6
phrase-based: graph syntax-based: hypergraph
Huang and Chiang Forest Rescoring
9
_ _●
(hyper-)edges
PP1, 3 VP3, 6 VP1, 6
phrase-based: graph syntax-based: hypergraph
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks
+LM items
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks
+LM items
with Sharon
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks
+LM items
with Sharon
bigram
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks
+LM items
with Sharon
bigram
held ... talk with ... Sharon
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks
+LM items
with Sharon
bigram
held ... talk with ... Sharon
bigram
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks held ... Sharon
+LM items
with Sharon
bigram
held ... talk with ... Sharon
bigram
Huang and Chiang Forest Rescoring
10
PP1, 3 VP3, 6 VP1, 6
_ _●
_ _ _ _ _
_ _●
_ _●
with ... Sharon along ... Sharon with ... Shalong held ... talk held ... meeting hold ... talks held ... Sharon held ... Shalong hold ... Sharon hold ... Shalong
+LM items
with Sharon
bigram
held ... talk with ... Sharon
bigram
Huang and Chiang Forest Rescoring
11
VP1, 6
hyperedge
PP1, 3 VP3, 6 PP1, 4 VP4, 6 NP1, 4 VP4, 6
1.0 1.1 2.5 2.3 4.6 7.2
Huang and Chiang Forest Rescoring
12
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
PP1, 3 VP3, 6 VP1, 6
monotonic grid?
2.0 4.0 9.0
2.1 4.1 9.1
4.5
6.5
11.5
Huang and Chiang Forest Rescoring
13
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
PP1, 3 VP3, 6 VP1, 6
non-monotonic grid due to LM combo costs
Huang and Chiang Forest Rescoring
13
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
PP1, 3 VP3, 6 VP1, 6
non-monotonic grid due to LM combo costs
bigram (meeting, with)
Huang and Chiang Forest Rescoring
14
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
PP1, 3 VP3, 6 VP1, 6
non-monotonic grid due to LM combo costs
Huang and Chiang Forest Rescoring
15
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
k-best parsing
(Huang and Chiang, 2005)
Huang and Chiang Forest Rescoring
16
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
k-best parsing
(Huang and Chiang, 2005)
Huang and Chiang Forest Rescoring
17
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
k-best parsing
(Huang and Chiang, 2005)
Huang and Chiang Forest Rescoring
18
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
items are popped out-of-order solution: keep a buffer of pop-ups
2.5 2.4 5.1
Huang and Chiang Forest Rescoring
18
(VP held meeting
3,6
) (VP held talk
3,6
) (VP hold conference
3,6
)
( P P
w i t h
h a r
1 , 3
)
( P P
a l
g
h a r
1 , 3
) ( P P
w i t h
h a l
g 1 , 3
)
finally re-sort the buffer and return inorder:
2.4 2.5 5.1
items are popped out-of-order solution: keep a buffer of pop-ups
2.5 2.4 5.1
Huang and Chiang Forest Rescoring
19
VP
process all hyperedges simultaneously! significant savings of computation
PP1, 3 VP3, 6 PP1, 4 VP4, 6 NP1, 4 VP4, 6
k-best parsing
(Huang and Chiang, 2005)
hyperedge
Huang and Chiang Forest Rescoring
19
VP
process all hyperedges simultaneously! significant savings of computation
PP1, 3 VP3, 6 PP1, 4 VP4, 6 NP1, 4 VP4, 6
k-best parsing
(Huang and Chiang, 2005)
hyperedge
instead of only at the root node
Huang and Chiang Forest Rescoring
20
Huang and Chiang Forest Rescoring
22
synchronous tree- substitution grammars (STSG)
(Galley et al., 2004; Eisner, 2003)
tested on 140 sentences slightly better BLEU scores than Pharaoh
VP VBD was VP-C VP VBN shot PP TO to NP-C NN death PP IN by NP-C DT the NN police
search space still a hypergraph
Huang and Chiang Forest Rescoring
22
synchronous tree- substitution grammars (STSG)
(Galley et al., 2004; Eisner, 2003)
tested on 140 sentences slightly better BLEU scores than Pharaoh
VP VBD was VP-C VP VBN shot PP TO to NP-C NN death PP IN by NP-C DT the NN police !"""#$%&"""'$
bei
VP VBD was VP-C VP VBN shot PP TO to NP-C NN death PP IN by NP-C DT the NN police
search space still a hypergraph
Huang and Chiang Forest Rescoring
23
speed ++
quality ++
( - log Prob )
Huang and Chiang Forest Rescoring
23
speed ++
quality ++
10 times faster
( - log Prob )
Huang and Chiang Forest Rescoring
23
speed ++
quality ++
10 times faster
( - log Prob )
same parameters
1 1 1
Huang and Chiang Forest Rescoring
23
speed ++
quality ++
10 times faster
( - log Prob )
same parameters
1 1 1
2 2 2
Huang and Chiang Forest Rescoring
23
speed ++
quality ++
10 times faster
( - log Prob )
same parameters
1 1 1
2 2 2
3 3 3
Huang and Chiang Forest Rescoring
24
speed ++
quality++
Huang and Chiang Forest Rescoring
26
VP PP1, 3 VP3, 6 PP1, 4 VP4, 6 NP1, 4 VP4, 6
_ _●
... talk ... meeting ... talks ... Sharon ... Shalong ... minister ... held ... hold ... did
with Sharon
held a talk
a talk
Huang and Chiang Forest Rescoring
26
VP PP1, 3 VP3, 6 PP1, 4 VP4, 6 NP1, 4 VP4, 6
_ _●
... talk ... meeting ... talks ... Sharon ... Shalong ... minister ... held ... hold ... did
with Sharon
held a talk
a talk
Huang and Chiang Forest Rescoring
a n d S h a r
w i t h A r i e l S h a r
w i t h S h a r
27
_ _●
... talk ... meeting ... talks
held a meeting held a talk hold a reunion a meeting a talk conference
... Sharon ... Shalong ... minister ... held ... hold ... did
grouping into hyperedge bundles
Huang and Chiang Forest Rescoring
a n d S h a r
w i t h A r i e l S h a r
w i t h S h a r
27
_ _●
... talk ... meeting ... talks
held a meeting held a talk hold a reunion a meeting a talk conference
... Sharon ... Shalong ... minister ... held ... hold ... did
grouping into hyperedge bundles Pharaoh would explore all cells
Huang and Chiang Forest Rescoring
a n d S h a r
w i t h A r i e l S h a r
w i t h S h a r
28
_ _●
... talk ... meeting ... talks
held a meeting held a talk hold a reunion a meeting a talk conference
... Sharon ... Shalong ... minister ... held ... hold ... did
but we explore the grids in a best-first fashion
Huang and Chiang Forest Rescoring
a n d S h a r
w i t h A r i e l S h a r
w i t h S h a r
28
_ _●
... talk ... meeting ... talks
held a meeting held a talk hold a reunion a meeting a talk conference
... Sharon ... Shalong ... minister ... held ... hold ... did
but we explore the grids in a best-first fashion in practice we use per-bin pruning as in Pharaoh
Huang and Chiang Forest Rescoring
29
Pharaoh
Huang and Chiang Forest Rescoring
29
Pharaoh Cube Pruning
Huang and Chiang Forest Rescoring
29
Cube Pruning
Huang and Chiang Forest Rescoring
29
Cube Pruning
close up
Huang and Chiang Forest Rescoring
29
Cube Pruning hyperedge bundles
close up
Huang and Chiang Forest Rescoring
29
Cube Pruning hyperedge bundles
close up
Huang and Chiang Forest Rescoring
29
Cube Pruning
2.5 8.3 2.4
hyperedge bundles
close up
Huang and Chiang Forest Rescoring
29
Cube Pruning
2.5 8.3 2.4
hyperedge bundles
close up
Huang and Chiang Forest Rescoring
30
speed ++
quality ++
tested on our faithful clone of Pharaoh ( - log Prob )
Huang and Chiang Forest Rescoring
30
speed ++
quality ++
32 times faster
tested on our faithful clone of Pharaoh ( - log Prob )
Huang and Chiang Forest Rescoring
30
speed ++
quality ++
32 times faster
tested on our faithful clone of Pharaoh ( - log Prob )
same parameters
Huang and Chiang Forest Rescoring
31
speed ++
quality++
Huang and Chiang Forest Rescoring
31
speed ++
quality++
~100 times faster
Huang and Chiang Forest Rescoring
32
www.cis.upenn.edu/~lhuang3/cubit/
a cube pruning decoder for phrase-based translation