Towards Bidirectional Hierarchical Representations for Attention-based Neural Machine Translation

Baosong Yang, Derek F. Wong, Tong Xiao, Lidia S. Chao, Jingbo Zhu

Abstract

Standard Neural Machine Translation (NMT) models often treat sentences as flat sequences, neglecting the inherent hierarchical structure of language. This paper proposes a bidirectional hierarchical encoder that captures both local lexical details and global syntactic context. By integrating bottom-up and top-down information flow and employing a gated attention mechanism, the model achieves significant improvements in translation quality, particularly for complex language pairs like English-to-Chinese.

Introduction

The sequence-to-sequence framework has become the standard for NMT. However, language is naturally structured into nested phrases. While "tree-to-sequence" models have attempted to incorporate this syntax, they typically rely on bottom-up encoders where phrase representations are built solely from their constituents. This lack of global context often leads to ambiguities in word sense and structural interpretation. We address these limitations through a bidirectional tree-structured encoder and a novel attention mechanism.

Methodology

Bidirectional Tree-Node Encoding

The core innovation is a bidirectional flow of information within the syntactic tree.

  1. Bottom-Up Encoding: A Tree-GRU computes phrase representations ($h^p$) starting from the leaf nodes (words) up to the root.
  2. Top-Down Encoding: Information from the root, representing the entire sentence, is propagated back down to the phrases and words. This ensures that every node's representation is informed by the global context.

Handling Rare Words with BPE Trees

To overcome the fixed-vocabulary limitations of traditional tree models, we integrate Byte-Pair Encoding (BPE). Sub-word units are organized into a "binary lexical tree" that extends the syntactic tree downwards from the original leaf nodes. This allows the hierarchical model to treat sub-words as standard syntactic units.

Tree-based rare word encoding with bidirectional information flow.

Gated Attention Mechanism

During decoding, the model attends to all nodes in the source tree. We introduce a gating scalar ($\beta$) that dynamically balances the focus between lexical information (leaf nodes) and structural information (internal phrase nodes) at each time step.

Experimental Results

The model was evaluated on English-to-Chinese translation using LDC parallel corpora and NIST test sets.

Quantitative Performance

The bidirectional hierarchical model significantly outperformed the sequential baseline. On the NIST mt04 test set, it achieved a BLEU score of 34.33, compared to 31.26 for the sequential model and 31.90 for a standard bottom-up tree encoder. The dynamic gating scalar was also found to be superior to fixed weighting, confirming the benefit of adaptive focus.

Qualitative Analysis

The model demonstrates a superior ability to resolve syntactic ambiguities. For instance, in the phrase "areas outside its member states," the hierarchical model correctly identifies the relationship between "areas" and "outside," whereas sequential models often fail to capture this long-distance dependency correctly.

Visualization of attention weights and hierarchical structure for a complex sentence.

Conclusion

By combining bidirectional information flow with a flexible attention mechanism and sub-word tree integration, we provide a more holistic representation of source sentences. This approach effectively bridges the gap between sequential efficiency and syntactic richness in NMT. Future work will explore applying these hierarchical representations to other NLP tasks and investigating alternative tree structures.

Summary updated

BibTeX
@inproceedings{yang2017towards,
  author = {Baosong Yang and Derek F. Wong and Tong Xiao and Lidia S. Chao and Jingbo Zhu},
  title = {{Towards Bidirectional Hierarchical Representations for Attention-based Neural Machine Translation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2017},
  doi = {10.18653/v1/d17-1150},
}
Figure