A Cross-Sentence Latent Variable Model for Semi-Supervised Text Sequence Matching

Jihun Choi, Taeuk Kim, Sang-goo Lee

Deep learning models for text matching tasks, such as Natural Language Inference (NLI) and paraphrase detection, typically require massive amounts of labeled data to achieve high performance. However, in many real-world scenarios, labeled data is scarce and expensive to obtain, while unlabeled sentence pairs are abundant. This paper, presented at ACL 2019, introduces the Cross-Sentence Latent Variable Model (CS-LVM), a novel generative framework designed to leverage unlabeled data effectively by moving beyond simple auto-encoding.

The Challenge of Semi-Supervised Text Matching

Previous attempts to apply Variational Auto-Encoders (VAEs) to text matching often treated sentences independently, encoding and decoding each sentence in isolation. This "auto-encoding" approach fails to capture the inherent semantic interactions between sentence pairs. Furthermore, standard VAEs frequently suffer from posterior collapse, where the model ignores the latent variables, leading to a failure in learning meaningful features for the matching task.

The CS-LVM Framework

The core innovation of CS-LVM is its "cross-sentence" generation approach. Instead of reconstructing a sentence from its own latent representation, the model learns to generate a target sentence ($x_t$) conditioned on a source sentence ($x_s$) and a relationship label ($y$).

Probabilistic graphical models for generation and recognition.

As shown in the graphical models above, the generation process mimics how many datasets are constructed: a human writer is given a premise ($x_s$) and a label ($y$) and is asked to write a hypothesis ($x_t$). By forcing the encoder to provide features sufficient for reconstructing the other sentence in the pair, the latent space becomes significantly more discriminative for the matching task.

Spherical Latent Spaces with vMF

To combat posterior collapse, the authors replace the standard Gaussian latent distribution with a von Mises-Fisher (vMF) distribution. Because the vMF distribution lives on a hypersphere and maintains a constant KL divergence for a fixed concentration parameter, the model cannot "cheat" by pushing the KL divergence to zero. This spherical latent space also aligns well with the cosine similarity metrics commonly used in text embedding tasks.

Learning from Unlabeled Data

For unlabeled data, the model treats the relationship label $y$ as a latent variable and marginalizes over all possible classes. This allows the model to learn the underlying structure of sentence pairs even without explicit labels.

Overview of the CS-LVM architecture and data flow.

The architecture consists of three main components:

  1. Encoder ($q_\phi$): Maps the source sentence $x_s$ to a latent representation $z_s$.
  2. Decoder ($p_\theta$): Generates the target sentence $x_t$ from $z_s$ and the label $y$.
  3. Classifier ($q_\psi$): Predicts the label $y$ given the sentence pair.

To further refine the model, the authors introduce semantic constraints during a fine-tuning phase (represented by the dashed lines in the architecture diagram). These constraints ensure that generated sentences reflect the intended labels ($R^y$), maintain latent consistency ($R^z$), and encourage diversity ($R^\mu$). Furthermore, tying the weights between the generative encoder and the discriminative classifier proved essential, ensuring that features learned for generation directly benefit the classification task.

Experimental Results

The CS-LVM was evaluated on two major benchmarks: the Stanford Natural Language Inference (SNLI) dataset and the Quora Question Pairs (QQP) dataset.

  • SNLI: In a low-resource setting with only 28k labeled examples, CS-LVM achieved 70.0% accuracy, significantly outperforming the previous state-of-the-art semi-supervised model, DeConv-VAE (67.2%). Even with the full dataset, it improved upon standard supervised baselines (82.8% vs 81.5%).
  • QQP: In an extremely data-constrained regime (1k labels), CS-LVM reached 66.5% accuracy, a substantial improvement over the CNN baseline (56.3%) and the DeConv-VAE (65.1%).

Ablation studies confirmed that the cross-sentence generation component was the most critical factor in these performance gains.

Conclusion

The CS-LVM demonstrates that a generative model capable of creating a related sentence is inherently better at identifying the relationship between sentences. By combining cross-sentence generation with vMF latent distributions and a joint generative-discriminative objective, the authors provide a powerful framework for semi-supervised text matching that effectively utilizes unlabeled data. Future work may involve integrating more advanced architectures like Transformers to improve the syntactic complexity of generated sequences.

Summary updated

BibTeX
@inproceedings{choi2019cross,
  author = {Jihun Choi and Taeuk Kim and Sang-goo Lee},
  title = {{A Cross-Sentence Latent Variable Model for Semi-Supervised Text Sequence Matching}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1469},
}
Figure