Skip to main content
QUICK REVIEW

[Paper Review] Understanding and Improving Encoder Layer Fusion in Sequence-to-Sequence Learning

Xuebo Liu, Longyue Wang|arXiv (Cornell University)|Dec 29, 2020
Topic ModelingComputer Science62 references11 citations
TL;DR

This paper proposes SurfaceFusion, a novel method that directly connects the encoder embedding layer to the decoder's softmax layer in sequence-to-sequence models, significantly improving performance by enhancing bilingual word embedding learning. Experiments show SurfaceFusion outperforms traditional encoder layer fusion across machine translation, text summarization, and grammatical error correction, achieving state-of-the-art results on WMT16 Romanian-English and WMT14 English-French tasks.

ABSTRACT

Encoder layer fusion (EncoderFusion) is a technique to fuse all the encoder layers (instead of the uppermost layer) for sequence-to-sequence (Seq2Seq) models, which has proven effective on various NLP tasks. However, it is still not entirely clear why and when EncoderFusion should work. In this paper, our main contribution is to take a step further in understanding EncoderFusion. Many of previous studies believe that the success of EncoderFusion comes from exploiting surface and syntactic information embedded in lower encoder layers. Unlike them, we find that the encoder embedding layer is more important than other intermediate encoder layers. In addition, the uppermost decoder layer consistently pays more attention to the encoder embedding layer across NLP tasks. Based on this observation, we propose a simple fusion method, SurfaceFusion, by fusing only the encoder embedding layer for the softmax layer. Experimental results show that SurfaceFusion outperforms EncoderFusion on several NLP benchmarks, including machine translation, text summarization, and grammatical error correction. It obtains the state-of-the-art performance on WMT16 Romanian-English and WMT14 English-French translation tasks. Extensive analyses reveal that SurfaceFusion learns more expressive bilingual word embeddings by building a closer relationship between relevant source and target embedding. Source code is freely available at https://github.com/SunbowLiu/SurfaceFusion.

Motivation & Objective

  • To resolve conflicting findings about why encoder layer fusion (EncoderFusion) improves sequence-to-sequence models.
  • To investigate the role of individual encoder layers, especially the encoder embedding layer, in improving model performance.
  • To address the source representation bottleneck, where standard models fail to capture both semantic and surface-level features effectively.
  • To propose a simpler, more effective alternative to existing EncoderFusion methods by focusing on the most informative encoder layer.
  • To demonstrate that direct fusion of the encoder embedding layer enhances learning of expressive bilingual word embeddings.

Proposed method

  • Introduce a fine-grained layer attention mechanism to quantitatively evaluate the contribution of each encoder layer to the decoder's attention.
  • Propose SurfaceFusion, a method that fuses only the encoder embedding layer with the decoder's softmax layer, bypassing intermediate layers.
  • Shorten the path between source and target embeddings to strengthen direct interactions and improve alignment of bilingual word representations.
  • Use a learnable surface attention module to attend to the encoder embedding layer during decoding, enabling joint training with the main model.
  • Conduct ablation studies and singular value decomposition (SVD) analysis to compare representational capacity and embedding quality between vanilla and SurfaceFusion models.
  • Evaluate the method across diverse NLP tasks, including machine translation, text summarization, and grammatical error correction, using standard benchmarks.

Experimental results

Research questions

  • RQ1Why does encoder layer fusion improve sequence-to-sequence models, and which encoder layer contributes most to this improvement?
  • RQ2How does the encoder embedding layer compare to other intermediate layers in terms of attention and representation capacity?
  • RQ3Does fusing only the encoder embedding layer yield better performance than fusing multiple intermediate layers?
  • RQ4Can direct fusion of the encoder embedding layer improve the quality of bilingual word embeddings in sequence-to-sequence models?
  • RQ5What is the impact of the source representation bottleneck on model performance, and how can it be mitigated?

Key findings

  • The encoder embedding layer is more critical than other intermediate encoder layers for successful encoder layer fusion, contradicting prior assumptions that lower layers are most informative.
  • The uppermost decoder layer consistently attends more to the encoder embedding layer across multiple NLP tasks, indicating its central role in representation learning.
  • Masking the encoder embedding layer causes a significant drop in performance, leading to hallucinatory (fluent but unfaithful) predictions, confirming its importance.
  • SurfaceFusion outperforms both the vanilla Seq2Seq model and standard EncoderFusion across all evaluated tasks, including WMT16 Romanian-English and WMT14 English-French translation benchmarks.
  • Singular value analysis shows that SurfaceFusion slows the decay of singular values in word embeddings, leading to more uniformly distributed and expressive representations.
  • SurfaceFusion enhances the alignment of bilingual word embeddings by shortening the path between source and target representations, improving cross-lingual transfer and model fidelity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.