conference-paper Open access

On Sparsifying Encoder Outputs in Sequence-to-Sequence Models

Research footprint

At a glance

Citations
1
References
49
Comments
0
Paper overview

Abstract

Sequence-to-sequence models usually transfer all encoder outputs to the decoder for generation. In this work, by contrast, we hypothesize that these encoder outputs can be compressed to shorten the sequence delivered for decoding. We take Transformer as the testbed and introduce a layer of stochastic gates in-between the encoder and the decoder. The gates are regularized using the expected value of the sparsityinducing L 0 penalty, resulting in completely masking-out a subset of encoder outputs. In other words, via joint training, the L 0 DROP layer forces Transformer to route information through a subset of its encoder states. We investigate the effects of this sparsification on two machine translation and two summarization tasks. Experiments show that, depending on the task, around 40-70% of source encodings can be pruned without significantly compromising quality. The decrease of the output length endows L 0 DROP with the potential of improving decoding efficiency, where it yields a speedup of up to 1.65 on document summarization and 1.20 on character-based machine translation against the standard Transformer. We analyze the L 0 DROP behaviour and observe that it exhibits systematic preferences for pruning certain word types, e.g., function words and punctuation get pruned most. Inspired by these observations, we explore the feasibility of specifying rule-based patterns that mask out encoder outputs based on information such as part-of-speech tags, word frequency and word position. 1

Record transparency

Publication details

DOI
10.18653/v1/2021.findings-acl.255
OpenAlex
W3176696796
Document type
conference-paper
Language
EN
Last metadata update
Community

Comments

Log in to join the discussion.

  1. No comments yet. Start the discussion.