HyperAIHyperAI

Command Palette

Search for a command to run...

5 months ago

Positional Encoding to Control Output Sequence Length

Sho Takase; Naoaki Okazaki

Positional Encoding to Control Output Sequence Length

Abstract

Neural encoder-decoder models have been successful in natural language generation tasks. However, real applications of abstractive summarization must consider additional constraint that a generated summary should not exceed a desired length. In this paper, we propose a simple but effective extension of a sinusoidal positional encoding (Vaswani et al., 2017) to enable neural encoder-decoder model to preserves the length constraint. Unlike in previous studies where that learn embeddings representing each length, the proposed method can generate a text of any length even if the target length is not present in training data. The experimental results show that the proposed method can not only control the generation length but also improve the ROUGE scores.

Code Repositories

takase/control-length
Official
pytorch

Benchmarks

BenchmarkMethodologyMetrics
text-summarization-on-duc-2004-task-1Transformer+LRPE+PE+Re-ranking+Ensemble
ROUGE-1: 32.85
ROUGE-2: 11.78
ROUGE-L: 28.52

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp