Elamur Research

A Neural Network Architecture for Multilingual Punctuation Generation

Paper · 2016 · Miguel Ballesteros and Leo Wanner

Summary

A sentence can contain all the right words in the right order and still be hard to read. Without punctuation, a reader has to work out where clauses meet, which phrases belong together, and how the sentence ends. Miguel Ballesteros and Leo Wanner study how to supply those marks when the words are already available. Their starting point is written text, particularly the output of a sentence generator that has chosen and ordered its words. The punctuation system works from those words alone. It receives neither an audio recording nor a separate analysis of the sentence’s grammar.

The system builds the punctuated sentence from left to right. At each step it either moves the next word into the output or inserts a particular punctuation mark at the current position. It bases that choice on what it has written so far, what remains to be read, and which actions brought it to the current position. Long short-term memory networks, or LSTMs, encode these sequences as numerical summaries. The system also reads the characters of each word to build its representation. An optional addition supplies a second representation of the word learned from a larger text collection.

The authors test the same architecture on Czech, English, French, German, and Spanish, using held-out sentences from annotated written corpora. The recurrent system beats a baseline restricted to the immediate context on the overall punctuation F score in every language. F combines precision, or how often a predicted mark is right, with recall, or how frequently a reference mark is recovered. On the English test set, the baseline scores 64.40 for all punctuation combined. The recurrent system scores 77.46 with character-derived word representations and 78.87 when it also uses pretrained word vectors. The gains are particularly clear for commas, whose recovery is frequently poor with the immediate context alone. Periods already have high recall in the baseline and generally leave less room for improvement.

The experiments show that a word sequence carries useful evidence for restoring several kinds of punctuation, including marks that occur less frequently than commas and periods. The overall scores pool all marks, so they establish performance on the mixture in each corpus. The authors report separate results for commas and periods. The evidence for each remaining mark is less specific, and differences in the corpora and their punctuation inventories limit comparisons across languages.

Deep dive: A Neural Network Architecture for Multilingual Punctuation Generation

How a neural system adds punctuation to unpunctuated writing, and what tests in five languages reveal about the value of wider context. · about 32 minutes to read

The problem and its context

The words are already in place

The task begins after a sentence’s words have been selected and put in order. In a system that generates written sentences, that job belongs to surface realization, the stage that turns an underlying representation into a sequence of word forms. Ballesteros and Wanner ask what a separate punctuation stage can do with that sequence. The punctuation stage keeps the words and their order. Its decisions concern which marks to add and where to put them.

This division of labor matters because punctuation can make distinctions whose evidence is spread across a sentence. A comma may help a reader tell where an introductory expression ends or which words form a separate unit. A question mark says something about the sentence that precedes it. The word immediately next to a mark can help, but its significance frequently depends on what other words are doing. A method that sees only the nearest words may have two apparently similar decisions with different correct answers. The task is to recover enough of those distinctions from the sequence itself.

Punctuation can serve several purposes at once. The paper distinguishes a prosodic or rhetorical function, which relates written marks to the phrasing of speech, from a grammatical function, which treats punctuation as a component of grammar in its own right. It also describes a syntactic function, in which a mark reflects the structure of a sentence. The comma is especially relevant to the rhetorical account that the authors cite. These views give different reasons why a reader might find a mark appropriate. The system is trained on where people put marks in written sentences, so a training example does not need a separate label for the function a mark serves. Syntax & grammar formalisms

The authors’ emphasis on writing also sets the scope of the task. A word sequence can be the output of a sentence generator, or it can come from a sentence whose punctuation has been taken away. In both cases, the punctuation system gets a sequence whose words are already available. It has no access to any earlier planning or syntactic representation a generator may have used. A pause, an intonation change, or a duration measurement is likewise outside its input. The choice to start with word forms makes the interface simple and leaves the network to learn which patterns in those forms are predictive.

What earlier approaches used as evidence

The paper describes speech transcripts as the most prominent application of automatic punctuation before this work. In a transcript, marks can be recovered from patterns in the words, properties of the speech signal, or a combination of both. Some earlier classifiers relied on an n-gram, which represents a sequence through short runs of neighboring items. Others added lexical or syntactic information, or drew on acoustics. A pause can provide evidence about a boundary even when the words on either side leave its status uncertain. Speech & spoken language · N-gram

The closest earlier approach in the authors’ account is Tilk and Alumäe’s work on Estonian speech transcripts. It also uses an LSTM, but its evidence includes pause duration alongside lexical information, and the marks it restores are periods and commas. This provides a clear point of comparison at the level of the problem design. A recurrent network had already been applied to punctuation decisions. Ballesteros and Wanner ask it to use written word forms alone and to choose among the broader set of marks used by each annotated corpus. The settings supply different evidence and require different outputs.

