Enhancing the Transformer Decoder with Transition-based Syntax

Leshem Choshen, Omri Abend

Abstract

Modern Transformer-based neural machine translation models often suffer from "syntactic amnesia," struggling to maintain long-distance grammatical dependencies during generation. This paper, presented at CoNLL 2022, introduces a novel architecture that integrates transition-based parsing directly into the Transformer decoder. By jointly predicting syntactic transitions and words, and employing a bidirectional attention mechanism (biTran), the model develops a structural awareness that significantly improves performance on complex linguistic constructions. Our results show consistent gains across standard benchmarks and specialized syntactic challenge sets.

Introduction: The Challenge of Syntactic Generalization

Despite the transformative impact of the Transformer architecture in NLP, these models frequently fail at syntactic generalization. A prominent example is the "split verb" construction in German or English particle verbs. Consider the sentence: "John put the coals out."

Dependency structure of a sentence with a particle verb, illustrating the long-distance dependency between "put" and "out".

In a standard left-to-right generation process, the decoder may "forget" the initial verb "put" by the time it needs to generate the particle "out." While previous work has enriched the encoder with syntactic information, the decoder has remained largely structure-unaware. This research addresses this gap by making the decoder an active participant in building the sentence's syntactic structure.

Methodology: Integrating Structure into the Decoder

The authors propose a flexible framework that embeds transition-based parsing into the generation process.

Transition-based Structure Generation

The model's output vocabulary is expanded to include syntactic transitions (e.g., LEFT-ARC:nsubj). As the model generates text, it simultaneously constructs a dependency tree. This allows the model to explicitly represent the grammatical relationships it is forming.

The biTran Decoder

Standard Transformer decoders are unidirectional, constrained by a causal mask. The proposed biTran (Bidirectional Transformer) decoder introduces bidirectional attention. When a syntactic edge is formed between two tokens, the model can re-encode the partial sequence. This enables the representation of an earlier word (like "put") to be updated and "informed" by its relationship to a later word (like "out").

The biTran architecture showing the progression from word prediction to structural transition prediction across layers.

Structural Feedback Mechanisms

Two methods were evaluated for feeding structural information back into the model:

  1. GCN Encoder: Employs Graph Convolutional Networks to encode the evolving dependency tree.
  2. PARENT: A more efficient approach where a dedicated attention head is biased to point directly to a token's syntactic parent.

Experimental Setup and Results

The models were evaluated on standard translation benchmarks (WMT16 En-De, WMT20 En-Ru) and specialized Syntactic Challenge Sets (Choshen and Abend, 2019). These challenge sets specifically target difficult phenomena like preposition stranding, particles, and reflexives, where related words are separated by significant distances.

Key Findings

  • Syntactic Robustness: The "PARENT" and "GCN" variants outperformed the vanilla Transformer in 18 out of 20 target-side syntactic challenge categories.
  • Performance Gains: On standard benchmarks, the structural decoders achieved improvements of 0.7–1.1 BLEU points and 1–2.4 chrF+ points over the baseline.
  • Importance of Structure: The researchers found that the presence of a connection (the graph edge) was more critical for performance than the specific grammatical label assigned to that edge.
  • Scaling Limitations: Increasing the size of a "Vanilla" Transformer did not resolve syntactic amnesia, suggesting that structural inductive biases are necessary for true grammatical competence.

Conclusion and Future Work

By baking grammatical awareness into the Transformer decoder, this work provides a path toward more linguistically robust translation models. While the GCN-based approach introduces higher computational costs, the "PARENT" model offers a lightweight alternative with significant benefits. Future research may extend this structural awareness to mitigate hallucinations in large language models or to incorporate external knowledge graphs.

Summary updated

BibTeX
@inproceedings{choshen2022enhancing,
  author = {Leshem Choshen and Omri Abend},
  title = {{Enhancing the Transformer Decoder with Transition-based Syntax}},
  booktitle = {CoNLL},
  year = {2022},
  doi = {10.18653/v1/2022.conll-1.27},
}
Figure