Sequence to Sequence Learning with Neural Networks
Oriol Vinyals Google vinyals@google.com
Quoc V. Le Google qvl@google.com
Abstract
Deep Neural Networks (DNNs) are powerful models that have achieved excellent performance on difficult learning tasks. Although DNNs work well whenever large labeled training sets are available, they cannot be used to map sequences to sequences. In this paper, we present a general end-to-end approach to sequence learning that makes minimal assumptions on the sequence structure. Our method uses a multilayered Long Short-Term Memory (LSTM) to map the input sequence to a vector of a fixed dimensionality, and then another deep LSTM to decode the target sequence from the vector. Our main result is that on an English to French translation task from the WMT’14 dataset, the translations produced by the LSTM achieve a BLEU score of 34.8 on the entire test set, where the LSTM’s BLEU score was penalized on out-of-vocabulary words. Additionally, the LSTM did not have difficulty on long sentences. For comparison, a phrase-based SMT system achieves a BLEU score of 33.3 on the same dataset. When we used the LSTM to rerank the 1000 hypotheses produced by the aforementioned SMT system, its BLEU score increases to 36.5, which is close to the previous best result on this task. The LSTM also learned sensible phrase and sentence representations that are sensitive to word order and are relatively invariant to the active and the passive voice. Finally, we found that reversing the order of the words in all source sentences (but not target sentences) improved the LSTM’s performance markedly, because doing so introduced many short term dependencies between the source and the target sentence which made the optimization problem easier.
Học từ chuỗi sang chuỗi với mạng nơ-ron (neural network)
Ilya Sutskever Google ilyasu@google.com
Oriol Vinyals Google vinyals@google.com
Quoc V. Le Google qvl@google.com
Tóm tắt
Mạng nơ-ron sâu (Deep Neural Networks, DNNs) là những mô hình mạnh đã đạt hiệu năng xuất sắc trên các tác vụ học khó. Mặc dù DNN hoạt động tốt khi có sẵn các tập huấn luyện lớn đã được gán nhãn, chúng không thể được dùng để ánh xạ chuỗi sang chuỗi. Trong bài báo này, chúng tôi trình bày một cách tiếp cận đầu cuối (end-to-end) tổng quát cho việc học chuỗi, với rất ít giả định về cấu trúc chuỗi. Phương pháp của chúng tôi sử dụng một mạng bộ nhớ dài-ngắn hạn (Long Short-Term Memory, LSTM) nhiều lớp để ánh xạ chuỗi đầu vào thành một vectơ có số chiều cố định, rồi dùng một LSTM sâu khác để giải mã chuỗi đích từ vectơ đó. Kết quả chính của chúng tôi là trên tác vụ dịch từ tiếng Anh sang tiếng Pháp của tập dữ liệu WMT’14, các bản dịch do LSTM tạo ra đạt điểm số BLEU là 34.8 trên toàn bộ tập kiểm thử, trong đó điểm số BLEU của LSTM bị trừ đối với các từ ngoài từ vựng. Ngoài ra, LSTM không gặp khó khăn với các câu dài. Để so sánh, một hệ thống dịch máy thống kê dựa trên cụm từ (SMT) đạt điểm số BLEU là 33.3 trên cùng tập dữ liệu. Khi chúng tôi dùng LSTM để xếp hạng lại 1000 giả thuyết do hệ thống SMT nói trên tạo ra, điểm số BLEU của hệ thống tăng lên 36.5, gần với kết quả tốt nhất trước đó trên tác vụ này. LSTM cũng học được các biểu diễn cụm từ và câu hợp lý, nhạy với thứ tự từ và tương đối bất biến đối với thể chủ động và thể bị động. Cuối cùng, chúng tôi nhận thấy rằng việc đảo ngược thứ tự từ trong tất cả các câu nguồn (nhưng không đảo trong các câu đích) cải thiện rõ rệt hiệu năng của LSTM, vì thao tác này tạo ra nhiều phụ thuộc ngắn hạn giữa câu nguồn và câu đích, giúp bài toán tối ưu hóa trở nên dễ hơn.
1 Introduction
1 Giới thiệu
Deep Neural Networks (DNNs) are extremely powerful machine learning models that achieve excellent performance on difficult problems such as speech recognition [13, 7] and visual object recognition [19], [6], [21], [20]. DNNs are powerful because they can perform arbitrary parallel computation for a modest number of steps. A surprising example of the power of DNNs is their ability to sort -bit numbers using only 2 hidden layers of quadratic size [27]. So, while neural networks are related to conventional statistical models, they learn an intricate computation. Furthermore, large DNNs can be trained with supervised backpropagation whenever the labeled training set has enough information to specify the network’s parameters. Thus, if there exists a parameter setting of a large DNN that achieves good results (for example, because humans can solve the task very rapidly), supervised backpropagation will find these parameters and solve the problem.
Mạng nơ-ron sâu (DNN) là các mô hình học máy cực kỳ mạnh mẽ đạt được hiệu năng xuất sắc trên các bài toán khó như nhận dạng giọng nói [13, 7] và nhận dạng đối tượng trực quan [19], [6], [21], [20]. DNN mạnh mẽ bởi vì chúng có thể thực hiện tính toán song song tùy ý trong một số lượng bước vừa phải. Một ví dụ đáng ngạc nhiên về sức mạnh của DNN là khả năng sắp xếp số -bit chỉ sử dụng 2 lớp ẩn có kích thước bậc hai [27]. Vì vậy, mặc dù mạng nơ-ron có liên quan đến các mô hình thống kê thông thường, chúng học một phép tính phức tạp. Hơn nữa, các DNN lớn có thể được huấn luyện bằng lan truyền ngược có giám sát bất cứ khi nào tập huấn luyện được gán nhãn có đủ thông tin để đặc tả các tham số của mạng. Do đó, nếu tồn tại một thiết lập tham số của một DNN lớn đạt được kết quả tốt (ví dụ, bởi vì con người có thể giải quyết nhiệm vụ rất nhanh), lan truyền ngược có giám sát sẽ tìm ra các tham số này và giải quyết bài toán.
Despite their flexibility and power, DNNs can only be applied to problems whose inputs and targets can be sensibly encoded with vectors of fixed dimensionality. It is a significant limitation, since many important problems are best expressed with sequences whose lengths are not known a-priori. For example, speech recognition and machine translation are sequential problems. Likewise, question answering can also be seen as mapping a sequence of words representing the question to a sequence of words representing the answer. It is therefore clear that a domain-independent method that learns to map sequences to sequences would be useful.
Mặc dù có tính linh hoạt và sức mạnh, DNN chỉ có thể được áp dụng cho các bài toán mà đầu vào và mục tiêu có thể được mã hóa hợp lý bằng các vectơ có số chiều cố định. Đây là một hạn chế đáng kể, vì nhiều bài toán quan trọng được biểu diễn tốt nhất bằng các chuỗi có độ dài không được biết trước. Ví dụ, nhận dạng giọng nói và dịch máy là các bài toán tuần tự. Tương tự, hỏi đáp cũng có thể được xem như ánh xạ một chuỗi các từ biểu diễn câu hỏi thành một chuỗi các từ biểu diễn câu trả lời. Vì vậy, rõ ràng rằng một phương pháp độc lập với miền học cách ánh xạ chuỗi sang chuỗi sẽ hữu ích.
Sequences pose a challenge for DNNs because they require that the dimensionality of the inputs and outputs is known and fixed. In this paper, we show that a straightforward application of the Long Short-Term Memory (LSTM) architecture [16] can solve general sequence to sequence problems. The idea is to use one LSTM to read the input sequence, one timestep at a time, to obtain large fixed-dimensional vector representation, and then to use another LSTM to extract the output sequence from that vector (fig. 1). The second LSTM is essentially a recurrent neural network language model [28], [23], [30] except that it is conditioned on the input sequence. The LSTM’s ability to successfully learn on data with long range temporal dependencies makes it a natural choice for this application due to the considerable time lag between the inputs and their corresponding outputs (fig. 1).
Các chuỗi đặt ra một thách thức cho DNN vì chúng yêu cầu số chiều của đầu vào và đầu ra phải được biết và cố định. Trong bài báo này, chúng tôi chỉ ra rằng việc áp dụng trực tiếp kiến trúc Long Short-Term Memory (LSTM) [16] có thể giải quyết các bài toán chuỗi sang chuỗi tổng quát. Ý tưởng là sử dụng một LSTM để đọc chuỗi đầu vào, từng bước thời gian một, để thu được biểu diễn vectơ có số chiều cố định lớn, sau đó sử dụng một LSTM khác để trích xuất chuỗi đầu ra từ vectơ đó (hình 1). LSTM thứ hai về cơ bản là một mô hình ngôn ngữ mạng nơ-ron hồi quy [28], [23], [30] ngoại trừ việc nó được điều kiện hóa trên chuỗi đầu vào. Khả năng của LSTM trong việc học thành công trên dữ liệu có các phụ thuộc thời gian phạm vi dài khiến nó trở thành lựa chọn tự nhiên cho ứng dụng này do độ trễ thời gian đáng kể giữa các đầu vào và các đầu ra tương ứng của chúng (hình 1).
There have been a number of related attempts to address the general sequence to sequence learning problem with neural networks. Our approach is closely related to Kalchbrenner and Blunsom [18] who were the first to map the entire input sentence to vector, and is related to Cho et al. [5] although the latter was used only for rescoring hypotheses produced by a phrase-based system. Graves [10] introduced a novel differentiable attention mechanism that allows neural networks to focus on different parts of their input, and an elegant variant of this idea was successfully applied to machine translation by Bahdanau et al. [2]. The Connectionist Sequence Classification is another popular technique for mapping sequences to sequences with neural networks, but it assumes a monotonic alignment between the inputs and the outputs [11].
Đã có một số nỗ lực liên quan nhằm giải quyết bài toán học chuỗi sang chuỗi tổng quát bằng mạng nơ-ron. Phương pháp của chúng tôi có liên hệ chặt chẽ với Kalchbrenner và Blunsom [18], những người đầu tiên ánh xạ toàn bộ câu đầu vào thành vectơ, và có liên hệ với Cho et al. [5] mặc dù phương pháp sau chỉ được sử dụng để chấm điểm lại các giả thuyết do một hệ thống dựa trên cụm từ tạo ra. Graves [10] giới thiệu một cơ chế attention khả vi mới cho phép mạng nơ-ron tập trung vào các phần khác nhau của đầu vào, và một biến thể thanh lịch của ý tưởng này đã được áp dụng thành công cho dịch máy bởi Bahdanau et al. [2]. Connectionist Sequence Classification là một kỹ thuật phổ biến khác để ánh xạ chuỗi sang chuỗi bằng mạng nơ-ron, nhưng nó giả định sự căn chỉnh đơn điệu giữa các đầu vào và đầu ra [11].
Figure.
Hình.


