Abstract
This paper introduces a novel approach to learning latent sentence structures, such as dependency trees, jointly with downstream natural language processing tasks. By utilizing SparseMAP, a structured inference method, the model produces a sparse distribution over possible structures. This technique allows for the creation of dynamic computation graphs that are both fully differentiable and computationally efficient, bridging the gap between exhaustive marginalization and non-differentiable MAP inference.
Introduction
Deep learning models in NLP often benefit from incorporating the underlying structural properties of language. For instance, understanding that a negation modifies a specific adjective is crucial for sentiment analysis. Historically, researchers have relied on two paradigms: using fixed, pre-trained off-the-shelf parsers or attempting to learn latent structures alongside the primary task.
Latent structure learning, however, typically faces a "tractability vs. differentiability" trade-off. Summing over all possible trees (marginalization) is computationally prohibitive, while selecting only the single best tree (MAP inference) is non-differentiable, hindering standard backpropagation. This paper proposes SparseMAP to overcome these limitations by selecting a small, manageable set of plausible structures.
Methods: The SparseMAP Framework
The core of the proposed architecture is the SparseMAP parser, which sits between dense marginalization and discrete selection.
- SparseMAP Inference: Instead of assigning a tiny probability to every possible tree, SparseMAP identifies a sparse set of likely dependency structures and assigns them weights.
- Dynamic Computation Graphs: For each input sentence, the model constructs a TreeLSTM for each identified tree.
- Differentiable Weighted Average: The final prediction is a weighted average of the outputs from these TreeLSTMs. Since the mapping from scores to weights is continuous and sparse, the entire pipeline can be trained end-to-end using gradient descent.
Experimental Evaluation
The authors evaluated the SparseMAP approach across several distinct NLP tasks:
- Sentence Classification: Subjectivity (Subj) and Stanford Sentiment Treebank (SST).
- Natural Language Inference (NLI): The SNLI corpus.
- Reverse Dictionary Lookup: Mapping dictionary definitions to word embeddings.
Key Results
The latent TreeLSTM achieved competitive results, notably outperforming fixed (off-line) dependency trees on the SST and SNLI datasets. As shown in the results table, the latent approach achieved 84.73% on SST compared to 83.25% for off-line trees.
Key Insights
- Interpretable Sparsity: By limiting active structures, the model provides clear interpretability, allowing researchers to visualize the specific trees the model considers for any given input.
- Task-Specific Syntax: The latent trees learned by the model often deviate from standard linguistic conventions. In sentiment tasks, the model frequently prefers flatter structures or symmetric coordination, suggesting that "optimal" syntax for a specific task may differ from general-purpose grammar.
- Global Structural Integrity: Unlike local attention mechanisms, SparseMAP maintains a global view, ensuring that the resulting structures are valid combinatorial objects (e.g., valid trees).
Limitations and Future Work
While SparseMAP is more efficient than marginalization, it still incurs a computational overhead compared to "flat" models like standard LSTMs. Training on SST was approximately 4.7x slower than using a fixed parser. Future research may explore extending this framework to other combinatorial structures, such as alignments or matchings, and conducting deeper comparisons with other differentiable argmax relaxations.
Summary updated