Abstract
DecVAE (Decomposable Variational Autoencoder) is a generative model designed to cleanly separate a sentence's meaning (semantics) from its structure (syntax) in latent space. By applying Total Correlation penalties and multi-head attention, the model achieves a finer-grained disentanglement than previous methods. We demonstrate that DecVAE sets new state-of-the-art benchmarks for both semantic and syntactic similarity tasks, effectively "unmixing" linguistic signals that are traditionally deeply interwoven.
Introduction
In Natural Language Processing (NLP), a long-standing goal is learning representations where different properties of a sentence—such as its sentiment, literal meaning, and grammatical structure—are stored in independent "slots." While previous Variational Autoencoder (VAE) models have attempted to split syntax from semantics, they often produce "leaky" results where the two remain entangled. This entanglement stems from the inherent interweaving of "what" is said (semantics) and "how" it is said (syntax) in human language. Existing models often lack the mathematical constraints necessary for a truly fine-grained decomposition, particularly in complex sentences where words play varying roles.
Methods
The proposed DecVAE framework extends the Variational Generative VAE (VGVAE) with several key innovations aimed at forcing a cleaner factorization of features.
Architectural Innovations
- Total Correlation (TC) Penalty: Borrowing from FactorVAE, a penalty term based on Total Correlation is added to the objective function. This encourages the dimensions of the latent variables to be statistically independent.
- Decomposable Latent Variables: DecVAE utilizes decomposable variables ($z^k$) to capture hierarchical linguistic structures and distinct entities, rather than treating the latent space as a monolithic block.
- Multi-head Attention Integration: Multi-head attention is integrated into the encoder to help cluster word embeddings more discriminatively, allowing the TC penalty to act on distinct sentence components.
Multi-task Auxiliary Losses
To guide the disentanglement process, the model employs three specific auxiliary losses:
- Paraphrase Reconstruction Loss (PRL): Swapping semantic variables between paraphrase pairs to ensure the model can reconstruct the original sentences.
- Discriminative Paraphrase Loss (DPL): A contrastive loss that aligns paraphrases in semantic space while pushing non-paraphrases apart.
- Word Position Loss (WPL): Forcing the syntactic variable to predict word positions, ensuring it captures structural rather than semantic information.
Evaluation and Results
The model was trained on a sample of 50 million paraphrase pairs from the ParaNMT-50M dataset. Evaluation was conducted on the STS Benchmark (2012–2016) for semantic tasks and via 1-nearest-neighbor parsers for syntactic tasks, specifically Constituent Parsing and Part-of-Speech (POS) Tagging.
Key Findings
- State-of-the-Art Performance: DecVAE achieved a Pearson correlation of 73.91% on the STS benchmark, a 1.7% improvement over the previous SOTA (VGVAE).
- Syntactic Precision: The full DecVAE model (utilizing LSTM encoders/decoders) reached a constituent parsing F1 of 41.5, significantly outperforming VGVAE's 29.3.
- Successful Disentanglement: The model demonstrated low leakage; semantic variables performed poorly on syntactic tasks and vice versa. As specialized losses (WPL, DPL) were added, performance on respective tasks diverged, indicating successful "unmixing" of signals.
Conclusion
DecVAE demonstrates that achieving fine-grained disentanglement requires moving beyond simple dual-variable latent spaces toward decomposable, independent components. While syntax remains a more challenging domain to isolate perfectly compared to semantics, DecVAE's unsupervised approach sets a new standard. Future work will explore applying this disentanglement to controllable text generation and interactive feature distillation.
Summary updated