The paper also traces a line of work on punctuation in writing. Some of those proposals describe the grammatical role of marks. Others build punctuation into rule-based resources used to analyze sentences or to produce their surface form. From the standpoint of sentence generation, a grammar can supply information about the construction being realized and the punctuation appropriate to it. That is a different place to solve the problem from the one Ballesteros and Wanner choose. They put punctuation after realization, at a point where the input consists of word forms. Parsing

Guo and colleagues’ work on Chinese sentence generation is the nearer statistical precedent for writing. As described in the paper, it predicts punctuation using syntactic features from the functional structures of a grammar, along with cue words and pairs of preceding punctuation marks. It therefore has access to an explicit account of sentence structure and to features designed for the prediction task. Ballesteros and Wanner retain the idea that previous punctuation can matter. They make it available through the emerging output and the record of earlier actions, with the network learning how to use that information.

Why borrow a transition system from parsing?

In a transition-based procedure, a sequence of small operations builds the answer. A parser, for instance, can keep track of the words it has yet to process and the structure it has constructed so far. Each action changes what either side contains, so a later decision is made in a state created in part by earlier decisions. Ballesteros and Wanner adapt that organization to a different output. The object being built is a sentence with punctuation, and the actions move a word or insert a mark. Dependency parsing · Incrementality in Deterministic Dependency Parsing

The recurrent architecture has a more specific precedent in Dyer and colleagues’ transition-based parser. That work motivates the use of a stack LSTM, a recurrent structure that accommodates adding and removing elements at the accessible end of a stack. For punctuation, the useful property is that a representation of the unread words can change when a word is transferred to the output. The state can keep information about the rest of the sentence while updating the position at which the next decision is made. The authors also name Dyer and colleagues’ recurrent work on generating and parsing phrase structures as an architectural influence. Transition-Based Dependency Parsing with Stack LSTM · Recurrent Neural Network Grammars

The two corpora situations that motivate the study should remain distinct. A sentence generator could supply the unpunctuated input in an application. An annotated corpus supplies a reference answer for training and testing because its punctuation is already recorded. The experiments use the second situation to test a system intended for the first. This gives the authors a direct way to compare its choices with punctuation in written sentences while keeping the input to the procedure at the level of words.

The method, step by step

A sentence is assembled by moving words and adding marks

The procedure starts with an input buffer containing the sentence’s word forms. A buffer is a sequence that holds items as they wait to be processed or as they accumulate. The output buffer begins empty. The next unread word sits at the accessible end of the input. The most recently written material sits at the accessible end of the output. This arrangement gives the procedure a current position without any need to refer to numerical word offsets in its action names.

An action called SHIFT removes the next word from the input and appends it to the growing sentence. An action called GENERATE inserts a punctuation symbol at the current output position. The latter comes in a separate variant for each supported mark. Choosing to generate a comma and choosing to generate a period are distinct classifier decisions. Generating a mark leaves the remaining input words in place, so advancement through the word sequence and insertion of punctuation are separate operations. punct: punctuation

The paper illustrates the process with the words No it was not. The procedure first moves No into the output. A comma action can then put the comma after No while it remains next in the input. The subsequent shifts move it, was, and not into the output in their original order. A final punctuation action supplies the period. The sequence demonstrates why a period can be added after the last word. At that point the input is empty, but the finished words give the classifier an output context in which to choose a mark.

The example also shows how the same word can be at the center of successive decisions. After moving No, the system has to choose whether to insert a mark or advance. Once it adds the comma, the unread words are the same as before. What has changed is the current output and the record of actions. Those changes give the next decision a different state, even though there has been no new word. If the procedure shifts it too early, the position after No has already passed.

How the recurrent system builds a punctuated sentence

The steps in order.

How the recurrent system builds a punctuated sentenceStep 1: Load unpunctuated words into the input buffer1. Load unpunctuated words into the input bufferStep 2: Represent words using their character sequences2. Represent words using their character sequencesStep 3: Encode unread words, output, and past actions3. Encode unread words, output, and past actionsStep 4: Score SHIFT and the individual punctuation actions4. Score SHIFT and the individual punctuation actionsStep 5: Move a word or append the selected mark5. Move a word or append the selected markStep 6: Update the affected sequences for the next decision6. Update the affected sequences for the next decision

The output is built in the original order. A choice to shift consumes a word and moves the next possible insertion position forward. A choice to generate adds something to the sentence and gives the next decision new information about what has just been inserted. The paper describes a greedy decision rule, meaning that the system selects the action that has the highest probability in the current state. It commits to that choice as it proceeds.

Word representations start with spelling

