[Paper Review] Revisiting Activation Regularization for Language RNNs
This paper revisits simple $L_2$ regularization on RNN activations (activation regularization, AR) and temporal consistency regularization (TAR) to improve language modeling performance. Applied with minimal architectural changes, AR and TAR achieve state-of-the-art results on Penn Treebank and WikiText-2, outperforming complex techniques like variational dropout and custom RNN cells while being compatible with optimized implementations like cuDNN LSTM.
Recurrent neural networks (RNNs) serve as a fundamental building block for many sequence tasks across natural language processing. Recent research has focused on recurrent dropout techniques or custom RNN cells in order to improve performance. Both of these can require substantial modifications to the machine learning model or to the underlying RNN configurations. We revisit traditional regularization techniques, specifically L2 regularization on RNN activations and slowness regularization over successive hidden states, to improve the performance of RNNs on the task of language modeling. Both of these techniques require minimal modification to existing RNN architectures and result in performance improvements comparable or superior to more complicated regularization techniques or custom cell architectures. These regularization techniques can be used without any modification on optimized LSTM implementations such as the NVIDIA cuDNN LSTM.
Motivation & Objective
- To investigate whether traditional, lightweight regularization techniques like $L_2$ on activations and temporal consistency can outperform complex modern regularization methods in RNN language modeling.
- To evaluate whether AR and TAR can be applied without modifying RNN cell architectures or training procedures, enabling compatibility with optimized libraries like cuDNN.
- To demonstrate the generality and robustness of AR and TAR across different RNN architectures, including LSTM, GRU, and $ anh$ RNN.
- To show that AR and TAR can significantly improve performance on standard benchmarks like Penn Treebank and WikiText-2, even when applied with hyperparameters tuned on a different cell type.
Proposed method
- Activation regularization (AR) applies $L_2$ penalty to the masked RNN output $m \odot h_t$, where $m$ is the dropout mask, to encourage small, stable activations.
- Temporal activation regularization (TAR) applies an $L_2$ penalty on the difference between consecutive hidden states $\|h_t - h_{t+1}\|_2$, promoting temporal smoothness.
- The regularization coefficients $\alpha$ and $\beta$ are tuned via validation set performance, with values transferred across different RNN cell types for ablation.
- Experiments use standard language modeling benchmarks (PTB, WT2) with tied embeddings and standard training protocols, comparing models with and without AR/TAR.
- The method is applied to both standard LSTM and alternative RNNs (GRU, $ anh$ RNN) to test generalization and robustness.
- Compatibility with optimized RNN libraries like cuDNN LSTM is preserved, as AR and TAR require no changes to the RNN cell or training loop.
Experimental results
Research questions
- RQ1Can simple $L_2$ regularization on RNN activations (AR) and temporal consistency (TAR) achieve performance comparable to or better than complex regularization techniques like variational dropout or custom RNN cells?
- RQ2Does AR and TAR maintain effectiveness when applied to optimized RNN implementations such as cuDNN LSTM, which do not support custom cell modifications?
- RQ3How general are AR and TAR across different RNN architectures, including GRU and $ anh$ RNN, which are not traditionally used for language modeling?
- RQ4Can the optimal hyperparameters $\alpha$ and $\beta$ for one RNN cell (e.g., LSTM) be effectively transferred to other cells (e.g., GRU, $ anh$ RNN) without re-tuning?
- RQ5Does TAR implicitly encourage identity-like behavior in RNNs, particularly when training from random initialization?
Key findings
- On the Penn Treebank dataset, AR and TAR reduced test perplexity from 667.5 to 227.8, representing a 66% relative improvement over the baseline LSTM.
- On WikiText-2, the same regularization improved test perplexity from 117.5 to 103.4, showing consistent gains on a more challenging, out-of-domain benchmark.
- For the GRU, applying the same $\alpha=5$, $\beta=2$ values from the LSTM reduced perplexity from 83.3 to 81.1, demonstrating transferability and effectiveness on a different RNN architecture.
- For the $ anh$ RNN, which failed to train without AR and TAR, the regularization enabled convergence, suggesting TAR acts as an implicit identity initialization constraint.
- The improvements from AR and TAR were robust across different RNN types, indicating that the techniques are not limited to LSTM but generalize to other sequence models.
- AR and TAR can be applied to optimized RNN libraries like cuDNN LSTM without architectural changes, preserving training speed and compatibility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.