Does String-Based Neural MT Learn Source Syntax?
Paper · 2016 · Xing Shi, Inkit Padhi and Kevin Knight
Summary
A translation system can produce a sentence in another language without ever being shown a grammatical analysis of its input. What does it learn about grammar along the way? The authors ask this question about neural machine translation from English into French and German. Their systems read an English sentence and compress it into fixed-size numerical states. A decoder uses those states to produce the translation. The study tests how much syntax can be recovered from the states, from the grammatical category of an individual word to the arrangement of phrases across the sentence.
The authors compare translation with two other ways to train the same kind of encoder. A supervised parser learns to turn English sentences into constituency trees, which show how words group into nested phrases. The other systems learn to copy their input, either English in its original order or English with its words permuted. In the first experiment, simple classifiers predict properties such as active or passive voice, tense, and part of speech from the trained encoders. On the held-out voice test, the French translation encoder supports 92.8% accuracy, compared with 82.8% for always guessing active and 82.7% for the ordinary English copying system. Word-level labels are easier to read from the lower layer of the translation encoders, while the upper layer has an advantage for sentence-level information, especially tense.
In the second experiment, a new decoder learns to produce a complete English parse while the original encoder stays fixed. On the Wall Street Journal test section, among outputs accepted for labeled bracketing evaluation, the decoder using German translation states scores 80.34 F1 and the one using French translation states scores 79.27. The ordinary copying encoder supports 59.35 F1, the permuted copying encoder supports 46.64, and the supervised parser reaches 89.61. The same broad ordering appears when trees are evaluated by the edits needed to repair them, a measure that can include readable trees with the wrong number of leaves.
The authors also compare the systems on the same short sentences for which all of them produce scorable trees. One especially large gap concerns attachment, or where a phrase belongs in a tree. When a phrase’s head word is assigned the wrong part of speech, an entire grouping can change. Translation training therefore leaves substantial English grammatical information available in the encoder, with clear differences across layers and tasks. The experiments establish what separate readers can extract from those states. They leave open how the original translation decoder uses that information and whether giving it explicit syntax would improve translation.
Deep dive: Does String-Based Neural MT Learn Source Syntax?
English-to-French and English-to-German translation systems learn some English grammar from sentence pairs, as tests of their encoders reveal. · about 30 minutes to read
The problem and its context
Where grammar could enter a translation system
The paper places its question alongside two traditions in non-neural translation. Statistical phrase-based translation worked with phrases, while syntax-based approaches supplied grammatical structure on the source side, the target side, or both. The terms tree-to-string, string-to-tree, and tree-to-tree describe these choices. A tree-to-string system gets a structured source and produces a target sequence. A string-to-tree system takes a source sequence and builds a structured target. A tree-to-tree system works with tree structure at both ends. These designs make it possible to identify where syntax enters the translation process.
Recurrent encoder–decoder work gave the authors a different starting point. The paper points to Sequence to Sequence Learning with Neural Networks and Learning Phrase Representations using RNN Encoder–Decoder in describing the success of sequence-based translation. In the architecture studied here, the source arrives as a sequence of words. It leaves the encoder as numerical states that the decoder can use. The goal of training is to produce the target sentence. The encoder receives no explicit instruction to mark an English noun phrase, distinguish a clause from its modifier, or identify the voice of the source sentence.
This creates a question about what the numerical representation contains. A source sentence has an order, a vocabulary, word categories in context, and groupings of words that extend across positions. A system trained to generate another sentence can find many of these properties relevant, but its training output does not tell an observer which properties it encoded or how it organized them. The target sequence may reward preserving a grammatical distinction implicitly. It may also be predictable from cues that fall short of a complete grammatical analysis. A translation score alone does not resolve these possibilities.
The authors distinguish the existence of grammatical information from its extent. A simple active-or-passive judgment concerns the sentence as a whole, but it does not specify the boundaries of its phrases. A part-of-speech label identifies the function of a particular word in context, but it does not establish where the phrase containing that word belongs. It is therefore possible to approach the paper’s question at several levels of detail. The study tests individual labels and then asks whether a reader can assemble the nested structure of a whole sentence.
The paper also raises a practical question about adding external syntax to the encoder. That question would require a translation comparison in which some systems receive grammatical information during training or inference. The experiments here take the trained string-based systems as their starting point. The research problem is to characterize what they have already learned, so that a claim about the presence or absence of syntax can be tied to particular measurements.
From downstream performance to a direct test
Earlier work discussed in the paper examined representations through the tasks they supported. Sentence and paragraph representations could be tried on sentiment, paraphrase detection, semantic relatedness, or other problems. The paper includes Distributed Representations of Sentences and Documents and A Convolutional Neural Network for Modelling Sentences in this wider line of research. A downstream score shows that a representation helps with the chosen task. A sentiment decision, for instance, can involve the interpretation of sentence structure alongside vocabulary. Its score does not isolate a particular grammatical distinction.
Other work looked inside recurrent systems more directly. In Visualizing and Understanding Recurrent Networks, individual cells in a character-level system could be examined for behavior related to such patterns as quotation marks and line length. Visualizing and Understanding Neural Models in NLP examined unit values in a recurrent sentiment system, including behavior around negation and intensification. The paper also describes a derivative-based method from that work for assessing how units contribute to a decision. These examples motivated a more explicit question about what could be learned by inspecting the states of a large recurrent translation encoder.
The difficulty is partly one of scale. A picture or a hand inspection can help explain a small set of unit values. A trained encoder here has many coordinates at each word position and layer. A procedure for reading those coordinates has to work across examples, and its success has to be measurable on sentences outside the reader’s training set. The authors use interpretability methods that turn proposed grammatical distinctions into prediction problems. In effect, the reader asks the same grammatical question of a large collection of states and is judged against independently assigned answers.
The comparison with copying and direct parsing gives these tests their frame of reference. Copying can be successful if the representation retains enough information to reproduce the surface sequence. Supervised parsing makes grammatical structure the output required by training. Translation lies between these objectives in the experimental design. It changes the language of the output while supplying no source trees to the encoder. With a common architecture across these cases, differences in what a trained reader can recover become evidence about the representations associated with each task.
The method, step by step
Train encoders for different outputs
An encoder reads successive words and updates an internal state after each one. A decoder takes the final encoding and generates an output sequence. For translation, its output is a sentence in the target language. This paper uses long short-term memory, abbreviated LSTM, for both parts of the system. An LSTM cell has an internal numerical state that changes as it encounters the sequence. The experiments inspect these cell states, which are available at each source position and separately for each encoder layer.
The authors use a common two-layer architecture with a state size of 1000. They omit attention so that the original decoder has to work from the fixed-size encoding. An attention mechanism would give the decoder a way to consult different source positions as it generated its output. Here, the sentence encoding is the route through which the source gets to the decoder. Intermediate states still exist and can be collected for analysis. This distinction is what allows the authors to ask a separate question about each word without giving the original decoder direct access to all those intermediate states.
The translation systems are called E2F and E2G. Both read English, with French and German as their respective outputs. Their training examples come from WMT2014. Keeping the source language common lets the authors apply the same English label definitions and parsing evaluation to both encoders. The two translation directions also give some indication of whether grammatical information is recoverable across more than one target language under the same general design.
The copying systems are E2E and PE2PE. E2E reads an English sentence and learns to output the very same sequence. PE2PE copies an already permuted English sequence. In that condition, the training target keeps the permuted order of the input. Restoring normal English order would have made grammatical reconstruction part of the task, which would serve a different experimental purpose. The paper draws the 4M English training sentences for these copying conditions from the English side of the English–German data.
The supervised reference is E2P. It reads English and generates a linearized constituency tree. Linearization expresses a branching tree as a sequence of symbols, using bracket structure to specify where phrases begin and end and labels to indicate their categories. This turns parsing into an output task that can use the same recurrent encoder–decoder design. The construction follows Grammar as a Foreign Language. In E2P, errors in a predicted tree provide a training signal to the encoder as well as the decoder. That is the important difference between E2P and the systems built later by attaching a tree reader to an already trained encoder.
The parsing training collection is called the CJ corpus. It includes 162K training sentences from public treebanks, collections of sentences with grammatical structure assigned to them. The paper names the Wall Street Journal portion of the Penn Treebank, OntoNotes version 5, and the English Web Treebank. It reports Sections 0-22 for the Wall Street Journal treebank contribution and names WSJ Section 22 as development material and Section 23 as the test set.
The larger portion of the CJ corpus comes from unannotated English in the bilingual collections. The authors take 4M English sentences from the French parallel data and 4M from the German parallel data. They run the existing Charniak–Johnson parser, described in Coarse-to-Fine Parsing and Reranking, over those sentences to obtain trees. The resulting automatically parsed portion contains 8M sentences. The paper reports 8,162K sentence and tree pairs in the full corpus. Thus E2P learns both from existing treebank annotation and from analyses generated by another parser. The same collection serves as supervision for the replacement decoders.
Training the encoders and testing their English syntax
The steps in order.
The authors use the Zoph RNN toolkit for the recurrent systems. Training uses minibatches of 128 and a dropout rate of 0.2. A minibatch is the group of examples used together for a training update. Dropout temporarily suppresses units during training. The paper also reports rescaling when the global norm exceeds 5. These are settings of the recurrent systems, separate from the settings of the logistic regression readers used later.
The translation and copying systems train for 8 epochs, with an initial learning rate of 0.35 and a schedule that starts halving it after 6 epochs. An epoch is a pass through the training data, and the learning rate controls the size of training updates. E2P trains for 15 epochs, also starting at 0.35. For the parser, the authors start applying decay by 0.7 once development perplexity begins to increase. Development perplexity tracks how well the system predicts the next symbol in its expected output on development examples. Watching it gives the training procedure a signal about when to reduce the learning rate. The replacement decoders later use the parser’s dropout and learning-rate update settings.
Give each grammatical question its own label
The first reading procedure asks for a label instead of an entire tree. For a sentence, the authors use voice, tense, and the sequence of phrase categories at the top of the tree. Voice distinguishes active from passive. Tense distinguishes past from non-past. Rules operating on a sentence’s constituency analysis assign its voice and tense labels. These categories define the prediction target. The classifier sees the trained encoder state as its input and learns from examples paired with those targets.
The top-level syntactic sequence, or TSS, records the order of the main constituents below the top of the parse. In the paper’s notation, an NP-VP pattern describes a noun phrase followed by a verb phrase. A PP-NP-VP pattern begins with a prepositional phrase before the noun phrase and verb phrase. The authors retain the 19 most frequent sequences and give the remaining ones the label “Other,” making 20 classes in the TSS task. The resulting label preserves an outline of the sentence. The internal structure of an individual phrase is outside what this label specifies.
The word-level targets concern the word just read by the encoder. The part-of-speech label, abbreviated POS, gives the word’s grammatical category in that occurrence. The smallest phrase constituent, abbreviated SPC, gives the category of the lowest phrase node above that word. A POS label and an SPC label can describe different facts about the same position. A word’s tag characterizes the word’s own role or form, while its smallest phrase label identifies the nearest grouping in the tree that contains it. A classifier can therefore be successful at reading the word’s category while having more difficulty identifying its local phrase.
The paper illustrates the labels with a short sentence about firms being ready, introduced by a phrase about the time. The sentence as a whole has a tense, a voice, and an ordering of its largest constituents. A particular word in it also has a category and occurs inside a phrase of a particular kind. The distinction between the complete sentence and a word position matters for when to read the state. For a global question, the authors wait for the sentence to end. To ask about a word, they take the state at the moment the encoder has just processed that word.
Match the classifier input to the question
The paper writes the source sentence as an ordered list.
s = [w₁, …, wᵢ, …, wₙ]
Here s is the source sentence and w denotes a word. The subscripts identify positions. w₁ is the first word, wᵢ is the word at position i, and wₙ is the last word. The index n is the sentence length. The square brackets enclose the sequence, and the ellipses stand for intermediate positions.
At every position the encoder produces a cell vector at each layer.
c = [(c₁,₀, c₁,₁), …, (cᵢ,₀, cᵢ,₁), …, (cₙ,₀, cₙ,₁)]
The list c collects the cell vectors for the sentence. In a vector symbol such as cᵢ,₀, the first subscript is the word position and the second identifies the layer. Layer 0 is the lower layer, which the paper calls C0. Layer 1 is the upper layer, called C1. At each position the parentheses group the lower and upper vectors together. The opening and closing pairs correspond to the first and final words, and the omitted pairs fill out the intermediate positions.
For a sentence-wide prediction, the classifier reads the final state of the selected layer.
Lₛ = g(cₙ,₀) or Lₛ = g(cₙ,₁)
Lₛ denotes the sentence label being predicted, with the subscript s indicating the source sentence. The function g is the logistic regression classifier. Its input is either the lower final cell vector cₙ,₀ or the upper final vector cₙ,₁. The alternatives correspond to fitting and evaluating a reader on each layer. The notation expresses the prediction procedure. A label assigned from the linguistic analysis supplies the answer against which each prediction is judged.
For a word-level task, there is an ordered set of answers across the sentence.
Lw = [Lw₁, …, Lwᵢ, …, Lwₙ]
Lw is the sequence of word labels for the chosen task. Lw₁, Lwᵢ, and Lwₙ are the labels of the first word, the word at position i, and the last word. The brackets preserve word order, and the ellipses indicate the other word labels. The authors predict each of these labels using its corresponding word-position state.
Lwᵢ = g(cᵢ,₀) or Lwᵢ = g(cᵢ,₁)
Lwᵢ is now the predicted label at word position i. The classifier g reads either cᵢ,₀, the lower layer’s state immediately after word i, or cᵢ,₁, the upper layer’s state at the same point. The word index changes from example to example. Each prediction uses the layer selected for that run. This design asks whether the state available during reading supports a local grammatical decision.
Logistic regression learns a weighted combination of the input coordinates to score a label choice. It gives the authors a reader whose decision is comparatively simple, so that successful classification indicates access through a linear scoring rule. For a task with multiple classes, the paper uses a one-versus-rest setup. Each class is distinguished from the remaining classes using a separate binary decision function. This applies to distinctions such as the several possible top-level sequences and the inventory of word tags.
The authors also compare readers with access to all 1000 coordinates against readers using a selected top 10. They train the full classifier and recursively remove units with the smallest absolute weights, fitting with the remaining features as elimination proceeds. This is recursive feature elimination. Weight magnitude allows large negative and large positive weights to count as potentially informative. The selected units are those that survive for a given prediction task under this procedure. The experiment measures how much of the reader’s performance can be preserved with restricted access to the state.
Train a replacement decoder to recover a whole tree
A constituency tree calls for a different kind of reader. Predicting one label per word would still leave the boundaries and nesting of phrases unresolved. The authors therefore reuse the sequence-generation approach from supervised parsing. A new decoder learns to produce the bracketed sequence for an English sentence, using an existing encoder to supply the state from which it begins.
In the paper’s generic notation, E2X stands for the original system and E2X2P stands for its parsing derivative. The X stands for the original output task, and the final P indicates the new parsing output. In the French example, E2F2P and E2F use the same trained English encoder. The French decoder plays no part in reading the tree. Its replacement starts with parameters drawn from a uniform distribution and learns from the CJ corpus. During this training only the replacement decoder’s parameters are updated.
The procedure is repeated for the other translation encoder and for both copying encoders. Each new decoder has tree supervision, while the encoder it receives retains the weights learned in its original task. E2P provides the supervised reference because its encoder could adapt to the same parsing objective from the start. The comparison asks how the starting representation affects the tree that a trained decoder can recover when the encoder is held fixed.
A recurrent decoder is a more powerful reader than the label classifier. It can use nonlinear combinations of state information and learn dependencies among the symbols of a tree as it emits them. Its output relies both on the original encoder state and on what it learned from the parsing corpus. The design handles that distinction by applying the decoder procedure to different encoders. An encoder that supports better direct tree recovery under the common procedure supplies a more useful input for this particular structural prediction task.
Experiments and results
Data, baselines, and the original training tasks
The paper reports sentence-pair counts by training, development, and test split. Both copying conditions and the English–German translation condition use 4M/3000/2737. English–French uses 4M/6003/3003. The E2P row reports 8162K/1700/2416 for parsing, with English sentences paired with tree sequences. The reported input vocabulary size is 200K across the systems. For the translation and copying conditions the output vocabulary size is 40K.
The authors report test-set BLEU as BLEU-n4r1 for the original string-output tasks. BLEU evaluates overlap between the generated sequence and a reference. E2F scores 24.59 and E2G scores 12.60 on their respective translation test sets. On the copying test sets, E2E scores 89.11 and PE2PE scores 88.84. The copying references are the inputs themselves, which explains why these figures and the translation figures serve different purposes. They record performance on the original output tasks. The grammatical measurements come from classifiers and tree decoders evaluated separately.
For the supervised parsing reference, the paper compares E2P with the Charniak–Johnson parser and the earlier system from Grammar as a Foreign Language. On WSJ Section 23, it reports labeled F1 of 89.6 for E2P, 92.1 for Charniak–Johnson, and 90.5 for the earlier neural result. The reported F1 values apply to valid trees. Of the 2416 test sentences, the comparison gives a valid-tree count of 2362 for E2P and 2416 for Charniak–Johnson. It gives no count for the earlier neural result. A separate table uses 89.61 for the E2P labeled F1 in the comparison with the newly trained tree decoders.
How well the classifiers read grammatical labels
Each of the sentence-level tasks uses 9000 training examples and 1000 test examples. Voice and tense each have 2 classes, with active and non-past as the respective majority labels. TSS has 20 classes, and its most frequent choice is NP-VP. The word-level POS data contain 87,366 training examples and 9317 test examples, with 45 classes and NN as the most frequent tag. The SPC data contain 81,292 training examples and 8706 test examples, with 24 classes and NP as the most frequent phrase category. The unit in these word-level counts is a labeled word position.
The introductory voice experiment gives a numerical view of how the comparison works. The English side of the bilingual training data for the French translation system has 110M tokens in that account. The authors take 10K separate English sentences, assign each an active or passive label, and pass them through the trained encoder. The resulting state vectors become inputs for the voice classifier. Of those sentences, 9000 train the classifier and 1000 test it. The majority-class baseline always answers active. Its accuracy measures how frequently a single constant answer suffices on that test set.
Voice prediction on held-out English sentences, accuracy
The French translation encoder supports better voice classification than the active-only baseline or the English copying encoder.
The numbers
| System or setting | accuracy % |
|---|---|
| Always predict active | 82.8 |
| English copying encoder | 82.7 |
| French translation encoder (this paper) | 92.8 |
The observed contrast concerns how reliably a simple classifier can recover voice. E2F’s state contains a signal that generalizes to the held-out examples. The ordinary copying encoder yields a score in the vicinity of the majority baseline. Since active is frequent, the copying score alone could sound high. Its closeness to the baseline gives the more informative reading of what the experiment establishes.
In the wider comparison shown in the paper’s label figure, the translation encoders and the supervised parsing encoder achieve approximately 95% accuracy on voice and tense. The two copying encoders perform near the respective majority baselines on these tasks. For the top-level constituent sequence, part of speech, and smallest phrase constituent, every encoder improves on the corresponding majority choice. The translation encoders retain a substantial advantage over the copying encoders on those tasks. Copying therefore supports some classification of phrase patterns and word categories under this test, even where its states provide weak evidence for the sentence-wide binary distinctions.
The broader label figure plots the test accuracy of each layer and feature setting. Where the paper describes a plotted result in approximate terms, the interpretation is the reported pattern across systems. The introductory voice example supplies a separate, explicitly tabulated comparison. Taken together, the results link the recoverability of a label to the training task and show why the majority baseline has to be read separately for each question.
How the paper scores generated trees
On the tree tasks, the replacement decoders generate bracketed sequences for WSJ Section 23 with a beam size of 10. Beam search keeps several partial output sequences in consideration during generation. Once a sequence is complete, the authors first determine whether its brackets can be interpreted as a tree. An unmatched or missing bracket can make a sequence malformed. Even when a tree is well formed, it can have more or fewer leaves (terminal positions) than the source sentence has words.
The paper uses EVALB for labeled bracketing F1. In this comparison, EVALB needs a generated tree with leaves that correspond to the source tokens and that otherwise meet its evaluation requirements. Bracketing evaluates how the output groups the words. For a labeled match, the grouping also has to carry the reference category. A missing phrase lowers the recovery of reference brackets, while a spurious phrase reduces the share of predictions that match. F1 combines these aspects of performance. Its value applies to the subset on which a given system produced an accepted tree.
The tree edit distance calculation uses the zxx package and applies to well-formed outputs. This metric measures the cost of transforming the predicted tree into the reference tree through node insertions, deletions, or renamings. Because the trees can be compared as structures, a candidate whose leaf count differs from the reference can still incur an edit cost. The reported average tree edit distance is per sentence with a well-formed output. The difference in eligibility is central to reading the two metrics together.
Tree extraction on each system’s EVALB-accepted WSJ Section 23 outputs, labeled F1
The translation encoders support stronger constituency prediction than the copying encoders, while direct parsing supervision yields the highest score.
The numbers
| System or setting | labeled F1 |
|---|---|
| Permuted English copying encoder | 46.64 |
| English copying encoder | 59.35 |
| English-to-German translation encoder | 80.34 |
| English-to-French translation encoder | 79.27 |
| Supervised English parser (this paper) | 89.61 |
For the 2416 WSJ Section 23 inputs, EVALB accepts 818 outputs from the permuted copying encoder’s decoder and 796 from the ordinary copying encoder’s decoder. It accepts 974 from the German translation encoder’s decoder and 1093 from the French translation encoder’s decoder. The supervised parser supplies 2362 accepted outputs. Thus the headline F1 comparison combines scores calculated over different sets of sentences. The original task influences both the quality of the scored trees and the number of outputs the evaluator can use.
The coverage figures also explain the value of edit distance in this experiment. The permuted and ordinary copying systems each generate a well-formed tree on 2416 inputs. The German translation system’s tree decoder does so for 2340 inputs, and the French translation system’s decoder for 2415. The supervised parser also generates 2415 well-formed outputs. Comparing these figures with the EVALB counts shows how often a sequence can express a tree without giving the evaluator a usable alignment of leaves to source words. The paper describes leaf-count mismatches as common in the extracted trees.
Tree extraction on well-formed WSJ Section 23 outputs, average tree edit distance per sentence
Trees recovered from translation encoders require fewer repairs than trees recovered from copying encoders.
The numbers
| System or setting | average tree edit distance |
|---|---|
| Permuted English copying encoder | 34.43 |
| English copying encoder | 31.25 |
| English-to-German translation encoder | 17.11 |
| English-to-French translation encoder | 17.77 |
| Supervised English parser (this paper) | 11.50 |
The edit-distance results cover a broader set of sentences and show the same ordering as the labeled F1 comparison. The translation encoders support trees closer to the references than the copying encoders do, and the supervised parser’s outputs require the fewest edits on average. The agreement matters because the two scores express different kinds of success. An accepted output can receive credit for correct labeled spans. A tree whose leaves fail to line up can still be assessed for structural repair under edit distance.
The authors also report perplexity for predicting the tree sequences. On the CJ training set, PE2PE2P has perplexity 1.83 and E2E2P has 1.69. E2G2P has 1.39 and E2F2P has 1.36. E2P has 1.11. On WSJ Section 22, the development perplexities are 1.92 for PE2PE2P, 1.77 for E2E2P, 1.41 for E2G2P, and 1.38 for E2F2P. E2P reaches 1.18 on that development split. Perplexity concerns prediction of output symbols in sequence. The bracket and edit measures concern the structure of the generated tree. The French translation condition has lower development perplexity than the German condition, while the German condition has the higher F1 on its own accepted WSJ Section 23 outputs. Each figure has to be read in terms of the task and subset it scores.
What the ablations show
Changing the layer and restricting what the classifier can see
The feature-elimination experiment restricts the classifier at readout time. The original encoders retain their trained parameters. Measuring accuracy from the full state and from selected coordinates therefore shows how compact the accessible signal is under a simple reader. It does not require retraining a translator with those coordinates removed.
On word-level POS and SPC, classifiers using C0 perform better than classifiers using C1 in the translation encoders. This means the state closer to the encoder’s word input is the better place to read these local properties in the setup tested. Sentence-level labels show a tendency in the other direction, clearest for tense, for which the upper layer offers better access. The comparison depends on the question and the point where the state was recorded. Word-level readers use intermediate states, while the sentence-level readers use final ones.
The top 10 selected units preserve much of the full reader’s performance for voice and tense. With the multiclass targets, reducing the input from all 1000 units usually leaves a larger gap. The comparison singles out lower-layer POS in the supervised parser. Its selected units preserve more of the full reader’s performance than the corresponding reduced set in the translation encoders. The paper interprets this as a more concentrated POS signal in the parser and a more distributed signal in the translation states. That interpretation concerns the recoverability of the classification with the feature selection and scoring rule used here.
The difference between binary and multiclass targets also gives this finding a natural scale. Active and passive supply a single distinction for the reader. A POS inventory asks it to recover several differently defined categories from the same representation. Comparing all units with selected ones on a fixed label task is therefore especially informative. A gap between tasks can also reflect the number and variety of distinctions that their classes require.
Comparing the same sentences across encoders
The authors use a shared subset to control for variation in which sentences the parsers can score. They collect the sentences for which every system yields an EVALB-accepted output. The intersection contains 569 sentences, with an average length of 12.54 tokens and a maximum of 40. For the full WSJ Section 23 test set, the average is 23.46 and the longest sentence has 67 tokens. The shared comparison puts every system on the same inputs, and those inputs are substantially shorter than the full test set.
On this intersection, labeled F1 is 58.67 for the permuted copying system and 70.91 for the ordinary copying system. The German translation encoder’s decoder scores 85.36, and the French translation encoder’s decoder scores 86.62. The supervised parser reaches 93.76. The main separation by original training task survives the shared-input comparison. The relative order of the two translation conditions changes from the F1 comparison on their separate accepted sets. The authors describe the syntactic differences between E2F and E2G as small overall. The shared-subset result and the individual-subset result give no consistent lead to either target language across these evaluations.
The authors also read the predicted POS tags from the generated trees on these same 569 sentences. The permuted copying system attains 54.32% POS accuracy, and the ordinary copying system attains 68.03%. The German translation system reaches 85.30%, and the French translation system reaches 87.09%. For E2P the value is 96.00%. These are tags emitted as part of the parsed output. They measure a different reading situation from the earlier logistic regression on the state at each word. In the tree experiment, the decoder must assign categories as it constructs an output from the fixed sentence encoding.
Finding the mistakes that change phrase structure
The Berkeley Parser Analyzer groups bracket mistakes by the repairs that would fix them. A repair can move a subtree or insert or delete a node. Several wrong brackets can then be attributed to a single type of linguistic error, instead of each being treated as an unrelated mismatch. This lets the authors ask whether the gap between translation encoders and the supervised parser is spread evenly across error types.
The analysis covers the top 11 error types on the intersection set. The paper gives the supervised parser’s average bracket errors per sentence and expresses the other systems’ averages relative to that reference. For the translation-based parsers, the first 10 types show roughly twice the errors of E2P. The category called “Sense Confusion” produces more than 16 times as many bracket errors. Here “Sense Confusion” has a specific interpretation within the analyzer. The word that acts as the head of a phrase receives an incorrect POS tag, and the resulting tree attaches the material differently from the reference.
The authors illustrate this with beyond. A predicted tree gives the word the adverb tag RB in a context where the reference has IN. The prepositional phrase expected in the reference is then absent. A tagging accuracy counts the word’s category as one mistake. A bracketing analysis can register the loss of a phrase or a change in its attachment. The example shows how comparatively good average tagging can coexist with a persistent structural gap. It is the role of the misclassified word in the tree that makes such an error consequential.
Limitations
Limits the authors identify
The authors caution that tree decoding is highly nonlinear and draws on substantial parsing supervision. A replacement decoder can learn how trees are usually formed and use those regularities to turn its input into a plausible output sequence. Encoder freezing prevents the parsing objective from rewriting the source representation. It does allow the decoder to learn a powerful way of interpreting that representation. The absolute parsing score consequently belongs to the combination of the frozen encoder and supervised reader. The paper relies on the comparison across encoder sources to interpret that score.
The authors also distinguish their experiment from recovering the surface sentence and then parsing it. An ordinary copying system comes with a decoder trained to reproduce the English input. One could use it to recover that input and then run the Charniak–Johnson parser on the recovered words. The authors are interested in whether the geometry of the encoding is already congenial to grammatical prediction. Passing through a reconstructed sentence would let a separate parser start again from the word string. Its score would answer a question about that combined pipeline.
A further limitation concerns the output format. The authors explicitly note that reported F1 is biased by the selection of accepted trees. With many outputs failing to match the correct number of leaves, the F1 values apply to only part of each system’s test output. Edit distance supplies an additional view, although its calculation still requires a well-formed tree. The system with 2340 well-formed outputs and one with 2416 are therefore measured on slightly different populations even under that metric.
The shared-set approach aligns the evaluated sentences but introduces a selection effect of its own. The authors observe that these sentences are short in relation to the test set and say that producing trees for longer inputs is difficult in their non-attentional setup. The fine-grained conclusions about error types and POS accuracy thus describe the shared scorable set. The paper uses this set to study how the encoders treat short sentences where a meaningful direct comparison is possible.
Limits of the comparisons
The label experiments give evidence about what a fitted linear classifier can recover from selected cell states. Failure can mean that the available signal is weak for that task, that a different choice of states would help, or that a more flexible mapping would recover something the linear reader misses. For example, seeing copying accuracy near the majority baseline for voice supports a claim about access with the chosen probe. An English sequence that can be reconstructed could still be analyzed for voice by a separate procedure, as the authors’ discussion of copying and parsing makes clear.
Conversely, accurate label prediction leaves causal use unresolved. The final states may retain a distinction because it occurs alongside other useful cues. A label probe only observes the states and predicts from them. Recursive feature elimination removes access to units for the classifier, leaving the translation computations intact. The comparisons therefore establish differences in availability and concentration for the readers under study. Determining how a translation changes when a grammatical signal is altered would require an intervention on the translation system itself.
The labels also sample grammar at particular resolutions. Voice and tense are binary classifications as operationalized by the paper’s rules. TSS retains the ordering of a few large categories and groups rarer patterns under “Other.” A local phrase label summarizes one position in a tree. These tasks can each be answered with partial grammatical evidence, possibly including familiar surface cues. Full tree extraction covers more structure and still leaves multiple possible accounts of what the encoder preserves. The typed repairs help localize failures at the output without identifying the precise computation inside the encoder that led to each failure.
The common recurrent architecture makes the benchmarks comparable in design, but the training data and objectives differ. The direct parser uses a larger collection of English sentences paired with trees, most of them assigned automatically. The copying conditions and the translation conditions receive other targets and follow a different training schedule. The paper’s upper and lower bounds are reference systems designed to help interpret a particular experiment. They do not provide mathematical limits on the amount of syntax a system could learn from any copying or translation task.
There is also an ambiguity in the corpus description. The paper names WSJ Sections 0-22 while describing the treebank contribution to training and also names WSJ Section 22 as the development set. The reported development perplexities can be identified by their stated split, but the description leaves it unclear how the development section was treated when the training collection was assembled. The separately named parsing test split is WSJ Section 23.
Finally, the paper studies English source syntax within a specific fixed-size architecture and two translation directions. It does not run a translation experiment with added syntactic supervision. A difference between the E2P tree scores and the translation-encoder tree scores identifies grammatical information that was harder to recover under translation training and this readout procedure. The effect of providing that information explicitly on target-language quality remains outside the experiment.
What came after
From sentence encodings to layers and token representations
Probing Sentence Embeddings for Linguistic Properties brings the recoverability question to sentence embeddings. The shared object of interest is a vector representing a sentence. Shi and colleagues get such vectors from encoders trained for particular sequence tasks and ask for grammatical labels or trees. The later work places the evaluation of linguistic properties of sentence embeddings at the center of its question. SentEval approaches sentence representation evaluation through a toolkit for universal sentence representations. Its connection is the need for an explicit evaluation procedure when comparing representations that can come from different training systems.
Other work keeps translation as the setting and changes the property to be recovered. What Do Neural Machine Translation Systems Learn about Morphology? puts the focus on morphology, the structure and grammatical forms of words. This narrows attention to a kind of linguistic information that can be studied locally. Evaluating Layers of Representation in Neural Machine Translation makes the layer comparison central and considers both part-of-speech and semantic tagging. The link to the earlier experiment is especially direct for part of speech. Both treat the choice of layer as an empirical question, and the later paper’s semantic tagging task extends that question to another kind of word-level annotation.
An Analysis of Encoder Representations in Transformer-Based Machine Translation carries the focus on translation encoders to the Transformer. The object of analysis shifts from recurrent cell states in a fixed-size encoding to encoder representations in a different architecture. The Bottom-up Evolution of Representations in the Transformer puts both layer progression and training objective into the same question by studying machine translation alongside language modeling. This continues two choices made in the earlier paper, looking at how representations vary across layers and taking the task that produced them into account.
What Do You Learn from Context? turns the search for sentence structure towards contextualized word representations. Shi and colleagues read a word-level label from the cell state reached when the encoder processes a word. The later question is what sentence structure can be probed in a representation whose object is the word in context. BERT Rediscovers the Classical NLP Pipeline frames the organization of linguistic processing in BERT in relation to the sequence of analyses found in a classical NLP pipeline. Its connection to the source-syntax paper is the focus on where linguistic distinctions are recoverable inside a trained system. The older experiment separates lower and upper cell states, while the later title foregrounds the ordering of kinds of analysis.
Asking what success on a probe establishes
Designing and Interpreting Probes with Control Tasks takes up the role of controls in probe design. In the translation study, a major control is to give a comparable reader a representation learned by copying and then compare it with a representation learned by translating. The later work puts control tasks themselves at the center of interpretation. It addresses the general difficulty exposed by the change from logistic regression to recurrent tree decoding. Once a reader has learned from labeled examples, part of the result depends on what that reader can learn.
Does Probing Accuracy Entail Task Relevance? isolates the distinction between predicting a property and establishing its relevance to the original task. In the 2016 study, a classifier’s test accuracy shows how well it can assign voice from translation states. The translation system has a separate original decoder with its own training objective. The later paper asks whether the former type of result warrants a claim about the latter. That question applies both to grammatical labels read with logistic regression and to the stronger forms of structural recovery possible with a supervised tree decoder.
Analysis Methods in Neural Language Processing surveys the wider family of methods to which the label, feature, and error analyses belong. Probing Classifiers: Promises, Shortcomings, and Advances focuses more specifically on the promises and limits of classifier-based analysis. The earlier paper supplies an example of why both perspectives matter. A compact reader can give precise evidence about a particular distinction on held-out data. A full tree reader and an error analysis can then show where that evidence stops short of a detailed account of sentence structure. The later methodological questions concern how to interpret gains under each reader and which claims those measurements can support.
Institutions
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Topics 2Research subjects and languages the work is about.Machine translation · 1,109 worksSyntax & grammar formalisms · 225 works
Cite
Cite as Xing Shi, Inkit Padhi and Kevin Knight. 2016. Does String-Based Neural MT Learn Source Syntax?. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{shi2016does,
title = {{Does String-Based Neural MT Learn Source Syntax?}},
author = {Xing Shi, Inkit Padhi and Kevin Knight},
booktitle = {Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing},
year = {2016},
doi = {10.18653/v1/d16-1159},
url = {https://doi.org/10.18653/v1/d16-1159}
}References
- “beyond” is predicted as “RB” instead of “IN”, resulting in a Ondrej Bojar, Christian Buck, Christian Federmann, Barry Haddow, Philipp Koehn, Matous Machacek, Christof Monz, Pavel Pecina, Matt Post, Herv Saint-Amand, Radu Soricut, and Lucia Specia, editors. 2014. Proc. Ninth Workshop on Statistical Machine Translation. missing prepositional phrase. OpenAlex ↗ · Scholar ↗
- Eugene Charniak and Mark Johnson. 2005. Coarse-to-fine n-best parsing and MaxEnt discriminative reranking. In Proc. ACL.
- Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proc. EMNLP.
- Brooke Cowan, Ivona Kučerová, and Michael Collins. 2006. A discriminative model for tree-to-tree translation. In Proc. EMNLP. OpenAlex ↗ · Scholar ↗
- Steve DeNeefe, Kevin Knight, Wei Wang, and Daniel Marcu. 2007. What can syntax-based MT learn from phrase-based MT? In Proc. EMNLP-CoNLL. OpenAlex ↗ · Scholar ↗
- Michel Galley, Mark Hopkins, Kevin Knight, and Daniel Marcu. 2004. What ’ s in a translation rule ? Information Sciences, 2004.
- Michel Galley, Jonathan Graehl, Kevin Knight, Daniel Marcu, Steve DeNeefe, Wei Wang, and Ignacio Thayer. 2006. Scalable inference and training of context-rich syntactic translation models. In Proc. ACL.
- Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8). OpenAlex ↗ · Scholar ↗
- Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. 2014. A convolutional neural network for modelling sentences. In Proc. ACL.
- Andrej Karpathy, Justin Johnson, and Li Fei-Fei. 2016. Visualizing and understanding recurrent networks. In Proc. ICLR.
- Yoon Kim. 2014. Convolutional neural networks for sentence classification. In Proc. EMNLP.
- Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In Proc. NIPS. OpenAlex ↗ · Scholar ↗
- Philipp Koehn, Franz Josef Och, and Daniel Marcu. 2003. Statistical phrase-based translation. In Proc. NAACL. OpenAlex ↗ · Scholar ↗
- Jonathan K. Kummerfeld, David Hall, James R. Curran, and Dan Klein. 2012. Parser showdown at the Wall Street Corral: An empirical investigation of error types in parser output. In Proc. EMNLP-CoNLL.
- Jonathan K. Kummerfeld, Daniel Tse, James R Curran, and Dan Klein. 2013. An empirical examination of challenges in Chinese parsing. In Proc. ACL. OpenAlex ↗ · Scholar ↗
- Qv Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. In Proc. ICML.
- Jiwei Li, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. 2016. Visualizing and understanding neural models in nlp. In Proc. NAACL.
- Yang Liu, Qun Liu, and Yajuan Lü. 2011. Adjoining tree-to-string translation. In Proc. ACL. OpenAlex ↗ · Scholar ↗
- Mitchell P Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993. Building a large annotated corpus of English: The Penn Treebank. Computational Linguistics, 19(2).
- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. BLEU: a method for automatic evaluation of machine translation. In Proc. ACL.
- Slav Petrov and Ryan McDonald. 2012. Overview of the 2012 shared task on Parsing the Web. In Notes of the First Workshop on Syntactic Analysis of Non-Canonical Language (SANCL). OpenAlex ↗ · Scholar ↗
- Sameer S Pradhan and Nianwen Xue. 2009. Ontonotes: the 90% solution. In Proc. NAACL.
- Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proc. EMNLP.
- Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Proc. NIPS.
- Laurens van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-SNE. Journal of Machine Learning Research, 9. OpenAlex ↗ · Scholar ↗
- Oriol Vinyals, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. 2015. Grammar as a foreign language. In Proc. NIPS. OpenAlex ↗ · Scholar ↗
- Kaizhong Zhang and Dennis Shasha. 1989. Simple fast algorithms for the editing distance between trees and related problems. SIAM Journal on Computing, 18(6). OpenAlex ↗ · Scholar ↗
- Han Zhao, Zhengdong Lu, and Pascal Poupart. 2015. Self-adaptive hierarchical sentence model. In Proc. IJ-CAI. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/shi-2016-does-string-based-neural-mt/