The decision procedure operates on vectors, which are ordered collections of numbers. A word embedding is a vector used to represent a word in a form that a network can process. In the character-based representation, the network assembles a word’s vector from its spelling. It reads the sequence of characters in both directions with LSTMs. This lets a representation draw on patterns across the word, including evidence near either end. The authors want words with related spelling or morphological structure to be able to acquire similar representations. Morphology is the structure of words, including recurring patterns across forms of a word. Word embeddings · Morphology

A recurrent network processes a sequence by updating an internal vector as it reads each item. The updated vector can carry information from earlier items into later updates. The paper explains the basic recurrence in terms of the current input vector and the preceding hidden state. The network joins those vectors, applies a linear transformation, and passes the result through a sigmoid, a nonlinear function. Here, the hidden state is the numerical representation available inside the network after a step. The LSTM adds a memory mechanism intended to help with the vanishing gradient problem, in which the training signal for an earlier part of a long sequence can become very small. The authors use recurrence both within words and across the sequences that define a punctuation decision. Generating Sequences With Recurrent Neural Networks

The two directions in the character encoder apply to the spelling of the same word. Each direction processes a sequence whose content is present when the word is represented. The input buffer’s access to future words is a separate property. It arises because the sentence has been loaded into the procedure before any word is moved. Similarly, the representation of the output is built from the items the procedure has actually appended. These distinctions matter because the architecture uses sequence information at several scales. Spelling helps describe a word. The buffers help describe where that word sits in the sentence under construction.

The paper draws the character-based design from earlier work on tagging and parsing. In such work, the shape of a word can help the system infer something about it from similarities to forms encountered during training. For punctuation, a word’s ending or another recurring sequence of characters can serve as evidence through the word vector, without the system receiving a separate morphological analysis. The experiments use this representation in both the local baseline and the recurrent system, so comparing the two context encoders does not require either to give up character information. Part-of-speech tagging · Character-based transition parsing

An optional branch adds a fixed vector for the whole word, trained on external text using Ling and colleagues’ skip n-gram approach. The vectors from the character encoder and pretraining are concatenated, meaning that the components of one are placed after the components of the other in a single vector. The paper describes this representation as going through a component-wise rectified linear unit, or ReLU. A component-wise operation acts on each number individually. The rectifier clips negative components to zero and keeps positive components. The comparison with pretraining therefore tests what the fixed whole-word vectors add when the character encoder is already present. Adaptations of word2vec for syntax

The baseline sees a local window

The baseline represents the current position using two embeddings from the accessible end of the output buffer and two from the front of the input buffer. It averages those vectors and applies a ReLU before the action classifier. The authors describe this as a 4-gram view of the context because the immediate evidence comes from a span of four items around the decision. Its output side can reflect what the system has already generated. Its input side gives it the nearest words ahead.

This is a learned baseline. Its word vectors carry spelling information and, in the configurations that use them, information from pretraining. It also performs the same series of shift and punctuation decisions as the recurrent system. The average makes a compact numerical summary. It also collapses the identities of the individual slots into one vector, so the classifier does not get a separate feature position for each embedding after the average. A comparison with this baseline tests a change in how context is represented, with the word representation and the basic action procedure available to both systems.

The window has an obvious use for punctuation. Nearby words frequently provide a cue to whether a mark is appropriate, and seeing a little of the upcoming material lets the system consider evidence on both sides of a potential insertion. The experimental question is how much the compressed local view gives up. A cue can be farther away than the baseline can see. Even within the window, the sequence of items and which side they belong to may matter. A recurrent state can preserve distinctions that the average leaves implicit.

The recurrent state follows the changing sentence

In the proposed architecture, an input stack LSTM is loaded with the whole sequence at the beginning. A stack provides access to the most recently exposed item and supports removing it with an operation frequently called a pop. The input is arranged so that the word needed for the next shift is accessible. When a shift takes that word away, the recurrent input state can represent the remaining sequence. The stack operation is pertinent because the input side shrinks during decoding, while the output side grows.

A second LSTM encodes the output. Each time a word or mark is added, the output history grows by that item. A third LSTM encodes the sequence of actions, including shifts and the particular punctuation-generating operations. The output and action sequences describe related events from different perspectives. A shift in the action history records what operation was taken. The corresponding item on the output side records which word was written. A punctuation action identifies the operation that inserted the mark, while the output keeps the mark in the context of the sentence around it.

The three recurrent representations provide the information for the decision state, with a component-wise ReLU used in the transformation leading to the action probabilities. The paper’s probability equation treats this state as a single vector. Conceptually, the classifier can ask what the words still ahead suggest, what kind of sentence has been built so far, and what operations the system has already performed. It makes the same kinds of choices as the baseline. The distinction is that the recurrent encoders can carry evidence from beyond the boundary of a short window.

