---
title: "Extracting Synchronous Grammar Rules From Word-Level"
description: "A linear-time algorithm turns many-to-many word alignments into compact phrase trees and extracts minimal synchronous grammar rules."
canonical: "https://research.elamur.ai/free/en/papers/zhang-2008-extracting-synchronous-grammar-rules-word/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/zhang-2008-extracting-synchronous-grammar-rules-word/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2008](https://md.research.elamur.ai/free/en/papers/2008/) / Extracting Synchronous Grammar Rules From Word-Level Alignments in Linear Time

# Extracting Synchronous Grammar Rules From Word-Level Alignments in Linear Time

Paper · 2008 · Hao Zhang, Daniel Gildea and David Chiang

**Authors:** [Hao Zhang](https://md.research.elamur.ai/free/en/authors/hao-zhang/), [Daniel Gildea](https://md.research.elamur.ai/free/en/authors/daniel-gildea/) and [David Chiang](https://md.research.elamur.ai/free/en/authors/david-chiang/) · **Year:** 2008 · **Venue:** Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008) · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

[**42** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2028162617) · [Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008)](https://aclanthology.org/volumes/C08-1/) · [licence](https://creativecommons.org/licenses/by-nc-sa/3.0/)

- [Publisher's page](https://aclanthology.org/C08-1136/)
- [PDF](https://aclanthology.org/C08-1136.pdf)
- [DOI 10.3115/1599081.1599217](https://doi.org/10.3115/1599081.1599217)
- [OpenAlex](https://openalex.org/W2028162617)

Citations: OpenAlex, 2026-10-14.

## Summary

When a sentence is translated, a word on either side can correspond to several words on the other, and the corresponding words can occur in a different order. A translation system that learns from such examples needs to work out which stretches of the sentences belong together and which stretches can be broken into smaller units. The authors tackle that problem when the input consists of a sentence pair and links between individual word positions. They look for pairs of contiguous stretches that enclose at least one link and leave no link with an endpoint inside on one side and outside on the other. These stretches can supply phrases for a translation system or building blocks for a grammar that describes both sentences together. [Machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/)

There can be many valid phrase pairs in a single alignment, and some overlap in ways that prevent all of them from appearing as nodes in the same tree. The authors show how to retain enough of them to recover the others. Their algorithm builds a compact tree by scanning the sentence positions in order, keeping candidate phrase starts and discarding starts once their alignment links make future success impossible. It extends an earlier technique for comparing permutations to alignments in which a word can have several partners or none. Construction takes time linear in the lengths of the sentences and the number of links. Explicit phrase enumeration takes additional time for the pairs it produces.

The same tree yields a synchronous context-free grammar. Each node supplies a rule with a sequence for each language. Where a child covers part of the parent, the rule uses linked placeholders that can be expanded together. This makes it possible to express a change in word order while keeping corresponding pieces paired. The result is a maximally decomposed representation of the alignment. Rule extraction retains wider pieces when the links do not permit another split into compatible phrases. [Context-free grammar](https://md.research.elamur.ai/free/en/concepts/context-free-grammar/)

The authors use the decomposition to examine human-annotated alignments across several language pairs. In the Chinese–English data, 99.7% of extracted rule occurrences have at most 2 placeholders on each side under the paper’s rank measure. The corresponding cumulative percentage is 99.9% in each of the other language pairs studied. Most extracted rules also contain little explicit wording, though the upper end of that distribution varies by language pair. These results show how far a grammar with small rules can reproduce the structure of the annotated alignments. The experiments measure the rules needed to describe those alignments, and the paper argues from these measurements that low-rank grammars are a practical choice for translation.

## Deep dive: Extracting Synchronous Grammar Rules From Word-Level Alignments in Linear Time

A linear-time algorithm turns many-to-many word alignments into compact phrase trees and extracts minimal synchronous grammar rules. · about 38 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### From word links to reusable rules

A word alignment records correspondences between positions in two sentences. The word at a given position is distinct from another occurrence of the same word, because the two occurrences can have different partners. At the level of individual links, an alignment can record that a particular source word corresponds to more than one target word. At the level of a phrase, the question changes. A proposed source stretch can be paired with a proposed target stretch only if the two account for exactly the same links. This makes a phrase pair a unit that can be moved into a grammar rule without leaving behind part of a correspondence.

The paper focuses on a setting where the word links supply the evidence for extracting rules. A system can also require that its rules agree with a syntactic parse of a sentence on one side. The authors cite Galley and colleagues for that approach and Chiang for an approach that extracts rules directly from word alignments. With word links alone, the boundaries of a phrase pair follow from the links and the order of the words. A pair can satisfy the extraction criterion even when the analysis supplies no linguistic category for it. The method must discover which pieces fit together before it can assign any grammar labels.

Phrase extraction already used alignment consistency as a criterion, and the paper cites the work of Och and Ney in that connection. The difficult part here is organizing all the consistent pieces. A small pair may fit inside a larger pair. It may also overlap a different pair that begins later and ends later. The same linked material can therefore support more than one grouping. Listing every qualifying pair would answer which phrases are available, but it would leave the problem of which of them to use in a hierarchical decomposition.

That hierarchy matters because a synchronous rule can refer to subordinate pieces by name. Applying the rule expands a source sequence and a target sequence together. A subordinate piece can occur among different neighbors, or in a different relative position, across the two sides. A rule that exposes such pieces separately may apply in settings where a rule containing the entire original wording would have no match. The authors also care about *rank*, the number of nonterminal occurrences on the right-hand side. A nonterminal is a placeholder expanded by another grammar rule. Rank describes how many subordinate pieces a rule has to coordinate, a property that affects the complexity of synchronous [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/).

The aim is consequently more specific than discovering short strings that happen to translate alike. The extraction must preserve the links in the input, identify the divisions those links permit, and provide rules after exploiting those divisions. Some groups remain inseparable because putting a boundary through them would cut a link or would require a discontinuous phrase. Such a group can still enter a rule as a larger unit. Its size reflects the structure of the particular alignment and the requirement that phrases occupy contiguous spans.

#### The connection with common intervals

Earlier work considered a version of the problem in which each item on one side has exactly one partner on the other. Imagine laying out the same items in two different orders. A common interval comprises items that occupy a contiguous stretch in both orders, even if their order inside the stretch differs. In an alignment matrix, each item supplies a link between its two positions. Finding a common interval then amounts to finding a pair of spans that contain the same items and whose links stay inside the corresponding rectangle. The translation problem retains that enclosure condition while dropping the guarantee that there is exactly one link at every position.

Uno and Yagiura showed how to find common intervals without testing every combination of starting and ending positions. Their running time includes a term for the number of intervals returned. That dependence matters when the input admits many intervals, because even a fast algorithm has to spend time on each interval it explicitly returns. The papers by Landau and colleagues and by Bui-Xuan and colleagues showed that the intervals could instead be encoded in a structure of linear size and that this structure could be built in linear time. Zhang and Gildea used related techniques to factor synchronous grammars under the earlier permutation assumption.

In an arbitrary word alignment, the order of the words no longer determines a permutation of matching items. Selecting a word can require including several target positions. The interval covering those positions may also enclose another target word whose partner is outside the proposed source interval. In that case the spans fail the consistency test even though the target interval already contains every partner of the selected source words. A word with no links creates a different problem. It can extend an otherwise valid phrase from the edge without changing which links the pair captures. The generalization needs to handle both the extra constraints from multiple links and the freedom introduced by missing links.

The paper separates the representation problem from the enumeration problem. It first builds a normalized decomposition that records the divisions forced or permitted by the alignment. An application can then use the tree directly to obtain decomposed rules, or recover phrase pairs that were left implicit. The earlier permutation work supplies the idea of a compact interval representation. The contribution here is to make that approach work when the input is a general set of correspondences, and to connect the resulting representation to the rules extracted from bilingual text.

### The method, step by step

#### What makes a pair of phrases valid

The input is a pair of sequences and a set of links between them. The paper represents a sentence by its ordered word positions throughout most of the algorithm. That is sufficient for deciding where a phrase begins and ends. The word strings themselves are needed again when the algorithm writes rules containing explicit words.

```
(E, F, A)
```

Here E and F are the sequences on the two sides, and A is the set of alignment links. The lengths of E and F are n and m, respectively. A link written as (i, j) joins position i in E to position j in F. The word at position i is eᵢ, and the word at position j is fⱼ. The paper uses English and French to illustrate the notation. The algorithm takes the same kind of input regardless of the languages assigned to E and F.

```
([s, t], [u, v])
```

This is a candidate phrase pair. The positions s and t are the inclusive ends of the span in E, and u and v are the inclusive ends of the span in F. Square brackets at both ends indicate that the endpoints are included. The paper also uses a closing parenthesis for an interval that excludes its right endpoint. In the candidate above, each span has its own set of incident links. The pair qualifies when those sets are equal and contain at least one link.

The condition is symmetric. Every link incident to a position in the E span must end within the F span. Every link incident to a position in the F span must have its other end within the E span. In the paper’s matrix drawing, E positions are columns, F positions are rows and a marked cell represents a link. A phrase pair is a rectangle containing a marked cell whose selected rows and columns have no marked cells extending beyond the rectangle. Links in rows and columns outside both intervals can coexist with the rectangle and play no role in its validity.

Consider the E span `[4, 6]` in the running example. Positions `4` and `6` each link to positions `1` and `3` on the F side. Position `5` links to position `2`. Thus the F span `[1, 3]` encloses the partners of all the selected E positions. None of those F positions has a link back to an E position outside `[4, 6]`, so the spans form a pair. The same drawing contains the smaller pair `([5, 5], [2, 2])`. An extraction can isolate that central correspondence even though the links between the surrounding positions must be taken together.

By comparison, selecting E position `4` alone already requires an F span from `1` to `3`. That interval contains links to E positions outside the proposed span. Selecting only the outer F positions would also fail, because a phrase on either side is a contiguous interval. Widening the E span as far as position `6` brings the intervening E position `5` into the span and gives the algorithm a valid enclosing pair. This kind of example explains why an alignment can have an indivisible residue even when a smaller phrase fits inside it.

#### Why the method starts with tight boundaries

An unlinked word next to a valid phrase can be added to the phrase without changing the set of enclosed links. From the perspective of alignment consistency, the enlarged pair is also valid. If the algorithm treats each possible boundary as a different object from the start, however, much of the output can consist of alternative ways of including the same unlinked material.

The paper calls a pair *tight* when each endpoint on each side has at least one link. This fixes the outer boundaries around the linked material. Unlinked words can still occur in the interior. An unlinked word between two linked endpoints is part of the contiguous span, and removing it from the middle would give a different kind of object. Tightness concerns the evidence for the boundaries, so it applies specifically to the first and last positions of each phrase.

Once a tight E span is proposed, its possible tight partner in F is determined. The first linked F position must be the left boundary, and the last linked F position must be the right boundary. Choosing a narrower span would omit a link that starts inside the E span. A wider one could preserve the same links only by adding unlinked material at an endpoint. The remaining question is whether the determined partner contains any links from outside the E span.

```
O(n²)
```

This is the paper’s upper bound on the number of tight phrase pairs in terms of the E sequence length n. The notation O describes an asymptotic upper bound, and the superscript ² means that n is squared. There can be at most one tight F partner for each E interval. The bound counts potential results, separately from how long the algorithm takes to build a representation of them.

```
O(n²m²)
```

This is the order of growth the paper illustrates for phrase pairs when the tightness restriction is dropped. The symbols n and m are the sequence lengths, and each squared term reflects the choices of two boundaries on its side. In the paper’s example for this bound, a single link joins the midpoints of the sequences. An interval on each side can extend around that link in many ways and still select it alone. The tight representation has a single pair for that alignment. The more permissive definition can have many pairs even when the evidence consists of only one link.

#### How overlapping phrases fit into a tree

Tree nodes describe nested pieces. If two nodes cover some of the same material, one is inside the other. Phrase pairs can also overlap in a crossing arrangement, where a pair starts earlier but ends inside the other. Both crossing pairs cannot be nodes in an ordinary span tree. The paper uses a closure property to represent that arrangement without losing the ability to recover either pair.

For two phrase pairs that overlap in this sense, the paper shows that their common portion, their respective exclusive portions, and their union are also valid pairs. In a schematic example, let `AB` and `BC` be the two overlapping E phrases, with `B` in both. Then `A`, `B`, `C` and `ABC` also have corresponding phrases on the other side. The same link sets that certify `AB` and `BC` explain the relationship among the smaller pieces. A link belonging to both pairs belongs to their common portion, while a link belonging to only one stays within that pair’s exclusive portion. The position of each portion in the target sentence follows the way the two original pairs overlap there.

The authors describe the family of phrase pairs as *weakly partitive*. In this setting, the term refers to closure under the intersection, differences and union involved in this overlap case. Its practical value is that the tree can record `A`, `B`, `C`, `AB` and `ABC`. The pair for `BC` is recoverable from the arrangement. Retaining a different grouping could encode the same possibilities. Normalization supplies a consistent choice, so the extraction algorithm can construct one tree instead of maintaining every grouping.

The paper favors *left-strong* intervals. A left-strong interval has no crossing overlap on its left, meaning there is no valid interval that begins earlier and ends inside it. The authors also make chains of binary nodes where a sequence of compatible adjacent pieces could instead be grouped under a single node. In the `AB` and `BC` example, the grouping `((AB)C)` illustrates the effect. It preserves a left grouping and keeps the evidence for `BC` available as a combination of neighboring pieces.

```
O(n)
```

This is the size bound for the normalized tree in terms of n, the length of E. The bound concerns the encoding of the successful spans. It can hold even when the number of tight phrase pairs an application can read from that encoding grows quadratically. The distinction allows the authors to seek linear construction time without claiming that every phrase can always be printed within that time.

From word links to phrases and synchronous rules The steps in order.

#### Testing a proposed span with link counts

The search scans right endpoints in order. For a proposed E span with left endpoint x and right endpoint y, the algorithm first identifies the narrowest interval in F that contains all its partners. It obtains the endpoints of that interval by taking the smallest and largest F positions reached by any link from the E span.

```
l(x, y) = min { j | (i, j) ∈ A, i ∈ [x, y] }
```

Here l is the lower endpoint of the possible F partner. The minimum ranges over F positions j for which a link (i, j) belongs to A and its E position i lies in the inclusive span `[x, y]`. The vertical bar means that j is considered subject to those conditions. The minimum is defined when the proposed span emits at least one link, as required for a phrase pair.

```
u(x, y) = max { j | (i, j) ∈ A, i ∈ [x, y] }
```

Here u is the upper endpoint of the possible F partner. The maximum uses the same link set A and the same inclusive E span from x to y. The values l(x, y) and u(x, y) delimit the candidate F interval. An endpoint of this F interval is linked by construction. For a tight pair, the endpoints of the chosen E span must also be aligned.

With y fixed, moving x to the right can only remove positions from the E span. The lower endpoint l can stay in place or move up, and the upper endpoint u can stay in place or move down. In either case several successive starts may share the same endpoint value. The authors call a maximal interval of starts on which the value stays constant a *step*. There are steps for the lower bound and steps for the upper bound. The two sets of boundaries need not coincide, because a new word can affect the two extrema differently.

Bounds for longer spans can be combined from bounds for adjacent shorter spans. This lets the scan reuse values it already holds. For instance, the rightmost target position reached from a combined span must be the rightmost one reached from either part.

```
u(x, y) = max { u(x, z), u(z + 1, y) }
```

The split point is z. The first part runs from x through z and the next runs from z + 1 through y. The maximum chooses whichever of their upper bounds is larger. The lower bound combines in the same way with a minimum. A part with no links contributes no endpoint.

```
F_c(j) = | { (i′, j′) ∈ A | j′ ≤ j } |
```

F_c counts the links with an F endpoint at or before position j. The variables i′ and j′ range over endpoints in A, and the vertical bars around the set indicate its size. The inequality selects the prefix of F ending at j. If a word in that prefix has several partners, all the corresponding links count, since the set contains links and not positions.

```
E_c(i) = | { (i′, j′) ∈ A | i′ ≤ i } |
```

E_c is the corresponding prefix count on the E side. The cutoff is the E position i. The set retains any link whose E endpoint i′ is at or before that cutoff, whatever its F endpoint j′. For either prefix count, a cutoff immediately before the first position gives the empty prefix.

The paper’s test compares the number of links incident to the proposed E span with the number incident to its candidate F span. A prefix count up through the last position, minus the prefix count before the first, gives the count over the interval. The first set of links is contained in the second because the F bounds were selected to include every partner of the E positions. As a consequence, equal counts establish equality of the sets. Without the containment guaranteed by the extrema, equal counts alone would say far less.

```
f(x, y) = F_c(u(x, y)) − F_c(l(x, y) − 1) − (E_c(y) − E_c(x − 1))
```

The function f counts the surplus links incident to the F interval. Its first difference counts the links with F endpoints between the lower bound l and upper bound u, inclusively. Its second difference counts the links whose E endpoints lie from x through y. In both differences, subtracting 1 from the lower endpoint gives the cutoff before the interval. Since the first count covers the whole second set, f is non-negative. For a candidate with linked material and tight E endpoints, a value of 0 means there are no surplus links, so the proposed spans are a phrase pair.

This test reduces a question about the placement of links to a question about a count. In the example, the F interval `[1, 3]` fails for the E span `[4, 4]` because it also receives links from other E positions. With `[4, 6]` as the E span, those links are all accounted for and the test succeeds. Precomputing the prefix counts means that the algorithm can make this decision without inspecting all the cells of the rectangle each time it tries an interval.

```
O(n + m + |A|)
```

This is the running time given for preparing the prefix counts. The terms n and m account for the positions on the two sides, and |A| denotes the number of links. Adding them expresses a cost linear in the sentence lengths and the explicit alignment data. The same bound is the target for the full tree construction.

#### The shift-and-reduce scan

The authors first give a simpler algorithm organized around shifting and reducing. A shift advances to the next right endpoint y and adds its position to an ordered list X of candidate starts. A reduction recognizes a phrase ending at y, records it and discards the starts inside that phrase that the normalized tree will no longer need. The scan proceeds in increasing order of y. For each y, it works through the retained starts from right to left, updating the extrema and evaluating the link surplus.

The right-to-left order means that the procedure sees a possible short phrase before considering a larger one that ends at the same position. It can then put the shorter phrase beneath the larger one when appropriate. A start removed on reduction can be the start of another valid phrase in the unrestricted collection. Reduction has a representational purpose. It preserves the grouping required for the normalized tree and leaves the recoverable combinations implicit. This differs from the later pruning step, whose justification is that a start cannot succeed at any subsequent end.

The simpler algorithm improves on checking the alignment rectangle from scratch for every interval. The remaining expense is the number of starts visited. If the algorithm keeps many prospective starts and repeatedly fails to reduce, one pass through the list does little to shorten the next. That repeated work accounts for the quadratic term in the bound.

```
O(n² + m + |A|)
```

This is the bound for the simpler shift-and-reduce algorithm. The term n² comes from repeated passes through possible starts in E. The terms m and |A| account for the other sequence and the links during preparation, with the cost for processing the n E positions absorbed by the n² term. The linear algorithm preserves the left-to-right organization but changes how much of the list it visits at an endpoint.

#### When a start can be discarded permanently

Though l and u each change monotonically as x moves to the right, f can rise or fall. The enclosing target interval may shrink as the source start changes, but the source span also loses some of its links. These effects enter the surplus count with opposite signs. The algorithm uses a property of two starts evaluated at the same end to restore an ordered list of surplus values.

```
x₁ < x₂ < y   and   f(x₁, y) < f(x₂, y)
```

The symbols x₁ and x₂ are distinct E starts, and y is their common right endpoint. The first inequality gives their order. The second says that the earlier start has fewer surplus links than the later start, despite covering a larger E span. If x₁ immediately precedes x₂ in X, the paper calls this a violation of the desired monotonic order.

```
f(x₂, y′) > 0   for all y′ ≥ y
```

The variable y′ is any right endpoint from the current y onward. The inequality states the consequence for the later start x₂. Its surplus stays positive, so no extension of its span to the right can make it a phrase. The scan can delete x₂ before visiting future endpoints.

The reason concerns where the later span’s extra links originate. The earlier E span contains everything in the later one plus the positions between the starts. Its enclosing F interval is at least as wide. If the earlier span has the smaller surplus, including those extra E positions absorbed some links already present in the later span’s F interval. Their E endpoints lie to the left of x₂. Advancing the right endpoint can widen the later span’s F interval, but it cannot exclude a partner already inside it. It also cannot add the missing E positions to the left of x₂. At least one surplus link therefore persists.

A further observation lets the algorithm delete a whole run of starts when it updates the extrema. Take two starts whose upper bounds differed before advancing the right endpoint. Suppose the larger upper bound belonged to the earlier start, and the new position makes the upper bounds equal.

```
u(x₁, y − 1) > u(x₂, y − 1)   and   u(x₁, y) = u(x₂, y)
```

Here x₁ is the earlier start, x₂ the later start, y − 1 the previous end and y the current end. The first comparison says the earlier span reached a higher F position before the shift. The equality says that the later span has now reached at least that far. A link that gave the earlier span its old upper bound originates to the left of x₂. Its target position is now inside the later span’s enclosing interval, which is why the later start fails permanently. The lower-bound case works by the same reasoning at the opposite end of the F interval.

This observation avoids inspecting each surplus value in a run whose bounds have merged. Starts belonging to different old steps represented genuinely different extrema, with a link outside the later E span responsible for at least part of that difference. The updated interval can make that link a permanent obstacle for the later starts. The step structure tells the scan where such a group begins.

#### Using whole steps to avoid repeated searches

At each new y, the linear algorithm appends y to X and independently updates the steps for u and l. It walks back from the rightmost steps until it finds how far the new position changes each bound. For u, an update raises the maximum. For l, it lowers the minimum. Beyond the affected suffix, old spans already contain all the new position’s F partners within their bounds, and the extrema stay as they were.

The leftmost affected steps give the scan the boundaries it needs for restoring the order of f. If the lower and upper bounds begin changing at different starts, some of the remaining starts lie in a region where only one bound changes. Farther right, there can be a region where both change. Within each region, after the deletions implied by the merged steps, the relevant starts get the same change in their surplus. The scan checks violations as it crosses the region boundaries. It deletes starts that violate the order and uses the stronger bound-merging observation for starts farther to the right. The newly appended position is checked as well.

The unchanged part of the list illustrates why the scan can skip a whole region. All the old F bounds there stay in place. Each source span ending at the new y gains the same links from the new E position. Thus the surplus of each surviving start in this region changes by the same amount.

```
f(xᵢ, y) − f(xᵢ, y − 1) = 0 − (E_c(y) − E_c(y − 1))
```

The subscript i identifies one of the starts xᵢ in the region where neither F bound changes. The left side is the change in surplus from the previous endpoint y − 1 to the current y. The 0 is the change in the count of links inside the F interval. The difference involving E_c counts the links of the new E position. Since every start in this region gets the same adjustment, any nonincreasing order established in the preceding iteration carries over.

The same reasoning applies inside a region where the affected bounds change uniformly. The F count may change there, but it changes by the same amount for each of those surviving starts. The proof starts with the list containing only the initial position, where there is no pair of starts to put out of order. It then preserves the order inside the regions and verifies it between them at each shift.

```
f(x₁, y) ≥ f(x₂, y)
```

Here x₁ and x₂ are adjacent surviving starts in X, ordered with x₁ on the left. The inequality is the invariant after the pruning step. An earlier start has at least as much surplus as the next one. As all surplus values are non-negative, every zero, if present, belongs to a suffix of the list. The reduction can work from that end and stop at the first positive value. It outputs the recognized spans and removes successors as required by the normalization.

The running example shows how the update and reduction operations differ. At y = 2, position `2` is eliminated from X by the monotonicity check, and `[1, 2]` is recognized. At y = 3, both `[3, 3]` and `[1, 3]` are recognized. The normalization then removes position `3` as an active start. In the second case, the start was part of a successful reduction. In the first, the violation shows why the start can be discarded before making such a reduction.

The implementation needs a representation of X that supports traversal and deletion at known positions. It also needs to traverse the steps for l and u without walking through every position represented by each step. The authors point to doubly linked lists for these structures. Their time argument is amortized, meaning that it bounds the total cost across the scan, even if some endpoints take more work than others. Nearly every step or position traversed during the updates and checks is deleted, with a bounded amount of extra work at each endpoint. A large traversal is therefore paid for by the removal of entries that will no longer be traversed. Adding the input preparation gives the linear bound in n, m and |A|.

#### Turning a node into a pair of grammar sequences

Each node of the normalized decomposition tree represents paired material in E and F. The algorithm assigns a nonterminal label to each node, then writes a rule for that label. Within the spans of a parent, every child span is replaced by the child’s nonterminal on both sides. The two occurrences carry the same index, so a later expansion of that child supplies both corresponding strings. Positions left uncovered by children become explicit words, or *terminals*, in the rule.

```
A → B⁽¹⁾ C⁽²⁾ , C⁽²⁾ B⁽¹⁾
```

This is the paper’s illustrative synchronous rule. A is the category being expanded, B and C are child categories, and the arrow introduces the two sequences separated by the comma. The superscripts 1 and 2 identify the linked occurrences across the sequences. The first sequence orders B before C. The second orders C before B. Matching indices allow a rule application to preserve the identity of each child through the reversal. The notation follows Satta and Peserico’s treatment of synchronous grammars. [Some Computational Complexity Results for Synchronous Context-Free Grammars](https://md.research.elamur.ai/free/en/papers/satta-2005-some-computational-complexity-results-synchronous/)

The example based on the actual alignment uses the node `([4, 6], [1, 3])` and the child `([5, 5], [2, 2])`. The child is assigned F as a nonterminal label in the rule, a use distinct from the earlier F for an entire sequence. Its occurrences replace E position `5` and target position `2`. The surrounding positions stay explicit because they fall outside that child.

```
C → e₄ F⁽¹⁾ e₆ , f₁ F⁽¹⁾ f₃
```

C is the label assigned to the parent node. The arrow gives its expansion on the two sides, with the comma separating them. F is the child label and the shared superscript 1 marks its paired occurrences. The symbols e₄ and e₆ are the words at positions `4` and `6` in E. The symbols f₁ and f₃ are the words at positions `1` and `3` in the target sequence. The child can be expanded independently of the surrounding words. Those surrounding words and their correspondences are residual material owned by the parent rule.

Labelling choices affect what can be generated with the extracted rules. With a unique label for every node, the grammar preserves the specific expansion assigned to each node. The authors describe this choice as producing the input sentences. For translation, an application may use a shared nonterminal so that different pieces can recombine, following the approach described by Chiang. The availability of a split comes from the alignment. The labelling policy controls which of the resulting pieces can substitute for one another.

The normalized tree puts an unlinked word as high as its position allows. The paper also describes varying its attachment point to recover other rules compatible with the same alignment. Moving an unlinked word into a child can change whether it appears explicitly in the parent rule or in the child’s expansion. There may be many ways to make such choices across a sentence, and the authors say the number of rules obtained by considering all attachments can grow exponentially. Their output-sensitive extraction claim is that the tree lets this enumeration proceed in time linear in the number of rules produced.

#### Reading phrase pairs that are implicit in the tree

For phrase extraction, every node already gives one valid tight pair. The remaining pairs come from the cases in which overlapping intervals were normalized. A sequence of adjacent pieces can appear as a left-branching chain of binary nodes whose rules all make the same ordering choice. A contiguous group of pieces from the chain can be read off as a phrase pair even if that group was skipped when the tree was built.

In the example used throughout, this kind of chain consists of the root and its left child. Two neighboring pieces in the chain are `([3, 3], [4, 4])` and `([4, 6], [1, 3])`. Together they occupy `[3, 6]` in E and `[1, 4]` in F. Their target order reverses their source order, and the union is contiguous in both. The pair `([3, 6], [1, 4])` can thus be recovered even though the normalized tree used a different grouping. If an application wants phrases with additional unlinked boundary words, it can also consider attachment choices after finding the tight pairs.

The method yields two kinds of output from the same organization of the alignment. Recovering phrases uses the evidence in the chains to enumerate compatible spans. Extracting maximally decomposed rules uses the parent–child relations to specify which subphrases become nonterminals. The data procedure for the paper’s study is to take each supplied human alignment, build the normalized tree and count properties of its rules. The paper gives no separate training procedure for estimating the word links or weighting the rules.

### Experiments and results

#### What the alignment study measures

The experiment applies the decomposition to human-annotated bilingual sentence pairs. It uses the alignment data previously studied by Wellington and colleagues, covering Chinese–English, Hindi–English and French–English, as well as Romanian–English and Spanish–English. On the input to the factorization, the authors retain the many-to-many links. Earlier studies discussed in the paper simplified the links before examining the structure required to parse the alignments. Direct decomposition lets the current measurements include the constraints created by those links.

Each sentence pair yields a normalized tree, and each node of the tree yields a synchronous rule. The paper counts rule occurrences, called *rule tokens* in its tables. A rule that occurs repeatedly can therefore contribute repeatedly. Rule rank comes first among the measurements and counts the nonterminals on a rule’s right-hand side. The second is the number of terminals on the right-hand side. The counts address different questions. The first describes how many child pieces a rule combines. The second describes how much word material is written explicitly in the rule.

The reported percentages are cumulative. An entry for a given rank counts occurrences at that rank and at all lower ranks. Similarly, a terminal-count entry covers rules up through the indicated count. Each percentage refers to the extracted rules for its own language pair. The paper does not specify a training, development or held-out test split for these measurements. It analyzes the annotated alignments as input data, without a reported split-based comparison. The earlier studies supply the comparison in problem setup. The paper reports no competing extractor evaluated on the same data with the same rank and terminal-count tables, and no translation-quality baseline.

#### How much branching the trees require

At rank 0, a rule has no child nonterminals. Its expansion supplies words directly. A rule of rank 1 can expand a child within a surrounding piece that stays explicit, as in the example that isolates the link from E position `5` to F position `2`. Rank 2 allows two children to be combined, including in opposite orders on the two sides. A cumulative percentage at rank 2 thus measures how much of the extracted rule inventory by occurrence stays within the binary branching limit, including leaves and unary combinations.

Cumulative rule-token coverage by rank in Chinese–English The binary threshold covers nearly all extracted rule occurrences.

**The numbers**

| System or setting | cumulative rule tokens % |
| --- | --- |
| Rank at most 0 | 51.0 |
| Rank at most 1 | 52.4 |
| Rank at most 2 (this paper) | 99.7 |

For Chinese–English, 51.0% of extracted rule occurrences have rank 0 and 52.4% have rank at most 1. At rank at most 2, the cumulative coverage reaches 99.7%. The chart shows where binary combinations enter the distribution. It compares thresholds applied to one extraction. A higher coverage value indicates that a threshold admits more of its rules, while the rank associated with that threshold still matters for parsing.

The same rank threshold of 2 covers 99.9% of extracted rule occurrences for each of Hindi–English, French–English and Romanian–English. Spanish–English also has 99.9% cumulative coverage at that threshold. The authors take this concentration as evidence that the extractor generally finds small combinations even on the original many-to-many alignments. It also places the higher-rank cases in perspective. They account for a small share of rule occurrences and still matter whenever the goal is to reproduce every link in every analyzed pair under the same formalism.

The rank 0 entries help interpret the authors’ characterization of the rules as overwhelmingly binary. For Hindi–English, 52.8% of rule occurrences have rank 0, and for French–English the corresponding share is 52.1%. Romanian–English has 50.8%, and Spanish–English has 50.7%. The cumulative percentages at rank 2 support the claim that nearly all extracted rules fit within a binary limit. They should be read as coverage up through that limit, with many of the covered rules supplying terminal material directly. A rank ceiling describes the most children a rule may combine, so leaves form part of the grammar measured against that ceiling.

#### How much wording stays explicit

The terminal-count distribution asks whether decomposition leaves many words in each individual rule. A structural rule can consist of linked nonterminals in the order needed for each sentence, with no explicit words of its own. Conversely, a rule with no children can still contain a group of words whose links prevent further decomposition. A grammar’s branching statistics therefore leave open how much wording its rules must reproduce literally.

Extracted rule tokens with at most one terminal by language pair Hindi–English has the highest cumulative share at this terminal threshold, and Chinese–English has the lowest.

**The numbers**

| System or setting | cumulative rule tokens % |
| --- | --- |
| Chinese–English | 87.2 |
| French–English | 89.0 |
| Romanian–English | 89.8 |
| Spanish–English | 91.8 |
| Hindi–English (this paper) | 92.2 |

Hindi–English has 92.2% of extracted rule occurrences at or below a terminal count of 1. The same threshold covers 91.8% for Spanish–English and 89.8% for Romanian–English. For French–English it covers 89.0%, and for Chinese–English it covers 87.2%. These are shares of rule occurrences from the proposed extraction. They give no direct ranking of the language pairs by translation quality.

Other thresholds reveal differences that a comparison at a single cutoff can hide. At a terminal count of at most 3, Hindi–English reaches 99.5% cumulative coverage and Spanish–English reaches 99.4%. The corresponding Chinese–English value is 99.0%, and Romanian–English reaches 98.9%. French–English reaches 95.8% at the same cutoff. French–English thus places above Chinese–English at the cutoff of 1 and below it at the cutoff of 3. A language pair can have a high concentration at a short rule length and still retain an upper tail of longer rules.

The largest observed terminal count is 18 for French–English, followed by 12 for Chinese–English. The maximum is 9 for both Romanian–English and Spanish–English, and 7 for Hindi–English. The authors attribute the longer French–English tail to the large number of links annotated as “possible” in that dataset. In the extraction procedure, any input link restricts the placement of phrase boundaries. Adding links can join material that would otherwise be eligible for separate rules, so annotation choices can affect the resulting terminal counts. The paper offers that explanation for the observed tail without presenting a controlled comparison in which the possible links are removed.

The authors connect short lexical material with the prospect of reusing a rule in other sentences. The measurement establishes that the decomposition usually leaves little wording in an extracted rule. Whether those rules recur in unseen text or improve a translation system would require a different evaluation. The experiment provides a structural account of the training material that an extraction procedure could supply.

### What the ablations show

The paper has no ablation experiment. It offers a formal comparison between two algorithms and two descriptive analyses of the rules extracted from human alignments. Each answers a different question about the method.

#### Why the faster scan can make the same reductions

The quadratic and linear scans share the same link-count test and build the same kind of normalized decomposition. The simpler scan tries each start still on its list against the current end. The linear scan first discards starts that violate the surplus order or are made permanently invalid when steps of the extrema merge. It then tests for reductions at the end of the list. This comparison identifies which work the new algorithm avoids and how that work is related to the output.

Removing a start because it currently has a positive surplus would be unsound. A later endpoint could include the missing E partners of a link already counted in the F interval. The paper’s pruning rules establish a stronger condition. They identify a surplus link that comes from a position *before* the candidate start. Extending the span on the right can never include that position. This is why the sequence of possible future reductions is preserved even as the list of candidate starts is shortened.

The complexity proof then identifies a separate benefit of the representation of l and u by steps. Suppose a new word changes bounds for many starts. A straightforward implementation could spend time updating them individually and revisit them later. The linear scan travels through the affected steps and discards the starts made invalid by that same update. The few step and start entries that can survive repeated visits contribute bounded work per endpoint. The comparison supports the linear-time claim through the running-time analysis. The paper gives no measured speedup or timing comparison between implementations.

#### What low rank and short lexical material show separately

The rank distribution indicates that the alignment can typically be decomposed into rules that perform small combinations. This is compatible with a substantial amount of local reordering. If several pieces can be joined through nested binary rules, their full order across a sentence can be more involved than the order change made by any single rule. The rank statistic measures the local combinations in the extraction. It does not give the frequency of different reorderings or identify the specific constructions that require high rank.

Terminal counts capture material that stays together in explicit wording after eligible children have been factored out. The French–English alignment data illustrate the value of reporting both measures. At rank at most 2, the cumulative share of rule occurrences is 99.9%. At a terminal count of at most 3, it is 95.8%, and the maximum terminal count is 18. A corpus can thus have a small branching requirement for most rules and still include some rules with substantial terminal material. Looked at by themselves, the rank counts would leave that difference invisible.

The paper contrasts its direct use of the links with the simplifying assumptions in earlier alignment studies. This makes the rank and terminal counts measurements of the alignments as analyzed without those earlier simplifications. The experiment does not provide paired distributions for the original and simplified versions. The size or direction of a change caused by keeping the many-to-many links therefore remains unmeasured. The direct extraction removes the need for that approximation in computing the distributions reported here.

The paper’s illustrative alignment also supplies a small structural analysis. Its tree can isolate the central word pair inside a larger group whose surrounding links prevent a complete breakup into single-position phrases. A chain higher in the same tree leaves an overlapping pair implicit and makes it recoverable. These are distinct reasons why an interval can be absent from a tree. Some proposed intervals fail the consistency condition. Other intervals satisfy it and can be reconstructed from the normalized grouping. That distinction is what lets the extraction provide a compact grammar and still support complete phrase enumeration.

### Limitations

#### Limits the authors identify

The algorithm assumes that word alignments are available. It analyzes which spans agree with those links. The paper’s translation setup omits the additional constraint of matching a supplied syntactic parse, because its objective is to factor the alignments directly. As a consequence, the extracted pieces and categories are determined by alignment consistency and by the labelling choice made during rule extraction. The procedure supplies no separate judgment about whether a span is a constituent in an independent syntactic analysis.

The main decomposition concerns tight phrases. The authors explicitly distinguish these from the larger collection obtained by allowing unlinked words at the boundaries. They discuss a default attachment for unlinked words and ways to enumerate other attachments when those distinctions matter to the application. Considering all compatible attachments can result in exponentially many grammar rules. The linear construction bound is for the compact tree. Explicitly enumerating the additional outputs incurs a cost that grows with their number.

The paper also describes different choices for nonterminal labels. Assigning a unique category to each node keeps the input derivations specific to those nodes. Assigning a shared category permits recombination for translation. This is a choice about what the grammar is allowed to generate beyond the analyzed examples. Alignment decomposition itself establishes the spans and the links of the pieces. The usefulness of a grammar with freely recombining pieces requires a further assessment of those generated combinations.

The authors identify possible links as an explanation for the larger terminal counts in the French–English data. Their observation highlights a condition on the measurements. A link admitted to the alignment has consequences for the decomposition irrespective of how certain the annotator was about it. Results depend on the alignment supplied to the algorithm and on which annotations are represented as links.

#### Limits visible in the design of the study

The empirical unit is a rule occurrence. A small proportion of high-rank occurrences can coexist with a consequential number of sentence pairs requiring at least one of those rules. The reported percentages do not say how often a whole sentence pair falls outside a strictly binary grammar. To answer that question from the extracted data would require aggregating by sentence pair and checking the maximum rank in each tree. Counts over distinct rule types would answer another question, since a frequently repeated low-rank rule can influence the token distribution more than a rare rule.

The experiment measures rank and terminal counts in decompositions of the human alignments used in the study. It reports no evaluation on unseen sentence pairs and no decoding experiment. The authors’ interpretation that binary grammars are adequate for translation rests on the dominance of low ranks in this structural analysis. The measured result is coverage of extracted rule occurrences at the reported rank thresholds. Translation quality, coverage of future inputs and decoding performance remain open empirical questions. Short explicit wording likewise creates an opportunity for reuse, while the study counts the wording in the original extractions rather than observed reuse.

The restriction to contiguous intervals is central to the result. A phrase pair must correspond to one span on each side. Links that join separated regions can force material into a wider rule when the intervening positions cannot be excluded without introducing a gap. The analysis illuminates how much the observed alignments can be factored under the synchronous context-free formalism and the chosen normalization. It supplies no comparison with a system that deliberately uses discontinuous constituent spans on the same unmodified input. In particular, the rank distribution by itself does not resolve the question raised by earlier work about coverage when binary branching is imposed as a strict requirement.

Finally, the proof and the empirical study address different kinds of scale. The proof accounts for sentence length and the number of supplied links, including alignments with many links. The corpus analysis describes the grammar rules that happened to result from the studied data. A wide or densely linked sentence can satisfy the proof’s running-time bound and still yield an awkward rule for a downstream parser. Likewise, a compact extraction can give rise to many outputs when an application elects to enumerate them. The cost of constructing the decomposition, the cost of printing its alternatives and the cost of using the resulting grammar are distinct quantities.

### What came after

#### Inducing phrasal synchronous grammars

The paper’s extraction procedure answers a structural question given an alignment. It determines where the links permit a split and builds rules using the resulting pieces. Phrasal synchronous grammar induction considers the learning of the grammar itself. The later work on a Gibbs sampler addresses that broader problem. Its title identifies sampling as the method used for induction and phrasal synchronous grammars as the object being induced. The common subject is the construction of a bilingual grammar whose rules can combine corresponding pieces of text. [A Gibbs Sampler for Phrasal Synchronous Grammar Induction](https://md.research.elamur.ai/free/en/papers/blunsom-2009-gibbs-sampler-phrasal-synchronous-grammar/)

The distinction matters for interpreting the connection. The linear-time result is conditional on a set of input links and concerns factorizing those links. An induction procedure addresses choices in learning a grammar, which go beyond the factorization of a fixed alignment. The later paper cites the extraction work, but the available account gives no specific use of its candidate pruning, normalized tree or rule inventory. The supported connection is between the extraction problem studied here and the later work’s focus on inducing phrasal synchronous rules.

#### Evaluating translated sentences

The other citing work addresses sentence-level translation evaluation by fitting many dense features. In the extraction paper, a sentence pair and its links are inputs to the construction of phrase and rule candidates. In the evaluation work, the sentence is the level at which a translation is assessed. The two tasks consequently ask different questions about bilingual text. Finding a grammar rule compatible with word links establishes a possible structural correspondence. Measuring translation quality requires an evaluation procedure and its own evidence. [Fitting Sentence Level Translation Evaluation with Many Dense Features](https://md.research.elamur.ai/free/en/papers/stanojevic-2014-fitting-sentence-level-translation-evaluation/)

The citation connects the grammar extraction study with later research on assessing translations. The later work’s title identifies its emphasis on fitting evaluation features, while the citing record supplies no detail on whether any feature used alignment decomposition, synchronous rules or another aspect of the earlier paper. Together the two citing works place the paper alongside research on grammar induction and sentence-level evaluation. Its established result remains the structural one that those tasks can be compared against. A supplied many-to-many alignment admits a compact decomposition that can be built in linear time, supports the recovery of its compatible phrases and exposes the rule sizes needed to represent the observed links.

## Cite

Cite as Hao Zhang, Daniel Gildea and David Chiang. 2008. Extracting Synchronous Grammar Rules From Word-Level Alignments in Linear Time. Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{zhang2008extracting,
  title = {{Extracting Synchronous Grammar Rules From Word-Level Alignments in Linear Time}},
  author = {Hao Zhang, Daniel Gildea and David Chiang},
  booktitle = {Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008)},
  year = {2008},
  doi = {10.3115/1599081.1599217},
  url = {https://doi.org/10.3115/1599081.1599217}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