The main result of this work is the following. On the WMT’14 English to French translation task, we obtained a BLEU score of 34.81 by directly extracting translations from an ensemble of 5 deep LSTMs (with 384M parameters and 8,000 dimensional state each) using a simple left-to-right beam-search decoder. This is by far the best result achieved by direct translation with large neural networks. For comparison, the BLEU score of an SMT baseline on this dataset is 33.30 [29]. The 34.81 BLEU score was achieved by an LSTM with a vocabulary of 80k words, so the score was penalized whenever the reference translation contained a word not covered by these 80k. This result shows that a relatively unoptimized small-vocabulary neural network architecture which has much room for improvement outperforms a phrase-based SMT system.
Kết quả chính của công trình này là như sau. Trong nhiệm vụ dịch từ tiếng Anh sang tiếng Pháp của WMT’14, chúng tôi thu được điểm BLEU là 34.81 bằng cách trực tiếp trích xuất các bản dịch từ một tổ hợp gồm 5 LSTM sâu (với 384M tham số và trạng thái có 8,000 chiều mỗi cái) sử dụng một bộ giải mã tìm kiếm chùm đơn giản từ trái sang phải. Đây là kết quả tốt nhất đạt được bằng dịch trực tiếp với các mạng nơ-ron lớn cho đến nay. Để so sánh, điểm BLEU của một đường cơ sở SMT trên tập dữ liệu này là 33.30 [29]. Điểm BLEU 34.81 đạt được bởi một LSTM với từ vựng gồm 80k từ, vì vậy điểm số bị phạt bất cứ khi nào bản dịch tham chiếu chứa một từ không được bao phủ bởi 80k từ này. Kết quả này cho thấy một kiến trúc mạng nơ-ron với từ vựng nhỏ, tương đối chưa được tối ưu hóa và còn nhiều khả năng cải thiện, vượt trội hơn một hệ thống SMT dựa trên cụm từ.
Finally, we used the LSTM to rescore the publicly available 1000-best lists of the SMT baseline on the same task [29]. By doing so, we obtained a BLEU score of 36.5, which improves the baseline by 3.2 BLEU points and is close to the previous best published result on this task (which is 37.0 [9]).
Cuối cùng, chúng tôi sử dụng LSTM để chấm điểm lại các danh sách 1000-best được công khai của đường cơ sở SMT trên cùng nhiệm vụ [29]. Bằng cách đó, chúng tôi thu được điểm BLEU là 36.5, cải thiện đường cơ sở thêm 3.2 điểm BLEU và gần với kết quả tốt nhất đã được công bố trước đó trên nhiệm vụ này (là 37.0 [9]).
Surprisingly, the LSTM did not suffer on very long sentences, despite the recent experience of other researchers with related architectures [26]. We were able to do well on long sentences because we reversed the order of words in the source sentence but not the target sentences in the training and test set. By doing so, we introduced many short term dependencies that made the optimization problem much simpler (see sec. 2 and 3.3). As a result, SGD could learn LSTMs that had no trouble with long sentences. The simple trick of reversing the words in the source sentence is one of the key technical contributions of this work.
Đáng ngạc nhiên là LSTM không gặp suy giảm trên các câu rất dài, mặc dù kinh nghiệm gần đây của các nhà nghiên cứu khác với các kiến trúc liên quan [26]. Chúng tôi có thể đạt kết quả tốt trên các câu dài bởi vì chúng tôi đảo ngược thứ tự các từ trong câu nguồn nhưng không đảo ngược các câu đích trong tập huấn luyện và tập kiểm thử. Bằng cách đó, chúng tôi đưa vào nhiều phụ thuộc ngắn hạn khiến bài toán tối ưu hóa đơn giản hơn nhiều (xem sec. 2 và 3.3). Kết quả là, SGD có thể học các LSTM không gặp khó khăn với các câu dài. Mẹo đơn giản là đảo ngược các từ trong câu nguồn là một trong những đóng góp kỹ thuật then chốt của công trình này.
A useful property of the LSTM is that it learns to map an input sentence of variable length into a fixed-dimensional vector representation. Given that translations tend to be paraphrases of the source sentences, the translation objective encourages the LSTM to find sentence representations that capture their meaning, as sentences with similar meanings are close to each other while different sentences meanings will be far. A qualitative evaluation supports this claim, showing that our model is aware of word order and is fairly invariant to the active and passive voice.
Một tính chất hữu ích của LSTM là nó học cách ánh xạ một câu đầu vào có độ dài biến đổi thành một biểu diễn vectơ có số chiều cố định. Do các bản dịch có xu hướng là các cách diễn đạt lại của các câu nguồn, mục tiêu dịch khuyến khích LSTM tìm ra các biểu diễn câu nắm bắt được ý nghĩa của chúng, vì các câu có ý nghĩa tương tự sẽ gần nhau trong khi các câu có ý nghĩa khác nhau sẽ cách xa nhau. Một đánh giá định tính ủng hộ nhận định này, cho thấy mô hình của chúng tôi nhận biết được thứ tự từ và khá bất biến đối với thể chủ động và thể bị động.
2 The model
2 Mô hình
The RNN can easily map sequences to sequences whenever the alignment between the inputs the outputs is known ahead of time. However, it is not clear how to apply an RNN to problems whose input and the output sequences have different lengths with complicated and non-monotonic relationships.
RNN có thể dễ dàng ánh xạ các chuỗi sang các chuỗi bất cứ khi nào sự căn chỉnh giữa các đầu vào và đầu ra được biết trước. Tuy nhiên, chưa rõ cách áp dụng RNN cho các bài toán mà chuỗi đầu vào và đầu ra có độ dài khác nhau với các mối quan hệ phức tạp và không đơn điệu.
The simplest strategy for general sequence learning is to map the input sequence to a fixed-sized vector using one RNN, and then to map the vector to the target sequence with another RNN (this approach has also been taken by Cho et al. [5]). While it could work in principle since the RNN is provided with all the relevant information, it would be difficult to train the RNNs due to the resulting long term dependencies (figure 1) [14], [4], [16], [15]. However, the Long Short-Term Memory (LSTM) [16] is known to learn problems with long range temporal dependencies, so an LSTM may succeed in this setting.
Chiến lược đơn giản nhất cho việc học chuỗi tổng quát là ánh xạ chuỗi đầu vào tới một vectơ có kích thước cố định bằng cách sử dụng một RNN, sau đó ánh xạ vectơ tới chuỗi mục tiêu bằng một RNN khác (cách tiếp cận này cũng đã được Cho và cộng sự sử dụng [5]). Mặc dù về nguyên tắc nó có thể hoạt động vì RNN được cung cấp tất cả thông tin liên quan, việc huấn luyện các RNN sẽ khó khăn do các phụ thuộc dài hạn phát sinh (hình 1) [14], [4], [16], [15]. Tuy nhiên, Long Short-Term Memory (LSTM) [16] được biết đến với khả năng học các bài toán có phụ thuộc thời gian tầm xa, vì vậy một LSTM có thể thành công trong thiết lập này.
The goal of the LSTM is to estimate the conditional probability where is an input sequence and is its corresponding output sequence whose length may differ from . The LSTM computes this conditional probability by first obtaining the fixed-dimensional representation of the input sequence given by the last hidden state of the LSTM, and then computing the probability of with a standard LSTM-LM formulation whose initial hidden state is set to the representation of :
Mục tiêu của LSTM là ước lượng xác suất có điều kiện trong đó là một chuỗi đầu vào và là chuỗi đầu ra tương ứng của nó, với độ dài có thể khác . LSTM tính toán xác suất có điều kiện này bằng cách trước tiên thu được biểu diễn có số chiều cố định của chuỗi đầu vào được cho bởi trạng thái ẩn cuối cùng của LSTM, sau đó tính toán xác suất của bằng một công thức LSTM-LM tiêu chuẩn có trạng thái ẩn ban đầu được đặt thành biểu diễn của :
In this equation, each distribution is represented with a softmax over all the words in the vocabulary. We use the LSTM formulation from Graves [10]. Note that we require that each sentence ends with a special end-of-sentence symbol “<EOS>”, which enables the model to define a distribution over sequences of all possible lengths. The overall scheme is outlined in figure 1, where the shown LSTM computes the representation of “A”, “B”, “C”, “<EOS>” and then uses this representation to compute the probability of “W”, “X”, “Y”, “Z”, “<EOS>”.
Trong phương trình này, mỗi phân phối được biểu diễn bằng một softmax trên tất cả các từ trong từ vựng. Chúng tôi sử dụng công thức LSTM từ Graves [10]. Lưu ý rằng chúng tôi yêu cầu mỗi câu kết thúc bằng một ký hiệu kết thúc câu đặc biệt “<EOS>”, cho phép mô hình xác định một phân phối trên các chuỗi có mọi độ dài có thể. Lược đồ tổng thể được trình bày trong hình 1, trong đó LSTM được minh họa tính toán biểu diễn của “A”, “B”, “C”, “<EOS>” và sau đó sử dụng biểu diễn này để tính toán xác suất của “W”, “X”, “Y”, “Z”, “<EOS>”.
Our actual models differ from the above description in three important ways. First, we used two different LSTMs: one for the input sequence and another for the output sequence, because doing so increases the number model parameters at negligible computational cost and makes it natural to train the LSTM on multiple language pairs simultaneously [18]. Second, we found that deep LSTMs significantly outperformed shallow LSTMs, so we chose an LSTM with four layers. Third, we found it extremely valuable to reverse the order of the words of the input sentence. So for example, instead of mapping the sentence to the sentence , the LSTM is asked to map to , where is the translation of . This way, is in close proximity to , is fairly close to , and so on, a fact that makes it easy for SGD to “establish communication” between the input and the output. We found this simple data transformation to greatly improve the performance of the LSTM.
Các mô hình thực tế của chúng tôi khác với mô tả trên theo ba cách quan trọng. Thứ nhất, chúng tôi sử dụng hai LSTM khác nhau: một cho chuỗi đầu vào và một cho chuỗi đầu ra, bởi vì việc này làm tăng số lượng tham số mô hình với chi phí tính toán không đáng kể và giúp việc huấn luyện LSTM trên nhiều cặp ngôn ngữ đồng thời trở nên tự nhiên [18]. Thứ hai, chúng tôi nhận thấy rằng các LSTM sâu vượt trội đáng kể so với các LSTM nông, vì vậy chúng tôi chọn một LSTM có bốn lớp. Thứ ba, chúng tôi nhận thấy rằng việc đảo ngược thứ tự các từ của câu đầu vào có giá trị rất lớn. Ví dụ, thay vì ánh xạ câu sang câu , LSTM được yêu cầu ánh xạ sang , trong đó là bản dịch của . Theo cách này, ở gần , khá gần với , và cứ tiếp tục như vậy, một thực tế giúp SGD dễ dàng “thiết lập liên lạc” giữa đầu vào và đầu ra. Chúng tôi nhận thấy phép biến đổi dữ liệu đơn giản này cải thiện đáng kể hiệu năng của LSTM.
3 Experiments
3 Thực nghiệm
We applied our method to the WMT’14 English to French MT task in two ways. We used it to directly translate the input sentence without using a reference SMT system and we it to rescore the n-best lists of an SMT baseline. We report the accuracy of these translation methods, present sample translations, and visualize the resulting sentence representation.
Chúng tôi áp dụng phương pháp của mình cho tác vụ dịch máy (machine translation) từ tiếng Anh sang tiếng Pháp của WMT’14 theo hai cách. Chúng tôi dùng phương pháp này để dịch trực tiếp câu đầu vào mà không sử dụng hệ thống dịch máy thống kê (SMT) tham chiếu, đồng thời dùng nó để chấm lại điểm số cho các danh sách n bản dịch tốt nhất của một hệ thống SMT đường cơ sở. Chúng tôi báo cáo độ chính xác của các phương pháp dịch này, trình bày các bản dịch mẫu và trực quan hóa biểu diễn câu thu được.
3.1 Dataset details
3.1 Chi tiết về tập dữ liệu
We used the WMT’14 English to French dataset. We trained our models on a subset of 12M sentences consisting of 348M French words and 304M English words, which is a clean “selected” subset from [29]. We chose this translation task and this specific training set subset because of the public availability of a tokenized training and test set together with 1000-best lists from the baseline SMT [29].
Chúng tôi sử dụng tập dữ liệu tiếng Anh sang tiếng Pháp của WMT’14. Chúng tôi huấn luyện các mô hình trên một tập con gồm 12M câu, chứa 348M từ tiếng Pháp và 304M từ tiếng Anh, là một tập con sạch được “chọn lọc” từ [29]. Chúng tôi chọn tác vụ dịch này và tập con huấn luyện cụ thể này vì tập huấn luyện và tập kiểm thử đã được tách token, cùng với các danh sách 1000 bản dịch tốt nhất từ hệ thống SMT đường cơ sở [29], đều được công bố công khai.
As typical neural language models rely on a vector representation for each word, we used a fixed vocabulary for both languages. We used 160,000 of the most frequent words for the source language and 80,000 of the most frequent words for the target language. Every out-of-vocabulary word was replaced with a special “UNK” token.
Vì các mô hình ngôn ngữ nơ-ron thông thường dựa vào một biểu diễn vectơ cho mỗi từ, chúng tôi sử dụng một bộ từ vựng cố định cho cả hai ngôn ngữ. Chúng tôi dùng 160,000 từ xuất hiện thường xuyên nhất cho ngôn ngữ nguồn và 80,000 từ xuất hiện thường xuyên nhất cho ngôn ngữ đích. Mỗi từ ngoài bộ từ vựng được thay bằng một token đặc biệt “UNK”.
3.2 Decoding and Rescoring
3.2 Giải mã và chấm lại điểm số
The core of our experiments involved training a large deep LSTM on many sentence pairs. We trained it by maximizing the log probability of a correct translation given the source sentence , so the training objective is
Phần cốt lõi của các thực nghiệm là huấn luyện một LSTM sâu, lớn trên nhiều cặp câu. Chúng tôi huấn luyện nó bằng cách cực đại hóa log xác suất của một bản dịch đúng khi biết câu nguồn , do đó mục tiêu huấn luyện là
where is the training set. Once training is complete, we produce translations by finding the most likely translation according to the LSTM:
trong đó là tập huấn luyện. Sau khi hoàn tất huấn luyện, chúng tôi tạo ra các bản dịch bằng cách tìm bản dịch có xác suất cao nhất theo LSTM:
We search for the most likely translation using a simple left-to-right beam search decoder which maintains a small number of partial hypotheses, where a partial hypothesis is a prefix of some translation. At each timestep we extend each partial hypothesis in the beam with every possible word in the vocabulary. This greatly increases the number of the hypotheses so we discard all but the most likely hypotheses according to the model’s log probability. As soon as the “<EOS>” symbol is appended to a hypothesis, it is removed from the beam and is added to the set of complete hypotheses. While this decoder is approximate, it is simple to implement. Interestingly, our system performs well even with a beam size of 1, and a beam of size 2 provides most of the benefits of beam search (Table 1).
Chúng tôi tìm bản dịch có xác suất cao nhất bằng một bộ giải mã tìm kiếm chùm (beam search) đơn giản từ trái sang phải, duy trì một số lượng nhỏ giả thuyết chưa hoàn chỉnh, trong đó một giả thuyết chưa hoàn chỉnh là tiền tố của một bản dịch nào đó. Ở mỗi bước thời gian, chúng tôi mở rộng từng giả thuyết chưa hoàn chỉnh trong chùm bằng từng từ có thể có trong bộ từ vựng. Điều này làm tăng mạnh số lượng giả thuyết, nên chúng tôi loại bỏ tất cả, chỉ giữ lại giả thuyết có xác suất cao nhất theo log xác suất của mô hình. Ngay khi ký hiệu “<EOS>” được nối vào một giả thuyết, giả thuyết đó được lấy ra khỏi chùm và thêm vào tập các giả thuyết hoàn chỉnh. Mặc dù bộ giải mã này mang tính xấp xỉ, nó dễ triển khai. Điều thú vị là hệ thống của chúng tôi hoạt động tốt ngay cả với kích thước chùm bằng 1, và chùm có kích thước bằng 2 mang lại phần lớn lợi ích của tìm kiếm chùm (Bảng 1).
We also used the LSTM to rescore the 1000-best lists produced by the baseline system [29]. To rescore an n-best list, we computed the log probability of every hypothesis with our LSTM and took an even average with their score and the LSTM’s score.
Chúng tôi cũng dùng LSTM để chấm lại điểm số cho các danh sách 1000 bản dịch tốt nhất do hệ thống đường cơ sở [29] tạo ra. Để chấm lại điểm số cho một danh sách n bản dịch tốt nhất, chúng tôi tính log xác suất của từng giả thuyết bằng LSTM và lấy trung bình cộng của điểm số từ hệ thống đó và điểm số của LSTM.
3.3 Reversing the Source Sentences
3.3 Đảo ngược các câu nguồn
While the LSTM is capable of solving problems with long term dependencies, we discovered that the LSTM learns much better when the source sentences are reversed (the target sentences are not reversed). By doing so, the LSTM’s test perplexity dropped from 5.8 to 4.7, and the test BLEU scores of its decoded translations increased from 25.9 to 30.6.
Mặc dù LSTM có khả năng giải quyết các bài toán có phụ thuộc dài hạn, chúng tôi phát hiện rằng LSTM học tốt hơn nhiều khi các câu nguồn được đảo ngược (các câu đích không được đảo ngược). Khi làm như vậy, độ bối rối (perplexity) của LSTM trên tập kiểm thử giảm từ 5.8 xuống 4.7, và điểm số BLEU trên tập kiểm thử của các bản dịch được giải mã tăng từ 25.9 lên 30.6.
While we do not have a complete explanation to this phenomenon, we believe that it is caused by the introduction of many short term dependencies to the dataset. Normally, when we concatenate a source sentence with a target sentence, each word in the source sentence is far from its corresponding word in the target sentence. As a result, the problem has a large “minimal time lag” [17]. By reversing the words in the source sentence, the average distance between corresponding words in the source and target language is unchanged. However, the first few words in the source language are now very close to the first few words in the target language, so the problem’s minimal time lag is greatly reduced. Thus, backpropagation has an easier time “establishing communication” between the source sentence and the target sentence, which in turn results in substantially improved overall performance.
Mặc dù chưa có lời giải thích đầy đủ cho hiện tượng này, chúng tôi cho rằng nguyên nhân là do việc đưa nhiều phụ thuộc ngắn hạn vào tập dữ liệu. Thông thường, khi nối một câu nguồn với một câu đích, mỗi từ trong câu nguồn đều ở xa từ tương ứng trong câu đích. Do đó, bài toán có “độ trễ thời gian tối thiểu” lớn [17]. Khi đảo ngược các từ trong câu nguồn, khoảng cách trung bình giữa các từ tương ứng trong ngôn ngữ nguồn và ngôn ngữ đích không thay đổi. Tuy nhiên, vài từ đầu tiên trong ngôn ngữ nguồn lúc này ở rất gần vài từ đầu tiên trong ngôn ngữ đích, nên độ trễ thời gian tối thiểu của bài toán giảm đáng kể. Vì vậy, lan truyền ngược (backpropagation) dễ “thiết lập liên lạc” giữa câu nguồn và câu đích hơn, từ đó cải thiện đáng kể hiệu năng tổng thể.
Initially, we believed that reversing the input sentences would only lead to more confident predictions in the early parts of the target sentence and to less confident predictions in the later parts. However, LSTMs trained on reversed source sentences did much better on long sentences than LSTMs trained on the raw source sentences (see sec. 3.7), which suggests that reversing the input sentences results in LSTMs with better memory utilization.
Ban đầu, chúng tôi cho rằng việc đảo ngược các câu đầu vào chỉ dẫn đến các dự đoán tự tin hơn ở phần đầu của câu đích và các dự đoán kém tự tin hơn ở phần sau. Tuy nhiên, các LSTM được huấn luyện trên các câu nguồn đảo ngược hoạt động tốt hơn nhiều trên các câu dài so với các LSTM được huấn luyện trên các câu nguồn nguyên bản (xem mục 3.7), cho thấy việc đảo ngược các câu đầu vào giúp LSTM sử dụng bộ nhớ tốt hơn.
3.4 Training details
3.4 Chi tiết huấn luyện
We found that the LSTM models are fairly easy to train. We used deep LSTMs with 4 layers, with 1000 cells at each layer and 1000 dimensional word embeddings, with an input vocabulary of 160,000 and an output vocabulary of 80,000. Thus the deep LSTM uses 8000 real numbers to represent a sentence. We found deep LSTMs to significantly outperform shallow LSTMs, where each additional layer reduced perplexity by nearly 10%, possibly due to their much larger hidden state. We used a naive softmax over 80,000 words at each output. The resulting LSTM has 384M parameters of which 64M are pure recurrent connections (32M for the “encoder” LSTM and 32M for the “decoder” LSTM). The complete training details are given below:
Chúng tôi nhận thấy các mô hình LSTM khá dễ huấn luyện. Chúng tôi sử dụng các LSTM sâu có 4 lớp, với 1000 ô ở mỗi lớp và các embedding từ 1000 chiều, cùng bộ từ vựng đầu vào gồm 160,000 từ và bộ từ vựng đầu ra gồm 80,000 từ. Như vậy, LSTM sâu dùng 8000 số thực để biểu diễn một câu. Chúng tôi nhận thấy các LSTM sâu có hiệu năng vượt trội đáng kể so với các LSTM nông, trong đó mỗi lớp bổ sung làm giảm độ bối rối gần 10%, có thể là do trạng thái ẩn lớn hơn nhiều của chúng. Chúng tôi dùng softmax theo cách trực tiếp trên 80,000 từ tại mỗi đầu ra. LSTM thu được có 384M tham số, trong đó 64M là các kết nối hồi quy thuần túy (32M cho LSTM “bộ mã hóa” và 32M cho LSTM “bộ giải mã”). Chi tiết huấn luyện đầy đủ được trình bày dưới đây:
• We initialized all of the LSTM’s parameters with the uniform distribution between -0.08 and 0.08 • We used stochastic gradient descent without momentum, with a fixed learning rate of 0.7. After 5 epochs, we begun halving the learning rate every half epoch. We trained our models for a total of 7.5 epochs. • We used batches of 128 sequences for the gradient and divided it the size of the batch (namely, 128). • Although LSTMs tend to not suffer from the vanishing gradient problem, they can have exploding gradients. Thus we enforced a hard constraint on the norm of the gradient [10, 25] by scaling it when its norm exceeded a threshold. For each training batch, we compute , where is the gradient divided by 128. If , we set . • Different sentences have different lengths. Most sentences are short (e.g., length 20-30) but some sentences are long (e.g., length ), so a minibatch of 128 randomly chosen training sentences will have many short sentences and few long sentences, and as a result, much of the computation in the minibatch is wasted. To address this problem, we made sure that all sentences in a minibatch are roughly of the same length, yielding a 2x speedup.
• Chúng tôi khởi tạo tất cả các tham số của LSTM theo phân phối đều trong khoảng từ -0.08 đến 0.08 • Chúng tôi sử dụng phương pháp hạ gradient ngẫu nhiên (stochastic gradient descent) không có động lượng, với tốc độ học cố định là 0.7. Sau 5 lượt huấn luyện, chúng tôi bắt đầu giảm tốc độ học đi một nửa sau mỗi nửa lượt huấn luyện. Chúng tôi huấn luyện các mô hình trong tổng cộng 7.5 lượt. • Chúng tôi sử dụng các lô gồm 128 chuỗi để tính gradient và chia gradient cho kích thước lô (tức là 128). • Mặc dù LSTM thường không gặp vấn đề tiêu biến gradient, chúng có thể gặp hiện tượng bùng nổ gradient. Vì vậy, chúng tôi áp đặt một ràng buộc cứng lên chuẩn của gradient [10, 25] bằng cách co giãn gradient khi chuẩn của nó vượt quá một ngưỡng. Với mỗi lô huấn luyện, chúng tôi tính , trong đó là gradient đã chia cho 128. Nếu , chúng tôi đặt . • Các câu khác nhau có độ dài khác nhau. Phần lớn các câu đều ngắn (ví dụ, độ dài 20-30), nhưng một số câu lại dài (ví dụ, độ dài ), do đó một lô nhỏ gồm 128 câu huấn luyện được chọn ngẫu nhiên sẽ có nhiều câu ngắn và ít câu dài, khiến phần lớn tính toán trong lô nhỏ bị lãng phí. Để giải quyết vấn đề này, chúng tôi bảo đảm rằng tất cả các câu trong một lô nhỏ có độ dài gần bằng nhau, nhờ đó tăng tốc gấp 2 lần.
3.5 Parallelization
3.5 Song song hóa
A C++ implementation of deep LSTM with the configuration from the previous section on a single GPU processes a speed of approximately 1,700 words per second. This was too slow for our purposes, so we parallelized our model using an 8-GPU machine. Each layer of the LSTM was executed on a different GPU and communicated its activations to the next GPU / layer as soon as they were computed. Our models have 4 layers of LSTMs, each of which resides on a separate GPU. The remaining 4 GPUs were used to parallelize the softmax, so each GPU was responsible for multiplying by a matrix. The resulting implementation achieved a speed of 6,300 (both English and French) words per second with a minibatch size of 128. Training took about a ten days with this implementation.
Một bản triển khai LSTM sâu bằng C++ với cấu hình từ mục trước trên một GPU duy nhất xử lý với tốc độ khoảng 1,700 từ mỗi giây. Tốc độ này quá chậm đối với mục đích của chúng tôi, nên chúng tôi song song hóa mô hình bằng một máy có 8 GPU. Mỗi lớp của LSTM được thực thi trên một GPU khác nhau và truyền các giá trị kích hoạt của nó sang GPU / lớp tiếp theo ngay khi chúng được tính xong. Các mô hình của chúng tôi có 4 lớp LSTM, mỗi lớp nằm trên một GPU riêng. 4 GPU còn lại được dùng để song song hóa softmax, nên mỗi GPU phụ trách phép nhân với một ma trận . Bản triển khai thu được đạt tốc độ 6,300 từ (gồm cả tiếng Anh và tiếng Pháp) mỗi giây với kích thước lô nhỏ là 128. Quá trình huấn luyện với bản triển khai này mất khoảng mười ngày.
3.6 Experimental Results
3.6 Kết quả thực nghiệm
We used the cased BLEU score [24] to evaluate the quality of our translations. We computed our BLEU scores using multi-bleu.pl on the tokenized predictions and ground truth. This way of evaluating the BELU score is consistent with [5] and [2], and reproduces the 33.3 score of [29]. However, if we evaluate the best WMT’14 system [9] (whose predictions can be downloaded from statmt.org\matrix) in this manner, we get 37.0, which is greater than the 35.8 reported by statmt.org\matrix.
Chúng tôi sử dụng điểm số BLEU có phân biệt chữ hoa và chữ thường [24] để đánh giá chất lượng các bản dịch. Chúng tôi tính các điểm số BLEU bằng multi-bleu.pl trên các dự đoán và bản dịch chuẩn đã được tách token. Cách đánh giá điểm số BELU này nhất quán với [5] và [2], đồng thời tái lập điểm số 33.3 của [29]. Tuy nhiên, nếu đánh giá hệ thống WMT’14 tốt nhất [9] (có thể tải các dự đoán của hệ thống này từ statmt.org\matrix) theo cách này, chúng tôi thu được 37.0, cao hơn mức 35.8 được báo cáo trên statmt.org\matrix.
The results are presented in tables 1 and 2. Our best results are obtained with an ensemble of LSTMs that differ in their random initializations and in the random order of minibatches. While the decoded translations of the LSTM ensemble do not outperform the best WMT’14 system, it is the first time that a pure neural translation system outperforms a phrase-based SMT baseline on a large scale MT
Các kết quả được trình bày trong bảng 1 và 2. Chúng tôi thu được kết quả tốt nhất với một tổ hợp (ensemble) các LSTM khác nhau về cách khởi tạo ngẫu nhiên và thứ tự ngẫu nhiên của các lô nhỏ. Mặc dù các bản dịch được giải mã từ tổ hợp LSTM không vượt qua hệ thống WMT’14 tốt nhất, đây là lần đầu tiên một hệ thống dịch thuần nơ-ron vượt qua đường cơ sở SMT dựa trên cụm từ trên một tác vụ dịch máy quy mô lớn
There several variants of the BLEU score, and each variant is defined with a perl script.
Có một số biến thể của điểm số BLEU, và mỗi biến thể được định nghĩa bằng một script perl.
| Method | test BLEU score (ntst14) |
|---|---|
| Bahdanau et al. [2] | 28.45 |
| Baseline System [29] | 33.30 |
| Single forward LSTM, beam size 12 | 26.17 |
| Single reversed LSTM, beam size 12 | 30.59 |
| Ensemble of 5 reversed LSTMs, beam size 1 | 33.00 |
| Ensemble of 2 reversed LSTMs, beam size 12 | 33.27 |
| Ensemble of 5 reversed LSTMs, beam size 2 | 34.50 |
| Ensemble of 5 reversed LSTMs, beam size 12 | 34.81 |
| Phương pháp | Điểm số BLEU trên tập kiểm thử (ntst14) |
|---|---|
| Bahdanau và cộng sự [2] | 28.45 |
| Hệ thống đường cơ sở [29] | 33.30 |
| Một LSTM xuôi, kích thước chùm 12 | 26.17 |
| Một LSTM đảo ngược, kích thước chùm 12 | 30.59 |
| Tổ hợp 5 LSTM đảo ngược, kích thước chùm 1 | 33.00 |
| Tổ hợp 2 LSTM đảo ngược, kích thước chùm 12 | 33.27 |
| Tổ hợp 5 LSTM đảo ngược, kích thước chùm 2 | 34.50 |
| Tổ hợp 5 LSTM đảo ngược, kích thước chùm 12 | 34.81 |
Table 1: The performance of the LSTM on WMT’14 English to French test set (ntst14). Note that an ensemble of 5 LSTMs with a beam of size 2 is cheaper than of a single LSTM with a beam of size 12.
Bảng 1: Hiệu năng của LSTM trên tập kiểm thử dịch từ tiếng Anh sang tiếng Pháp WMT’14 (ntst14). Lưu ý rằng một tổ hợp 5 LSTM với chùm có kích thước 2 có chi phí thấp hơn một LSTM duy nhất với chùm có kích thước 12.
| Method | test BLEU score (ntst14) |
|---|---|
| Baseline System [29] | 33.30 |
| Cho et al. [5] | 34.54 |
| Best WMT’14 result [9] | 37.0 |
| Rescoring the baseline 1000-best with a single forward LSTM | 35.61 |
| Rescoring the baseline 1000-best with a single reversed LSTM | 35.85 |
| Rescoring the baseline 1000-best with an ensemble of 5 reversed LSTMs | 36.5 |
| Oracle Rescoring of the Baseline 1000-best lists | ~45 |
| Phương pháp | Điểm số BLEU trên tập kiểm thử (ntst14) |
|---|---|
| Hệ thống đường cơ sở [29] | 33.30 |
| Cho và cộng sự [5] | 34.54 |
| Kết quả WMT’14 tốt nhất [9] | 37.0 |
| Chấm điểm lại 1000 bản dịch tốt nhất của đường cơ sở bằng một LSTM xuôi | 35.61 |
| Chấm điểm lại 1000 bản dịch tốt nhất của đường cơ sở bằng một LSTM đảo ngược | 35.85 |
| Chấm điểm lại 1000 bản dịch tốt nhất của đường cơ sở bằng một tổ hợp 5 LSTM đảo ngược | 36.5 |
| Chấm điểm lại bằng oracle các danh sách 1000 bản dịch tốt nhất của đường cơ sở | ~45 |
Table 2: Methods that use neural networks together with an SMT system on the WMT’14 English to French test set (ntst14).
Bảng 2: Các phương pháp sử dụng mạng nơ-ron (neural network) cùng với một hệ thống SMT trên tập kiểm thử dịch từ tiếng Anh sang tiếng Pháp WMT’14 (ntst14).
task by a sizeable margin, despite its inability to handle out-of-vocabulary words. The LSTM is within 0.5 BLEU points of the best WMT’14 result if it is used to rescore the 1000-best list of the baseline system.
với khoảng cách đáng kể, mặc dù không thể xử lý các từ ngoài từ vựng. LSTM chỉ kém kết quả WMT’14 tốt nhất trong khoảng 0.5 điểm BLEU nếu được dùng để chấm điểm lại danh sách 1000 bản dịch tốt nhất của hệ thống đường cơ sở.
3.7 Performance on long sentences
3.7 Hiệu năng trên các câu dài
We were surprised to discover that the LSTM did well on long sentences, which is shown quantitatively in figure 3. Table 3 presents several examples of long sentences and their translations.
Chúng tôi ngạc nhiên khi phát hiện rằng LSTM xử lý tốt các câu dài, như được thể hiện định lượng trong hình 3. Bảng 3 trình bày một số ví dụ về các câu dài và bản dịch của chúng.
3.8 Model Analysis
3.8 Phân tích mô hình
Figure.
Hình.


