Abstract
Text sequence matching is a fundamental NLP task, often requiring a balance between computational efficiency and the semantic richness of sentence embeddings. We present the Deconvolutional Latent-Variable Model (DeConv-LVM), which utilizes a deconvolutional network as a decoder within a Variational Auto-Encoder (VAE) framework. Unlike traditional recurrent decoders that suffer from the "vanishing KL" problem by acting as independent language models, the deconvolutional decoder is forced to rely entirely on the latent vector for reconstruction. This architecture results in embeddings with significantly higher semantic content, faster training times due to parallelization, and superior performance in semi-supervised settings.
Introduction
Determining relationships between text sequences—such as paraphrase detection or natural language inference—remains a core challenge in NLP. Existing methods typically choose between word-by-word matching, which is accurate but computationally expensive ($O(T^2)$), and sentence encoding, which maps sentences to fixed-length vectors. While faster, sentence encoding often struggles to capture the full semantic nuance of a sequence.
Generative models like Variational Auto-Encoders (VAEs) attempt to learn these embeddings by reconstructing input sentences. However, standard VAEs using LSTM decoders frequently encounter the "vanishing KL" problem. Because LSTMs are powerful autoregressive models, they can learn to reconstruct text using only their internal state and previous ground-truth words, effectively ignoring the latent "thought" vector. This leads to embeddings that lack meaningful semantic information.
Methods: The Deconvolutional Decoder
To address the limitations of recurrent decoders, we propose the Deconvolutional Latent-Variable Model (DeConv-LVM). The architecture employs a Siamese-style VAE structure where a 3-layer CNN encoder maps input sentences into a latent distribution.
The primary innovation lies in the Deconvolutional Decoder. Instead of generating words sequentially like an LSTM, this decoder uses transposed convolutional layers to "up-sample" the latent vector $z$ into a reconstructed sentence matrix.
As shown in the figure above, the deconvolutional decoder does not have access to ground-truth words during the generation process. This architectural constraint forces the model to encode all necessary information into the latent vector $z$. By breaking the autoregressive dependency, we solve the exposure bias and vanishing KL issues, ensuring $z$ acts as a robust global feature. Furthermore, the non-sequential nature of deconvolutional operations allows for high parallelization on GPUs, significantly reducing training time.
Experimental Results
We evaluated DeConv-LVM on major benchmarks including the Stanford Natural Language Inference (SNLI) and Quora Question Pairs datasets.
Performance and Efficiency
The model demonstrated a significant increase in information richness. The KL divergence for DeConv-LVM reached 31.7, compared to only 4.6 for the LSTM-based variant, indicating that the latent variable captures far more semantic data. Training speed also improved dramatically; DeConv-LVM completed 10,000 iterations in approximately 8 minutes, nearly 5x faster than the LSTM-LVM.
Semi-Supervised Learning
DeConv-LVM excels particularly when labeled data is scarce. By leveraging the generative objective on unlabeled data, it learns features that purely supervised models miss.
On the SNLI dataset with only 28k labeled examples, DeConv-LVM achieved 67.2% accuracy, outperforming both LSTM-LVM and standard CNN baselines. Similar gains were observed on the Quora dataset with limited labels. Qualitative analysis using t-SNE visualizations further confirmed that DeConv-LVM embeddings naturally cluster by writing style (e.g., scientific vs. informal) in a completely unsupervised manner.
Conclusion
The DeConv-LVM provides a powerful alternative to recurrent generative models for text matching. By replacing the LSTM decoder with a deconvolutional network, we force the model to produce semantically rich embeddings while gaining significant computational efficiency. While the fixed-length nature of the deconvolutional architecture may pose challenges for extremely long documents, its success in sequence matching suggests broad applicability to tasks requiring global semantic consistency.
Summary updated