The output and action summaries are also the means by which an earlier punctuation choice can influence a later one. An inserted symbol enters the output immediately, and the operation enters the action history. This gives the system a way to make successive choices depend on one another even though the probability calculation at each step refers to the current state. The recurrent summaries are finite vectors. Encoding the whole sequence means that the encoder processes it, with the training procedure determining what information the vector actually preserves.

From the current state to an action sequence

The authors assign a score to each possible action from the current state. A softmax converts those scores into probabilities by exponentiating them and normalizing across the available choices. A score that is larger relative to the other scores receives more probability. The equation below describes the decision at a particular step.

p(zₜ ∣ sₜ) = exp(gᵀ_zₜ sₜ + q_zₜ) / ∑_{z′ ∈ A} exp(gᵀ_z′ sₜ + q_z′)

Here, t marks the current step, zₜ is the action whose probability is being evaluated, and sₜ is the state vector at that step. The expression p(zₜ ∣ sₜ) is the probability of choosing that action given the state, with ∣ marking the condition. The vector g_zₜ represents the candidate action, and ᵀ denotes transpose, so gᵀ_zₜ sₜ is the dot product of the action vector and state vector. This dot product adds the products of corresponding vector components. The scalar q_zₜ is the candidate’s bias, a learned value added to its score regardless of the current state. The function exp exponentiates the score. The denominator adds the exponentiated scores for all actions in A, the action set. The summation symbol ∑ denotes that addition, and z′ ∈ A means that z′ ranges over the members of A. The terms g_z′ and q_z′ are the vector and bias for each action used in the sum.

The inventory in A includes SHIFT and a GENERATE variant for each available punctuation mark. Knowing the action set determines the classes the system can predict. The target inventory comes from the language’s corpus, so a shared scoring rule can be used with different inventories. The word sequence and earlier actions affect the scores through the state. The action vectors and biases let the classifier use the same state differently when considering a shift, a comma, or any other candidate.

A whole output corresponds to a series of actions. The paper gives the probability of that series conditional on the original words as the product of its stepwise probabilities.

p(z ∣ w) = ∏_{t=1}^{|z|} p(zₜ ∣ sₜ)

In this equation, z is the full action sequence and w is the input word sequence. The expression on the left is the conditional probability of that sequence of actions given the words. The symbol ∏ denotes a product. The index t starts at 1 and runs to |z|, the length of the action sequence, with the vertical bars around z indicating that length. On the right, zₜ is the action at step t, and sₜ is the state used to decide it. The function p denotes probability. Each factor uses the state that follows from processing the words and taking the earlier actions in the sequence.

The product allows the probability of later actions to depend on earlier ones. When a mark is inserted, it can influence subsequent states and therefore subsequent factors in the product. The training objective uses the logarithm of this probability. The log turns the multiplication into an addition of the log probabilities of the actions, so learning rewards the network for assigning probability to the reference choices throughout the sentence. At test time, the greedy rule uses the most probable current action and updates the state before selecting again. Maximizing each current choice can produce a different sequence from searching for the highest probability complete sequence.

Learning from punctuated sentences

The corpora supply both the sequence of words and the punctuation to recover. The words can be used as input in their existing order. The reference punctuation specifies where the training sequence has to generate a symbol between shifts or after the final word. In the example with No, the comma is a reference generation action immediately after that word has been shifted. A reference position with no punctuation is passed by shifting the next word, when one remains. The same training objective applies to the local and recurrent contexts.

The recurrent setup uses two layers of dimension 100 for each input sequence. In both architectures, character-based word embeddings and punctuation embeddings have 100 dimensions, as do the pretrained word embeddings where used. The study uses development sets to choose settings and held-out test sets to report results. The paper also points readers to the authors’ LSTM-punctuation implementation.

Experiments and results

The tests use edited text in several languages

For Czech, English, German, and Spanish, the authors obtain the word forms from treebanks used in the CoNLL 2009 Shared Task. A treebank is a collection of sentences with linguistic annotations, frequently including a description of their syntactic structure. The French sentences come from the dataset of Candito and colleagues. The structure annotated in a treebank is useful for many tasks, but in these experiments the input to the punctuation procedure is the sequence of word forms. Punctuation and the corpus tag sets supply the target symbols. Treebanks · CoNLL shared task on syntactic and semantic dependencies

The choice of languages gives the authors settings with different punctuation conventions. They describe English, French, and Spanish as generally associated with prosodic punctuation and German as giving greater weight to syntax. They describe Czech punctuation as leaning toward syntactic criteria as well, while allowing that its relatively free word order may make prosodic cues relevant. These characterizations motivate the selection of languages. The experiment itself measures punctuation predictions under each corpus’s conventions. English · French · Multilingual & cross-lingual NLP

