Abstract
Long Short-Term Memory (LSTM) infers long-term dependency through a cell state maintained by input and forget gate structures, typically modeled using sigmoid functions. However, the sigmoid gate's graduality limits its flexibility in representing multi-modality or skewness. Furthermore, standard models assume gate independence, missing opportunities to model correlations between previous and current inputs. This paper proposes a new gate structure using the bivariate Beta distribution. This probabilistic approach allows for customized cell state flow via priors and distributions. We theoretically demonstrate a higher gradient upper bound compared to sigmoid functions and empirically observe improved gradient flow during training. The effectiveness of the bivariate Beta gate structure is demonstrated across sentence classification, image classification, polyphonic music modeling, and image caption generation.
The Rigidity of Standard LSTMs
Standard LSTM networks are foundational for sequential data processing, yet they suffer from a "rigidity" problem stemming from their reliance on sigmoid gates. The authors identify three primary flaws in the standard approach:
- Inflexibility: The sigmoid function is inherently gradual, making it difficult to represent skewed or multi-modal data distributions. This often results in gate values being squeezed into narrow ranges, reducing discriminative power.
- Independence Assumption: In standard LSTMs, the input gate (determining what to add) and the forget gate (determining what to erase) are computed independently. In reality, these processes are often correlated. For instance, a transition word like "but" suggests the model should simultaneously forget old context and focus on new input—a negative correlation.
- Vanishing Gradients: Sigmoid-based gating can exacerbate vanishing gradient issues, hindering the learning of long-term dependencies in extensive sequences.
Methods: Probabilistic Gating with Bivariate Beta Distributions
The researchers propose replacing deterministic sigmoid gates with a stochastic structure based on the Beta distribution. Unlike the sigmoid, the Beta distribution is defined by two shape parameters, allowing it to take various forms—symmetric, skewed, or U-shaped—providing significantly more flexibility for memory management.
Architectural Innovations
- Bivariate Modeling: To capture the relationship between gates, the model employs a bivariate Beta distribution constructed from shared Gamma random variables.
- bBeta-LSTM(3G): Utilizes three Gamma variables to model positive correlations.
- bBeta-LSTM(5G): Utilizes five Gamma variables, enabling the representation of both positive and negative correlations between input and forget gates.
- Structured Priors (5G+p): The model can incorporate "Domain Customized Structured Priors." In text processing, for example, Latent Dirichlet Allocation (LDA) or GloVe vectors provide "global" context hints to the gates before processing the current token.
Key Insights: Correlation and Gradient Flow
A central contribution of this work is treating gate correlation as an inductive bias. By allowing gates to be correlated, the model can naturally mimic human-like focus during context shifts.
Furthermore, the authors mathematically prove that the Beta gate structure provides a higher upper bound for gradients than the sigmoid function. This "greases the wheels" of backpropagation, facilitating learning in long sequences. Empirical histograms also show that bBeta-LSTM utilizes the full [0, 1] range of gate values, whereas standard LSTMs tend to cluster in the middle.
Experimental Results
The Bivariate Beta-LSTM consistently outperformed standard LSTMs and advanced variants like CIFG-LSTM across multiple domains:
- Sentence Classification: On the CR sentiment dataset, the bBeta-LSTM(5G+p) achieved 84.66% accuracy, surpassing the standard LSTM's 82.91%.
- Polyphonic Music Modeling: The model achieved significantly lower Negative Log-Likelihood (NLL) across datasets like JSB Chorales and Muse, indicating a superior fit for complex sequences.
- Image Classification: In the difficult Permuted MNIST task, the model reduced the test error rate from 10.76% to 7.66%.
- Image Captioning: Integrating the bBeta structure into a "Show & Tell" model improved the CIDEr score on MS-COCO from 94.7 to 97.3.
Conclusion
By introducing probabilistic gating via the bivariate Beta distribution, this work addresses the inherent limitations of sigmoid-based LSTMs. The ability to model gate correlations and improve gradient flow leads to state-of-the-art performance across diverse sequence modeling tasks. Future work may explore extending this probabilistic gating approach to other architectures, such as Transformers.
Summary updated