Efficient Transformation-Based Parsing

Giorgio Satta, Eric BrillACL 1996

Abstract

Transformation-based parsing (TBP) is a powerful paradigm for natural language processing, yet its standard implementation suffers from significant computational overhead. This paper introduces an optimized algorithm that improves parsing speed by two to three orders of magnitude. By representing a sequence of tree-rewriting rules as a single deterministic tree automaton (DTA), the system shifts complexity from the total rule set size to the number of rules actually applied. This approach effectively exploits the sparseness of rule applications in typical linguistic data.

The Challenge of Transformation-Based Parsing

Transformation-based parsing operates by iteratively refining an initial, simple parse tree through a sequence of ordered "rewrite rules." While these rules are easy to learn automatically and provide high accuracy, the naive application algorithm is notoriously inefficient.

In the standard approach, the parser must check every rule in an ordered list against every possible node in the tree. For a typical sentence and a standard rule set (e.g., the 300 rules described in Brill, 1993), this results in thousands of checks. However, empirical observations suggest that, on average, only one rule actually applies per node. This "sparseness" means the standard algorithm spends the vast majority of its time confirming that rules do not apply.

Examples of tree-rewriting rules where an initial structure is iteratively transformed into a more accurate parse.

Methodology: Compiling Rules into Automata

To address this bottleneck, the authors propose a two-step optimization strategy centered on simultaneous rule matching and efficient state updates.

1. Preprocessing with Tree Automata

Instead of checking rules sequentially, the entire rule set is compiled into a single Deterministic Tree Automaton (DTA). This automaton performs a bottom-up (post-order) scan of the tree, identifying all potential rule matches in a single pass. The cost of matching is no longer multiplied by the number of rules ($\pi$); instead, the automaton transitions depend only on the alphabet and the tree structure.

Formal transition functions of a DTA, which allow the parser to detect multiple rule matches simultaneously during a single tree traversal.

2. Efficient Local Updating

When a rule is applied, it modifies the tree structure. Rather than re-scanning the entire tree, the authors demonstrate that rule applications have a limited "horizon" of effect. By using a heap-based priority queue, the parser tracks pending rule applications and only updates the DTA states for the specific nodes affected by a change. This ensures that the work performed is proportional to the number of actual transformations rather than the total number of rules.

Complexity and Performance Insights

The standard TBP algorithm runs in $O(\pi \rho n)$ time, where $\pi$ is the number of rules and $n$ is the sentence length. In contrast, the proposed algorithm runs in $O(|T| + \rho t \log t)$ time, where $t$ is the number of actually applied rules.

Since $t$ is typically much smaller than $\pi \times n$, this represents a massive theoretical and practical speedup. In systems with large, lexicalized rule sets, this translates to a performance increase of 2 to 3 orders of magnitude. This optimization effectively brings tree-based transformation parsing in line with the linear-time performance of finite-state string taggers.

Limitations and Future Considerations

While highly efficient, the DTA approach involves a trade-off between speed and memory. The number of states in the DTA can grow exponentially relative to rule size in the worst-case scenario. Although this is rarely encountered in natural language applications, exceptionally large rule sets might lead to onerous memory requirements. Future work may explore hybrid approaches that balance the rapid matching of DTAs with the memory efficiency of traditional top-down algorithms.

Summary updated

BibTeX
@inproceedings{satta1996efficient,
  author = {Giorgio Satta and Eric Brill},
  title = {{Efficient Transformation-Based Parsing}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {1996},
  doi = {10.3115/981863.981897},
}
Figure