The prediction inventories cover more than sentence stops and commas. They include marks such as colons, dashes, and parentheses. The Spanish inventory also includes opening question and exclamation marks. The Czech inventory contains symbols such as + and § because the corpus categorizes them as punctuation. The shared procedure consequently works with whichever symbols the corpus assigns to the task. One language can have an action for a mark that the setup for another language never asks the classifier to predict.

The optional pretrained vectors are evaluated for English, German, and Spanish. The sources are the AFP portion of English Gigaword version 5, the German monolingual training material from the 2010 Machine Translation Workshop, and Spanish Gigaword version 3. The comparison in each of these languages adds the relevant fixed vectors to the character representations. Czech and French are evaluated with the character-based settings. Their published scores describe the contrast between the local and recurrent contexts under those settings.

How to read the scores

The test results are reported in terms of precision, recall, and F. For a given mark, precision asks what share of the system’s predictions match the reference. Recall asks what share of the marks in the reference the system recovers. Both are needed to interpret a change. Inserting commas in more positions can raise recall while reducing precision if the additional insertions include errors. A conservative system can achieve respectable precision by inserting a comma only when the evidence is strongest, even as it misses many that the reference contains.

The F score combines precision and recall using their harmonic mean, which keeps a strong result on one measure from fully compensating for a weak result on the other. The paper reports a triple of precision, recall, and F for commas, another for periods, and a micro-average for the whole punctuation inventory. A micro-average pools the decisions across mark types before measuring precision and recall. This makes a common mark more influential than a rare one because it accounts for more of the pooled instances. Evaluation & benchmarks

The authors say commas account for around 55% and periods for around 30% of the punctuation marks in the datasets. Those frequencies help explain why the paper gives them their own columns and why their behavior is central to interpreting the overall figures. The separate columns also let a reader see whether an aggregate gain comes with better predictions for both common marks or primarily for one. The pooled figures include the rest of the inventory and answer a broader question about recovering punctuation on the test sentences as a whole.

Overall punctuation improves with recurrent context

The English results show the overall comparison in a language where the paper tests both types of context, with and without pretraining. The recurrent settings give higher micro-averaged F scores than either setting with a local window. Adding pretrained vectors improves F within both context architectures. The recurrent system with pretraining gives the highest F of the English settings.

Micro-averaged punctuation F on the English held-out test set

Recurrent context yields the larger improvement, and pretraining lifts both architectures.

Micro-averaged punctuation F on the English held-out test setLookAhead: 64.40LookAhead64.40LookAhead + Pre: 64.99LookAhead + Pre64.99LSTM: 77.46LSTM77.46LSTM + Pre (this paper): 78.87LSTM + Pre (this paper)78.87
The numbers
System or settingF
LookAhead64.40
LookAhead + Pre64.99
LSTM77.46
LSTM + Pre (this paper)78.87

For the English held-out test set, the character-based baseline has micro-averaged precision of 82.72 and recall of 52.72. The corresponding recurrent setting has precision of 84.89 and recall of 71.23. The improvement is especially visible in how much reference punctuation the system recovers. With pretraining, the recurrent setting reaches recall of 74.56 and precision of 83.72. Its F score is higher even though precision is lower than in the character-only recurrent setting.

The character-only comparison favors recurrence on the other held-out sets as well. In Czech the micro-averaged F score goes from 67.95 with the local baseline to 75.18 with the recurrent architecture. In French it goes from 42.18 to 53.66. In German the corresponding F scores are 62.10 and 72.28, and in Spanish they are 45.12 and 56.06. The German recurrent result with pretrained vectors is 73.87, and the Spanish result with pretrained vectors is 57.13. The shared pattern is the direction of the comparison on each test set. Each language has its own starting point, data, and set of punctuation classes.

The overall precision and recall for French and Spanish show why their F results have a different scale from the English figures. The French recurrent system has micro-averaged precision of 65.34 and recall of 45.52. For Spanish, the recurrent system with pretrained vectors has precision of 68.09 and recall of 49.21. The systems improve the combined metric relative to their respective local baselines while leaving a substantial share of reference punctuation unrecovered in these corpora.

Comma recovery benefits from wider context

On the English held-out test set, the character-only baseline’s comma precision is 75.60, compared with recall of 38.52 and F of 51.04. The character-only recurrent setting reaches precision of 78.88, recall of 70.02, and F of 74.19. With pretraining the recurrent system reaches precision of 80.83 and recall of 74.81, for F of 77.70. The recurrent comparison therefore changes both the number of reference commas recovered and how reliably the system places its predicted commas.

