Abstract
Stochastic recurrent neural networks with latent random variables of complex dependency structures have shown to be more successful in modeling sequential data than deterministic deep models. However, the majority of existing methods have limited expressive power due to the Gaussian assumption of latent variables. In this paper, we advocate learning implicit latent representations using semi-implicit variational inference to further increase model flexibility. Semi-implicit stochastic recurrent neural network (SIS-RNN) is developed to enrich inferred model posteriors that may have no analytic density functions, as long as independent random samples can be generated via reparameterization. Extensive experiments in different tasks on real-world datasets show that SIS-RNN outperforms the existing methods.
Introduction
In sequence modeling, Recurrent Neural Networks (RNNs) serve as foundational architectures. While deterministic RNNs are powerful, they often struggle to capture the inherent uncertainty present in real-world sequential data. To address this, stochastic variants like the Variational Recurrent Neural Network (VRNN) were introduced, incorporating latent random variables to model variability. However, a significant limitation persists: most existing models rely on the "Gaussian assumption," where latent variables are constrained to follow simple Normal distributions.
This assumption acts as a bottleneck. Real-world data distributions are frequently multi-modal, skewed, or exhibit heavy tails—features that a single Gaussian distribution cannot represent. When forced into a Gaussian framework via Mean-Field Variational Inference (MFVI), models often suffer from "posterior collapse," where latent variables become uninformative. This paper introduces Semi-Implicit Stochastic Recurrent Neural Networks (SIS-RNN) to overcome these constraints by leveraging semi-implicit variational inference for highly flexible latent representations.
Methodology: Semi-Implicit Variational Inference
The core innovation of SIS-RNN is the move from explicit to implicit posteriors. Unlike standard VRNNs that predict deterministic parameters (mean and variance) for a Gaussian latent variable $z_t$, SIS-RNN treats the parameters themselves as random variables.
Hierarchical Construction
The model employs a hierarchical structure:
- Latent Sampling: $z_t \sim q(z_t | \psi_t)$
- Parameter Generation: $\psi_t \sim q_\phi(\psi_t | x_t, h_{t-1})$
By passing random noise through a deep neural network to generate the parameters $\psi_t$, the resulting marginal distribution for $z_t$ becomes "implicit." This means the distribution does not require a closed-form analytic density, yet it remains tractable because we can still draw samples from it via reparameterization.
Training Objective
Training such models is challenging because the standard Evidence Lower Bound (ELBO) becomes intractable. The authors utilize Semi-Implicit Variational Inference (SIVI), which introduces a regularized objective function. This objective includes a term ($B_K$) that uses Monte Carlo samples to provide a tighter bound on the log-likelihood and prevents the distribution from collapsing into a degenerate point.
Experimental Evaluation
The effectiveness of SIS-RNN was evaluated across three distinct domains: sequential image generation (Sequential MNIST), handwriting synthesis (IAM-OnDB), and language modeling (Yahoo and PTB).
Handwriting Synthesis
On the IAM-OnDB dataset, which consists of pen-stroke coordinates, SIS-RNN demonstrated a substantial performance leap. It achieved an average Negative Log-Likelihood (NLL) of -1973, a significant improvement over the standard VRNN's -1384.
Language Modeling
In text-based tasks, SIS-RNN was tested against benchmarks like the Yahoo and Penn Treebank (PTB) datasets. The model consistently outperformed strong baselines, including VAE-Transformers and Cyclic-VAEs, in terms of both NLL and Perplexity (PPL).
Discussion and Key Insights
The results indicate that moving beyond the "bell curve" allows for much richer latent structures. By making the posterior parameters stochastic, SIS-RNN restores complex dependencies often lost in mean-field approximations.
A critical observation is the mitigation of posterior collapse. SIS-RNN maintains a healthy KL divergence, suggesting that the increased flexibility makes latent variables more useful to the decoder. Qualitatively, the model generates highly coherent and diverse sequences, capturing better semantic abstractions than its Gaussian-constrained counterparts.
Conclusion and Future Work
SIS-RNN represents a significant step forward in stochastic sequence modeling by breaking the Gaussian bottleneck. While the model introduces some computational overhead due to Monte Carlo estimation and requires careful hyperparameter tuning (such as cyclic annealing), the performance gains are clear. Future research may explore extending this semi-implicit framework to other architectures, such as graph neural networks, to handle even more complex dynamic systems.
Summary updated