Abstract
This paper introduces a novel mathematical framework using a "Semantic Euclidean Space" to quantitatively measure the information retention of Recurrent Neural Networks (RNNs). By representing sequence semantics as convex hulls of word embeddings, the authors demonstrate that the memory capacity of LSTMs and GRUs effectively plateaus at a sequence length of approximately 15 words. This provides a principled approach for setting hyperparameters such as Backpropagation Through Time (BPTT) length.
Introduction
While architectures like Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU) are known for superior memory retention compared to Vanilla RNNs (VRNNs), their capacity is often treated as a "black box." Researchers typically rely on empirical guesswork to determine input sequence lengths or BPTT windows. This lack of theoretical grounding risks either information loss in excessively long sequences or underutilization of the network's potential in sequences that are too short. This study proposes a spatial, geometric approach to directly compare semantic information in hidden states against original input sequences.
Methodology: Semantic Euclidean Space
To quantify memory, the authors compare the "meaning" of an input sentence to the "meaning" captured by hidden layers. They define a Semantic Euclidean Space ($\mathbb{SR}^n$) that extends standard word embeddings to include "abstract semantic points," accounting for implicit meanings generated by word sequences.
The meaning of a sequence is mathematically defined as the convex hull of its constituent word vectors, with the sequence's "central idea" represented by the geometric centroid of this hull.
To ensure direct spatial comparison, the authors utilize a tied Neural Network Language Model (NNLM) architecture, forcing input word vectors and hidden state vectors into the same mathematical space. Six evaluation indicators are established, including:
- Semantic Coverage Recall/Precision: Measuring the extent and accuracy of original meaning coverage.
- Central Idea Offsets: Measuring the drift of the hidden state's centroid from the input's centroid.
Experimental Results
The framework was evaluated using the Penn Treebank (PTB) and Wiki-2 datasets.
The Memory Plateau
A key finding is that the memory capacity of LSTMs and GRUs is not boundless. Semantic coverage metrics (Recall, Precision, and F-Measure) increase rapidly for sequences up to 15 words but flatten out thereafter. This "magic number 15" suggests a hard limit on the semantic information these units can absorb.
Hyperparameter Validation
The authors empirically validated that setting the BPTT hyperparameter to 15 achieved optimal Perplexity (PPL) scores. Increasing BPTT to 35—a common default—did not yield performance improvements, confirming that the plateau in semantic memory directly correlates with training efficiency.
Architectural Comparisons
- VRNNs: These units exhibited a Semantic Coverage Precision Ratio (SCPR) of less than 1%, indicating they lose specific input meaning by generating overly broad, imprecise semantic representations.
- LSTM vs. GRU: Both architectures perform similarly. However, LSTMs are slightly more effective at preserving the "central idea" when using a single final hidden state, while GRUs are highly competitive when utilizing the full sequence of hidden states.
Discussion and Limitations
A primary limitation of the current approach is the reliance on t-SNE to project high-dimensional vectors into 2D space for area calculations. While t-SNE preserves local topology, the reduction from 50 dimensions to 2 may distort some geometric relationships.
Future research could apply these indicators to downstream tasks like machine translation or reading comprehension. Additionally, the "Central Idea Hit Ratio"—which remains low across current architectures—serves as a potential optimization target for designing next-generation recurrent units.
Summary updated