The German results give another view of the same pattern. The local baseline has comma recall of 32.89, while the character-only recurrent setting reaches 65.45. Precision for those two systems is 68.87 and 73.78, respectively. The best German comma result is from the recurrent setting with pretraining, which has precision of 76.56 and recall of 69.19.

Comma F on the German held-out test set

Recurrent context improves comma recovery, and the setting with pretrained vectors gives the highest F.

Comma F on the German held-out test setLookAhead: 44.52LookAhead44.52LookAhead + Pre: 50.94LookAhead + Pre50.94LSTM: 69.37LSTM69.37LSTM + Pre (this paper): 72.69LSTM + Pre (this paper)72.69
The numbers
System or settingF
LookAhead44.52
LookAhead + Pre50.94
LSTM69.37
LSTM + Pre (this paper)72.69

For French, comma F goes from 32.02 to 51.73 when recurrent context replaces the local window. The baseline’s recall of 22.76 rises to 44.52, and precision rises from 54.00 to 61.73. For Spanish, comma F goes from 29.39 to 51.25 in the character-only comparison, with a further increase to 53.63 when pretraining is added to the recurrent system. The Spanish recurrent setting with pretraining has comma precision of 65.65 and recall of 45.33. The direction of the gain is similar to English and German, while the remaining difficulty is visible in the lower recovery of reference commas.

This result is consistent with the motivation for wider context. A potentially useful cue to a comma can lie beyond the nearest words, and the earlier punctuation in a sentence can also provide context for a later mark. The experiments compare systems that differ in several aspects of their state representation. The result identifies an advantage for the recurrent architecture as a whole, while the scores alone leave the contribution of any particular cue open.

Periods begin from a stronger baseline

Period recall is high even for the local systems in the paper. For the English held-out set, the character-based local baseline reaches recall of 97.76. Its precision is 88.51, for period F of 92.91. The equivalent recurrent setting reaches precision of 93.07, recall of 98.31, and F of 95.62. With pretraining its period precision reaches 94.44 and its F reaches 96.22, while recall is 98.06. The stronger system thus obtains a better F score with precision doing much of the work.

The French local baseline has period precision of 71.34 and recall of 94.61, giving F of 81.34. The recurrent setting improves period F to 84.86, with precision of 76.38 and recall of 95.47. On German, the character-only systems score 86.21 and 90.97 on period F for the local and recurrent architectures, respectively. Adding pretraining to the recurrent German setting yields 91.58. In these cases the period scores favor recurrence, but the recall patterns differ from the sizable increases seen for commas.

The Spanish test set also illustrates how a feature that helps pooled punctuation can have a different effect on a single mark. The character-only recurrent setting has the highest Spanish period F. The recurrent setting with pretraining has a higher overall F score across punctuation but a lower period F. The baseline’s period recall is 99.13, and its precision is 73.13. For the character-only recurrent system, recall is 98.65 and precision is 74.70. That balance gives the latter the stronger period F.

Period F on the Spanish held-out test set

The character-only recurrent setting scores highest, with the tested settings close together.

Period F on the Spanish held-out test setLookAhead: 84.17LookAhead84.17LookAhead + Pre: 84.25LookAhead + Pre84.25LSTM (this paper): 85.02LSTM (this paper)85.02LSTM + Pre: 84.69LSTM + Pre84.69
The numbers
System or settingF
LookAhead84.17
LookAhead + Pre84.25
LSTM (this paper)85.02
LSTM + Pre84.69

The inputs in these tests are already individual sentences. The system therefore has access to the end of the input sequence as a potential cue. The paper reports period scores under these conditions, where the problem is choosing a mark in a sentence whose span is available. A period prediction in that setting is different from finding where a sentence ends in a continuous stream of words. The period results are best understood alongside the evaluation’s sentence-level inputs.

What the ablations show

The context comparison changes more than window length

The main controlled comparison keeps the punctuation task, action vocabulary, and character-derived word representations in place while swapping the state representation. The look-ahead system sees the nearest input and output embeddings through their average. The recurrent architecture separately encodes the remaining input, the growing output, and the action history. Across the held-out sets, the resulting gains in punctuation F support the authors’ choice of a richer state. The result is particularly informative because the baseline already sees evidence on both sides of the position and has access to the same kinds of word representations.

Several design changes occur together. The recurrent setting can use information from farther away, retains sequence order in its encoders, and receives an explicit history of actions. It also keeps the representations of the input and output separate before constructing the combined state. The experiments test the bundle. They do not contain a setting in which a recurrent architecture loses only the action-history encoder or keeps its encoders while seeing a shorter input sequence. The advantage can therefore be attributed to the architecture in the tested comparison, with the value of separate channels left undetermined.