One of the attractive features of our model is its ability to turn a sequence of words into a vector of fixed dimensionality. Figure 2 visualizes some of the learned representations. The figure clearly shows that the representations are sensitive to the order of words, while being fairly insensitive to the
Một trong những đặc trưng hấp dẫn của mô hình chúng tôi là khả năng biến một chuỗi từ thành một vectơ có số chiều cố định. Hình 2 trực quan hóa một số biểu diễn đã học được. Hình này cho thấy rõ rằng các biểu diễn nhạy với thứ tự từ, đồng thời khá ít nhạy với
| Type | Sentence |
|---|---|
| Our model | Ulrich UNK , membre du conseil d’ administration du constructeur automobile Audi , affirme qu’ il s’ agit d’ une pratique courante depuis des années pour que les téléphones portables puissent être collectés avant les réunions du conseil d’ administration afin qu’ ils ne soient pas utilisés comme appareils d’ écoute à distance . |
| Truth | Ulrich Hackenberg , membre du conseil d’ administration du constructeur automobile Audi , déclare que la collecte des téléphones portables avant les réunions du conseil , afin qu’ ils ne puissent pas être utilisés comme appareils d’ écoute à distance , est une pratique courante depuis des années . |
| Our model | “ Les téléphones cellulaires , qui sont vraiment une question , non seulement parce qu’ ils pourraient potentiellement causer des interférences avec les appareils de navigation , mais nous savons , selon la FCC , qu’ ils pourraient interférer avec les tours de téléphone cellulaire lorsqu’ ils sont dans l’ air ” , dit UNK . |
| Truth | “ Les téléphones portables sont véritablement un problème , non seulement parce qu’ ils pourraient éventuellement créer des interférences avec les instruments de navigation , mais parce que nous savons , d’ après la FCC , qu’ ils pourraient perturber les antennes-relais de téléphonie mobile s’ ils sont utilisés à bord ” , a déclaré Rosenker . |
| Our model | Avec la crémation , il y a un “ sentiment de violence contre le corps d’ un être cher ” , qui sera “ réduit à une pile de cendres ” en très peu de temps au lieu d’ un processus de décomposition “ qui accompagnera les étapes du deuil ” . |
| Truth | Il y a , avec la crémation , “ une violence faite au corps aimé ” , qui va être “ réduit à un tas de cendres ” en très peu de temps , et non après un processus de décomposition , qui “ accompagnerait les phases du deuil ” . |
| Kiểu | Câu |
|---|---|
| Mô hình của chúng tôi | Ulrich UNK, thành viên hội đồng quản trị của hãng sản xuất ô tô Audi, khẳng định rằng việc thu gom điện thoại di động trước các cuộc họp hội đồng quản trị để chúng không bị sử dụng làm thiết bị nghe lén từ xa đã là thông lệ trong nhiều năm. |
| Bản dịch chuẩn | Ulrich Hackenberg, thành viên hội đồng quản trị của hãng sản xuất ô tô Audi, cho biết việc thu gom điện thoại di động trước các cuộc họp hội đồng quản trị, để chúng không thể bị sử dụng làm thiết bị nghe lén từ xa, đã là thông lệ trong nhiều năm. |
| Mô hình của chúng tôi | “Điện thoại di động thực sự là một vấn đề, không chỉ vì chúng có khả năng gây nhiễu các thiết bị dẫn đường, mà chúng tôi còn biết, theo FCC, rằng chúng có thể gây nhiễu các trạm thu phát sóng di động khi ở trên không”, UNK nói. |
| Bản dịch chuẩn | “Điện thoại di động thực sự là một vấn đề, không chỉ vì chúng có thể gây nhiễu các thiết bị dẫn đường, mà còn vì chúng tôi biết, theo FCC, rằng chúng có thể gây nhiễu các trạm thu phát sóng di động nếu được sử dụng trên máy bay”, Rosenker cho biết. |
| Mô hình của chúng tôi | Với việc hỏa táng, có một “cảm giác bạo lực đối với thi thể của người thân yêu”, vốn sẽ bị “biến thành một đống tro” trong thời gian rất ngắn thay vì trải qua một quá trình phân hủy “đồng hành cùng các giai đoạn đau buồn”. |
| Bản dịch chuẩn | Với việc hỏa táng, có “sự bạo lực đối với thi thể người thân yêu”, vốn sẽ bị “biến thành một đống tro” trong thời gian rất ngắn, chứ không phải sau một quá trình phân hủy, vốn “sẽ đồng hành cùng các giai đoạn đau buồn”. |
Table 3: A few examples of long translations produced by the LSTM alongside the ground truth translations. The reader can verify that the translations are sensible using Google translate.
Bảng 3: Một vài ví dụ về các bản dịch dài do LSTM tạo ra, đặt cạnh các bản dịch chuẩn (ground truth). Có thể dùng Google translate để kiểm tra rằng các bản dịch này hợp lý.
Figure.
Hình.


