Abstract
Character-level language models (CLMs) offer significant advantages over word-level models (WLMs), including the ability to handle out-of-vocabulary (OOV) words and a reduced output layer size. However, CLMs typically struggle to capture long-range dependencies as effectively as WLMs. This paper introduces a hierarchical Recurrent Neural Network (RNN) architecture that operates at multiple timescales. By using a high-level module that updates only at word boundaries, the model captures word-level context while maintaining character-level flexibility. Our results show that this hierarchical approach achieves state-of-the-art perplexity and improves speech recognition accuracy while being significantly more parameter-efficient than standard deep LSTMs.
Introduction
Language modeling is a fundamental task in natural language processing, traditionally dominated by word-level models. While WLMs are efficient at capturing semantic context, they suffer from the "out-of-vocabulary" problem and require massive embedding matrices. Character-level models avoid these issues but face the challenge of learning dependencies over much longer sequences—often requiring the model to track state over dozens of characters to understand a single concept.
The authors propose a middle ground: a Hierarchical Recurrent Neural Network (HRNN) that processes text at the character level but incorporates structural biases that mirror the hierarchical nature of language (characters forming words).
The Hierarchical RNN Architecture
The core of the proposed system is a multi-timescale architecture. Instead of a single RNN processing every character with the same priority, the model is split into low-level and high-level modules:
- Low-Level RNN (Character-level): This module processes every input character to generate a "short-term embedding" representing the current word.
- High-Level RNN (Word-level): This module operates on a "slow clock," updating its state only when a word boundary (e.g., a space or end-of-sentence marker) is detected. It receives the summary from the low-level RNN and provides "long-term context" back to it.
- State Reset: A key feature is the resetting of the low-level RNN's internal state at word boundaries. This forces the low-level module to focus exclusively on encoding the current word, while the high-level module maintains the broader linguistic history.
The authors explored two specific configurations, HLSTM-A and HLSTM-B, as shown below.
Experimental Evaluation
The models were evaluated on two primary benchmarks: the Wall Street Journal (WSJ) corpus for perplexity and speech recognition, and the One Billion Word Benchmark for large-scale language modeling.
Key Results
The hierarchical models demonstrated superior efficiency and performance compared to standard deep LSTMs. On the One Billion Word Benchmark, the HLSTM-B model outperformed a Kneser-Ney 5-gram word-level model while using only 2% of the parameters.
In the WSJ speech recognition task, the hierarchical model reduced the Word Error Rate (WER) from 7.85% to 7.78% compared to a standard deep LSTM, despite having 70% fewer parameters. As shown in the table below, the HLSTM variants consistently achieve lower Bits Per Character (BPC) and Word Perplexity (PPL) than their non-hierarchical counterparts of similar or even larger sizes.
Discussion and Insights
The success of the HRNN highlights several important principles:
- Temporal Hierarchy: Language is naturally structured. Separating short-term spelling tasks from long-term semantic tasks allows the network to specialize and learn more efficiently.
- Mitigating Vanishing Gradients: By resetting the low-level state and using a high-level "anchor," the model effectively shortens the path for gradients to flow across long sequences.
- Memory Efficiency: By avoiding large word-level vocabularies in the output layer, the model remains lean and suitable for resource-constrained environments.
Conclusion and Future Work
This work demonstrates that hierarchical architectures can bring the benefits of word-level modeling to character-level inputs. While the current implementation relies on manual boundary markers (like spaces), future research could focus on learning these "clock" signals automatically. This would extend the model's utility to languages without clear word delimiters or to other sequential data types like audio and sensor signals.
Summary updated