The changes in precision and recall offer some evidence about how the advantage appears in predictions. In a language such as English, the character-only recurrent system’s improvement in micro-averaged recall accompanies an improvement in precision. A larger share of all reference marks is recovered without giving up reliability among the marks predicted. The English comma comparison displays that same pattern. In Czech, the overall result also comes with higher precision and recall in the character-only recurrent setting. These are stronger aggregate improvements than a gain achieved solely by predicting marks more often at the expense of precision.

The paper’s explanation appeals to linguistic cues that are easier to preserve in a richer sequence representation. That is compatible with the comparison, especially for commas, but there is no analysis tracing a score to a particular word, construction, or past action. For instance, a gain might come from evidence far from the insertion point, or from representing the order of close words more effectively than an average does. The scores measure the net effect on punctuation decisions. They do not allocate the gain among those mechanisms.

Pretraining tests what a second source of word information adds

The optional vectors give a more focused comparison. In the English, German, and Spanish experiments, the authors compare each context architecture with and without fixed word vectors while retaining the character encoder. For micro-averaged F, pretraining helps the local and recurrent settings in all three languages. The German look-ahead setting, for instance, reaches 63.65 with pretraining and 62.10 without it. Spanish micro-averaged F for the look-ahead setting is 48.36 with pretraining and 45.12 without it. The corresponding recurrent comparisons also favor pretraining on the pooled metric.

The character-only recurrent configurations outperform the local configurations with pretrained vectors on the overall metric in all three of those languages. This makes the ordering of the tested changes clear. Adding information to the word representation helps the local system. Giving the classifier a recurrent state provides a greater gain in these tests, even when the recurrent system has only the character-derived word representations. Using both gives the best overall result for each of the three languages in which both are tested.

At the level of individual marks, the benefit is conditional. English period F in the local setting goes from 92.91 without pretraining to 92.29 with it, while the recurrent setting improves when the vectors are added. In Spanish, the local period F improves with pretraining while the recurrent period F declines. German local period F is 86.21 without pretraining and 86.20 with it. The result depends on the architecture and the type of punctuation being predicted. The consistent improvements reported for pooled F should be read at that level.

The comparison also has a clear boundary around what it says about character representations. Because the systems without pretraining perform the task using characters, they establish that character-derived word vectors are sufficient to support the measured scores. Every pretrained setting also retains the character encoder. The paper does not test a whole-word-only setting that would let a reader measure the separate advantage of constructing the word representation from spelling. The evidence supports a benefit from supplementing characters with fixed whole-word information in the pooled comparisons.

Corpus differences are an explanation the authors consider

The authors examine whether sentence length and training set size might help explain why the results are lower for Spanish and French. The mean sentence lengths for the Spanish and French datasets are 29.8 and 27.0, respectively. The corresponding means are 18.0 in German, 16.8 in Czech, and 24.0 in English. The Spanish and French training sets are also smaller, according to the paper. These observations make two possible sources of difficulty concrete. A longer sentence can place relevant cues farther apart, and less training material can give the system fewer examples from which to learn reliable punctuation patterns.

These observations compare corpora that differ together in sentence length, training size, and punctuation inventory. The paper gives no matched-length comparison or experiment that varies training set size in isolation. It also reports no per-length breakdown that would show how any given system’s performance varies with sentence length inside a corpus. The length and size figures therefore motivate hypotheses about the outcome. The controlled comparison is the change in context architecture within a dataset, where the sentences and the evaluation inventory are held fixed.

The distinction also applies to the authors’ discussion of punctuation conventions. The recurrent architecture improves pooled scores in corpora described as differently oriented towards prosody and syntax. This establishes that the architectural comparison favors recurrence under both sorts of conventions in the selected data. It does not give a direct measure of the balance between syntactic and rhetorical cues. The system’s training targets specify which marks occurred, without telling it which linguistic function explains any given occurrence.

Limitations

Limits identified by the authors

The authors caution against using the test scores to rank the languages by difficulty. The test sets contain different material, the sentence lengths and amounts of training data differ, and the task inventories depend on what each corpus treats as punctuation. Even if the same metric and architecture are used, the pooled result weights the particular marks and contexts found in that corpus. A language-by-language comparison of the baseline and recurrent architecture is informative because each pair attempts the same test. Comparing the size of the scores across corpora introduces the differences in the tests themselves.

The authors make a separate point about comparisons with the Estonian work by Tilk and Alumäe. That work concerns period and comma restoration in speech transcripts and has access to pause information. The current paper concerns restoration in written sentences across a wider range of marks. Differences in domain, inputs, and target inventories make the scores answers to different experimental questions. The fact that both studies use recurrent networks explains the methodological comparison, while their reported performance belongs to each task’s own setup.

