---
title: "Factorization of Synchronous Context-Free Grammars in Linear"
description: "How to factor synchronous grammar rules in linear time, and what minimum branching reveals about word order in aligned translations."
canonical: "https://research.elamur.ai/free/en/papers/zhang-2007-factorization-synchronous-context-free-grammars/"
---
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-2007-factorization-synchronous-context-free-grammars/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2007](https://md.research.elamur.ai/free/en/papers/2007/) / Factorization of Synchronous Context-Free Grammars in Linear Time

# Factorization of Synchronous Context-Free Grammars in Linear Time

Paper · 2007 · Hao Zhang and Daniel Gildea

**Authors:** [Hao Zhang](https://md.research.elamur.ai/free/en/authors/hao-zhang/) and [Daniel Gildea](https://md.research.elamur.ai/free/en/authors/daniel-gildea/) · **Year:** 2007 · **Venue:** Proceedings of SSST, NAACL-HLT 2007 / AMTA Workshop on Syntax and Structure in Statistical Translation · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

[**22** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2101793943) · [Cited by **17** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/zhang-2007-factorization-synchronous-context-free-grammars/cited-by/) · [Proceedings of SSST, NAACL-HLT 2007 / AMTA Workshop on Syntax and Structure in Statistical Translation](https://aclanthology.org/volumes/W07-04/) · [licence](https://creativecommons.org/licenses/by-nc-sa/3.0/)

- [Publisher's page](https://aclanthology.org/W07-0404/)
- [PDF](https://aclanthology.org/W07-0404.pdf)
- [DOI 10.3115/1626281.1626285](https://doi.org/10.3115/1626281.1626285)
- [OpenAlex](https://openalex.org/W2101793943)

Citations: OpenAlex, 2026-10-14.

## Summary

A translation rule can put corresponding pieces of a sentence in different orders. When those pieces can be assembled in small groups on both sides, a parser can use the groups as intermediate results. Some reorderings resist that strategy. A group that looks complete in one language may have other material interleaved with it in the other. The paper asks how small the groups can be made while preserving what the original rule generates. It answers the question for synchronous [context-free grammar](https://md.research.elamur.ai/free/en/concepts/context-free-grammar/), a formalism that pairs grammatical expansions across languages. The answer matters for [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/) because the widest step in a grammatical derivation can determine how many string boundaries a parser has to consider together.

The authors turn each rule into a permutation that records the order of its linked pieces. They then look for groups that occupy uninterrupted stretches in both orders. A tree of such groups represents a valid factorization. The objective is to minimize the largest number of children at any node. A straightforward algorithm builds the tree by scanning the permutation and merging groups when it can. Its difficulty is that failed merges can keep reappearing as candidates. The authors adapt an algorithm for finding intervals common to two permutations so that impossible starting positions are dropped permanently. They also discard overlapping alternatives once a greedy merge has resolved them. The resulting algorithm computes the minimum branching factor in a running time that scales linearly with the input permutation’s length.

The paper uses that minimum as a measurement on hand-aligned translations involving [English](https://md.research.elamur.ai/free/en/topics/english/). The authors first select a maximum one-to-one matching of words from each alignment, then factor the order of those matched words. In the Chinese/English data, 451 sentence pairs have minimum branching factor 2, while 30 have minimum branching factor 4. The analysis also finds less frequent reorderings that require higher branching. The authors separately examine how much text the nonbinary structures cover. They report that only a small fraction of the alignments present nonbinary cases that escape treatment through phrases or flattened trees within windows of size 10. The algorithm establishes the branching requirement exactly for each selected permutation. The alignment analysis shows where those requirements arise in the sample and how the result changes when local coverage matters.

## Deep dive: Factorization of Synchronous Context-Free Grammars in Linear Time

How to factor synchronous grammar rules in linear time, and what minimum branching reveals about word order in aligned translations. · 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

#### A rule fixes an order on each side

A synchronous grammar describes paired strings. An ordinary context-free expansion replaces a nonterminal, a symbol for a part of the derivation that is still to be expanded, with material on its right-hand side. A synchronous expansion pairs two such instructions. Its shared indices identify occurrences that are to be expanded together. If a particular occurrence stands for a larger expression, the material produced from it on each side comes from the same synchronous continuation. The order of the indexed occurrences can still differ. A rule thus specifies both what can expand together and where the resulting material goes on each side.

The paper situates this setup in syntax-based statistical [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/). It identifies [Inversion Transduction Grammar](https://md.research.elamur.ai/free/en/papers/wu-1997-stochastic-inversion-transduction-grammars-bilingual/) as an example and also points to tree-transformation approaches such as [Yamada and Knight’s syntax-based approach](https://md.research.elamur.ai/free/en/papers/yamada-2001-syntax-based-statistical-translation-model/). What carries over among these examples is the need to describe translational correspondence along with changes in order. The number of linked places in a rule determines how many pieces can participate directly in a single rearrangement. A rule with many such places can express a wider range of orders. The same freedom makes the rule more expensive to apply during synchronous parsing.

There was an empirical reason to take long rules seriously. The paper describes earlier work in which extraction from large parallel corpora produced sizable rules. It also cites an analysis by Wellington and colleagues that used human word alignments to investigate how expressive a synchronous grammar needed to be. Their work gave reasons to expect demanding reorderings in aligned text. Restricting rule size from the outset therefore raised a coverage question. A smaller grammar rule could be cheap to apply, while the order it excluded could still arise in the material that a parser was meant to handle.

Factorization offers a different way to control rule size. It starts with the reordering the grammar already specifies and asks whether that particular reordering can be built from smaller ones. Imagine that several linked pieces occur next to one another in both languages. A new intermediate nonterminal can stand for their group. The enclosing rule can then move that group as a unit, while a separate rule preserves the order of the pieces inside it. The factorization succeeds only if reconstructing the original rule from the new ones recovers both orders and keeps the original links.

#### Why the largest combination matters

The paper motivates the optimization through bottom-up chart parsing. A chart records what grammatical structures can cover particular spans of the input. In synchronous parsing, an item refers to a span on each side. To combine child items under a synchronous rule, the parser must consider boundaries compatible with the order of the children on both sides. A convenient split in one string can correspond to a much less convenient arrangement in the other string. The identities of the children constrain which boundaries can be handled together.

For the binary case discussed by Wu, the paper gives the following bound.

```
O(N⁶)
```

Here `O` denotes an asymptotic upper bound, `N` measures input string length under the assumption that the paired strings are comparable in length, and the superscript `6` is the exponent. The exponent comes from jointly considering six boundary variables, with three in each language. In each string, the boundaries specify the beginning of the first child, their shared split, and the end of the second child. An inverted rule changes which child corresponds to which position across the pair. The binary arrangement still allows the same boundary accounting.

For an unrestricted higher-arity grammar, the paper gives a bound that can be as high as the following.

```
O(Nⁿ⁺⁴)
```

Here `O` again denotes an asymptotic upper bound, `N` is the comparable string-length measure, and `n` is the maximum number of linked nonterminals in a rule. The exponent is `n` plus `4`. As the paper explains, organizing the computation into binary steps on one side can keep that side to three boundary variables. A difficult permutation may still require as many as `n` plus one boundaries on the other side. The paper discusses these parsing costs in connection with earlier results on [SCFG complexity](https://md.research.elamur.ai/free/en/papers/satta-2005-some-computational-complexity-results-synchronous/).

These bounds concern what happens when a grammar is used. The factorization problem concerns what can be done to the grammar beforehand. A rule's original arity tells the parser how many linked pieces the rule mentions. It leaves open whether some of those pieces can be handled by a smaller rule whose result is reused inside the original operation. Which groups are available depends on the specific permutation. Two rules of the same length can consequently place different demands on a system even when both have been factored as far as possible.

#### From binarization to minimum branching

The most restrictive version of this operation is binarization. It seeks a derivation in which every combination joins at most two children. Earlier work on [synchronous binarization](https://md.research.elamur.ai/free/en/papers/zhang-2006-synchronous-binarization-machine-translation/) had addressed this case. As characterized in the paper, that work left aside grammars that could not be made binary. Zhang and Gildea take the remaining cases as part of the problem. A binary failure becomes a question about the smallest arity that does suffice. The answer may call for a wider operation in just part of a rule, with ordinary binary operations elsewhere.

The paper also describes a previous factorization strategy that organized the work using a balanced binary tree, in the manner of merge sort. It then turns to the related problem that supplies the mechanism for its own algorithm. Uno and Yagiura sought all intervals common to two permutations. A common interval is a set of elements that occurs contiguously in each order, even when its internal ordering differs. That property is exactly what a candidate intermediate group requires. The enumeration task has to retain all such groups, including ones that overlap. Grammar factorization calls for a tree, where groups must nest or remain separate. This difference in what must be returned makes it possible to use the interval method while doing less work.

Wellington and colleagues had approached alignment complexity from the level of parsing, counting the gaps a synchronous parser needed when it was allowed to use discontinuous spans. The branching question studies a related difficulty through contiguous groups. It asks how wide a combination has to be if every intermediate span is to remain continuous on both sides. The paper uses this distinction to connect a formal problem about rules with a measurement on human alignments.

### The method, step by step

#### Turn the rule into an ordering problem

The input to the factorization is a rule's pattern of links. Use the order of one side to give the linked occurrences consecutive labels. Read those labels in the order in which they occur on the other side. This gives a permutation, a sequence containing each label once. The paper treats nonterminal occurrences as the elements being ordered. Two occurrences with the same grammatical category can still be separate elements because their indices identify different links.

The schematic rule can be written as follows.

```
X → X₁⁽¹⁾ … Xₙ⁽ⁿ⁾ , X → Xπ₍₁₎⁽π⁽¹⁾⁾ … Xπ₍ₙ₎⁽π⁽ⁿ⁾⁾
```

`X` is the nonterminal being expanded, and each `X` with a subscript on the right stands for a variable that can take a nonterminal value. `n` is the number of linked occurrences. `π` is the permutation. A subscript written as `π₍ᵢ₎` denotes the occurrence in reference position `π(i)`, where `i` is a position in the permuted order. Parenthesized superscripts indicate linkage indices, with `π⁽ⁱ⁾` in this display denoting the index given by `π(i)`. Matching indices on the two sides specify a shared expansion. The arrow indicates a grammatical expansion, the ellipses stand for the intervening occurrences, and the comma separates the two sides of the synchronous rule.

In the paper's main example, the reference order is alphabetical by occurrence, from A through G. The other side reads E, G, D, F, C, A, B. The numeric version used throughout the algorithm discussion is as follows.

```
π = (5, 7, 4, 6, 3, 1, 2)
```

`π` names the whole permutation. Parentheses enclose the list in its scanned order, and the commas separate its entries. Each numeral identifies the position of the corresponding nonterminal occurrence in the reference order. For instance, the initial E has label `5`, and the final B has label `2`.

A group is available if its elements occur next to one another in the scan and occupy consecutive labels in the reference order. This is why the initial four entries can be combined. They stand for the contiguous group from D through G, even though they appear internally as E, G, D, F. C can then join that larger group. A and B already form another group. At the root, the original rule places the A–B group first on one side and the C–G group first on the other. The root can therefore preserve that ordering with a binary swap.

The same explanation works with a matrix representation of the permutation. The axes give the positions in the two orders, and a point marks each correspondence. A usable group occupies an unbroken set of positions along each axis. The points inside can take different relative positions. The places the grammar is allowed to cut are determined by the extent of a group on both axes. Once a group has been identified, the algorithm only needs its internal permutation for the rule that constructs it. The group can be treated as a single child when a larger unit is built.

Minimum-branching factorization of a synchronous rule The steps in order.

#### Define the trees the algorithm can return

A single element is already a complete tree. A longer sequence can have a tree if it admits a partition into adjoining segments, each of which has its own tree and consists of consecutive reference labels. The parent identifies the relative order of those child segments. This recursive definition requires every subtree to have a continuous span in both orders. It also accounts for nesting. An element can belong to a small group and a larger group that contains it. Two groups in separate branches must have distinct elements.

To ask whether a permutation is parsable under a given arity bound, the paper allows the following range at an internal node.

```
k ≥ k′ ≥ 2
```

`k` is the bound for the tree, `k′` is the number of children at the node, `2` is the minimum number of children in a combination, and `≥` means greater than or equal to. Each child must itself be parsable under the same bound. A leaf requires no combination, so the lower bound in this display concerns internal nodes.

The parent can put the children in any of the following number of orders.

```
k′!
```

`k′` again counts the children. The exclamation mark denotes the factorial, the number of arrangements of those distinct child positions. The tree stores the particular arrangement the rule uses. For a child containing several elements, its position in this arrangement records where its whole block occurs. Its own subtree records the order inside the block.

The optimization is over the largest child count in the tree. It does not depend on all branches having the same size. The example makes the distinction concrete. The A–B group uses the identity order, C joins the D–G group in inverted order, and the root is also inverted. The D–G node still needs the wider combination whose relative order is shown below.

```
(2, 4, 1, 3)
```

The parentheses delimit a permutation of child positions. The four entries label those children in reference order, and their sequence is the order on the other side. D is the first reference child of this node, E the second, F the third, and G the fourth. The relative order therefore describes E, G, D, F within that group. The paper's trace finds no proper multi-element reduction inside this block before the whole block can be reduced.

To recover grammar rules from a tree, each internal node gets a paired expansion following its label. At the root of the example, the rule expands the original left-hand-side category into the newly named A–B and C–G groups in the appropriate orders. The A–B rule expands the first group into its original children. The C–G rule joins C and the new category for D–G. The D–G rule retains the order of the four original occurrences. New nonterminals are used for the intermediate groups so that each stands for the intended part of the original expansion. Composing the new rules recovers the original pair of right-hand sides. Applying this construction independently to the grammar's rules keeps the increase in grammar size within a constant factor, as the paper states.

#### Build a first parser with a stack

The first algorithm is a shift-reduce parser. A shift advances the scan and puts the next input element on a stack. A reduction replaces an adjoining collection of items at the top of that stack with the group they form. At any moment, a stack item stands either for an individual element or for an already constructed group. Together the items cover the part of the permutation that has been read. Their order in the stack is their order in that scanned prefix.

After shifting, the algorithm looks at collections ending at the top item. It starts with small collections and extends them down the stack, tracking the total number of elements and the smallest and largest labels in the collection. As soon as the labels make an interval, the algorithm merges those items into a parent and restarts the search from the new top. If there is no eligible merge, it shifts again. Under a specified branching bound, it stops looking after it has considered as many items as a node may have. Once the input is exhausted, success means that a single item covers the permutation.

The interval test works because all labels are distinct. A collection of a given length can fill the integer range from its minimum to its maximum only if the extent of that range agrees with its length. If a label inside the range is missing, the extremes span more space than the elements can fill. This is the partition property used in the stack algorithm. Each child is already continuous in both orders, so the test for their union suffices to determine whether they can become the children of a new group.

In the example, the parser shifts the entries from E through F before it can combine the initial block. Shifting C then allows the block that has just been made to merge with C. After A and B are both available, the parser first joins them in reference order. This creates a fresh opportunity to join the A–B and C–G groups. Both merges finish at B in the scan. They belong at different levels in the tree, which is why an algorithm must be able to make several nested reductions before taking another input item.

With a supplied branching bound, the paper gives the time cost as follows.

```
O(n · k)
```

`O` denotes an asymptotic upper bound, `n` counts entries in the permutation, `k` is the maximum number of items considered for a reduction, and the centered dot denotes multiplication. As the search steps down the stack, adding one item lets it update the length and extremes incrementally. A successful reduction also shrinks the stack. Across the scan, there are only linearly many shifts and successful reductions to trigger these bounded searches.

To discover the smallest bound directly, the stack algorithm can continue past any pre-defined child count. Unsuccessful searches then become expensive. If the stack grows while successive shifts provide few reductions, the parser can examine a large part of that growing stack each time. The paper gives this worst-case bound for the unrestricted stack search.

```
O(n²)
```

`O` denotes an asymptotic upper bound, `n` is the number of entries, and the superscript `2` means that the bound is quadratic in that number. The paper reports a different bound for the earlier balanced-tree strategy.

```
O(n log n)
```

`O` denotes an asymptotic upper bound, `n` is the permutation length, and `log n` is its logarithm. The formula bounds the running time of the earlier factorization strategy described by the authors. Both approaches still encounter reduction tests whose failure could have been anticipated from earlier spans. The linear algorithm addresses that source of work directly.

#### Give each potential span a gap count

The paper illustrates repeated testing with the segment that begins with `7` in the running example. When `4` arrives after `7`, the pair spans a range that contains `5`. That label appeared earlier and sits outside the candidate span. Appending more elements on the right can never bring it into a span whose start is fixed at `7`. The same witness is still available when `6` arrives. A search that retains the start simply rediscovers the obstruction. The faster algorithm learns to remove such starts using the changing minimum and maximum of candidate spans.

The paper indexes these spans as follows.

```
1 ≤ x ≤ y ≤ n
```

`x` and `y` are the inclusive left and right positions in the scanned order, respectively. `n` is the permutation length, `1` is the initial position, and `≤` means less than or equal to. During an iteration, `y` is fixed at the newest input position. Different candidate values of `x` specify suffixes of the prefix ending at `y`.

The lower extreme is defined by the following expression.

```
l(x, y) = min {π(i) : i ∈ [x, y]}
```

`l(x, y)` is the smallest reference label in the span from `x` through `y`. `min` means minimum. `π(i)` is the label at scan position `i`, and `i` ranges over the inclusive positions in `[x, y]`. The braces enclose the set of labels, the colon means “such that,” `∈` means belongs to, and `=` gives the defining equality.

The upper extreme is analogous.

```
u(x, y) = max {π(i) : i ∈ [x, y]}
```

`u(x, y)` is the largest reference label in that span, and `max` means maximum. `x` and `y` are the two span endpoints. `π(i)` again maps scan position `i` to its reference label. The braces and colon specify the set of labels, `i ∈ [x, y]` restricts the positions to the inclusive span, and `=` defines its upper extreme.

The difference between the extent of the reference labels and the extent of their scan positions is the test quantity.

```
f(x, y) = u(x, y) − l(x, y) − (y − x)
```

`f(x, y)` is the gap count for the span. `u(x, y)` and `l(x, y)` give the upper and lower label extremes. The minus signs indicate subtraction. The parenthesized expression takes the difference between the right and left positions. This counts the extent between position endpoints on the same basis as the difference between label endpoints. With distinct labels, the reference range is at least as wide as the position range, so the gap count is non-negative.

The interval condition can now be written as follows.

```
f(x, y) = 0
```

`f` measures the gaps inside the reference range of the span beginning at `x` and ending at `y`. Equality to `0` means that range is filled. A span made from several current children can then be reduced. A singleton also satisfies the formula and serves as the simplest surviving group. When the algorithm handles several zero counts together, the singleton is the starting point for those combinations, not a separate branching operation.

For a fixed right endpoint, moving the left endpoint toward the beginning can only enlarge the set of labels. The upper extreme stays at the same value or rises. The lower extreme stays at the same value or falls. Both traces can be represented as stairs, with a run of positions sharing the same extreme. The gap count is more complicated because it includes the length of the span. It can rise or fall as a candidate start changes. The central operation of the fast algorithm is to keep a subset of starts on which the gap counts are ordered.

#### Keep the ordered part of the search

The authors store candidate starts in an ordered doubly linked list. A position is appended when it first arrives. Older positions can be removed from inside the list, which is harder to arrange with a stack alone. At the end of each update, neighboring candidate starts are supposed to satisfy the following relationship.

```
f(xᵢ, y) ≥ f(xᵢ₊₁, y)
```

`xᵢ` is a retained start and `xᵢ₊₁` is the next retained start to its right. The subscript `i` gives the position within the list, and `i + 1` gives its successor. `y` is the current end of the scan, `f` is the gap count, and `≥` means greater than or equal to. The relationship says that the retained gap counts are nonincreasing as the list is read from left to right. Since every gap count is non-negative, the zeros are consecutive at the right-hand end. They can be located by looking only as far as the first positive entry.

To keep that property after a shift, first locate the pivot, written `x*` in the paper. It is the earliest existing start for which the newly read label changes an extreme. For starts before the pivot, the label lies inside the old range. For starts affected through an increase of the maximum, it lies above the old range. In the other case it lies below the old range and decreases the minimum. The nested ranges for a common right endpoint make the affected older starts a suffix of the list. The new singleton sits at the right and has gap count zero by construction.

In the first pruning operation, compare the old extrema across the affected suffix. If the new label raised the maximum, remove the starts whose previous maximum was smaller than the pivot's previous maximum. The pivot's old maximum is itself an input label. For each of those later starts, it occurred too far to the left to be included. It also falls inside the new range of the later span, between its previous maximum and the incoming label. Its absence is permanent for that start. When the new label lowers the minimum, the argument uses the pivot's old minimum and removes starts with a larger previous minimum. This operation can eliminate a whole suffix in one update.

The remaining older starts on the pivot's side now share the relevant old extreme. They consequently undergo a uniform change on extension. All their old maxima are replaced by the same new maximum, or all their old minima by the same new minimum. The opposite extreme for each retained start stays where it was. Since the extent of the scan has increased by the same amount for each, the changes in gap count are also the same within this part of the list. The order that held there before the shift is preserved.

The change is different before the pivot. Both extremes for these starts stay fixed while their spans lengthen. Their gap counts fall together. The boundary at the pivot can therefore violate the desired order even though the positions on each side still satisfy it internally. The second pruning operation looks at the start immediately before the pivot and compares its gap count with the gap counts beginning at the pivot. It deletes starts at the front of the right-hand part until the remaining counts fit in order after the left neighbor. If the pivot has no predecessor, there is no boundary between older starts to repair.

There is a direct way to understand the second deletion test. Compare a longer span starting before the pivot with one of the shorter spans considered for deletion. The shorter span has fewer entries and a label range contained in the longer span's range. If it has more gaps, the extra entries in the longer span outnumber the label positions available outside the shorter span's range. Some extra entry must be inside that range. It is to the left of the shorter span's start, so extending the shorter span farther right leaves that entry missing. The inversion in the gap counts supplies evidence of permanent failure. Pruning therefore does more than arrange the list for fast access. It removes spans whose future cannot include the required labels.

The running example illustrates both tests. At scan position `3`, which contains `4`, the pivot is at position `1`, and position `2`, which contains `7`, is eliminated by the comparison of old extrema. At scan position `4`, which contains `6`, the pivot is at position `3`. The boundary comparison eliminates that pivot itself. With either of those discarded starts, the earlier occurrence of `5` prevents the corresponding suffix from filling its range. The paper's figure shows the upper and lower stairs at successive right endpoints, with the deleted starts marked. It shows the gap values for the whole example as well as the subset that remains ordered on the list.

#### Reduce the zeros and keep the resulting boundary

Once the list has been pruned, the algorithm visits the zeros from the right. They identify the reducible suffixes at the current endpoint in order from shortest to longest. A short merge can become a child of a longer one at the same endpoint. When these merges have been made, the leftmost start of the zero run survives as the boundary of the resulting group. The other zero starts lie inside that group. If only the new singleton qualifies, it remains a candidate for a later merge.

Deleting an impossible start and consuming the start of an already merged child have different justifications. In the first case, a missing label blocks any future valid span with that start. In the second case, a start can still belong to a common interval that overlaps the group just formed. The paper gives C as the example. It participates in the merge on its left with the D–G group. It could also take part in an interval with the A–B group on its right. Retaining C as an independent start would preserve that second possibility for enumeration. The factorization elects the earlier merge, leaving C available through its place inside the larger group.

The safety of that choice follows from how trees behave under restriction. Take a common interval selected as a group and imagine a tree that achieves an arity bound for the current permutation. Restrict the leaves of the tree to the group, discarding empty branches and collapsing nodes with a single remaining child. The induced orders give a tree for the group, and the restriction cannot increase a child count. A second restriction keeps all elements outside the group and a representative from the group. Because the group is contiguous on both sides, that representative occupies the position of the whole group in the induced orders. This second tree supplies a way to arrange the contracted group with the rest. Inserting the group's tree at the representative recovers a full tree under the same arity bound.

This also explains why the greedy parser can use the smallest available merge at a newly scanned position. At the start of a scan step, earlier available reductions have been exhausted. If the current suffix can be reduced under a given bound, some deepest internal node in a tree for it combines current items directly. A node ending before the newly read position would already have offered a reduction. A deepest node ending at that position therefore supplies a candidate suffix whose child count fits the bound. The shortest reducible suffix uses no more children than that candidate. Contracting it preserves the existence of a bounded tree, so the reasoning can be repeated. The ordered-list algorithm finds the same reductions because its permanent deletions remove only starts that cannot be valid. This gives the link from the local test to the minimum largest branching factor across the tree.

#### Account for the total work

The data structures for the extremum functions matter to the time claim. The authors group equal extrema into runs and represent the runs with linked lists, cross-linked to the candidate list. A known candidate start can reach the relevant extrema directly. A search for the pivot can follow the stair runs backward from the right, passing over stretches of starts together. Scanning for the pivot and deleting obsolete runs are charged to the runs that disappear in that update. The paper's accounting bounds the total number of such runs created across the scan by the input length.

The other operations receive similar accounting. A candidate position is created when the scan reaches it. Once pruning or reduction deletes it, subsequent iterations cannot pay for deleting it again. Tests that end a deletion scan incur only a bounded overhead at that iteration. Exposing several nested reductions at one position can take several operations, but the inner starts they consume are removed from the list. This is an amortized analysis, meaning that the bound applies to the total work across the input even when an individual iteration performs several updates.

The resulting factorization bound is as follows.

```
O(n)
```

`O` denotes an asymptotic upper bound, and `n` is the number of input permutation entries. The authors point out that the input itself takes linear time to read. The bound is for factorizing a rule's permutation, with the tree then giving the smaller rules. It is separate from the string-length bounds for using an already constructed grammar in synchronous parsing.

For comparison, the paper states this bound for the common-interval enumeration on which it builds.

```
O(n + K)
```

`O` denotes an asymptotic upper bound, `n` counts permutation entries, `K` is the number of common intervals returned, and `+` denotes addition. In the worst case, the number of common intervals itself can have the following lower bound.

```
Ω(n²)
```

`Ω` denotes an asymptotic lower bound, `n` is the permutation length, and the superscript `2` denotes a square. A tree can represent a choice of groupings without listing every overlapping interval. The paper also states that all common intervals can be generated by transforming the tree. The time for returning the tree and the time for expanding it into a potentially much larger collection are distinct.

#### Prepare the alignments for the same analysis

The empirical input starts as a graph. Words on one side of a sentence pair form one set of vertices, words on the other side form the other set, and an annotated word link is an edge between them. A word can have more than one link in the human alignment. The factorizer needs a permutation, which requires each element in its input to have a single counterpart. The authors therefore use a maximum matching, a selection with as many edges as possible subject to each word occurring at most once among the selected edges.

The selected links supply an ordering on each side. Number the matched positions in one sentence and read those labels in the order of their counterparts in the other sentence. The result has the same structure as the permutation of nonterminal occurrences in a rule. The factorization algorithm can then report the smallest branching bound for that matched ordering. No parameter estimation is part of this procedure. The human annotation supplies the graph, matching determines the permutation, and factorization supplies the tree and its largest child count.

The authors also examine the words covered by nonbinary nodes. This uses the position of the matched blocks in the sentences, where a node may cover several words even when its child count is small. The branching measurement answers how many parts have to come together. The coverage measurement addresses how much text that difficult combination spans. Both properties matter to the comparison with earlier work on whether local phrases can absorb difficult reorderings.

### Experiments and results

#### What the data and counts represent

The experiments reuse the human alignment data studied by Wellington and colleagues. The pairs include Chinese/English, Romanian/English, Hindi/English, and Spanish/English. The study also includes [French](https://md.research.elamur.ai/free/en/topics/french/) paired with English. The reported distributions are for the aligned sentence pairs in these samples. Each sentence pair contributes a classification of the permutation obtained from its selected matching. The paper does not describe separate training and test splits because the experiment measures properties of the aligned data and involves no fitted parameters.

The main metric is the sentence count at a given minimum branching factor. A count at a lower arity includes only examples whose minimum is that value. A higher-arity row records those that need that arity and cannot be accommodated with the immediately lower bound. Read this way, the results are about irreducible requirements under the continuous-span tree definition. A higher count for a particular language pair can also reflect the size of its alignment sample. Counts alone do not rank the language pairs by the prevalence of a given phenomenon.

The binary case provides the immediate structural baseline. An alignment permutation that has a binary factorization fits the branching restriction of inversion transduction grammar, abbreviated ITG. A case above that bound requires at least one wider node in this analysis. The paper also uses Wellington and colleagues' results as a point of comparison. Their parser could make discontinuous spans and measured the associated gaps. The current analysis gives the exact smallest branching bound after choosing a matching, a quantity whose definition does not refer to gaps in the intermediate spans.

#### Where binary factorization suffices

Hand-aligned sentence pairs with minimum branching factor 2 The Chinese/English sample has the largest raw count of binary cases among the alignment sets.

**The numbers**

| System or setting | sentence pairs |
| --- | --- |
| Chinese/English (this paper) | 451 |
| Romanian/English | 195 |
| Hindi/English | 85 |
| Spanish/English | 195 |
| French/English | 425 |

The chart compares the raw sentence counts of the same setting across the samples. Its star marks the largest observed count. Each bar represents sentence pairs for which every merge can be expressed with at most two children. The distribution establishes that binary groups account for a large portion of the observed permutations. At the same time, these counts give no information on their own about the span lengths of difficult cases. A sentence can use many binary operations over substantial spans and still remain inside the binary class.

A practical interpretation of the binary tally is that a substantial number of the measured alignments permit repeated combination by keeping both sides continuous. The permutation can still contain inversions. Binary factorization permits a group to preserve or reverse its child order, and a tree can compose many such decisions. The width of the required operations is what the counts track. They do not tell how many swaps occur in a derivation or how deep the resulting tree is.

#### Where wider rules are required

Hand-aligned sentence pairs with minimum branching factor 4 Each alignment set contains cases requiring this wider branching, with the largest raw count in Chinese/English.

**The numbers**

| System or setting | sentence pairs |
| --- | --- |
| Chinese/English (this paper) | 30 |
| Romanian/English | 4 |
| Hindi/English | 1 |
| Spanish/English | 4 |
| French/English | 9 |

Here the star again marks the largest raw count for the setting shown. Each counted permutation needs at least one node with the branching factor named in the chart, even when all smaller groupings that can be factored out have been taken into account. The figures therefore isolate a structural difference within the same alignment procedure. There are matching-derived permutations in each sample that fail the binary criterion. The algorithm can go further and say which arity suffices for them.

The results include still higher requirements. The paper singles out the order below as an example of the higher-order patterns it finds.

```
(3, 1, 5, 2, 4)
```

The entries identify positions in the reference order, and their order inside the parentheses is their order on the other side. The commas separate successive positions. This is the example the authors use to show that the observed failures of binary parsing include higher-order patterns. They describe those patterns as sparse. The distribution is informative precisely because it can distinguish these extra requirements inside the set that a test of binary parsability would collect under a single failure outcome.

A large maximum branching factor means that a difficult substructure remains somewhere in the permutation. The rest of that sentence can still admit smaller groups. In the same way, a branching factor from the sentence-level analysis does not say how frequently the widest rule would have to be used. The counts measure whether a given width is required at least once in each classified sentence pair. This makes them a way to describe coverage by an arity bound rather than a tally of how many rule applications of each arity occur.

#### How large the difficult regions are

The authors next examine the terminal words covered by nonbinary synchronous nodes. Their final tabulation singles out cases with branching factor at least `4` and coverage exceeding `10` words. This criterion adds a span condition to the arity condition. A node can have an order that is intrinsically difficult to factor while still occurring within a stretch short enough to be handled as a phrase or by flattening part of a tree. Flattening here means treating a local piece of the hierarchy as a wider construction. The size test asks how frequently such a local treatment would fail to encompass the difficult region.

For the translated sentence pairs, the authors report that only a small fraction of the non-ITG cases pose this problem under a window of size `10`. They contrast this observation with Wellington and colleagues' findings for English/English bitext. In that setting, the earlier study found that most of its non-ITG cases remained outside what phrases of length up to `10` could handle. The earlier observation concerns its own data and its treatment of parser gaps. The current one concerns the span of difficult structures in five translation alignment sets under the maximum-matching procedure.

This additional result matters for interpreting what a coverage failure would require from a grammar. An arity count answers whether a wider combination ever becomes necessary when all subtrees must have continuous spans. A window condition asks whether that combination is small enough in the text to be included whole in a local rule. A sentence can count as nonbinary under the first criterion and fit within the practical locality condition under the second. The paper reports alignment structure and coverage. It supplies neither a timed comparison of complete parsers nor translation scores for grammars constructed at different arity bounds.

### What the ablations show

The paper reports no component ablations. It instead analyzes the behavior of the factorizer through a shared execution example, compares worst-case costs, and examines how the interpretation of alignment complexity changes when word span is considered along with branching.

#### Repeated tests come from starts that survive too long

The execution example compares the stack search and the pruned search on the same ordering. Both advance left to right. Both can make a new group when the covered labels fill a reference interval, and both reduce greedily. The difference lies in what they carry from one scan position to the next. The stack search can revisit the start at `7` after previously seeing that `5` is missing. The linked-list search drops that start at the point where the missing value proves it can never work. At the following scan point the start at `4` can also be discarded, through the gap-count comparison across the pivot. These are different tests acting on the same kind of permanent obstacle.

This comparison identifies what makes the interval test economical. Checking the extremes of an individual candidate can already be done efficiently in the stack algorithm. Repeatedly selecting starts that cannot succeed is what makes the entire search expensive. Pruning lowers the total candidate work, while the linked representation of the stairs lets the update skip runs of starts sharing an extreme. The paper analyzes those operations together. The example makes their roles visible without assigning an independent speed contribution to either pruning operation.

The execution example also illustrates the role of a successful reduction. A zero gap count can consume several starts, which become internal to a new group. Removing those starts avoids the later work of exploring overlapping groups. This is a separate source of savings from eliminating impossible starts. An interval enumerator must retain starts that can still produce other intervals. A factorizer can finish with a single choice because the proof permits greedy contraction without raising the required branching factor.

#### The same input permits different output sizes

The comparison with Uno and Yagiura isolates a change in the output requirement. Their problem is to enumerate all common intervals. Even a short description of an input order can imply many valid intervals. The factorization keeps a nested structure whose role is to produce smaller rules, and overlapping alternatives need not be explicitly emitted. The authors identify the treatment of reducible starts as the important change to the enumeration procedure. They also note a difference in scan direction, while grounding the running-time argument in the removal and retention of list entries.

The stack, balanced-tree, and linked-list analyses speak to growth with permutation length. The stack becomes quadratic when it is used to find the unknown minimum. The balanced-tree approach improves that bound by changing the organization of the search. The authors' procedure gives a linear worst-case bound by ensuring that scans which process candidates can be paid for through operations that permanently consume them. The evidence consists of counting these operations and explaining which earlier tests they avoid. The paper does not offer an empirical crossover point at which the extra bookkeeping pays off.

#### Branching and locality answer different questions

The binary and higher-arity distributions expose structure that a single count of failed binary parses would hide. They establish that the failures cover several branching requirements, and the higher-order example shows what one of those additional requirements looks like as a permutation. Adding the word window asks a different question of the same alignment material. Some cases that genuinely require nonbinary structure occupy a small enough portion of text to be handled together locally. The paper reports relatively few cases that are demanding under both criteria.

The comparison to English/English bitext helps specify what that observation supports. The locality findings differ across the analyses. The data and the way each analysis represents alignment complexity also differ. Consequently the comparison establishes a difference in the reported observations, while leaving the explanation for that difference open. The paper's own measurement is most directly interpretable as the branching and span profile of the selected translation alignments.

### Limitations

#### The scope the authors state

The formal problem concerns the ordering of linked nonterminal occurrences in individual synchronous rules. The authors factor each rule by analyzing its associated permutation. A group has to cover a continuous span in each order, and the objective is the largest child count in the resulting tree. The equivalence claim is generative. Expanding the intermediate categories produced by the factorization recovers the original synchronous expansion. The paper does not present this objective as a general optimization of a weighted translation system or as an optimization of all uses of a new grammar.

The distinction matters because several quantities can vary even when two trees have the same maximum arity. One may use a different arrangement of intermediate groups or have a different shape. The algorithm's proof establishes that the largest combination is as small as possible. The paper bounds the growth of the grammar by a constant factor. It does not aim to minimize the number of distinct new nonterminals across the entire grammar, or to select a tree by the eventual costs of particular rule applications on a corpus.

On the empirical side, the authors explicitly describe losing links when they turn human alignments into permutations. Their maximum matching takes as many links as possible under the one-to-one restriction, and the permutation is built from that selection. They describe this as retaining a backbone of the alignment. The full annotation may contain further connections. The measured branching factor is consequently exact for the chosen backbone under the paper's tree definition. A demand placed by an omitted connection is outside that exact claim.

The authors use a specific locality test when discussing difficult cases. They count nonbinary configurations that extend beyond a window of size `10` because they want to assess treatment by phrases or tree flattening within that window. Their finding about rarity is scoped to this condition and to the translation data they analyze. A window cutoff describes which spans could fit into a local treatment at that scale. It does not measure the frequency with which a particular grammar already contains the needed phrases.

#### Further limits of the experimental setup

Maximizing the number of retained links leaves the possibility of a tie. Two matchings of the same size can select different edges when a word has competing counterparts. The paper does not report how sensitive the branching distribution is to alternative maximum matchings. The factorizer's correctness guarantees that each resulting permutation can be analyzed. That guarantee does not make the projected permutation unique for an alignment graph. The measurements therefore combine properties of the annotated links with the effect of selecting a one-to-one projection.

The reported counts also do not control for the amount of material available in each language-pair sample. A larger count can come from a larger sample or from a greater prevalence of the pattern. The paper gives sentence counts by branching class and flags cases that meet its span condition. It offers no sampling intervals or tests designed to establish population-level differences between languages. Nor does the study show how the profile depends on sentence length or on the number of matched words available in an example. Such effects matter because what can be observed in a permutation depends partly on how many positions survive the projection.

There is also a difference between a sentence-level maximum and the complexity of a grammar extracted for use. The empirical measurement asks how wide the widest necessary node is when the selected ordering is decomposed. The observed width does not establish that a grammar induction procedure would extract the corresponding rules, how often the rules would appear, or how they would interact with rules learned from other sentences. The paper uses branching as a direct structural measurement. Estimating an operational grammar inventory or decoder workload would require observations beyond that measurement.

Similarly, the theoretical gain concerns the worst-case time to factor a permutation. The paper does not measure the runtime of the linked-list implementation against the stack and balanced-tree alternatives on the alignment samples. It also does not measure the subsequent runtime of parsing equivalent grammars before and after factorization. The complexity motivation explains why smaller rules are attractive, and the analysis proves that the factorization itself has a linear bound. How much time an entire pipeline saves depends on which rules it applies and what other work the pipeline performs.

Finally, the continuity requirement gives the minimum its precise meaning. Allowing a single child to cover several separated regions changes the set of legal trees. Earlier work with gaps is therefore relevant as another way of representing difficult alignments. The paper does not derive a single conversion from its minimum branching factor to the number of gaps needed by such a parser. The measurements concern related structural restrictions, and a direct numerical comparison would require holding the alignment representation and permitted operations fixed.

### What came after

#### From aligned words to extracted rules

[Extracting Synchronous Grammar Rules From Word-Level Alignments](https://md.research.elamur.ai/free/en/papers/zhang-2008-extracting-synchronous-grammar-rules-word/) takes up a neighboring stage of grammar construction. Its stated output is a set of synchronous grammar rules obtained from word-level alignments, and its title makes linear time part of that extraction problem. In the factorization paper, alignments serve as empirical inputs after selection of a one-to-one matching, while the core transformation starts with the ordering of a rule that is already specified. The extraction work addresses how to obtain grammar rules from the alignment itself. The connection is the use of aligned structure to make a grammar computation tractable. The citation establishes that the earlier paper is part of the later work's context. It does not establish which of the factorizer's pruning steps the extraction algorithm uses.

[Binarization of Synchronous Context-Free Grammars](https://md.research.elamur.ai/free/en/papers/huang-2009-binarization-synchronous-context-free-grammars/) revisits the particular branching target that motivates the general problem. A binary decomposition is the case where every group can be built by combining pairs of children. The factorization paper supplies a way to decide whether that is possible and to identify the smallest wider branching bound whenever it is needed. The later work addresses binarization itself, bringing the discussion back to how synchronous grammar rules can be expressed through binary operations. Its citation places minimum-branching factorization in the line of work around that transformation. The title and citation do not specify how its procedure handles rules whose permutation requires wider branching.

Together, these works identify two places where the representation of correspondence becomes consequential. Extraction concerns the movement from alignments to rules. Binarization concerns the internal structure of the resulting grammatical description. The factorization paper sits between those questions in a precise sense. Its empirical analysis starts from alignments to measure what widths arise, and its theoretical result starts from rules to find the smallest width that preserves their order. The later works cite it from different sides of that division.

#### From grammar structure to translation evaluation

[Fitting Sentence Level Translation Evaluation with Many Dense Features](https://md.research.elamur.ai/free/en/papers/stanojevic-2014-fitting-sentence-level-translation-evaluation/) moves to the task of scoring translations at sentence level. Its stated method concerns fitting an evaluation measure using dense features. That places the work at a different stage from selecting a grammar representation or measuring the minimum rule width of an alignment. The citation connects the studies within research on translation, but the stated scope gives no basis for identifying minimum branching as a fitted feature or for describing the feature set in more detail.

[Taking MT Evaluation Metrics to Extremes](https://md.research.elamur.ai/free/en/papers/fomicheva-2019-taking-mt-evaluation-metrics-extremes/) also concerns assessment of translations. It frames the problem around what can be learned about evaluation metrics beyond their correlation with human judgments. The factorization paper offers a particular example of a narrowly defined quantity on aligned text. Minimum branching has an exact interpretation once the matched permutation and legal tree operations have been fixed. A translation evaluation metric addresses a different measurement question. The later citation does not establish that this evaluation work uses the permutation tree or transfers the minimum-branching quantity into a score.

The grammar papers carry forward problems closest to the formal result, namely how rules are obtained and how far they can be decomposed. The evaluation papers show the citation appearing in work with different outputs and criteria. Their stated aims support a connection at that level. Specific claims about algorithmic reuse or about the effect of factorization on the later evaluation methods would require evidence beyond the citation and their stated scope.

## Cite

Cite as Hao Zhang and Daniel Gildea. 2007. Factorization of Synchronous Context-Free Grammars in Linear Time. Proceedings of SSST, NAACL-HLT 2007 / AMTA Workshop on Syntax and Structure in Statistical Translation.

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

```bibtex
@inproceedings{zhang2007factorization,
  title = {{Factorization of Synchronous Context-Free Grammars in Linear Time}},
  author = {Hao Zhang and Daniel Gildea},
  booktitle = {Proceedings of SSST, NAACL-HLT 2007 / AMTA Workshop on Syntax and Structure in Statistical Translation},
  year = {2007},
  doi = {10.3115/1626281.1626285},
  url = {https://doi.org/10.3115/1626281.1626285}
}
```

> 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)
