Abstract
Standard sequence-to-sequence (Seq2Seq) models often struggle with semantic consistency and parameter bloat in the output layer. We present the Word Embedding Attention Network (WEAN), which replaces the traditional linear softmax layer with an attention-based retrieval mechanism. By querying distributed word representations, WEAN captures semantic relationships more effectively, reduces parameters by up to 100x, and achieves significantly faster convergence and higher BLEU scores on paraphrase generation tasks.
Introduction
Sequence-to-sequence (Seq2Seq) models are the foundation of modern natural language processing. However, their traditional "output layer"—a massive linear softmax matrix—presents two significant challenges. First, it suffers from semantic blindness, treating words as isolated IDs rather than entities with shared meanings (e.g., "happy" vs. "joyful"). Second, it creates a parameter bottleneck, often consuming tens of millions of parameters to map hidden states to a large vocabulary.
Researchers from Peking University and Hong Kong Polytechnic University have reimagined this process. Instead of predicting a word ID through a fixed weight matrix, their proposed Word Embedding Attention Network (WEAN) allows the model to "query" word meanings from a distributed representation space.
Methods: The Word Embedding Attention Network (WEAN)
The core innovation of WEAN is the shift from a generative style to a retrieval-based style of word selection. Instead of a standard linear projection, WEAN employs an attention mechanism to find the best match among word embeddings.
As illustrated in the architecture above, the process involves three components:
- The Query ($q_t$): A vector combining the decoder's current hidden state and the source context.
- The Keys and Values: These are the distributed word embeddings themselves, shared across the model.
- The Retrieval: The model calculates relevance scores between the query and every word embedding in the vocabulary. The word with the highest semantic relevance is selected for output.
By reusing input embeddings for this lookup (a "tri-source" update across encoder, decoder, and output), WEAN eliminates the need for a dedicated output weight matrix, drastically reducing the model's footprint.
Key Insights
Meaning over Memory
By querying embeddings, the model is forced to learn the meaning of words to generate them. If the query vector is close to the concept of "fast," it naturally assigns high scores to synonyms like "quick" or "speedy," leading to more semantically coherent paraphrases.
Rapid Convergence and Efficiency
WEAN demonstrates remarkable efficiency. On the PWKP dataset, it reduced output layer parameters from 12.8 million to just 0.13 million—a nearly 100x reduction. Furthermore, the model reaches near-optimal performance much faster than traditional architectures.
As shown in the training curve, WEAN achieves high BLEU scores within the first 2-3 epochs, whereas standard Seq2Seq models require 15 or more to reach a lower plateau.
Experimental Results
The authors evaluated WEAN on text simplification (English PWKP and EW-SEW datasets) and short text abstractive summarization (Chinese LCSTS dataset).
- Text Simplification: On the PWKP dataset, WEAN achieved a BLEU score of 54.54, outperforming the Seq2Seq baseline (48.26) by over 6 points. On the larger EW-SEW dataset, it reached a BLEU of 94.45.
- Summarization: On the LCSTS dataset, WEAN achieved a ROUGE-2 F1 score of 25.6, surpassing previous state-of-the-art models like DRGD.
- Human Evaluation: Human raters consistently judged WEAN's outputs as more fluent and adequate (meaning-preserving) than competing neural approaches, noting a reduction in "broken" or incomplete sentences.
Conclusion and Future Work
WEAN represents a significant step toward more efficient and semantically aware text generation. By replacing memorization with a retrieval-based query mechanism, the model achieves better performance with a fraction of the parameters. Future work may explore more sophisticated query functions and the application of this technique to open-ended creative generation tasks.
Summary updated