The paper uses greedy inference and notes that beam search could be explored. A beam would keep several partially built outputs alive while extending them, so a locally less probable action could remain available if it produced a better continuation. The reported results use immediate commitments. There is no comparison showing how often a wider search would recover from an early punctuation choice, how much it would help, or what it would cost on these datasets. The paper describes its proposed procedure as operating in linear time. Its evaluation focuses on punctuation scores and supplies no running-time measurements alongside the claim.

The authors describe speech recognition and correction of grammatical errors as possible applications. They also propose exploring multilingual word embeddings as a basis for cross-lingual training. The experiments in the paper train and test on the individual language datasets. The reuse of the architecture across them demonstrates portability of the procedure when training material is available for each setting. It leaves the performance of a shared training setup or transfer to another language as a separate question. Grammatical error correction & learner language · Massively Multilingual Word Embeddings

Limits apparent from the evaluation

The reference punctuation comes from text in the corpora. That gives the study a reproducible target, but it makes the score a measure of recovering the recorded punctuation. Some strings of words can admit different punctuation choices, for example when a mark signals phrasing or emphasis. The reported evaluation does not assess whether a different choice would also be acceptable to a reader. A held-out corpus is a natural test of how well the system learns the conventions represented in its training material. Readability under alternative punctuation would need different evidence.

The tested input also gives the procedure the words of a sentence in their existing order, with the full sentence available before any shifts take place. This is a good fit for the intended use after surface realization. For a continuous transcript, the sentence boundaries would have to be supplied or recovered, and the words could include recognition errors or hesitations. For a sentence generator, a separate end-to-end test would show how punctuation behaves on the generator’s actual outputs. The paper’s results establish recovery from corpus word sequences. They provide no direct measurement of either of those additional conditions.

The label inventory covers a broad set of symbols, yet the published performance breakdown focuses on commas and periods. The pooled score gives each mark influence in proportion to how often its instances enter the pooled totals. As a consequence, a high micro-average can coexist with poor recovery of some rare symbols. The paper gives no separate figures for parentheses, opening question marks, or other individual marks beyond the two common categories. A reader can confirm that such marks were in the prediction vocabulary where listed and that they contribute to the overall metric. The reported results leave their individual performance open.

Paired marks illustrate a related limitation. The transition system can choose individual opening and closing symbols from the inventory, and the recurrent state can carry evidence about a symbol already written. The paper describes no explicit pairing requirement and reports no metric for whether the two parts of a pair are recovered together. Recovering a mark at a reference position and producing a well-formed pair across a longer span are related outcomes. A pooled symbol score gives limited information about the second.

The basic architecture avoids hand-supplied syntax and acoustics, but the experiments do not identify which forms of linguistic knowledge it has acquired internally. The association between spelling and morphology motivates the character encoder. The association between punctuation and structure motivates using more context. Neither is tested through a diagnostic of the learned representations. The results support the claim that the available signals help recover marks. Stronger claims about which constructions the system recognizes, or which signals it uses in individual decisions, would need targeted comparisons.

Finally, the comparisons are reported as test-set scores without uncertainty estimates. The larger recurrent gains recur across datasets under the specified comparisons. Some differences between pretraining settings for periods are much smaller, and the paper does not quantify how sensitive they are to the training run or sample of test sentences. The appropriate reading of those close results is the ordering achieved by the reported configurations on their held-out sets. They do not establish that the same ordering will recur in another sample.

What came after

The later citing work is DyNet: The Dynamic Neural Network Toolkit. Its subject is a toolkit for dynamic neural networks. The citation connects the punctuation study with work on the software used to express neural architectures. The punctuation task itself makes clear why such a connection is relevant. Each sentence gives rise to a sequence of decisions, and the state updates as words are moved and marks are inserted. The input shrinks while the output and action history grow, with the next computation depending on what has already happened.

The citation establishes that the toolkit paper refers to this work. It gives no basis here for attributing a punctuation experiment, a change to the transition procedure, or improved punctuation scores to DyNet. In the punctuation paper, transfer across languages, wider search, and applications to speech recognition and error correction remain proposed directions. The demonstrated result is the within-corpus advantage of recurrent context for recovering punctuation from already ordered word forms.

Cite

Cite as Miguel Ballesteros and Leo Wanner. 2016. A Neural Network Architecture for Multilingual Punctuation Generation. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/d16-1111

@inproceedings{ballesteros2016neural,
  title = {{A Neural Network Architecture for Multilingual Punctuation Generation}},
  author = {Miguel Ballesteros and Leo Wanner},
  booktitle = {Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  doi = {10.18653/v1/d16-1111},
  url = {https://doi.org/10.18653/v1/d16-1111}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/ballesteros-2016-neural-network-architecture-multilingual-punctuation/