IBM Alignment Models
   HOME

TheInfoList



OR:

IBM alignment models are a sequence of increasingly complex models used in
statistical machine translation Statistical machine translation (SMT) is a machine translation paradigm where translations are generated on the basis of statistical models whose parameters are derived from the analysis of bilingual text corpora. The statistical approach contrast ...
to train a translation model and an alignment model, starting with lexical translation probabilities and moving to reordering and word duplication. They underpinned the majority of statistical machine translation systems for almost twenty years starting in the early 1990s, until
neural machine translation Neural machine translation (NMT) is an approach to machine translation that uses an artificial neural network to predict the likelihood of a sequence of words, typically modeling entire sentences in a single integrated model. Properties They requi ...
began to dominate. These models offer principled probabilistic formulation and (mostly) tractable inference. The original work on statistical machine translation at IBM proposed five models, and a model 6 was proposed later. The sequence of the six models can be summarized as: * Model 1: lexical translation * Model 2: additional absolute alignment model * Model 3: extra fertility model * Model 4: added relative alignment model * Model 5: fixed deficiency problem. * Model 6: Model 4 combined with a HMM alignment model in a log linear way


Mathematical setup

The IBM alignment models translation as a conditional probability model. For each source-language ("foreign") sentence f, we generate both a target-language ("English") sentence e and an alignment a. The problem then is to find a good statistical model for p(e, a, f), the probability that we would generate English language sentence e and an alignment a given a foreign sentence f. The meaning of an alignment grows increasingly complicated as the model version number grew. See Model 1 for the most simple and understandable version.


Model 1


Word alignment

Given any foreign-English sentence pair (e, f), an alignment for the sentence pair is a function of type \ \to \. That is, we assume that the English word at location i is "explained" by the foreign word at location a(i). For example, consider the following pair of sentences
It will surely rain tomorrow -- 明日 は きっと 雨 だ
We can align some English words to corresponding Japanese words, but not everyone:
it -> ? will -> ? surely -> きっと rain -> 雨 tomorrow -> 明日
This in general happens due to the different grammar and conventions of speech in different languages. English sentences require a subject, and when there is no subject available, it uses a
dummy pronoun A dummy pronoun is a deictic pronoun that fulfills a syntactical requirement without providing a contextually explicit meaning of its referent. As such, it is an example of exophora. Dummy pronouns are used in many Germanic languages, includin ...
''it''. Japanese verbs do not have different forms for future and present tense, and the future tense is implied by the noun 明日 (tomorrow). Conversely, the topic-marker は and the grammar word だ (roughly "to be") do not correspond to any word in the English sentence. So, we can write the alignment as
1-> 0; 2 -> 0; 3 -> 3; 4 -> 4; 5 -> 1
where 0 means that there is no corresponding alignment. Thus, we see that the alignment function is in general a function of type \ \to \. Future models will allow one English world to be aligned with multiple foreign words.


Statistical model

Given the above definition of alignment, we can define the statistical model used by Model 1: * Start with a "dictionary". Its entries are of form t(e_i , f_j), which can be interpreted as saying "the foreign word f_j is translated to the English word e_i with probability t(e_i , f_j)". * After being given a foreign sentence f with length l_f, we first generate an English sentence length l_e uniformly in a range Uniform , 2, ..., N/math>. In particular, it does not depend on f or l_f. * Then, we generate an alignment uniformly in the set of all possible alignment functions \ \to \. * Finally, for each English word e_1, e_2, ... e_, generate each one independently of every other English word. For the word e_i, generate it according to t(e_i, f_). Together, we have the probabilityp(e, a, f) = \frac\prod_^ t(e_i , f_)IBM Model 1 uses very simplistic assumptions on the statistical model, in order to allow the following algorithm to have closed-form solution.


Learning from a corpus

If a dictionary is not provided at the start, but we have a corpus of English-foreign language pairs \_k (without alignment information), then the model can be cast into the following form: * fixed parameters: the foreign sentences \_k. * learnable parameters: the entries of the dictionary t(e_i , f_j). * observable variables: the English sentences \_k. * latent variables: the alignments \_k In this form, this is exactly the kind of problem solved by
expectation–maximization algorithm In statistics, an expectation–maximization (EM) algorithm is an iterative method to find (local) maximum likelihood or maximum a posteriori (MAP) estimates of parameters in statistical models, where the model depends on unobserved latent variabl ...
. Due to the simplistic assumptions, the algorithm has a closed-form, efficiently computable solution, which is the solution to the following equations: \begin \max_ \sum_k \sum_i \sum_ t(a^ , e^, f^) \ln t(e_i^ , f_^) \\ \sum_x t'(e_x , f_y) = 1 \quad \forall y \end This can be solved by
Lagrangian multipliers In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied ex ...
, then simplified. For a detailed derivation of the algorithm, see chapter 4 and. In short, the EM algorithm goes as follows:
INPUT. a corpus of English-foreign sentence pairs \_k INITIALIZE. matrix of translations probabilities t(e_x , f_y).
This could either be uniform or random. It is only required that every entry is positive, and for each y, the probability sums to one: \sum_x t(e_x, f_y) = 1.
LOOP. until t(e_x , f_y) converges:
t(e_x , f_y) \leftarrow \frac \sum_\frac
where each \lambda_y is a normalization constant that makes sure each \sum_x t(e_x, f_y) = 1.
RETURN. t(e_x , f_y).
In the above formula, \delta is the
Dirac delta function In mathematics, the Dirac delta distribution ( distribution), also known as the unit impulse, is a generalized function or distribution over the real numbers, whose value is zero everywhere except at zero, and whose integral over the entire ...
-- it equals 1 if the two entries are equal, and 0 otherwise. The index notation is as follows:
k ranges over English-foreign sentence pairs in corpus; i ranges over words in English sentences; j ranges over words in foreign language sentences; x ranges over the entire vocabulary of English words in the corpus; y ranges over the entire vocabulary of foreign words in the corpus.


Limitations

There are several limitations to the IBM model 1. * No fluency: Given any sentence pair (e, f), any permutation of the English sentence is equally likely: p(e, f) = p(e', f) for any permutation of the English sentence e into e'. * No length preference: The probability of each length of translation is equal: \sum_p(e, f) = \frac 1N for any l \in \. *Does not explicitly model fertility: some foreign words tend to produce a fixed number of English words. For example, for German-to-English translation, ''ja'' is usually omitted, and ''zum'' is usually translated to one of ''to the, for the, to a, for a''.


Model 2

Model 2 allows alignment to be conditional on sentence lengths. That is, we have a probability distribution p_a(j , i, l_e, l_f), meaning "the probability that English word i is aligned to foreign word j, when the English sentence is of length l_e, and the foreign sentence is of length l_f". The rest of Model 1 is unchanged. With that, we have p(e, a, f) = \prod_^ t(e_i , f_)p_a(a(i), i, l_e, l_f)The EM algorithm can still be solved in closed-form, giving the following algorithm:t(e_x , f_y) \leftarrow \frac \sum_\fracp_a(j, i, l_e, l_f) \leftarrow \frac \sum_\fracwhere \lambda are still normalization factors. See section 4.4.1 of for a derivation and an algorithm.


Model 3

The fertility problem is addressed in IBM Model 3. The fertility is modeled using probability distribution defined as: :n(\phi \lor f) For each foreign word j, such distribution indicates to how many output words \phi it usually translates. This model deals with dropping input words because it allows \phi=0. But there is still an issue when adding words. For example, the English word ''do'' is often inserted when negating. This issue generates a special ''NULL'' token that can also have its fertility modeled using a conditional distribution defined as: :n(\varnothing \lor NULL) The number of inserted words depends on sentence length. This is why the NULL token insertion is modeled as an additional step: the fertility step. It increases the IBM Model 3 translation process to four steps: The last step is called distortion instead of alignment because it is possible to produce the same translation with the same alignment in different ways. For example, in the above example, we have another way to get the same alignment: * ja NULL nie pôjde tak do do domu * I do not go the to house * I do not go to the house IBM Model 3 can be mathematically expressed as: :P(S\mid E,A)=\prod_^ \Phi_i!n(\Phi \mid e_j)*\prod_^t(f_j \mid e_)*\prod_^d(j , a_j, I, J)\binom p_0^p_1^J where \Phi_i represents the fertility of e_i, each source word s is assigned a fertility distribution n, and I and J refer to the absolute lengths of the target and source sentences, respectively. See section 4.4.2 of for a derivation and an algorithm.


Model 4

In IBM Model 4, each word is dependent on the previously aligned word and on the word classes of the surrounding words. Some words tend to get reordered during translation more than others (e.g. adjective–noun inversion when translating Polish to English). Adjectives often get moved before the noun that precedes them. The word classes introduced in Model 4 solve this problem by conditioning the probability distributions of these classes. The result of such distribution is a lexicalized model. Such a distribution can be defined as follows: For the initial word in the cept: d_1(j-\odot_\lor A(f_),B(e_j)) For additional words: d_1(j-\pi_\lor B(e_j)) where A(f) and B(e) functions map words to their word classes, and e_ and f_ are distortion probability distributions of the words. The cept is formed by aligning each input word f_i to at least one output word. Both Model 3 and Model 4 ignore if an input position was chosen and if the probability mass was reserved for the input positions outside the sentence boundaries. It is the reason for the probabilities of all correct alignments not sum up to unity in these two models (deficient models).


Model 5

IBM Model 5 reformulates IBM Model 4 by enhancing the alignment model with more training parameters in order to overcome the model deficiency. During the translation in Model 3 and Model 4 there are no heuristics that would prohibit the placement of an output word in a position already taken. In Model 5 it is important to place words only in free positions. It is done by tracking the number of free positions and allowing placement only in such positions. The distortion model is similar to IBM Model 4, but it is based on free positions. If v_j denotes the number of free positions in the output, the IBM Model 5 distortion probabilities would be defined as: For the initial word in the cept: d_1(v_j\lor B(e_j),v_,v_) For additional words: d_1(v_-v_\lor B(e_j),v_) The alignment models that use first-order dependencies like the HMM or IBM Models 4 and 5 produce better results than the other alignment methods. The main idea of HMM is to predict the distance between subsequent source language positions. On the other hand, IBM Model 4 tries to predict the distance between subsequent target language positions. Since it was expected to achieve better alignment quality when using both types of such dependencies, HMM and Model 4 were combined in a log-linear manner in Model 6 as follows: :p_6(f,a\lor e)= \frac where the interpolation parameter \alpha is used in order to count the weight of Model 4 relatively to the
hidden Markov model A hidden Markov model (HMM) is a statistical Markov model in which the system being modeled is assumed to be a Markov process — call it X — with unobservable ("''hidden''") states. As part of the definition, HMM requires that there be an ob ...
. A log-linear combination of several models can be defined as p_k (f, a \mid e) with k=1,2,\dotsc,K as: :p_6(f,a\lor e)=\frac The log-linear combination is used instead of linear combination because the P_r (f, a \mid e) values are typically different in terms of their orders of magnitude for HMM and IBM Model 4.


References

{{reflist Machine translation IBM software