SpanAlign: Sentence Alignment Method based on Cross-Language Span Prediction and ILP
Paper · 2020 · Katsuki Chousa, Masaaki Nagata and Masaaki Nishino
Summary
Two newspaper articles can tell the same story in different languages without giving each sentence an obvious partner. An editor may move a passage, divide a long sentence into shorter ones, or leave out an explanation that readers of the other edition already know. To turn these articles into training material for machine translation, a system has to find which pieces convey the same content and identify which ones have no equivalent. SpanAlign tackles both decisions for English and Japanese newspaper articles.
The authors approach the search as a form of question answering. They use a sentence or a group of adjacent sentences from one article as a query and look for its translation inside the other article. A multilingual text encoder reads the query together with the passage it is searching, allowing individual words and parts of words on either side to influence the predicted start and end of a match. It can also predict that the other article contains no answer. The authors train this predictor on sentence matches produced automatically by an existing alignment method.
These local predictions can disagree. A search beginning with an English sentence may favor a Japanese passage that also looks like the translation of another English sentence. Searching from Japanese into English may suggest a different pairing. SpanAlign uses integer linear programming to choose among the candidates for the whole document pair. Each sentence is assigned to a bilingual match or marked as having no counterpart. The chosen matches can cross when displayed between the articles, so a passage can have a valid partner even if an editor moved it.
On the manually aligned English–Japanese newspaper test set, the bidirectional version with integer linear programming achieved 70.3 F1, 8.0 points above Vecalign. Its gains were especially large for identifying unmatched English sentences, where it scored 80.0 F1 against Vecalign’s 26.1. The authors also used the extracted pairs to adapt an existing Japanese-to-English translator. On the newspaper translation test, the SpanAlign data yielded 18.3 BLEU, 4.1 points above the next best extraction method. The results measure both the accuracy of the sentence links and the value of the material gathered through them.
Deep dive: SpanAlign: Sentence Alignment Method based on Cross-Language Span Prediction and ILP
SpanAlign finds translated passages in noisy bilingual documents, then selects sentence matches that can coexist even when their order changes. · about 34 minutes to read
The problem and its context
When articles are parallel but their sentences are not
Sentence alignment starts with documents that are already associated across languages. The task is to identify smaller passages within them that can be treated as translations of each other. For training a translator, the distinction between document and sentence correspondence matters. Two articles about the same story may share enough content to make a plausible document pair while still containing passages that differ substantially. Using the document pairing alone would give the translator examples in which part of the source text has no equivalent on the other side.
Even when the content corresponds, the sentence breaks can differ. A single sentence may become several sentences, or consecutive sentences may be combined during translation. An alignment unit therefore has to be able to include stretches of adjacent sentences on either side. At the same time, the aim is to find reasonably small parallel units. Joining entire sections can conceal accurate smaller links and keep additional material that would have been easier to identify as unmatched on its own. The reader who can see both articles may be able to tell where such units begin and end. A sentence aligner has to infer those boundaries from the text.
Sentence alignment also has to account for passages that were added or omitted. In a clean exercise where each sentence has a corresponding translation, finding the best remaining match is a reasonable way to proceed. In a noisy newspaper pair, even the most plausible candidate may be unsuitable. Leaving a sentence unpaired is a meaningful outcome because it affects what enters the training corpus. The paper cites earlier work on how noise in bilingual training material affects translation, motivating an evaluation of the extracted data as well as the accuracy of the links themselves. On the Impact of Various Types of Noise on Neural Machine Translation
A separate issue is whether links preserve the order of the documents. An alignment is monotonic when moving forward through one text also moves forward through the corresponding parts of the other. An omission can still fit that rule: the aligner can pass over a sentence and then continue in order. Moving a passage creates a different problem. If a passage near the start of one article is moved past another passage in the translation, the links for both passages cannot be included in an order-preserving alignment. The authors cite legislation as an earlier example of material with links that break this ordering assumption.
How earlier aligners found their matches
The paper describes earlier methods as combining a score for each possible match with a procedure for choosing a compatible set of matches. Sentence length supplied one kind of evidence. A length-based aligner looks for plausible correspondences between the amounts of text on the two sides. Other methods drew evidence from bilingual dictionaries or used a translation system to help compare passages. In the more recent approach used by Vecalign, each candidate passage is encoded as a sentence embedding, a vector intended to represent the text. The aligner can compare the vectors of passages in different languages. A Program for Aligning Sentences in Bilingual Corpora
Vecalign uses multilingual sentence representations and a recursive approximation to dynamic programming. In the earlier experiments discussed by the authors, it performed strongly on a German–French test and also worked on language pairs with less available data in a Bible dataset. The paper points to its use in building ParaCrawl as an example of alignment within a larger corpus collection effort. English and Japanese offered the authors a setting in which to test how well such a method traveled beyond the European languages emphasized in previous sentence alignment work. Vecalign · ParaCrawl
The dictionary-based method of Utiyama and Isahara was particularly relevant because it had been used to construct publicly available English–Japanese corpora, including datasets for NTCIR Patent Translation and the Workshop on Asian Translation. Its first job is to find counterpart documents. It uses a bilingual dictionary to represent a source document with words from the target language, then performs a BM25 retrieval search with the target document as the query. The second job is to align sentences in the resulting document pairs. Its sentence score, SIM, reflects the relative frequency of dictionary-based correspondences between words in the two passages.
That method also uses sentence evidence to reconsider the strength of a document pairing. It averages the SIM scores of the aligned sentences to obtain AVSIM and uses the product of AVSIM and a pair’s SIM to assess that sentence pair. A locally plausible sentence pair can thus receive less support if the rest of its document pair aligns poorly. This use of context operates through a document-level score. The text comparison that produces SIM still relies on the word correspondences supplied by the dictionary. The approach embodies a useful distinction for reading SpanAlign: context can affect confidence in an alignment at several different points in the process.
Two choices SpanAlign revisits
The first choice concerns when the two texts meet. In the sentence-embedding approach described by the paper, each passage becomes a vector before the aligner compares it with a passage in the other language. The vector for the source sentence is available for reuse across candidate comparisons. SpanAlign instead presents the query and the text to be searched as a joint input. The resulting representation of a token can depend on the text across the language boundary and on the material around the potential match. The authors frame this as an interaction-based approach, drawing an analogy to the distinction between representation-based and interaction-based systems in information retrieval.
The second choice concerns how local scores become a document alignment. Dynamic programming is commonly used in the earlier methods described by the authors. In the monotonic alignment setup, the aligner can work through successive prefixes of the documents. A proposed match extends an alignment that has already accounted for the text before it. The order constraint helps structure the search, but it also prevents the resulting links from crossing. The paper draws on earlier work in phrase and sequence alignment that used integer linear programming to select compatible links without relying on that order. In SpanAlign, the scoring procedure proposes passages, while the optimization procedure decides which ones can be selected together. This makes it possible to test the two choices separately to a degree, by running SpanAlign’s scoring with either monotonic dynamic programming or integer linear programming.
The method, step by step
Turning a sentence into a question about another article
In an extractive reading task, a question comes with a passage and the answer is a continuous piece of that passage. The paper illustrates this with a question about what makes precipitation fall. The passage itself contains the answer, so the prediction can be expressed by pointing to its location. SpanAlign uses the same form for bilingual search. The equivalent of the question is a sentence or group of consecutive sentences from one article. The equivalent of the answer is the stretch of the other article that translates it. The paper relates this setup to the reading-comprehension task associated with SQuAD.
The bilingual example concerns a Japanese passage about individuals. Several nearby English sentences mention people or address the reader, so the task is to identify which stretch conveys the same statement as the Japanese query. The prediction points to the English sentence affirming the importance of individuals. The answer is located in a slightly larger passage, which allows the scorer to see the surrounding text while choosing the boundaries. SpanAlign works with wording that appears in the article and returns its position. A translation written independently of the article would be a different kind of output and could not serve directly as a sentence alignment.
Providing several consecutive sentences as a query lets the same procedure handle grouped correspondences. Suppose an idea expressed in a short sequence in one language is conveyed by a single long sentence in the other. The aligner can ask about the consecutive source sentences together and predict the single sentence as the answer. When the direction is reversed, it can begin with the single sentence and recover a stretch containing several sentences. Candidate grouping matters because the best match for a whole thought may be easier to score than separate matches for parts of it.
How SpanAlign builds a document alignment
The steps in order.
Predicting start and end positions
For scoring, the paper describes the source document as a sequence of tokens called F, with length N, and the target document as a sequence called E, with length M. A token is a unit of the encoder’s input and can represent part of a word. The paper writes fᵢ for the token at position i in F and eₖ for the token at position k in E. The query Q is a consecutive interval in F, beginning at i and ending at j. Its candidate answer R begins at k and ends at l in E. A query is assembled from complete source sentences, while the start and end of the predicted answer are initially available at token resolution.
The authors specialize XLM-RoBERTa for this task by adding separate outputs for the start and end of the answer. It is a multilingual text encoder in the BERT family. The input starts with the classification marker [CLS], followed by the query, a separator [SEP], the target text, and a final [SEP]. Both pieces of text go through the encoder together. Cross-attention in this joint input allows a source token and a target token to affect one another’s representations. The boundary decisions can therefore use how particular parts of the query relate to particular parts of the article. The paper uses the base configuration of XLM-RoBERTa and draws on the input convention of BERT.
The start output estimates a probability for each possible start position. The end output does the same for end positions. For a given candidate, the paper multiplies the two probabilities and then applies a softmax to the highest-scoring candidates.
ωᵢⱼₖₗ = softmax(p₁(k | E, Q) · p₂(l | E, Q))
Here ωᵢⱼₖₗ is the score of pairing the query interval i through j with the target interval k through l. The terms p₁ and p₂ give the probabilities for a start at k and an end at l. The vertical bar means that each probability is conditioned on E, the target text, and Q, the query. The dot means multiplication. The softmax rescales the products in the 10-best list for that query, and ωᵢⱼₖₗ is the resulting entry for the specified span. The authors apply this step because the products tend to be small. This gives a score relative to the alternatives under consideration for the query.
The highest-scoring answer must also be a valid interval. Its start has to lie at or before its end, and both positions must lie in the target text. The paper expresses the selection as follows.
(k̂, l̂) = arg max_{(k,l): 1 ≤ k ≤ l ≤ M} ωᵢⱼₖₗ
The hats mark the chosen start k̂ and end l̂. The expression arg max returns the pair of positions at which the candidate score ωᵢⱼₖₗ is greatest, with i and j fixed by the query. The condition following the colon gives the permitted values of k and l. Here 1 is the first position and M is the length of E. This formula identifies the local winner for a query. The later optimization still has to determine whether that winner can coexist with the other choices.
The scoring procedure also needs a way to register the absence of a translation. For a query spanning i through j, the authors derive a non-parallel score φᵢⱼ from the predictions at [CLS]. A score there represents the no-answer option. If the non-parallel score exceeds the scores of the proposed text spans, the local decision is that the query lacks a translation in the target text. This gives the system a reason of its own to leave a passage unmatched. It can make that judgment independently of whether an otherwise plausible target passage has already been assigned to another source passage.
Converting token predictions into sentence candidates
The highest-scoring token span can start partway through a sentence or end before a sentence is finished. The proposed aligner begins with sentence-segmented documents and evaluates its output at sentence level, so it has to reconcile these units. Its rule is to keep the longest consecutive sequence of complete sentences enclosed by the predicted token span. A partly covered sentence at an edge does not enter that sequence. This makes the output directly usable in the sentence optimization, while leaving an important distinction between where the scorer found supporting text and what the aligner finally returns.
The query side also requires a selection of boundaries. The authors allow groups of adjacent sentences up to the stated limit of 4 and search for a match for each query group considered. A single sentence and a longer group containing it may both produce plausible predictions. The decision to use the longer group has consequences for nearby sentences, so the span scorer cannot settle the grouping based only on each prediction’s isolated score. The candidates passed onward give the document optimizer a choice among competing uses of the same source material.
Candidate pruning keeps that optimization tractable. The authors distinguish the 10-best scores used in normalization from the span hypotheses retained to build the alignment. For the optimization, they keep the 1-best span for each input query in a given direction. In preliminary experiments, passing additional hypotheses for a query did not improve accuracy. The authors suggest that other entries could add noise to the optimization. Pruning also has a direct consequence for what the optimizer can achieve. If a plausible answer survives neither search direction, the final selection has no variable with which to choose it.
Letting the second search change the choice
A span prediction gives a score to a specific answer under a specific query. Swapping the languages changes the query and the passage in which the answer must be found. For example, an English query might retrieve a particular Japanese span, while a search beginning with that Japanese span might favor a longer stretch of English. The encoder parameters are shared across directions, so this asymmetry comes from the different inputs and roles that the passages take on. The two searches offer complementary evidence even though they use the same learned parameters.
The paper denotes the source-to-target score by ωᵢⱼₖₗ and the reverse score for the same pairing by ω′ᵢⱼₖₗ. It blends them as follows.
Ωᵢⱼₖₗ = λωᵢⱼₖₗ + (1 − λ)ω′ᵢⱼₖₗ
The left side, Ωᵢⱼₖₗ, is the combined score for source interval i through j and target interval k through l. The weight λ controls the contribution of the forward score ωᵢⱼₖₗ, and its complement, 1 − λ, controls the reverse score ω′ᵢⱼₖₗ. Addition combines the weighted scores. The setting λ = 1 uses the forward score, λ = 0 uses the reverse score, and λ = 0.5 gives equal weight to the two. The paper compares these directional choices in the sentence alignment experiment.
A high combined score should make a candidate attractive, but the authors observed that using the span scores directly tended to favor larger sentence groups. They wanted the final alignment to favor small units when the documents could be aligned in that way. They therefore turn the score into a cost and multiply by a factor based on how many sentences the candidate uses.
cᵢⱼₖₗ = ((nSents(i, j) + nSents(k, l)) / 2) · (1 − Ωᵢⱼₖₗ)
The quantity cᵢⱼₖₗ is the cost of selecting the bilingual candidate. The function nSents counts the sentences in an interval. Adding the counts for the two sides and dividing by 2 yields the mean sentence count of the candidate. The term 1 − Ωᵢⱼₖₗ makes higher-scoring candidates less costly, and the multiplication makes the length of the candidate matter for a given score. In this part of the method, the paper uses i, j, k, and l for the boundaries of sentence intervals, following the conversion from token spans.
nSents(i, j) = j − i + 1
Here nSents(i, j) is the count of complete sentences in the source interval. The symbols i and j are the first and last sentence indices. The addition of 1 includes both endpoints in the count, and the same convention applies to the target interval k through l. The cost still permits a grouped match. Whether the grouping is worthwhile depends on its price and on the costs of the alternatives needed to cover those sentences.
Choosing an alignment for both documents
The integer linear program uses binary decisions, meaning that each candidate is either selected or left out. A proposed bilingual match is a choice to cover an interval in each article at the same time. An unmatched candidate is a choice to cover an interval in just one article. This second kind of choice is needed because a valid alignment has to account for every sentence even when some sentences have no translation. In the paper’s notation, aᵢⱼₖₗ names the bilingual candidate connecting i through j to k through l.
yᵢⱼₖₗ, bᵢⱼ, b′ₖₗ ∈ {0, 1}
The variable yᵢⱼₖₗ indicates whether the solution selects aᵢⱼₖₗ. The variable bᵢⱼ indicates whether the source interval i through j is selected as unmatched, and b′ₖₗ does the same for the target interval k through l. The symbol ∈ means that the variables take values from the displayed set. A value of 1 means the choice is made, and 0 leaves it out. Primes distinguish the reverse direction or target-side quantities where the paper uses them.
The solver looks for the selection with the lowest total cost.
minimize Σᵢⱼₖₗ cᵢⱼₖₗ yᵢⱼₖₗ + Σᵢⱼ φᵢⱼ bᵢⱼ + Σₖₗ φ′ₖₗ b′ₖₗ
Each Σ sums over the candidates with the indicated indices. The first term sums the costs cᵢⱼₖₗ of bilingual candidates selected by yᵢⱼₖₗ. The second uses φᵢⱼ as the paper’s coefficient for declaring source interval i through j unmatched. The third uses φ′ₖₗ for the analogous choice on the target side. The binary variables cause each term to contribute its coefficient only if the corresponding choice is made. The paper also uses φ to denote the local non-parallel score derived from [CLS]. It spells out the score-to-cost transformation for bilingual candidates more explicitly than the convention relating that local no-answer score to the unmatched coefficient in the objective.
The constraints ensure that a low-cost solution gives a complete account of the sentences. For each source sentence, the solver counts the selected unmatched intervals containing it and the selected bilingual pairs whose source interval contains it. The total must equal 1.
Σ_{i≤x≤j} (bᵢⱼ + Σₖₗ yᵢⱼₖₗ) = 1, for every x with 1 ≤ x ≤ N
Here x is the source sentence being checked. The outer sum runs through source intervals with endpoints i and j that contain x. The inner sum runs through the target intervals with endpoints k and l paired with that source interval. The term bᵢⱼ counts a choice to mark the source interval unmatched, while yᵢⱼₖₗ counts a chosen bilingual match. The paper reuses N from its span notation as the upper bound on the source index. At this optimization stage the covered units are sentences. The equality makes an uncovered sentence and a sentence claimed by multiple choices equally inadmissible.
The target side receives its own constraint.
Σ_{k≤x≤l} (b′ₖₗ + Σᵢⱼ yᵢⱼₖₗ) = 1, for every x with 1 ≤ x ≤ M
In this expression x is the target sentence, and the outer sum runs through target intervals k through l that contain it. The inner sum runs through source intervals i through j that can form a candidate with the target interval. The term b′ₖₗ counts a choice to mark that target interval unmatched. The term yᵢⱼₖₗ again represents the same bilingual candidate, so selecting it consumes space on both sides. The upper bound M now applies to target sentence positions. The equality gives each target sentence exactly one assignment, whether bilingual or unmatched.
Taken together, these constraints stop two candidates from claiming the same sentence. They allow links whose order differs across the documents because they impose no ordering between separate, non-overlapping matches. If two passages exchange places between the editions and the span scorer finds both, the solver can select both links. If two queries want the same target sentence, the solver has to consider how selecting each link affects all the other sentences involved. The optimum is the lowest-cost feasible combination of the candidates supplied to the solver. A reference alignment can still differ from it if the scores favor the wrong candidates or a correct candidate was omitted.
Training the predictor and searching long articles
The assignments used to train span prediction are pseudo-labels, meaning that the answer locations come from another alignment procedure. The authors use their implementation of Utiyama and Isahara to gather these labels for the newspaper articles. This makes large-scale training possible without having to mark the corresponding passages individually. Human alignments are used in development and testing. The distinction is important because those reference links give the authors a way to evaluate SpanAlign even when it makes a different choice from the method that supplied the training examples.
The span predictor uses the XLM-RoBERTa base setting with 12 layers, a hidden representation size of 768, and 12 attention heads. The authors implemented it using Transformers and used ILOG CPLEX 12.8.0.0 to solve the integer programs. For training, they report a learning rate of 3e−5, a batch size of 20, and 5 epochs. The batch size gives the amount of data processed together, and an epoch is a pass through the training data. They select the parameters giving the highest F1 on the development set and share the same predictor for the two directions.
An article may contain more text than the encoder can read in one input. The total input limit is 384 tokens, and the query is limited to 158 tokens. The space available for the target window comes from the total after taking out the query and the three special markers in the input. The window moves through the target document with a stride of 64 tokens, so the search can continue beyond the first portion of the article. This preserves the query while changing the stretch of article available for comparison. The encoder’s view of the target context comes from the window for the current input. The authors identify the SpanAlign project as the outlet for their implementation and datasets.
Experiments and results
The newspaper alignment benchmark
The authors use Japanese articles from Yomiuri Shimbun and English articles from its English edition, The Japan News, formerly the Daily Yomiuri. The automatically aligned training collection begins with material published in 2012. The authors report 317,491 Japanese articles and 3,878 English articles in that source collection and 2,989 bilingual documents obtained through automatic document pairing. They then use their implementation of Utiyama and Isahara to extract training links from those document pairs. The test of sentence alignment therefore concerns an aligner trained on imperfect links from material of the same general kind as the evaluation articles.
To construct a reference collection, the authors manually searched for Japanese counterparts to 182 English documents from 2013/02/01–2013/02/07 and 2013/08/01–2013/08/07. This produced 157 bilingual document pairs, comprising 131 articles and 26 editorials. The authors manually aligned sentences in these pairs and obtained 2,243 many-to-many alignments across that full collection. They used 15 articles for development, the next 15 for testing, and reserved the other articles and the editorials. The full collection counts describe the scope of annotation. The headline test score is measured on the articles selected for the test split.
The paper reports the average English training document at 19.7 sentences and the average Japanese training document at 23.9 sentences. In development the corresponding averages are 17.9 for English and 18.9 for Japanese. On the test split they are 23.8 and 26.2. After XLM-RoBERTa tokenization, the test-set sentences average 31.5 tokens in English and 28.0 in Japanese. These statistics put the windowing decisions in context. The alignment covers documents containing many sentences even though the text encoder must examine the materials in smaller pieces.
The authors compare SpanAlign with Vecalign, which uses LASER multilingual sentence representations, and with their implementation of Utiyama and Isahara. For Vecalign, they use the implementation from its authors, with a maximum alignment size of 8 and a maximum of 10 allowed overlaps in its configuration. LASER had been pretrained on 93 languages. The dictionary baseline splits sentences using punctuation and additional rules, then uses MeCab-UniDic for Japanese and TreeTagger for English. The dictionaries used in that implementation contain 483,317 entries for Japanese-to-English lookup and 367,347 for English-to-Japanese lookup. LASER multilingual sentence embeddings
The SpanAlign configurations vary the search direction and the method for assembling the document alignment. The authors run forward scoring from English to Japanese, reverse scoring from Japanese to English, and a combination of the two. They test these directions with monotonic dynamic programming and with integer linear programming. This comparison matters because the end-to-end system changes both the way bilingual similarity is scored and the way overlapping links are resolved. Including the dynamic programming versions shows how part of the system behaves with the order restriction in place.
Overall alignment accuracy
The main metric is strict sentence alignment F1, computed from the predicted and reference alignment pairs using Vecalign’s scoring script. Precision measures how much of the predicted alignment agrees with the reference, and recall measures how much of the reference the system recovers. F1 combines the two. Under strict scoring, choosing the right general location can still miss the reference if the proposed link has the wrong set of sentences. A grouping decision therefore affects the score even where the system has detected some of the right bilingual content.
Strict sentence alignment F1 on the English–Japanese newspaper test set
Bidirectional SpanAlign with integer linear programming gives the highest overall F1.
The numbers
| System or setting | F1 |
|---|---|
| Vecalign | .623 |
| Utiyama and Isahara | .604 |
| SpanAlign DP, English to Japanese | .599 |
| SpanAlign DP, Japanese to English | .603 |
| SpanAlign DP, bidirectional | .644 |
| SpanAlign ILP, English to Japanese | .638 |
| SpanAlign ILP, Japanese to English | .661 |
| SpanAlign ILP, bidirectional (this paper) | .703 |
The bidirectional integer program is the best configuration on this test, at 70.3 F1 in the paper’s prose. The authors report a gain of 8.0 points over Vecalign and 9.9 points over Utiyama and Isahara. The best configuration records .734 precision and .675 recall, compared with .591 precision and .658 recall for Vecalign. Thus its higher F1 accompanies gains in both components, with the larger change visible in precision. The dictionary baseline has .604 precision and .603 recall. Its test results also provide a direct comparison to the method used to produce the pseudo-labels.
The distinction among the SpanAlign variants is important. Bidirectional scoring with the monotonic decoder reaches .682 precision and .611 recall, yielding an F1 above both external baselines. The English-to-Japanese and Japanese-to-English variants with that decoder fall below Vecalign on F1. The results support the complete bidirectional configuration and also show that the choice of scoring direction and decoder affects the benefit. The stronger pipeline combines several decisions that the simpler variants do not make together.
Finding sentences without a translation
The authors report separate precision, recall and F1 by the numbers of English and Japanese sentences in a link. This breakdown gives unmatched sentences an explicit place in the evaluation. An English sentence with no Japanese counterpart is counted in a different category from a Japanese sentence with no English counterpart. The headline alignment F1 does not directly report either outcome. The grouping analysis also shows how performance changes when the answer consists of several sentences or when the two editions divide an explanation differently.
F1 for unmatched English sentences on the English–Japanese newspaper test set
Both bidirectional SpanAlign variants recover more of the unmatched English sentences while retaining high precision.
The numbers
| System or setting | F1 |
|---|---|
| Vecalign | .261 |
| Utiyama and Isahara | .182 |
| SpanAlign DP, bidirectional | .789 |
| SpanAlign ILP, bidirectional (this paper) | .800 |
For unmatched English sentences, Vecalign’s precision is 1.00 and its recall is .150. The Utiyama and Isahara baseline also has 1.00 precision, with .100 recall. The scarce recovery visible in those recall values explains why their F1 scores are low despite the precision reported for the cases they identify. Bidirectional SpanAlign with dynamic programming reaches .833 precision and .750 recall. The integer program version reaches .933 precision and .700 recall, producing the higher F1 of the two. The comparison shows how different assignments can improve the final balance even when one configuration finds a smaller share of the omissions.
For unmatched Japanese sentences, Vecalign records .967 precision and .674 recall for .795 F1. Utiyama and Isahara obtains .938 F1. Both bidirectional SpanAlign variants obtain .951, each with 1.00 precision and .907 recall. In the paper’s prose, the best configuration’s omission scores are 80.0 F1 for English and 95.1 for Japanese, against 26.1 and 79.5 for Vecalign. The much larger shift for English reflects a lower baseline on the unmatched English category. For Japanese, the dictionary baseline already finds a substantial share of the cases at high precision.
The size-based breakdown also includes bilingual matches. The authors report that the proposed approach improves on the earlier systems across the sentence-count categories and that the integer program has the highest F1 except for the 1-to-2 category. A category with a lower score for the integer program can coexist with a better document-level result because the optimization has to choose consistent groups across the whole article. The reported category scores describe the assignments the systems actually returned, so they combine boundary detection, candidate choice, and the competition to cover sentences across the document.
Testing the extracted pairs as translation data
A second experiment asks whether the sentence links yield better examples for a translator. It uses a larger newspaper collection from the same publications. The training articles range from 1989 to 2015 and exclude articles used in the manually aligned collection. The authors form 110,821 bilingual documents with the automatic procedure of Utiyama and Isahara. They then compare the three sentence extraction methods on this material. For SpanAlign they use the bidirectional integer program, which had performed best in the alignment comparison.
The evaluation uses parallel sentences from the manually aligned collection. The 15 development articles supply 162 translation pairs, and the next 15 test articles supply 238. This evaluation counts pairs used for Japanese-to-English translation and gives a different view of the articles from the alignment F1 calculation. Alignment F1 evaluates which sentences should be associated or left unmatched. Translation evaluation checks the English output produced from Japanese input after training on the extracted material.
For each extraction method the authors randomly sample 300,000 pairs. They first train a translator using only the extracted pairs. This condition measures how useful the sample is as the training corpus itself. They also adapt a pretrained translator with the extracted pairs. This second condition measures the value of the sample as further newspaper training for a system that already has bilingual experience. The equal sample size gives each method the same number of training pairs in the main comparison, while the content and quality of those pairs can differ.
The authors use SentencePiece to segment words into sub-word units, using a vocabulary of 16,000 shared across Japanese and English. For the runs trained on the extracted data alone, they implement a Transformer using fairseq. The reported configuration uses an embedding dimension of 512, a feed-forward dimension of 1,024, and 4 attention heads. The encoder and decoder each use 6 layers. On the decoder side, the input representations and output scoring share an embedding matrix.
The runs using extracted data alone use Adam with a learning-rate parameter of 5e−4 and averaging coefficients of 0.9 and 0.98. The learning-rate schedule uses a linear warmup of 4,000 steps and then an inverse-square-root schedule. The dropout rate is 0.3. Each mini-batch has 4,096 tokens, and gradients from 8 mini-batches are accumulated for an update. These settings describe the experiment in which the extracted pairs carry the full burden of training. For the adaptation experiment, the authors instead follow the settings and preprocessing supplied with the pretrained JParaCrawl translator, which had been trained on 8,763,995 parallel sentences.
They measure translation with BLEU as computed by sacre-BLEU. BLEU evaluates aspects of the overlap between generated translations and the reference translations. It therefore answers a different question from the exact sentence-link comparison. Here the evaluated outputs are generated by the translators, while the extraction methods differ in the data that they supply during training or adaptation. A Call for Clarity in Reporting BLEU Scores
BLEU after adaptation on the Japanese-to-English newspaper translation test
The pretrained translator scores highest after adaptation with the pairs selected by SpanAlign.
The numbers
| System or setting | BLEU |
|---|---|
| Utiyama and Isahara | 14.2 |
| Vecalign | 12.2 |
| SpanAlign ILP (this paper) | 18.3 |
Using only the extracted pairs, the translator trained with SpanAlign data scores 4.1 BLEU. The runs with data from Utiyama and Isahara and from Vecalign each score 0.8. The authors describe training solely on these noisy newspaper data as a weak setup. The fine-tuned results show that the same source of data is more useful when it supplements an existing translator. Relative to the pretrained translator, the paper reports gains of +6.8 BLEU for SpanAlign, +2.7 for Utiyama and Isahara, and +0.7 for Vecalign. The reported gap between SpanAlign and the next best adapted run is 4.1 BLEU on the newspaper test.
The authors also vary the amount of training data by sorting the extracted pairs from lower to higher cost and taking different quantities from the top of that ranking. SpanAlign gives the highest BLEU at every quantity compared in the figure, with a sharp early increase as pairs are added at small data sizes. This gives the alignment cost a second role beyond selecting links within a document. A useful ordering can concentrate valuable training pairs near the beginning of a corpus, where they still have an effect when the adaptation run uses only a small slice of the available material.
Where the computation goes
The paper reports about 53 hours of training on four NVIDIA Tesla K80 GPUs with 12GB each. Predicting spans for each input took about 1.9 seconds on a Tesla K80. Once the predictions were ready, the integer program averaged 0.39 seconds per test document. The measurements use different units of work. A document contributes multiple inputs through candidate sentence groups, windows, and search directions. The comparatively short solve time per document therefore describes only the final selection stage. The span computations precede that stage and have to be included when considering the time needed to align a new collection.
What the ablations show
The decoder and the search direction both matter
The closest comparison to a component ablation keeps the SpanAlign scoring approach and changes how the candidates are assembled. In the bidirectional setting, monotonic dynamic programming yields .644 F1, and the integer program yields .703 on the same test. The latter has higher precision and recall. The English-to-Japanese F1 scores move from .599 with dynamic programming to .638 with integer linear programming. For Japanese to English, they move from .603 to .661. The improvement with the integer program therefore appears in each directional setting reported by the authors.
This comparison supports the choice of the proposed document optimizer under the conditions of the test. Its interpretation is broader than the effect of accepting crossing links alone. The integer program selects a partition with the cost objective described in the method, and it allows a different set of solutions from the monotonic decoder. The paper gives no separate score for a marked subset of reordered passages. The experiment consequently shows the effect of switching decoders as implemented. It leaves open how much of that effect comes from links made possible by reordering.
The direction comparison addresses a separate question about the evidence behind the links. With integer programming, .703 F1 for the bidirectional setting exceeds .638 for English to Japanese and .661 for Japanese to English. With dynamic programming, .644 similarly exceeds the unidirectional scores of .599 and .603. The consistency across the two optimizers is evidence that the second directional search helps under these conditions. Since the directions share the same learned parameters, the gain is associated with obtaining scores under both arrangements of the input and combining them at decision time.
The direction results give particular context to the claim about joint scoring. Bidirectional SpanAlign with monotonic dynamic programming outperforms the external baselines, so dropping monotonicity is unnecessary for every improvement observed in the paper. At the same time, the two unidirectional SpanAlign versions with dynamic programming score below Vecalign. The comparison between external systems involves different encoders and training procedures, as well as the way text is scored. An experiment that removed cross-attention while holding the rest of SpanAlign fixed would answer a narrower question. The paper’s argument for token interaction rests on the implemented systems and the behavior they show together.
The gains for omissions begin before global selection
For unmatched English sentences, SpanAlign with dynamic programming reaches .789 F1, close to the .800 obtained with integer linear programming. For unmatched Japanese sentences, both bidirectional configurations give .951. These results help locate one part of the gain. Many of the improvements on omissions are already present with a decoder that keeps the passages in order. The explicit prediction of no answer gives the local scoring stage a way to recognize a missing translation, which either decoder can then use.
The authors suggest that the no-answer classification and training in both directions account for the strong omission results. The comparison fits that explanation, particularly because both SpanAlign decoders do well on the unmatched categories. It does not measure the effects of those choices individually. There is no reported run that removes the [CLS] no-answer prediction while leaving the other design choices fixed. The outcome for the English category also shows what the choice of decoder can still change. The integer program increases precision for unmatched English sentences, while the dynamic programming version has higher recall for that category.
Grouping provides another check on the scope of the result. The best overall configuration does well across the paper’s sentence-count categories, but the 1-to-2 exception shows that the ranking of systems can differ with the structure of the match. An aligner may locate a broadly correct passage and still choose the wrong boundary or attach an adjacent sentence. Exact category scores expose some of these cases because the source and target cardinalities help define the reference link. They cannot identify the source of each error without further inspection of the underlying decisions.
What the preliminary comparisons establish
The authors describe preliminary experiments that informed several decisions. They found that minimizing costs gave better alignment accuracy than maximizing the scores directly. They also found that there was no accuracy gain from passing more than the best span for each query to the document optimizer. Because extra candidates increase the amount of work and can introduce plausible but incorrect alternatives, they kept the smaller candidate set. They report that the Utiyama and Isahara labels worked better for training than labels obtained with Vecalign.
These are useful observations about the development of the system, with less detail than the main decoder and direction comparison. The paper gives no full set of numerical results for these preliminary decisions. It also reports that using the span scores directly favored large many-to-many links. That observation motivates the average sentence-count factor in the cost, and the published results show the behavior of the final version that includes it. The paper does not quantify the independent effect of the length factor on either grouping accuracy or downstream translation.
The translation experiments offer a distinct controlled comparison. At equal sample size and within the same training regime, the translation scores vary with the source of the alignment data. The authors also test adaptation with different sizes of cost-ranked subsets. The strong early performance from SpanAlign’s low-cost pairs is consistent with their interpretation that the ranking helps filter misalignments. The endpoint is translation quality, so relevance to the newspaper test, the coverage of the chosen examples, and correctness of alignment can all contribute to the result. The figure supports the practical use of the ranking in this adaptation setup without measuring these influences individually.
Limitations
Limits identified by the authors
The authors identify sentence segmentation as a dependency. SpanAlign begins with sentences already marked in each language. Candidate queries use consecutive source sentences, and predictions must be converted into stretches of complete target sentences. An incorrect sentence break can therefore change both the available queries and the output units. The paper specifically notes that boundaries can be ambiguous in languages with limited resources and in languages such as Japanese and Chinese, where words are not separated by spaces. The authors propose exploring a version that can work without given sentence boundaries.
They also point to the length of the input accepted by the multilingual encoder. Windowing makes it possible to process articles that do not fit in one input. It limits what the scorer sees together when judging a particular candidate. A passage can be examined in successive windows, but context distributed across the article may be unavailable in any single judgment. The authors identify encoders with support for longer inputs as a direction for further work.
The paper proposes extending the experiments to other language pairs and joining sentence alignment more closely with document alignment. The reported evaluation concerns English and Japanese. The predictor learns from automatically labeled passages, which gives a route to training where manual links are scarce, provided suitable documents and an initial way to label them can be found. Testing other language pairs would establish how much of the performance carries across different data conditions. Bringing in document alignment would address the earlier step of finding which articles should be compared in the first place.
Limits of the experimental evidence
The manually aligned newspaper collection contains more material than the headline results use. The sentence alignment test contains 15 articles, and the translation test contains 238 reference pairs from the test articles. The reserved editorials could have supported a test on another kind of text within the same publications. The results instead characterize the selected newspaper articles. A sizeable gain in this split can guide a comparison of the systems on these documents, while the magnitude of the gain in other publications, genres, or language pairs remains a separate empirical question.
The gold alignments give an external check on the pseudo-labels, but the training labels still inherit decisions from an existing dictionary-based alignment procedure. The results show that this reliance is compatible with surpassing that procedure on the newspaper test. They leave open how much training depends on the quality and coverage of those initial links. The preliminary comparison with Vecalign-derived labels suggests that the choice of training aligner matters. It does not establish what level of label noise the span predictor can tolerate or which kinds of alignment errors are easiest for it to overcome.
There are also structural limits to the candidate set. Each span is a continuous interval on its own side. The optimizer can select several non-overlapping intervals in a different order across languages, but it cannot represent an individual match made of disconnected pieces within an article. Candidate groups are bounded in size, and pruning to the best span for a query removes some possible matches before the optimization begins. In addition, converting token spans to their enclosed full sentences can change what is represented by a local prediction. Optimality applies to the cost and candidates given to the solver. The manually annotated answer can be missing from that search space.
The span scoring formula normalizes a short list of alternatives for each query, so a score expresses how a candidate fares within that query’s search. The translation experiment provides evidence that the resulting costs can be useful for ranking extracted pairs in the newsroom dataset. It does not establish that a cost has the same interpretation across documents or languages. The comparison also leaves the mechanics of a few scoring cases less explicit than the main objective. For example, the paper gives the weighted combination of forward and reverse scores, but does not specify in the equations how to supply a directional value for a pair discarded by that direction’s pruning.
Finally, the evaluation isolates neither crossing links nor the encoder’s cross-language interaction. The decoder and direction comparisons show which variants work better on the benchmark as a whole. The omission and grouping results give finer detail on where the differences appear. A count of correctly recovered reordered links or an otherwise matched comparison with cross-attention removed would be needed to measure those individual effects. Likewise, the translation test measures adaptation of a particular pretrained Japanese-to-English translator on newspaper material. It supports the usefulness of the extracted pairs in that setting, with the reported BLEU depending on both the data selection and the translation procedure used to test it.
What came after
The paper describes one extension already made by the authors and their collaborators. Nagata, Chousa, and Nishino applied cross-language span prediction to supervised word alignment. The connection is that a piece of text in one language again serves as the query for a span in another. The change is in the unit being aligned. Word alignment asks which parts of a bilingual sentence pair correspond, whereas SpanAlign asks which stretches of two documents belong together as sentence groups. The reported extension concerns the span prediction idea. The paper does not attribute SpanAlign’s document-level integer program or its newspaper results to the word alignment work.
The authors also outline work that they were considering, including longer inputs, other language pairs, and alignment without fixed sentence boundaries. These directions follow from different parts of the system. Longer inputs change the context available to the scorer. Removing the requirement for sentence boundaries changes what the scorer and optimizer must be able to return. Testing other languages or adding document search changes the data that reaches those stages. The paper reports the word alignment application as a completed extension and gives the other directions as open work.
Cite
Cite as Katsuki Chousa, Masaaki Nagata and Masaaki Nishino. 2020. SpanAlign: Sentence Alignment Method based on Cross-Language Span Prediction and ILP. Proceedings of the 28th International Conference on Computational Linguistics.
@inproceedings{chousa2020spanalign,
title = {{SpanAlign: Sentence Alignment Method based on Cross-Language Span Prediction and ILP}},
author = {Katsuki Chousa, Masaaki Nagata and Masaaki Nishino},
booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
year = {2020},
doi = {10.18653/v1/2020.coling-main.418},
url = {https://doi.org/10.18653/v1/2020.coling-main.418}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/chousa-2020-spanalign-sentence-alignment-method-based/