4csll5 ibm translation models
play

4CSLL5 IBM Translation Models Martin Emms October 23, 2020 4CSLL5 - PowerPoint PPT Presentation

4CSLL5 IBM Translation Models 4CSLL5 IBM Translation Models Martin Emms October 23, 2020 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction The brute force EM algorithm defined A formula for p ( a | o , s ) Examples


  1. 4CSLL5 IBM Translation Models 4CSLL5 IBM Translation Models Martin Emms October 23, 2020

  2. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction The brute force EM algorithm defined A formula for p ( a | o , s ) Examples brute force EM in action

  3. 4CSLL5 IBM Translation Models Brute force EM learning

  4. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Outline Parameter learning (brute force) Introduction The brute force EM algorithm defined A formula for p ( a | o , s ) Examples brute force EM in action

  5. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models

  6. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D )

  7. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . )

  8. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . ) ◮ but we don’t . . .

  9. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . ) ◮ but we don’t . . . ◮ if we knew the parameters , it would be (relatively) easy to calculate the ’odds’ on alignments ie. P ( a 1 | o 1 , s 1 ) . . . P ( a D | o D , s D )

  10. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . ) ◮ but we don’t . . . ◮ if we knew the parameters , it would be (relatively) easy to calculate the ’odds’ on alignments ie. P ( a 1 | o 1 , s 1 ) . . . P ( a D | o D , s D ) ◮ but we don’t . . .

  11. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . ) ◮ but we don’t . . . ◮ if we knew the parameters , it would be (relatively) easy to calculate the ’odds’ on alignments ie. P ( a 1 | o 1 , s 1 ) . . . P ( a D | o D , s D ) ◮ but we don’t . . . ◮ something of a ’Chicken and Egg’ situation

  12. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction Learning Lexical Translation Models ◮ We would like to estimate the lexical translation probabilities t ( o | s ) from a parallel corpus ( o 1 , s 1 ) . . . ( o D , s D ) ◮ this would be easy if we had the alignments ie. ( o 1 , a 1 , s 1 ) . . . ( o D , a D , s D ) (or just how frequent . . . ) ◮ but we don’t . . . ◮ if we knew the parameters , it would be (relatively) easy to calculate the ’odds’ on alignments ie. P ( a 1 | o 1 , s 1 ) . . . P ( a D | o D , s D ) ◮ but we don’t . . . ◮ something of a ’Chicken and Egg’ situation ◮ but the EM algorithm embraces this exactly

  13. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction EM Algorithm roughly Expectation Maximization (EM) in a nutshell 1. initialize model parameters (e.g. uniform) 2. assign probabilities to the missing data 3. treat probabilities like counts in complete data and estimate model parameters from the pseudo-completed data 4. iterate steps 2–3 until convergence

  14. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction The EM algorithm keeps re -estimating the parameters. The following slides show in a graphical fashion the evolution of the parameters when the process is applied to the corpus s 1 s 2 s 3 la maison la maison bleu la fleur o 1 o 2 o 3 the house the blue house the flower and with all tr ( o | s ) values initially equal

  15. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction initial la ma la ma la fle ble the ho the blu ho the flo

  16. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction after one la ma la ma la fle ble the ho the blu ho the flo

  17. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction after two la ma la ma la fle ble the ho the blu ho the flo

  18. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction after four la ma la ma la fle ble the ho the blu ho the flo

  19. 4CSLL5 IBM Translation Models Parameter learning (brute force) Introduction after ten la ma la ma la fle ble the ho the blu ho the flo

  20. 4CSLL5 IBM Translation Models Parameter learning (brute force) The brute force EM algorithm defined Outline Parameter learning (brute force) Introduction The brute force EM algorithm defined A formula for p ( a | o , s ) Examples brute force EM in action

  21. 4CSLL5 IBM Translation Models Parameter learning (brute force) The brute force EM algorithm defined

  22. 4CSLL5 IBM Translation Models Parameter learning (brute force) The brute force EM algorithm defined ◮ to arrive at the EM algorithm for this case its a good idea to first spell out explicitly what the counting and parameter-estimation would look like if you had the alignments

  23. 4CSLL5 IBM Translation Models Parameter learning (brute force) The brute force EM algorithm defined ◮ to arrive at the EM algorithm for this case its a good idea to first spell out explicitly what the counting and parameter-estimation would look like if you had the alignments ◮ then migrate that into the EM version replacing anything which assume a definite alignment with lines which consider all possible alignments, treating each has having a ’count’ of p ( a | o , s )

  24. 4CSLL5 IBM Translation Models Parameter learning (brute force) The brute force EM algorithm defined ◮ to arrive at the EM algorithm for this case its a good idea to first spell out explicitly what the counting and parameter-estimation would look like if you had the alignments ◮ then migrate that into the EM version replacing anything which assume a definite alignment with lines which consider all possible alignments, treating each has having a ’count’ of p ( a | o , s ) ◮ next 2 slides do exactly this

  25. Estimating translation probs tr ( o | s ) from complete data Suppose you have a corpus of D pairs of sentence, and each has an alignment a . From this we can estimate the values of tr ( o | s ) for the model in a straightforward way 1 COUNT 1 If we wanted to be really thorough we could set up the differential equations which define the parameters which will maximise the likelihood of the data under the model and show that solving them for tr ( o | s ) parameters amounts to the counting procedure shown

  26. Estimating translation probs tr ( o | s ) from complete data Suppose you have a corpus of D pairs of sentence, and each has an alignment a . From this we can estimate the values of tr ( o | s ) for the model in a straightforward way 1 COUNT for each o ∈ V o for each s ∈ V s ∪ { NULL } set #( o , s ) = 0 1 If we wanted to be really thorough we could set up the differential equations which define the parameters which will maximise the likelihood of the data under the model and show that solving them for tr ( o | s ) parameters amounts to the counting procedure shown

  27. Estimating translation probs tr ( o | s ) from complete data Suppose you have a corpus of D pairs of sentence, and each has an alignment a . From this we can estimate the values of tr ( o | s ) for the model in a straightforward way 1 COUNT for each o ∈ V o for each s ∈ V s ∪ { NULL } set #( o , s ) = 0 for each aligned pair ( o , a , s ) // just counting freqs of (o,s) for each j ∈ 1 : ℓ o // word-pairs in the data #( o j , s a ( j ) ) += 1 1 If we wanted to be really thorough we could set up the differential equations which define the parameters which will maximise the likelihood of the data under the model and show that solving them for tr ( o | s ) parameters amounts to the counting procedure shown

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