Abstract
Traditional neural language models (NLMs) typically utilize word-level embeddings to predict the next token in a sequence. While subword and character-level information have been successfully integrated into the input (context) side of these models, their application to the output (prediction) layer remains less explored. This paper investigates the impact of using character and factored morphological decompositions to construct output representations for NLMs. Focusing on Czech—a morphologically rich language—the study demonstrates that augmenting output word representations with character-based embeddings significantly improves performance, particularly for rare words.
Introduction
In Natural Language Processing, the standard approach treats words as atomic units. This paradigm faces significant hurdles when applied to morphologically rich languages (MRLs) like Czech, German, or Finnish. In these languages, a single root can produce a vast array of surface forms through inflection, leading to a "combinatorial explosion."
This phenomenon results in three primary challenges for traditional models:
- Data Sparsity: Many inflected forms appear infrequently, preventing the model from learning robust, independent embeddings.
- Out-of-Vocabulary (OOV) Errors: Unseen word forms are typically mapped to a generic
<UNK>token, stripping them of semantic and syntactic utility. - Parameter Inefficiency: Treating "run," "runs," and "running" as entirely unrelated entities ignores structural regularities that could streamline the model.
While subword units have successfully mitigated these issues on the input side, this research explores whether character-level information can enhance the output layer's predictive capabilities.
Methodology
The authors implement a recurrent neural language model based on the Long Short-Term Memory (LSTM) architecture. The innovation lies in the construction of the output word representations used during the prediction step.
Augmented Output Representations
Instead of relying solely on a lookup table for word IDs, the model generates an output representation by concatenating a standard word embedding with a subword-based embedding. Two distinct architectures were evaluated for generating these subword components:
- CharCNN: A Convolutional Neural Network designed to capture local patterns, such as prefixes and suffixes.
- CharBiLSTM: A bidirectional LSTM that processes character sequences to capture global word structure.
To manage the interaction between these concatenated sources, "Highway" layers were employed. These layers allow the model to dynamically gate the flow of information, deciding the relative importance of the word-level and character-level features for a given prediction.
Computational Efficiency
Predicting across the massive vocabulary of Czech is computationally expensive. To address this, the authors utilized Target Sampling, a form of importance sampling. This technique approximates the full softmax probability by considering only the correct word and a small subset of the vocabulary during each training iteration, making the training of large-vocabulary models feasible.
Experimental Setup
The study utilized the Czech News Commentary 2015 corpus, comprising approximately 4.7 million tokens. To test the model's robustness against data sparsity, the researchers experimented with various vocabulary thresholds. By varying the frequency required for a word to be included in the lookup table (e.g., appearing at least 5 or 10 times), they could observe how the model handled an increasing number of rare or "unknown" words.
Results and Discussion
The experimental results indicate a clear performance gain when incorporating character-level information into the output layer.
Perplexity Gains
In a "full vocabulary" scenario where data sparsity is most acute, a standard word-only model achieved a perplexity of 495. The addition of character-based augmentation (Words + CharCNN) reduced this significantly to 411. When a frequency threshold of 5 was applied—effectively forcing the model to rely on character representations for rare words—the perplexity dropped further to 376.
The Role of Rare Words
A key insight from the study is that character-based embeddings serve as a critical "safety net." For frequent words, the model continues to rely on standard word embeddings. However, for rare words where word-level embeddings are poorly trained, the character-level features provide the necessary morphological clues to maintain predictive accuracy. The authors found that reducing the size of the word lookup table actually improved overall performance by forcing the model to leverage these subword structures.
Architecture and Stability
The CharCNN architecture generally outperformed the CharBiLSTM, likely due to its proficiency in identifying specific morphological markers common in Czech. However, the authors noted that training these augmented models is inherently more unstable than traditional word-based models, often requiring backtracking to previous checkpoints to ensure convergence.
Conclusion
This research demonstrates that character-level information is a powerful tool for improving the output layer of neural language models in morphologically rich contexts. By providing a "smoother" mapping for rare and unseen words, these models overcome the limitations of atomic word representations. While challenges remain regarding training stability and complex factored predictions, these findings suggest that subword-based output representations are essential for robust language modeling in MRLs.
Summary updated