Latent Structure Models for Natural Language Processing

André F. T. Martins, Tsvetomila Mihaylova, Nikita Nangia, Vlad NiculaeACL 2019 · DOI

Introduction

Natural language is inherently hierarchical and compositional. While modern "black-box" architectures like LSTMs and Transformers have achieved remarkable success, they often treat language as a flat sequence, potentially ignoring the underlying structures—such as trees, sequences, and alignments—that linguists have long studied. Manually annotating these structures is a bottleneck: it is expensive, slow, and may not always align with the needs of a specific downstream task.

Latent structure modeling offers a solution by allowing neural networks to discover their own internal structural representations. Instead of relying on gold-standard parses, these models learn to induce structure (e.g., a dependency tree) as a hidden variable while optimizing for a primary objective like machine translation or sentiment analysis.

The Challenge: The Argmax Problem

The primary technical hurdle in latent structure modeling is the non-differentiability of discrete operations. To select a specific structure, such as the most likely parse tree, a model typically employs an argmax operation. However, argmax is a step function with a gradient of zero almost everywhere, which prevents the use of standard backpropagation.

Training Paradigms

The research community has developed three primary strategies to overcome this "argmax" problem:

1. Reinforcement Learning (RL)

These methods treat the selection of a discrete structure as an "action" within a stochastic computation graph. By utilizing the REINFORCE algorithm (Williams, 1992) or other score function estimators, the model is rewarded based on how well the chosen structure minimizes the expected loss of the downstream task.

  • Advantages: High flexibility in the types of structures that can be modeled.
  • Challenges: High variance and training instability, often requiring sophisticated variance reduction techniques or actor-critic frameworks.

2. Surrogate Gradients

This approach approximates the gradient of discrete mappings using continuous relaxations. Notable techniques include the Straight-Through Estimator and the Gumbel-Softmax (reparameterization trick).

  • Advantages: Generally exhibits lower variance than RL-based methods.
  • Challenges: Introduces bias, as the gradient used during the backward pass does not perfectly correspond to the discrete operation performed during the forward pass.

3. End-to-End Differentiable Approaches

These methods replace the discrete argmax with a continuous relaxation, such as SparseMAP or structured attention mechanisms. These relaxations are designed to be exactly differentiable.

  • Advantages: Provides exact gradients for the relaxed objective and can produce "sparse" structures, allowing the model to focus on a small set of high-probability candidates.
  • Challenges: Can be computationally demanding and may be restricted to specific classes of substructures.

Insights and Applications

Incorporating structural priors serves as a powerful form of regularization. By imposing a structural bias, models often generalize better to unseen data and exhibit improved robustness. Furthermore, latent structures enhance interpretability; for instance, word alignments in translation tasks provide a transparent view of the model's internal logic.

Benchmarks and Discovery

Models are evaluated on diagnostic datasets like ListOps, which tests the ability to learn latent tree structures through nested operations. Beyond diagnostics, these methods have shown success in:

  • Unsupervised Discovery: Inducing word alignments or parse trees (Shen et al., 2019; Yogatama et al., 2017) without explicit supervision.
  • Hybrid Architectures: Combining latent vector representations with latent graph or tree structures for tasks like Natural Language Inference (NLI).

Future Directions

Despite progress, several questions remain. A key debate is whether the "trees" learned by these models reflect human linguistic syntax or are merely task-specific artifacts (Williams et al., 2018). Additionally, scaling these methods to long sequences remains a computational challenge due to the combinatorial complexity of the search space. Future work continues to explore the balance between linguistic plausibility and task performance.

This summary is based on the ACL 2019 tutorial by André F.T. Martins, Tsvetomila Mihaylova, Nikita Nangia, and Vlad Niculae.

Summary updated

BibTeX
@inproceedings{martins2019latent,
  author = {André F. T. Martins and Tsvetomila Mihaylova and Nikita Nangia and Vlad Niculae},
  title = {{Latent Structure Models for Natural Language Processing}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-4001},
}
Figure