replacement of an active voice with a passive voice. The two-dimensional projections are obtained using PCA.
việc thay thế thể chủ động bằng thể bị động. Các phép chiếu hai chiều được thu được bằng phân tích thành phần chính (PCA).
4 Related work
4 Công trình liên quan
There is a large body of work on applications of neural networks to machine translation. So far, the simplest and most effective way of applying an RNN-Language Model (RNNLM) [23] or a
Có một lượng lớn các công trình nghiên cứu về các ứng dụng của mạng nơ-ron vào dịch máy. Cho đến nay, cách đơn giản nhất và hiệu quả nhất để áp dụng Mô hình Ngôn ngữ RNN (RNNLM) [23] hoặc
More recently, researchers have begun to look into ways of including information about the source language into the NNLM. Examples of this work include Auli et al. [1], who combine an NNLM with a topic model of the input sentence, which improves rescoring performance. Devlin et al. [8] followed a similar approach, but they incorporated their NNLM into the decoder of an MT system and used the decoder’s alignment information to provide the NNLM with the most useful words in the input sentence. Their approach was highly successful and it achieved large improvements over their baseline.
Gần đây hơn, các nhà nghiên cứu đã bắt đầu tìm hiểu các phương pháp đưa thông tin về ngôn ngữ nguồn vào NNLM. Các ví dụ của hướng nghiên cứu này bao gồm Auli et al. [1], những người kết hợp một NNLM với một mô hình chủ đề của câu đầu vào, qua đó cải thiện hiệu năng chấm điểm lại. Devlin et al. [8] đã theo một cách tiếp cận tương tự, nhưng họ tích hợp NNLM của mình vào bộ giải mã của một hệ thống MT và sử dụng thông tin căn chỉnh của bộ giải mã để cung cấp cho NNLM những từ hữu ích nhất trong câu đầu vào. Cách tiếp cận của họ đạt thành công lớn và đem lại những cải thiện đáng kể so với đường cơ sở của họ.
Our work is closely related to Kalchbrenner and Blunsom [18], who were the first to map the input sentence into a vector and then back to a sentence, although they map sentences to vectors using convolutional neural networks, which lose the ordering of the words. Similarly to this work, Cho et al. [5] used an LSTM-like RNN architecture to map sentences into vectors and back, although their primary focus was on integrating their neural network into an SMT system. Bahdanau et al. [2] also attempted direct translations with a neural network that used an attention mechanism to overcome the poor performance on long sentences experienced by Cho et al. [5] and achieved encouraging results. Likewise, Pouget-Abadie et al. [26] attempted to address the memory problem of Cho et al. [5] by translating pieces of the source sentence in way that produces smooth translations, which is similar to a phrase-based approach. We suspect that they could achieve similar improvements by simply training their networks on reversed source sentences.
Công trình của chúng tôi có liên hệ chặt chẽ với Kalchbrenner và Blunsom [18], những người đầu tiên ánh xạ câu đầu vào thành một vectơ rồi ánh xạ ngược trở lại thành một câu, mặc dù họ ánh xạ các câu thành các vectơ bằng cách sử dụng mạng nơ-ron tích chập, vốn làm mất thứ tự của các từ. Tương tự như công trình này, Cho et al. [5] đã sử dụng một kiến trúc RNN giống LSTM để ánh xạ các câu thành các vectơ và ngược lại, mặc dù trọng tâm chính của họ là tích hợp mạng nơ-ron của mình vào một hệ thống SMT. Bahdanau et al. [2] cũng thử nghiệm các bản dịch trực tiếp bằng một mạng nơ-ron sử dụng cơ chế attention để khắc phục hiệu năng kém trên các câu dài mà Cho et al. [5] gặp phải và đạt được các kết quả đáng khích lệ. Tương tự, Pouget-Abadie et al. [26] đã cố gắng giải quyết vấn đề bộ nhớ của Cho et al. [5] bằng cách dịch các phần của câu nguồn theo cách tạo ra các bản dịch mượt mà, tương tự như một cách tiếp cận dựa trên cụm từ. Chúng tôi nghi ngờ rằng họ có thể đạt được những cải thiện tương tự chỉ bằng cách huấn luyện các mạng của mình trên các câu nguồn đã được đảo ngược.
End-to-end training is also the focus of Hermann et al. [12], whose model represents the inputs and outputs by feedforward networks, and map them to similar points in space. However, their approach cannot generate translations directly: to get a translation, they need to do a look up for closest vector in the pre-computed database of sentences, or to rescore a sentence.
Huấn luyện end-to-end cũng là trọng tâm của Hermann et al. [12], có mô hình biểu diễn các đầu vào và đầu ra bằng các mạng truyền thẳng, và ánh xạ chúng tới các điểm tương tự trong không gian. Tuy nhiên, cách tiếp cận của họ không thể tạo ra các bản dịch trực tiếp: để có được một bản dịch, họ cần thực hiện tra cứu vectơ gần nhất trong cơ sở dữ liệu các câu đã được tính toán trước, hoặc chấm điểm lại một câu.
5 Conclusion
5 Kết luận
In this work, we showed that a large deep LSTM, that has a limited vocabulary and that makes almost no assumption about problem structure can outperform a standard SMT-based system whose vocabulary is unlimited on a large-scale MT task. The success of our simple LSTM-based approach on MT suggests that it should do well on many other sequence learning problems, provided they have enough training data.
Trong công trình này, chúng tôi đã chỉ ra rằng một LSTM sâu lớn, có từ vựng hạn chế và hầu như không đưa ra giả định nào về cấu trúc bài toán, có thể vượt trội hơn một hệ thống dựa trên SMT tiêu chuẩn có từ vựng không giới hạn trong một tác vụ MT quy mô lớn. Thành công của phương pháp đơn giản dựa trên LSTM của chúng tôi trên MT cho thấy nó có thể hoạt động tốt trên nhiều bài toán học chuỗi khác, với điều kiện chúng có đủ dữ liệu huấn luyện.
We were surprised by the extent of the improvement obtained by reversing the words in the source sentences. We conclude that it is important to find a problem encoding that has the greatest number of short term dependencies, as they make the learning problem much simpler. In particular, while we were unable to train a standard RNN on the non-reversed translation problem (shown in fig. 1), we believe that a standard RNN should be easily trainable when the source sentences are reversed (although we did not verify it experimentally).
Chúng tôi ngạc nhiên trước mức độ cải thiện đạt được bằng cách đảo ngược các từ trong các câu nguồn. Chúng tôi kết luận rằng điều quan trọng là tìm ra một cách mã hóa bài toán có số lượng phụ thuộc ngắn hạn lớn nhất, vì chúng làm cho bài toán học đơn giản hơn nhiều. Cụ thể, trong khi chúng tôi không thể huấn luyện một RNN tiêu chuẩn trên bài toán dịch không đảo ngược (được minh họa trong hình 1), chúng tôi tin rằng một RNN tiêu chuẩn có thể dễ dàng được huấn luyện khi các câu nguồn được đảo ngược (mặc dù chúng tôi chưa xác minh điều này bằng thực nghiệm).
We were also surprised by the ability of the LSTM to correctly translate very long sentences. We were initially convinced that the LSTM would fail on long sentences due to its limited memory, and other researchers reported poor performance on long sentences with a model similar to ours [5, 2, 26]. And yet, LSTMs trained on the reversed dataset had little difficulty translating long sentences.
Chúng tôi cũng ngạc nhiên trước khả năng của LSTM trong việc dịch chính xác các câu rất dài. Ban đầu chúng tôi tin rằng LSTM sẽ thất bại trên các câu dài do bộ nhớ hạn chế của nó, và các nhà nghiên cứu khác đã báo cáo hiệu năng kém trên các câu dài với một mô hình tương tự của chúng tôi [5, 2, 26]. Tuy nhiên, các LSTM được huấn luyện trên tập dữ liệu đã đảo ngược gặp rất ít khó khăn khi dịch các câu dài.
Most importantly, we demonstrated that a simple, straightforward and a relatively unoptimized approach can outperform an SMT system, so further work will likely lead to even greater translation accuracies. These results suggest that our approach will likely do well on other challenging sequence to sequence problems.
Quan trọng nhất, chúng tôi đã chứng minh rằng một phương pháp đơn giản, trực tiếp và tương đối chưa được tối ưu hóa có thể vượt trội hơn một hệ thống SMT, vì vậy các nghiên cứu tiếp theo có khả năng sẽ dẫn đến độ chính xác dịch thuật còn cao hơn nữa. Những kết quả này cho thấy phương pháp của chúng tôi có khả năng sẽ hoạt động tốt trên các bài toán chuỗi sang chuỗi đầy thách thức khác.
6 Acknowledgments
6 Lời cảm ơn
We thank Samy Bengio, Jeff Dean, Matthieu Devin, Geoffrey Hinton, Nal Kalchbrenner, Thang Luong, Wolfgang Macherey, Rajat Monga, Vincent Vanhoucke, Peng Xu, Wojciech Zaremba, and the Google Brain team for useful comments and discussions.
Chúng tôi cảm ơn Samy Bengio, Jeff Dean, Matthieu Devin, Geoffrey Hinton, Nal Kalchbrenner, Thang Luong, Wolfgang Macherey, Rajat Monga, Vincent Vanhoucke, Peng Xu, Wojciech Zaremba, và nhóm Google Brain vì những nhận xét và thảo luận hữu ích.
References
- M. Auli, M. Galley, C. Quirk, and G. Zweig. Joint language and translation modeling with recurrent neural networks. In EMNLP, 2013.
- D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
- Y. Bengio, R. Ducharme, P. Vincent, and C. Jauvin. A neural probabilistic language model. In Journal of Machine Learning Research, pages 1137–1155, 2003.
- Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2):157–166, 1994.
- K. Cho, B. Merrienboer, C. Gulcehre, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Arxiv preprint arXiv: 1406.1078, 2014.
- D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In CVPR, 2012.
- G. E. Dahl, D. Yu, L. Deng, and A. Acero. Context-dependent pre-trained deep neural networks for large vocabulary speech recognition. IEEE Transactions on Audio, Speech, and Language Processing - Special Issue on Deep Learning for Speech and Language Processing, 2012.
- J. Devlin, R. Zbib, Z. Huang, T. Lamar, R. Schwartz, and J. Makhoul. Fast and robust neural network joint models for statistical machine translation. In ACL, 2014.
- Nadir Durrani, Barry Haddow, Philipp Koehn, and Kenneth Heafield. Edinburgh’s phrase-based machine translation systems for wmt-14. In WMT, 2014.
- A. Graves. Generating sequences with recurrent neural networks. In Arxiv preprint arXiv:1308.0850, 2013.
- A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In ICML, 2006.
- K. M. Hermann and P. Blunsom. Multilingual distributed representations without word alignment. In ICLR, 2014.
- G. Hinton, L. Deng, D. Yu, G. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 2012.
- S. Hochreiter. Untersuchungen zu dynamischen neuronalen netzen. Master’s thesis, Institut fur Informatik, Technische Universitat, Munchen, 1991.
- S. Hochreiter, Y. Bengio, P. Frasconi, and J. Schmidhuber. Gradient flow in recurrent nets: the difficulty of learning long-term dependencies, 2001.
- S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 1997. Read it here
- S. Hochreiter and J. Schmidhuber. LSTM can solve hard long time lag problems. 1997.
- N. Kalchbrenner and P. Blunsom. Recurrent continuous translation models. In EMNLP, 2013.
- A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. Read it here
- Q.V. Le, M.A. Ranzato, R. Monga, M. Devin, K. Chen, G.S. Corrado, J. Dean, and A.Y. Ng. Building high-level features using large scale unsupervised learning. In ICML, 2012.
- Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. Read it here
- T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno University of Technology, 2012.
- T. Mikolov, M. Karafiát, L. Burget, J. Černocký, and S. Khudanpur. Recurrent neural network based language model. In INTERSPEECH, pages 1045–1048, 2010.
- K. Papineni, S. Roukos, T. Ward, and W. J. Zhu. BLEU: a method for automatic evaluation of machine translation. In ACL, 2002.
- R. Pascanu, T. Mikolov, and Y. Bengio. On the difficulty of training recurrent neural networks. arXiv preprint arXiv:1211.5063, 2012.
- J. Pouget-Abadie, D. Bahdanau, B. van Merrienboer, K. Cho, and Y. Bengio. Overcoming the curse of sentence length for neural machine translation using automatic segmentation. arXiv preprint arXiv:1409.1257, 2014.
- A. Razborov. On small depth threshold circuits. In Proc. 3rd Scandinavian Workshop on Algorithm Theory, 1992.
- D. Rumelhart, G. E. Hinton, and R. J. Williams. Learning representations by back-propagating errors. Nature, 323(6088):533–536, 1986. Read it here
- H. Schwenk. University le mans. http://www-lium.univ-lemans.fr/~schwenk/cslm_joint_paper/, 2014. [Online; accessed 03-September-2014].
- M. Sundermeyer, R. Schluter, and H. Ney. LSTM neural networks for language modeling. In INTERSPEECH, 2010.
- P. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of IEEE, 1990.
Read off the page by a vision model reading the page images using olmOCR-2-7B-1025-FP8.
Read off the page by a vision model reading the page images using olmOCR-2-7B-1025-FP8. Translated from the English.