Introduction
Standard Recurrent Neural Networks (RNNs) are "fair" to a fault: they spend the exact same amount of computation on every input token, whether it’s a content-heavy word like "invigorating" or a functional one like "the." In many natural language tasks, this uniform processing is highly inefficient.
Previous attempts to fix this usually involved "skipping" tokens entirely (e.g., LSTM-Jump). However, skipping can be risky because even "unimportant" words provide context and maintain the structural integrity of a sentence. Furthermore, models that skip tokens often fail to produce an output for every time step, making them difficult to drop into existing architectures that expect a continuous stream of hidden states.
To address this, researchers introduce Skim-RNN, a novel architecture that mimics human speed reading by dynamically deciding how much computational effort to spend on each word. By using a "big" RNN for important tokens and a "small" RNN for unimportant ones, it achieves up to a 3x reduction in computational cost with virtually no loss in accuracy, often outperforming standard RNNs on CPUs in terms of latency.
The Skim-RNN Architecture
The core of the model is the Skim-RNN unit, which consists of two RNN cells: a "big" cell (standard size $d$) and a "small" cell (size $d'$, where $d' \ll d$).
- The Decision Mechanism: At each time step, the model uses a small, lightweight function to look at the current input and the previous hidden state. It makes a binary choice: "read" or "skim."
- Skimming vs. Reading:
- If it decides to read, the big RNN updates the entire $d$-dimensional hidden state.
- If it decides to skim, the small RNN updates only the first $d'$ dimensions of the hidden state, while the remaining dimensions are simply copied over from the previous step.
- Differentiable Training: Because a hard "either/or" decision is non-differentiable (you cannot backpropagate through a discrete choice), the authors use the Gumbel-Softmax reparameterization trick. This allows the model to learn the optimal skimming policy alongside the task-specific weights using standard gradient descent.
- Efficiency Penalty: To prevent the model from simply "reading" everything to maximize accuracy, a penalty term is added to the loss function that encourages a higher "skimming rate."
Key Insights
- Skimming > Skipping: The results suggest that "paying a little attention" to unimportant words is significantly better than "paying no attention." By updating a fraction of the hidden state, the model maintains a continuous memory of the sentence structure that skipping models lose.
- Hidden State Stability: Interestingly, skimming sometimes improves accuracy. The authors hypothesize that by not updating the full hidden state for every noisy or unimportant token, the "long-term memory" stored in the larger dimensions of the state remains more stable over time.
- Inference-Time Control: One of the most practical features is that the "skim threshold" can be adjusted after the model is trained. This allows developers to dynamically trade off accuracy for speed depending on the available hardware resources at runtime.
- The CPU Advantage: While GPUs excel at massive parallelization (making the sequential nature of Skim-RNN less beneficial), many real-world applications run on CPUs. For these latency-sensitive applications, Skim-RNN is a massive win.
Results & Performance
The authors evaluated Skim-RNN across several diverse NLP benchmarks, including Sentiment Analysis (SST, Rotten Tomatoes, IMDb, AGNews) and Question Answering (SQuAD, CBT).
- Computational Efficiency: Skim-RNN achieved up to a 3x reduction in floating-point operations (FLOPs) compared to standard LSTMs while maintaining similar accuracy levels.
- Performance on SQuAD: On the complex SQuAD task, Skim-RNN reduced computation by 1.4x to 1.7x without losing F1 score. When integrated into the more complex BiDAF model, it maintained performance while significantly cutting costs.
- Latency: On the IMDb dataset, a Skim-RNN running on a single-thread CPU achieved 4.5x lower latency than a standard RNN running on a high-end Titan X GPU (29 $\mu$s vs 110 $\mu$s per token). This highlights its utility for edge devices and real-time applications.
- Qualitative Success: Visualization of the model's decisions showed it logically "reads" descriptive adjectives and nouns while "skimming" over prepositions and punctuation.
Limitations and Future Work
- Hardware Constraints: The current implementation's speedup is primarily realized on CPUs. Because current GPU kernels are optimized for large, uniform matrix multiplications, the branching logic of Skim-RNN doesn't yet translate to significant speed gains on standard GPU frameworks.
- Complexity of Decisions: The model currently makes a binary choice. Future work could involve multiple levels of skimming (e.g., using three or more RNN sizes) for even finer control.
- Broader Modalities: While this paper focuses on text, the "skimming" principle could theoretically be applied to video processing, where many frames are redundant and don't require full-scale convolutional analysis.
Summary updated